Isis 3 Programmer Reference
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;
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;
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;
105  if (p_camera->isTimeSet()) {
106  p_camera->setTime(p_camera->time().Et() + deltaT);
107  }
108  return true;
109  }
110 
111 
116  p_ss = (p_detectorSampleSumming / 2.0) + 0.5 +
117  (p_startingDetectorSample - 1.0);
118 
119  p_sl = (p_detectorLineSumming / 2.0) + 0.5 +
120  (p_startingDetectorLine - 1.0);
121  }
122 
123 
130  return p_ss;
131  }
132 
133 
140  return p_sl;
141  }
142 
143 
150  return p_parentSample;
151  }
152 
153 
160  return p_parentLine;
161  }
162 
163 
170  return p_detectorSample;
171  }
172 
173 
180  return p_detectorLine;
181  }
182 
183 
191  }
192 
193 
200  return p_detectorLineSumming;
201  }
202 
203 
210  return 0.0;
211  }
212 
213 
228  double CameraDetectorMap::exposureDuration(const double sample,
229  const double line,
230  const int band) const {
231  QString msg = "Exposure duration is only available for LineScan, VariableLineScan, "
232  "and PushFrame Cameras.";
234 
235  // This should never return
236  return -1;
237  }
238 }
239 
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:2384
double p_startingDetectorLine
Detector start coordinate line value.
virtual ~CameraDetectorMap()
Destructor.
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.
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:162
double DetectorSample() const
Return detector sample.
void Compute()
Compute new offsets whenenver summing or starting sample/lines change.
double p_startingDetectorSample
Detector start coordinate sample value.
virtual double SampleScaleFactor() const
Return scaling factor for computing sample resolution.
double p_parentSample
The parent sample calculated from the detector.
double p_detectorLineSumming
The scaling factor for computing line resolution.
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:40
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 AdjustedStartingSample() const
Return the starting detector sample adjusted for summation.
double p_sl
Start line.
double ParentSample() const
Return parent sample.
double p_detectorSampleSumming
The scaling factor for computing sample resolution.
double p_ss
Start sample.
virtual double LineRate() const
Return the line collection rate (0 for framing cameras)
double ParentLine() const
Return parent line.
double AdjustedStartingLine() const
Return the starting detector line adjusted for summation.
Isis exception class.
Definition: IException.h:107
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
virtual double LineScaleFactor() const
Return scaling factor for computing line resolution.
bool isTimeSet()
Returns true if time has been initialized.
Definition: Spice.cpp:1444
double DetectorLine() const
Return detector line.
Camera * p_camera
Pointer to the camera.
double p_detectorSample
Detector coordinate sample value.
double p_parentLine
The parent line calculated from the detector.
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition: iTime.h:139
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions...
Definition: Spice.cpp:809