Isis Developer Reference
Isis::AlphaCube Class Reference

This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group. More...

#include <AlphaCube.h>

Collaboration diagram for Isis::AlphaCube:
Collaboration graph

Public Member Functions

 AlphaCube (Cube &cube)
 Constructs an AlphaCube object using a PVL object.
 
 AlphaCube (int alphaSamples, int alphaLines, int betaSamples, int betaLines)
 Constructs an AlphaCube object given alphaSamples, alphaLines, betaSamples and betaLines.
 
 AlphaCube (int alphaSamples, int alphaLines, int betaSamples, int betaLines, double alphaSs, double alphaSl, double alphaEs, double alphaEl)
 Constructs an AlphaCube object with a basic mapping from corner-to-corner, beta 0.5,0.5 maps to alpha 0.5,0.5 and beta ns+0.5,nl+0.5 maps to alpha ns+0.5, nl+0.5.
 
 ~AlphaCube ()
 Destroys the AlphaCube object.
 
int AlphaLines () const
 Returns the number of lines in the alpha cube.
 
int AlphaSamples () const
 Returns the number of samples in the alpha cube.
 
int BetaLines () const
 Returns the number of lines in the beta cube.
 
int BetaSamples () const
 Returns the number of samples in the beta cube.
 
double AlphaLine (double betaLine)
 Returns an alpha line given a beta line.
 
double AlphaSample (double betaSample)
 Returns an alpha sample given a beta sample.
 
double BetaLine (double alphaLine)
 Returns a beta line given an alpha line.
 
double BetaSample (double alphaSample)
 Returns a beta sample given an alpha sample.
 
void UpdateGroup (Cube &cube)
 Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples, etc) in the proper group in a PVL object.
 
void Rehash (AlphaCube &alphaCube)
 Merges two AlphaCube objects.
 

Detailed Description

This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group.

This class allows programmers to map cube pixel positions back to the first cube they came from.This is critical for camera models or radiometric models in order to map input cube pixels to camera detector position. The alpha keywords are automatically generated in programs like crop, pad, reduce, and enlarge.

Author
2004-02-13 Jeff Anderson

Constructor & Destructor Documentation

◆ AlphaCube() [1/3]

Isis::AlphaCube::AlphaCube ( Cube & cube)

Constructs an AlphaCube object using a PVL object.

Parameters
cubeThe cube to write to

References Isis::PvlObject::findObject(), Isis::Cube::label(), Isis::Cube::lineCount(), and Isis::Cube::sampleCount().

◆ AlphaCube() [2/3]

Isis::AlphaCube::AlphaCube ( int alphaSamples,
int alphaLines,
int betaSamples,
int betaLines )

Constructs an AlphaCube object given alphaSamples, alphaLines, betaSamples and betaLines.

Parameters
alphaSamplesNumber of alpha samples in the cube
alphaLinesNumber of alpha lines in the cube
betaSamplesNumber of beta samples in the cube
betaLinesNumber of beta lines in the cube

◆ AlphaCube() [3/3]

Isis::AlphaCube::AlphaCube ( int alphaSamples,
int alphaLines,
int betaSamples,
int betaLines,
double alphaSs,
double alphaSl,
double alphaEs,
double alphaEl )

Constructs an AlphaCube object with a basic mapping from corner-to-corner, beta 0.5,0.5 maps to alpha 0.5,0.5 and beta ns+0.5,nl+0.5 maps to alpha ns+0.5, nl+0.5.

Parameters
alphaSamplesNumber of alpha samples in the cube
alphaLinesNumber of alpha lines in the cube
betaSamplesNumber of beta samples in the cube
betaLinesNumber of beta lines in the cube
alphaSsStarting alpha sample
alphaSlStarting alpha line
alphaEsEnding alpha sample
alphaElEnding alpha line

◆ ~AlphaCube()

Isis::AlphaCube::~AlphaCube ( )
inline

Destroys the AlphaCube object.

Member Function Documentation

◆ AlphaLine()

double Isis::AlphaCube::AlphaLine ( double betaLine)
inline

Returns an alpha line given a beta line.

Parameters
betaLineThe beta line
Returns
double Beta line

Referenced by Isis::CSMCamera::parentLine(), Rehash(), Isis::Camera::SetImage(), Isis::CSMCamera::SetImage(), and Isis::Camera::SetImage().

◆ AlphaLines()

int Isis::AlphaCube::AlphaLines ( ) const
inline

Returns the number of lines in the alpha cube.

Returns
int Number of lines in the alpha cube

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

◆ AlphaSample()

double Isis::AlphaCube::AlphaSample ( double betaSample)
inline

Returns an alpha sample given a beta sample.

Parameters
betaSampleThe beta sample
Returns
double Beta sample

Referenced by Isis::CSMCamera::parentSample(), Rehash(), Isis::Camera::SetImage(), Isis::CSMCamera::SetImage(), and Isis::Camera::SetImage().

◆ AlphaSamples()

int Isis::AlphaCube::AlphaSamples ( ) const
inline

Returns the number of samples in the alpha cube.

Returns
int Number of samples in the alpha cube

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

◆ BetaLine()

double Isis::AlphaCube::BetaLine ( double alphaLine)
inline

Returns a beta line given an alpha line.

Parameters
alphaLineThe alpha line
Returns
double Alpha line

Referenced by Isis::CSMCamera::SetGround(), and Isis::Camera::SetRightAscensionDeclination().

◆ BetaLines()

int Isis::AlphaCube::BetaLines ( ) const
inline

Returns the number of lines in the beta cube.

Returns
int Number of lines in the beta cube

Referenced by Isis::Camera::CacheSize(), Isis::Camera::LoadCache(), Rehash(), and Isis::Camera::StartEndEphemerisTimes().

◆ BetaSample()

double Isis::AlphaCube::BetaSample ( double alphaSample)
inline

Returns a beta sample given an alpha sample.

Parameters
alphaSampleThe alpha sample
Returns
double Alpha sample

Referenced by Isis::CSMCamera::SetGround(), and Isis::Camera::SetRightAscensionDeclination().

◆ BetaSamples()

int Isis::AlphaCube::BetaSamples ( ) const
inline

Returns the number of samples in the beta cube.

Returns
int Number of samples in the beta cube

Referenced by Isis::Camera::LoadCache(), Rehash(), and Isis::Camera::StartEndEphemerisTimes().

◆ Rehash()

void Isis::AlphaCube::Rehash ( AlphaCube & add)

Merges two AlphaCube objects.

This facilities combinations of programs crop-enlarge, crop-crop, reduce-pad, etc.

Parameters
addThe AlphaCube object to be merged.

References AlphaLine(), AlphaSample(), BetaLines(), and BetaSamples().

◆ UpdateGroup()

void Isis::AlphaCube::UpdateGroup ( Isis::Cube & cube)

Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples, etc) in the proper group in a PVL object.

It chooses first to write and AlphaGroup if the Mapping group exists. If not then is will write the keywords in the Instrument group if it exists. Otherwise it will write to the AlphaCube group.

Parameters
&cubeThe cube to write to.

References Isis::PvlObject::findObject(), Isis::Cube::label(), and Isis::toString().


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