USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::PushFrameCameraDetectorMap Class Reference

Convert between parent image coordinates and detector coordinates. More...

#include <PushFrameCameraDetectorMap.h>

Inheritance diagram for Isis::PushFrameCameraDetectorMap:
Inheritance graph
Collaboration diagram for Isis::PushFrameCameraDetectorMap:
Collaboration graph

Public Member Functions

 PushFrameCameraDetectorMap (Camera *parent, const double etStart, const double frameletRate, int frameletHeight)
 Construct a detector map for push frame cameras.
 
virtual ~PushFrameCameraDetectorMap ()
 Destructor.
 
virtual bool SetParent (const double sample, const double line)
 Compute detector position from a parent image coordinate.
 
virtual bool SetDetector (const double sample, const double line)
 Compute parent position from a detector coordinate.
 
double FrameletRate () const
 Return the time in seconds between framelets.
 
void SetFrameletRate (const double frameletRate)
 Reset the frame rate.
 
int FrameletOffset () const
 Return the frame offset.
 
void SetFrameletOffset (int frameletOffset)
 Reset the frame offset.
 
void SetFramelet (int framelet)
 This method changes the current framelet.
 
int Framelet ()
 This method returns the current framelet.
 
void SetBandFirstDetectorLine (int firstLine)
 Change the starting line in the detector based on band.
 
int GetBandFirstDetectorLine ()
 Return the starting line in the detector for the current band.
 
void SetStartTime (const double etStart)
 Reset the starting ephemeris time.
 
double StartEphemerisTime () const
 This returns the starting ET of this band.
 
void SetExposureDuration (double exposureDuration)
 Change the exposure duration in seconds.
 
void SetFrameletOrderReversed (bool frameletOrderReversed, int nframelets)
 Changes the direction of the framelets.
 
void SetFrameletsGeometricallyFlipped (bool frameletsFlipped)
 Mirrors the each framelet in the file.
 
int TotalFramelets () const
 Return the total number of framelets including padding.
 
double frameletSample () const
 This returns the calculated framelet sample.
 
double frameletLine () const
 This returns the calculated framelet line.
 
int frameletHeight () const
 This returns how many lines are considered a single framelet.
 
bool timeAscendingFramelets ()
 
double AdjustedStartingSample () const
 Return the starting detector sample adjusted for summation.
 
double AdjustedStartingLine () const
 Return the starting detector line adjusted for summation.
 
double ParentSample () const
 Return parent sample.
 
double ParentLine () const
 Return parent line.
 
double DetectorSample () const
 Return detector sample.
 
double DetectorLine () const
 Return detector line.
 
void SetStartingDetectorSample (const double sample)
 Set the starting detector sample.
 
void SetStartingDetectorLine (const double line)
 Set the starting detector line.
 
void SetDetectorSampleSumming (const double summing)
 Set sample summing mode.
 
void SetDetectorLineSumming (const double summing)
 Set line summing mode.
 
virtual double SampleScaleFactor () const
 Return scaling factor for computing sample resolution.
 
virtual double LineScaleFactor () const
 Return scaling factor for computing line resolution.
 
virtual double LineRate () const
 Return the line collection rate (0 for framing cameras)
 

Protected Attributes

Camerap_camera
 
double p_parentSample
 
double p_parentLine
 
double p_detectorLine
 
double p_detectorSample
 
double p_detectorSampleSumming
 
double p_detectorLineSumming
 
double p_startingDetectorSample
 
double p_startingDetectorLine
 
double p_ss
 
double p_sl
 

Private Attributes

double p_etStart
 Starting time at the top of the 1st parent line.
 
double p_exposureDuration
 Exposure duration in secs.
 
double p_frameletRate
 iTime between framelets in parent cube
 
int p_frameletHeight
 Height of a framelet in detector lines.
 
int p_bandStartDetector
 The first detector line of current band.
 
int p_frameletOffset
 The numner of framelets padding the top of the band.
 
int p_framelet
 The current framelet.
 
int p_nframelets
 If flipped framelets, the number of framelets in this band.
 
double p_frameletSample
 The sample in the current framelet.
 
double p_frameletLine
 The line in the current framelet.
 
bool p_flippedFramelets
 Indicates whether the geometry in a framelet is flipped.
 
bool p_timeAscendingFramelets
 Are framelets reversed from top-to-bottom in file.
 

Detailed Description

Convert between parent image coordinates and detector coordinates.

This class is used to convert between parent dector coordinates (sample/line) and detector coordinates for a push frame camera.

See Also
Camera
Author
2007-10-15 Steven Lambright
History:

2008-06-18 Steven Lambright Added documentation

2008-10-23 Steven Lambright Added optimizations, fixed misc. bugs

2009-03-07 Debbie A. Cook Removed reference to obsolute CameraDetectorMap methods

2009-06-02 Steven Lambright Fixed framelet detection in the forward direction and inside framelet check in the reverse direction

2012-07-06 Debbie A. Cook, Updated Spice members to be more compliant with Isis coding standards. References #972.

2014-04-17 Jeannie Backer - Renamed SetFlippedFramelets and SetGeometricallyFlippedFramelets to SetFrameletOrderReversed and SetFrameletsGeometricallyFlipped, respectively. Moved method implementations to cpp file. References #1659.

Definition at line 56 of file PushFrameCameraDetectorMap.h.

Constructor & Destructor Documentation

Isis::PushFrameCameraDetectorMap::PushFrameCameraDetectorMap ( Camera parent,
const double  etStart,
const double  frameletRate,
int  frameletHeight 
)

Construct a detector map for push frame cameras.

Parameters
parentThe parent camera model for the detector map
etStartstarting ephemeris time in seconds at the first framelet (not including padded framelets).
frameletRatethe time in seconds between framelets
frameletHeightPhysical height of framelet in lines (don't account for summing)

Definition at line 44 of file PushFrameCameraDetectorMap.cpp.

References frameletHeight(), p_bandStartDetector, p_etStart, p_exposureDuration, p_flippedFramelets, p_frameletHeight, p_frameletOffset, p_frameletRate, p_nframelets, and p_timeAscendingFramelets.

Isis::PushFrameCameraDetectorMap::~PushFrameCameraDetectorMap ( )
virtual

Destructor.

Definition at line 59 of file PushFrameCameraDetectorMap.cpp.

Member Function Documentation

double Isis::CameraDetectorMap::AdjustedStartingLine ( ) const
inherited

Return the starting detector line adjusted for summation.

Definition at line 93 of file CameraDetectorMap.cpp.

double Isis::CameraDetectorMap::AdjustedStartingSample ( ) const
inherited

Return the starting detector sample adjusted for summation.

Definition at line 88 of file CameraDetectorMap.cpp.

double Isis::CameraDetectorMap::DetectorLine ( ) const
inlineinherited

Return detector line.

Definition at line 89 of file CameraDetectorMap.h.

Referenced by Isis::Camera::SetImage().

double Isis::CameraDetectorMap::DetectorSample ( ) const
inlineinherited

Return detector sample.

Definition at line 84 of file CameraDetectorMap.h.

Referenced by Isis::Camera::SetImage().

int Isis::PushFrameCameraDetectorMap::Framelet ( )

This method returns the current framelet.

This framelet is calculated when SetParent is called.

Returns
int The current framelet

Definition at line 280 of file PushFrameCameraDetectorMap.cpp.

References p_framelet.

int Isis::PushFrameCameraDetectorMap::frameletHeight ( ) const

This returns how many lines are considered a single framelet.

Returns
int Number of lines in a framelet

Definition at line 399 of file PushFrameCameraDetectorMap.cpp.

References p_frameletHeight.

Referenced by Isis::PushFrameCameraGroundMap::FindDistance(), and PushFrameCameraDetectorMap().

double Isis::PushFrameCameraDetectorMap::frameletLine ( ) const

This returns the calculated framelet line.

Returns
double Current framelet line

Definition at line 388 of file PushFrameCameraDetectorMap.cpp.

References p_frameletLine.

Referenced by Isis::PushFrameCameraGroundMap::FindDistance().

int Isis::PushFrameCameraDetectorMap::FrameletOffset ( ) const

Return the frame offset.

Definition at line 269 of file PushFrameCameraDetectorMap.cpp.

References p_frameletOffset.

double Isis::PushFrameCameraDetectorMap::FrameletRate ( ) const

Return the time in seconds between framelets.

Definition at line 248 of file PushFrameCameraDetectorMap.cpp.

References p_frameletRate.

double Isis::PushFrameCameraDetectorMap::frameletSample ( ) const

This returns the calculated framelet sample.

Returns
double Current framelet sample

Definition at line 377 of file PushFrameCameraDetectorMap.cpp.

References p_frameletSample.

int Isis::PushFrameCameraDetectorMap::GetBandFirstDetectorLine ( )

Return the starting line in the detector for the current band.

Definition at line 303 of file PushFrameCameraDetectorMap.cpp.

References p_bandStartDetector.

virtual double Isis::CameraDetectorMap::LineRate ( ) const
inlinevirtualinherited

Return the line collection rate (0 for framing cameras)

Reimplemented in Isis::LineScanCameraDetectorMap, Isis::RadarPulseMap, and Isis::ApolloPanoramicDetectorMap.

Definition at line 158 of file CameraDetectorMap.h.

virtual double Isis::CameraDetectorMap::LineScaleFactor ( ) const
inlinevirtualinherited

Return scaling factor for computing line resolution.

Definition at line 153 of file CameraDetectorMap.h.

Referenced by Isis::PushFrameCameraGroundMap::FindDistance(), Isis::Camera::LineResolution(), Isis::ThemisIrCamera::SetBand(), SetDetector(), SetParent(), and TotalFramelets().

double Isis::CameraDetectorMap::ParentLine ( ) const
inlineinherited

Return parent line.

Definition at line 79 of file CameraDetectorMap.h.

Referenced by Isis::Camera::RawFocalPlanetoImage(), and Isis::Camera::SetRightAscensionDeclination().

double Isis::CameraDetectorMap::ParentSample ( ) const
inlineinherited

Return parent sample.

Definition at line 74 of file CameraDetectorMap.h.

Referenced by Isis::Camera::RawFocalPlanetoImage(), and Isis::Camera::SetRightAscensionDeclination().

virtual double Isis::CameraDetectorMap::SampleScaleFactor ( ) const
inlinevirtualinherited

Return scaling factor for computing sample resolution.

Definition at line 148 of file CameraDetectorMap.h.

Referenced by Isis::Camera::SampleResolution().

void Isis::PushFrameCameraDetectorMap::SetBandFirstDetectorLine ( int  firstLine)

Change the starting line in the detector based on band.

Use this method to change which line is read out of the CCD for any given band. That is, as the virtual SetBand method for the specfic camera is invoked this method should be called.

Parameters
firstLine0-based offset to the first line (first line of detector = 0)

Definition at line 296 of file PushFrameCameraDetectorMap.cpp.

References p_bandStartDetector.

Referenced by Isis::ThemisVisCamera::BandEphemerisTimeOffset(), Isis::MarciCamera::SetBand(), and Isis::LroWideAngleCamera::SetBand().

bool Isis::PushFrameCameraDetectorMap::SetDetector ( const double  sample,
const double  line 
)
virtual

Compute parent position from a detector coordinate.

This method will compute a parent sample given a detector coordinate. The parent line and framelet line will be computed.

Parameters
sampleSample number in the detector
lineLine number in the detector
Returns
conversion successful

Reimplemented from Isis::CameraDetectorMap.

Definition at line 75 of file PushFrameCameraDetectorMap.cpp.

References Isis::CameraDetectorMap::LineScaleFactor(), p_bandStartDetector, p_flippedFramelets, p_framelet, p_frameletHeight, p_frameletLine, p_frameletSample, and Isis::CameraDetectorMap::SetDetector().

Referenced by Isis::PushFrameCameraGroundMap::FindDistance().

void Isis::PushFrameCameraDetectorMap::SetExposureDuration ( double  exposureDuration)

Change the exposure duration in seconds.

Use this method to change the exposure duration of each framelet which may be different than the framelet rate.

Parameters
exposureDuration

Definition at line 226 of file PushFrameCameraDetectorMap.cpp.

References p_exposureDuration.

void Isis::PushFrameCameraDetectorMap::SetFramelet ( int  framelet)

This method changes the current framelet.

The camera's ephemeris time will be updated to the center of the framelet.

Parameters
frameletCurrent Framelet

Definition at line 180 of file PushFrameCameraDetectorMap.cpp.

References p_etStart, p_exposureDuration, p_framelet, p_frameletOffset, p_frameletRate, p_nframelets, p_timeAscendingFramelets, and Isis::Sensor::setTime().

Referenced by Isis::PushFrameCameraGroundMap::FindDistance(), Isis::PushFrameCameraGroundMap::FindSpacecraftDistance(), Isis::PushFrameCameraGroundMap::SetGround(), and SetParent().

void Isis::PushFrameCameraDetectorMap::SetFrameletOffset ( int  frameletOffset)

Reset the frame offset.

Use this method to reset the frame offset. Usually this will not need to be done unless the offset changes between bands.

Parameters
frameletOffsetNumber of frames offset in cube

Definition at line 262 of file PushFrameCameraDetectorMap.cpp.

References p_frameletOffset.

Referenced by Isis::MarciCamera::SetBand(), and Isis::LroWideAngleCamera::SetBand().

void Isis::PushFrameCameraDetectorMap::SetFrameletOrderReversed ( bool  frameletOrderReversed,
int  nframelets 
)

Changes the direction of the framelets.

Use this method to change which direction the framelets are ordered. In some cases, the top framelet from the raw instrument data has been moved to the bottom of the image and this compensates for that.

If not set, the default is to not flip the framelet order

Parameters
frameletOrderReversedIndicates whether the order of the framelets is should be flipped
nframeletsNumber of framelets in each band, ignored if frameletsReversed is set to false

Definition at line 324 of file PushFrameCameraDetectorMap.cpp.

References p_nframelets, and p_timeAscendingFramelets.

Referenced by Isis::LroWideAngleCamera::LroWideAngleCamera(), Isis::MarciCamera::MarciCamera(), and Isis::ThemisVisCamera::ThemisVisCamera().

void Isis::PushFrameCameraDetectorMap::SetFrameletRate ( const double  frameletRate)

Reset the frame rate.

Use this method to reset the time between framelets. Usually this will not need to be done unless the rate changes between bands.

Parameters
frameletRatethe time in seconds between framelets

Definition at line 241 of file PushFrameCameraDetectorMap.cpp.

References p_frameletRate.

void Isis::PushFrameCameraDetectorMap::SetFrameletsGeometricallyFlipped ( bool  frameletsFlipped)

Mirrors the each framelet in the file.

Use this method to change which direction the framelets are geometrically placed. If the first line in the framelet has been changed to the last line in the framelet, then this should be true (DEFAULT).

If not set, the default is true.

Parameters
frameletsFlippedIndicates whether each framelet is flipped over a horizontal axis

Definition at line 343 of file PushFrameCameraDetectorMap.cpp.

References p_flippedFramelets.

Referenced by Isis::LroWideAngleCamera::LroWideAngleCamera(), and Isis::MarciCamera::MarciCamera().

bool Isis::PushFrameCameraDetectorMap::SetParent ( const double  sample,
const double  line 
)
virtual

Compute detector position from a parent image coordinate.

This method will compute the detector position and framelet position from the parent line/sample coordinate. The parent line will be used to set the appropriate time in the parent camera.

Parameters
sampleSample number in the parent image
lineLine number in the parent image
Returns
conversion successful

Reimplemented from Isis::CameraDetectorMap.

Definition at line 134 of file PushFrameCameraDetectorMap.cpp.

References Isis::CameraDetectorMap::LineScaleFactor(), p_bandStartDetector, p_flippedFramelets, p_frameletHeight, p_frameletLine, p_frameletSample, SetFramelet(), and Isis::CameraDetectorMap::SetParent().

void Isis::CameraDetectorMap::SetStartingDetectorLine ( const double  line)
inlineinherited

Set the starting detector line.

Use this method to specify the starting detector that represents the first image line in the cube. If not set the default is 1.

Parameters
lineStarting detector line

Definition at line 114 of file CameraDetectorMap.h.

References Isis::CameraDetectorMap::Compute().

Referenced by Isis::AmicaCamera::AmicaCamera(), and Isis::MdisCamera::MdisCamera().

void Isis::CameraDetectorMap::SetStartingDetectorSample ( const double  sample)
inlineinherited
void Isis::PushFrameCameraDetectorMap::SetStartTime ( const double  etStart)

Reset the starting ephemeris time.

Use this method to reset the starting time of the top edge of the first line in the parent image. That is the time, prior to cropping, scaling, or padding. Usually this will not need to be done unless the time changes between bands.

Parameters
etStartstarting ephemeris time in seconds

Definition at line 213 of file PushFrameCameraDetectorMap.cpp.

References p_etStart.

Referenced by Isis::ThemisVisCamera::SetBand().

double Isis::PushFrameCameraDetectorMap::StartEphemerisTime ( ) const

This returns the starting ET of this band.

Returns
double Starting time (often band-dependant)

Definition at line 355 of file PushFrameCameraDetectorMap.cpp.

References p_etStart.

int Isis::PushFrameCameraDetectorMap::TotalFramelets ( ) const

Return the total number of framelets including padding.

Returns
int

Definition at line 366 of file PushFrameCameraDetectorMap.cpp.

References Isis::CameraDetectorMap::LineScaleFactor(), p_frameletHeight, and Isis::Camera::ParentLines().

Referenced by Isis::PushFrameCameraGroundMap::SetGround().

Member Data Documentation

int Isis::PushFrameCameraDetectorMap::p_bandStartDetector
private

The first detector line of current band.

Definition at line 96 of file PushFrameCameraDetectorMap.h.

Referenced by GetBandFirstDetectorLine(), PushFrameCameraDetectorMap(), SetBandFirstDetectorLine(), SetDetector(), and SetParent().

double Isis::PushFrameCameraDetectorMap::p_etStart
private

Starting time at the top of the 1st parent line.

Definition at line 92 of file PushFrameCameraDetectorMap.h.

Referenced by PushFrameCameraDetectorMap(), SetFramelet(), SetStartTime(), and StartEphemerisTime().

double Isis::PushFrameCameraDetectorMap::p_exposureDuration
private

Exposure duration in secs.

Definition at line 93 of file PushFrameCameraDetectorMap.h.

Referenced by PushFrameCameraDetectorMap(), SetExposureDuration(), and SetFramelet().

bool Isis::PushFrameCameraDetectorMap::p_flippedFramelets
private

Indicates whether the geometry in a framelet is flipped.

Definition at line 104 of file PushFrameCameraDetectorMap.h.

Referenced by PushFrameCameraDetectorMap(), SetDetector(), SetFrameletsGeometricallyFlipped(), and SetParent().

int Isis::PushFrameCameraDetectorMap::p_framelet
private

The current framelet.

Definition at line 98 of file PushFrameCameraDetectorMap.h.

Referenced by Framelet(), SetDetector(), and SetFramelet().

int Isis::PushFrameCameraDetectorMap::p_frameletHeight
private

Height of a framelet in detector lines.

Definition at line 95 of file PushFrameCameraDetectorMap.h.

Referenced by frameletHeight(), PushFrameCameraDetectorMap(), SetDetector(), SetParent(), and TotalFramelets().

double Isis::PushFrameCameraDetectorMap::p_frameletLine
private

The line in the current framelet.

Definition at line 102 of file PushFrameCameraDetectorMap.h.

Referenced by frameletLine(), SetDetector(), and SetParent().

int Isis::PushFrameCameraDetectorMap::p_frameletOffset
private

The numner of framelets padding the top of the band.

Definition at line 97 of file PushFrameCameraDetectorMap.h.

Referenced by FrameletOffset(), PushFrameCameraDetectorMap(), SetFramelet(), and SetFrameletOffset().

double Isis::PushFrameCameraDetectorMap::p_frameletRate
private

iTime between framelets in parent cube

Definition at line 94 of file PushFrameCameraDetectorMap.h.

Referenced by FrameletRate(), PushFrameCameraDetectorMap(), SetFramelet(), and SetFrameletRate().

double Isis::PushFrameCameraDetectorMap::p_frameletSample
private

The sample in the current framelet.

Definition at line 101 of file PushFrameCameraDetectorMap.h.

Referenced by frameletSample(), SetDetector(), and SetParent().

int Isis::PushFrameCameraDetectorMap::p_nframelets
private

If flipped framelets, the number of framelets in this band.

Definition at line 99 of file PushFrameCameraDetectorMap.h.

Referenced by PushFrameCameraDetectorMap(), SetFramelet(), and SetFrameletOrderReversed().

bool Isis::PushFrameCameraDetectorMap::p_timeAscendingFramelets
private

Are framelets reversed from top-to-bottom in file.

Definition at line 105 of file PushFrameCameraDetectorMap.h.

Referenced by PushFrameCameraDetectorMap(), SetFramelet(), and SetFrameletOrderReversed().


The documentation for this class was generated from the following files: