Isis 3 Programmer Reference
CameraDetectorMap.cpp
1
6/* SPDX-License-Identifier: CC0-1.0 */
7#include "CameraDetectorMap.h"
8#include "iTime.h"
9
10namespace Isis {
16 p_camera = parent;
21 Compute();
22 if (parent != 0) {
24 }
25 }
26
27
31
32
43 bool CameraDetectorMap::SetDetector(const double sample,
44 const double line) {
45 p_detectorSample = sample;
46 p_detectorLine = line;
49 return true;
50 }
51
52
63 bool CameraDetectorMap::SetParent(const double sample,
64 const double line) {
65 return CameraDetectorMap::SetParent(sample, line, 0.0);
66 }
67
68
82 bool CameraDetectorMap::SetParent(const double sample,
83 const double line,
84 const double deltaT) {
85 p_parentSample = sample;
86 p_parentLine = line;
89 if (p_camera->isTimeSet()) {
90 p_camera->setTime(p_camera->time().Et() + deltaT);
91 }
92 return true;
93 }
94
95
100 p_ss = (p_detectorSampleSumming / 2.0) + 0.5 +
102
103 p_sl = (p_detectorLineSumming / 2.0) + 0.5 +
105 }
106
107
114 return p_ss;
115 }
116
117
124 return p_sl;
125 }
126
127
134 return p_parentSample;
135 }
136
137
144 return p_parentLine;
145 }
146
147
154 return p_detectorSample;
155 }
156
157
164 return p_detectorLine;
165 }
166
167
176
177
186
187
194 return 0.0;
195 }
196
197
212 double CameraDetectorMap::exposureDuration(const double sample,
213 const double line,
214 const int band) const {
215 QString msg = "Exposure duration is only available for LineScan, VariableLineScan, "
216 "and PushFrame Cameras.";
217 throw IException(IException::Programmer, msg, _FILEINFO_);
218
219 // This should never return
220 return -1;
221 }
222}
223
double p_detectorLineSumming
The scaling factor for computing line resolution.
double ParentSample() const
Return parent sample.
double ParentLine() const
Return parent line.
double DetectorLine() const
Return detector line.
CameraDetectorMap(Camera *parent=0)
Default constructor assumes no summing and starting detector offsets.
double p_parentLine
The parent line calculated from the detector.
virtual double LineScaleFactor() const
Return scaling factor for computing line resolution.
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
double DetectorSample() const
Return detector sample.
double p_parentSample
The parent sample calculated from the detector.
virtual double SampleScaleFactor() const
Return scaling factor for computing sample resolution.
double p_detectorSample
Detector coordinate sample value.
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 p_detectorLine
Detector coordinate line value.
virtual double LineRate() const
Return the line collection rate (0 for framing cameras)
void Compute()
Compute new offsets whenenver summing or starting sample/lines change.
double AdjustedStartingLine() const
Return the starting detector line adjusted for summation.
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
double p_startingDetectorSample
Detector start coordinate sample value.
double AdjustedStartingSample() const
Return the starting detector sample adjusted for summation.
double p_ss
Start sample.
double p_startingDetectorLine
Detector start coordinate line value.
virtual ~CameraDetectorMap()
Destructor.
Camera * p_camera
Pointer to the camera.
double p_detectorSampleSumming
The scaling factor for computing sample resolution.
void SetDetectorMap(CameraDetectorMap *map)
Sets the Detector Map.
Definition Camera.cpp:2402
Isis exception class.
Definition IException.h:91
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition IException.h:146
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:99
virtual iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
Definition Spice.cpp:891
bool isTimeSet()
Returns true if time has been initialized.
Definition Spice.cpp:1589
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16