29 bool MocWideAngleDetectorMap::SetDetector(
const double sample,
31 if(!LineScanCameraDetectorMap::SetDetector(sample, line))
return false;
33 if((p_moclab->CrosstrackSumming() == 13) ||
34 (p_moclab->CrosstrackSumming() == 27)) {
35 int detector = (int) sample;
36 if(detector < 1) detector = 1;
37 if(detector >= p_moclab->Detectors()) detector = p_moclab->Detectors() - 1;
38 double samp1 = p_moclab->Sample(detector - 1);
39 double samp2 = p_moclab->Sample(detector);
40 if(samp1 < 0.0)
return false;
41 if(samp2 < 0.0)
return false;
43 double m = (samp2 - samp1);
44 p_parentSample = m * (sample - detector) + samp2;
57 bool MocWideAngleDetectorMap::SetParent(
const double sample,
59 if(!LineScanCameraDetectorMap::SetParent(sample, line))
return false;
62 if((p_moclab->CrosstrackSumming() == 13) ||
63 (p_moclab->CrosstrackSumming() == 27)) {
64 int isamp = (int) sample;
66 p_detectorSample = p_moclab->StartDetector(1);
67 p_detectorSample += sample - 1.0;
69 else if(isamp > p_camera->Samples()) {
70 p_detectorSample = p_moclab->StartDetector(p_camera->Samples());
71 p_detectorSample += sample - p_camera->Samples();
74 int ss = p_moclab->StartDetector(isamp - 1);
75 int es = p_moclab->EndDetector(isamp - 1);
76 double samp1 = (ss + es) / 2.0;
78 ss = p_moclab->StartDetector(isamp);
79 es = p_moclab->EndDetector(isamp);
80 double samp2 = (ss + es) / 2.0;
82 double m = (samp2 - samp1);
83 p_detectorSample = m * (sample - isamp) + samp1;
Unless noted otherwise, the portions of Isis written by the USGS are public domain.
Namespace for the standard library.
Namespace for ISIS/Bullet specific routines.