Isis 3.0 Programmer Reference
Back | Home
CameraDetectorMap.cpp
Go to the documentation of this file.
1 
23 #include "CameraDetectorMap.h"
24 #include "iTime.h"
25 
26 namespace Isis {
32  p_camera = parent;
35  p_detectorSampleSumming = 1.0;
36  p_detectorLineSumming = 1.0;
37  Compute();
38  if (parent != 0) {
39  p_camera->SetDetectorMap(this);
40  }
41  }
42 
43 
46  }
47 
48 
59  bool CameraDetectorMap::SetDetector(const double sample,
60  const double line) {
61  p_detectorSample = sample;
62  p_detectorLine = line;
63  p_parentSample = (p_detectorSample - p_ss) / p_detectorSampleSumming + 1.0;
64  p_parentLine = (p_detectorLine - p_sl) / p_detectorLineSumming + 1.0;
65  return true;
66  }
67 
68 
79  bool CameraDetectorMap::SetParent(const double sample,
80  const double line) {
81  return CameraDetectorMap::SetParent(sample, line, 0.0);
82  }
83 
84 
98  bool CameraDetectorMap::SetParent(const double sample,
99  const double line,
100  const double deltaT) {
101  p_parentSample = sample;
102  p_parentLine = line;
103  p_detectorSample = (p_parentSample - 1.0) * p_detectorSampleSumming + p_ss;
104  p_detectorLine = (p_parentLine - 1.0) * p_detectorLineSumming + p_sl;
105  if (p_camera->isTimeSet()) {
106  p_camera->setTime(p_camera->time().Et() + deltaT);
107  }
108  return true;
109  }
110 
111 
114  p_ss = (p_detectorSampleSumming / 2.0) + 0.5 +
115  (p_startingDetectorSample - 1.0);
116 
117  p_sl = (p_detectorLineSumming / 2.0) + 0.5 +
118  (p_startingDetectorLine - 1.0);
119  }
120 
121 
124  return p_ss;
125  }
126 
127 
130  return p_sl;
131  }
132 
133 
136  return p_parentSample;
137  }
138 
139 
142  return p_parentLine;
143  }
144 
145 
148  return p_detectorSample;
149  }
150 
151 
154  return p_detectorLine;
155  }
156 
157 
160  return p_detectorSampleSumming;
161  }
162 
163 
166  return p_detectorLineSumming;
167  }
168 
169 
172  return 0.0;
173  }
174 
175 
190  double CameraDetectorMap::exposureDuration(const double sample,
191  const double line,
192  const int band) const {
193  QString msg = "Exposure duration is only available for LineScan, VariableLineScan, "
194  "and PushFrame Cameras.";
196 
197  // This should never return
198  return -1;
199  }
200 }
201 
virtual double SampleScaleFactor() const
Return scaling factor for computing sample resolution.
double ParentSample() const
Return parent sample.
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
CameraDetectorMap(Camera *parent=0)
Default constructor assumes no summing and starting detector offsets.
void SetDetectorMap(CameraDetectorMap *map)
Sets the Detector Map.
Definition: Camera.cpp:2441
virtual double LineScaleFactor() const
Return scaling factor for computing line resolution.
double p_startingDetectorLine
Detector start coordinate line value.
virtual ~CameraDetectorMap()
Destructor.
virtual double LineRate() const
Return the line collection rate (0 for framing cameras)
double DetectorLine() const
Return detector line.
virtual double exposureDuration(const double sample, const double line, const int band) const
This virtual method is for returning the exposure duration of a given pixel.
double ParentLine() const
Return parent line.
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:154
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition: iTime.h:135
void Compute()
Compute new offsets whenenver summing or starting sample/lines change.
double p_startingDetectorSample
Detector start coordinate sample value.
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
Definition: Spice.cpp:804
double AdjustedStartingSample() const
Return the starting detector sample adjusted for summation.
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:38
double p_detectorLine
Detector coordinate line value.
void setTime(const iTime &time)
By setting the time you essential set the position of the spacecraft and body as indicated in the cla...
Definition: Sensor.cpp:112
double p_sl
Start line.
double p_ss
Start sample.
double DetectorSample() const
Return detector sample.
Isis exception class.
Definition: IException.h:99
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
bool isTimeSet()
Returns true if time has been initialized.
Definition: Spice.cpp:1431
Camera * p_camera
Pointer to the camera.
double p_detectorSample
Detector coordinate sample value.
double AdjustedStartingLine() const
Return the starting detector line adjusted for summation.

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the ISIS Support Center
File Modified: 07/12/2023 23:15:29