Isis 3 Programmer Reference
LineScanCameraDetectorMap.cpp
1
6/* SPDX-License-Identifier: CC0-1.0 */
7
8#include "LineScanCameraDetectorMap.h"
9
10#include "CameraFocalPlaneMap.h"
11#include "iTime.h"
12
13namespace Isis {
14
24 const double etStart,
25 const double lineRate) :
26 CameraDetectorMap(parent) {
27 p_etStart = etStart;
28 p_lineRate = lineRate;
29 }
30
31
35
36
47 void LineScanCameraDetectorMap::SetStartTime(const double etStart) {
48 p_etStart = etStart;
49 }
50
51
60 void LineScanCameraDetectorMap::SetLineRate(const double lineRate) {
61 p_lineRate = lineRate;
62 }
63
64
71 return p_lineRate;
72 }
73
74
86 bool LineScanCameraDetectorMap::SetDetector(const double sample,
87 const double line) {
88
89 if(!CameraDetectorMap::SetDetector(sample, line)) {
90 return false;
91 }
92 double etDiff = p_camera->time().Et() - p_etStart;
93 p_parentLine = etDiff / p_lineRate + 0.5;
94 return true;
95
96 }
97
98
110 bool LineScanCameraDetectorMap::SetParent(const double sample,
111 const double line) {
112 return SetParent(sample, line, 0.0);
113 }
114
115
128 bool LineScanCameraDetectorMap::SetParent(const double sample,
129 const double line,
130 const double deltaT) {
131
132 if(!CameraDetectorMap::SetParent(sample, line)) {
133 return false;
134 }
136 double etLine = p_etStart + p_lineRate * (line - 0.5);
137 p_camera->setTime(etLine + deltaT);
138 return true;
139
140 }
141
142
150 return p_etStart;
151 }
152
153
176 const double line,
177 const int band) const {
178 return LineRate();
179 }
180
181}
Convert between parent image coordinates and detector coordinates.
double p_parentLine
The parent line calculated from the detector.
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
double p_detectorLine
Detector coordinate line value.
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
Camera * p_camera
Pointer to the camera.
CameraFocalPlaneMap * FocalPlaneMap()
Returns a pointer to the CameraFocalPlaneMap object.
Definition Camera.cpp:2866
virtual bool SetDetector(const double sample, const double line)
Compute parent position from a detector coordinate.
virtual bool SetParent(const double sample, const double line)
Compute detector position from a parent image coordinate.
LineScanCameraDetectorMap(Camera *parent, const double etStart, const double lineRate)
Construct a detector map for line scan cameras.
double StartTime() const
Access the starting time at the top edge of the first line in the parent image.
virtual double exposureDuration(const double sample, const double line, const int band) const
@breif This virtual method is for returning the exposure duration of a pixel.
void SetStartTime(const double etStart)
Reset the starting ephemeris time.
double p_etStart
Starting time at the top of the first parent line.
void SetLineRate(const double lineRate)
Reset the line rate.
double LineRate() const
Access the time, in seconds, between scan lines.
double p_lineRate
Time, in seconds, between lines in parent cube.
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
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16