Isis 3 Programmer Reference
CameraDetectorMap.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 #include "CameraDetectorMap.h"
8 #include "iTime.h"
9 
10 namespace Isis {
16  p_camera = parent;
21  Compute();
22  if (parent != 0) {
23  p_camera->SetDetectorMap(this);
24  }
25  }
26 
27 
30  }
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 +
101  (p_startingDetectorSample - 1.0);
102 
103  p_sl = (p_detectorLineSumming / 2.0) + 0.5 +
104  (p_startingDetectorLine - 1.0);
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 
175  }
176 
177 
184  return p_detectorLineSumming;
185  }
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 
Isis::Spice::time
iTime time() const
Returns the ephemeris time in seconds which was used to obtain the spacecraft and sun positions.
Definition: Spice.cpp:884
Isis::CameraDetectorMap::p_parentLine
double p_parentLine
The parent line calculated from the detector.
Definition: CameraDetectorMap.h:141
Isis::Camera::SetDetectorMap
void SetDetectorMap(CameraDetectorMap *map)
Sets the Detector Map.
Definition: Camera.cpp:2372
Isis::CameraDetectorMap::DetectorSample
double DetectorSample() const
Return detector sample.
Definition: CameraDetectorMap.cpp:153
Isis::CameraDetectorMap::p_startingDetectorSample
double p_startingDetectorSample
Detector start coordinate sample value.
Definition: CameraDetectorMap.h:147
Isis::CameraDetectorMap::p_startingDetectorLine
double p_startingDetectorLine
Detector start coordinate line value.
Definition: CameraDetectorMap.h:148
Isis::CameraDetectorMap::SampleScaleFactor
virtual double SampleScaleFactor() const
Return scaling factor for computing sample resolution.
Definition: CameraDetectorMap.cpp:173
Isis::CameraDetectorMap::SetParent
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
Definition: CameraDetectorMap.cpp:63
Isis::CameraDetectorMap::~CameraDetectorMap
virtual ~CameraDetectorMap()
Destructor.
Definition: CameraDetectorMap.cpp:29
Isis::CameraDetectorMap::p_parentSample
double p_parentSample
The parent sample calculated from the detector.
Definition: CameraDetectorMap.h:140
Isis::Camera
Definition: Camera.h:236
Isis::CameraDetectorMap::Compute
void Compute()
Compute new offsets whenenver summing or starting sample/lines change.
Definition: CameraDetectorMap.cpp:99
Isis::CameraDetectorMap::p_detectorLineSumming
double p_detectorLineSumming
The scaling factor for computing line resolution.
Definition: CameraDetectorMap.h:146
Isis::CameraDetectorMap::exposureDuration
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.
Definition: CameraDetectorMap.cpp:212
Isis::CameraDetectorMap::p_detectorLine
double p_detectorLine
Detector coordinate line value.
Definition: CameraDetectorMap.h:142
Isis::Sensor::setTime
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:97
Isis::iTime::Et
double Et() const
Returns the ephemeris time (TDB) representation of the time as a double.
Definition: iTime.h:126
Isis::CameraDetectorMap::p_detectorSampleSumming
double p_detectorSampleSumming
The scaling factor for computing sample resolution.
Definition: CameraDetectorMap.h:145
Isis::CameraDetectorMap::ParentSample
double ParentSample() const
Return parent sample.
Definition: CameraDetectorMap.cpp:133
Isis::IException
Isis exception class.
Definition: IException.h:91
Isis::CameraDetectorMap::SetDetector
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
Definition: CameraDetectorMap.cpp:43
Isis::CameraDetectorMap::LineScaleFactor
virtual double LineScaleFactor() const
Return scaling factor for computing line resolution.
Definition: CameraDetectorMap.cpp:183
Isis::CameraDetectorMap::DetectorLine
double DetectorLine() const
Return detector line.
Definition: CameraDetectorMap.cpp:163
Isis::CameraDetectorMap::AdjustedStartingSample
double AdjustedStartingSample() const
Return the starting detector sample adjusted for summation.
Definition: CameraDetectorMap.cpp:113
Isis::CameraDetectorMap::p_sl
double p_sl
Start line.
Definition: CameraDetectorMap.h:151
Isis::CameraDetectorMap::p_camera
Camera * p_camera
Pointer to the camera.
Definition: CameraDetectorMap.h:138
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
Isis::CameraDetectorMap::AdjustedStartingLine
double AdjustedStartingLine() const
Return the starting detector line adjusted for summation.
Definition: CameraDetectorMap.cpp:123
Isis::CameraDetectorMap::p_detectorSample
double p_detectorSample
Detector coordinate sample value.
Definition: CameraDetectorMap.h:143
Isis::Spice::isTimeSet
bool isTimeSet()
Returns true if time has been initialized.
Definition: Spice.cpp:1577
Isis::CameraDetectorMap::p_ss
double p_ss
Start sample.
Definition: CameraDetectorMap.h:150
Isis::CameraDetectorMap::LineRate
virtual double LineRate() const
Return the line collection rate (0 for framing cameras)
Definition: CameraDetectorMap.cpp:193
Isis::CameraDetectorMap::ParentLine
double ParentLine() const
Return parent line.
Definition: CameraDetectorMap.cpp:143
Isis::CameraDetectorMap::CameraDetectorMap
CameraDetectorMap(Camera *parent=0)
Default constructor assumes no summing and starting detector offsets.
Definition: CameraDetectorMap.cpp:15
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16