Isis 3 Programmer Reference
|
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group. More...
#include <AlphaCube.h>
Public Member Functions | |
AlphaCube (Cube &cube) | |
Constructs an AlphaCube object using a PVL object. More... | |
AlphaCube (int alphaSamples, int alphaLines, int betaSamples, int betaLines) | |
Constructs an AlphaCube object given alphaSamples, alphaLines, betaSamples and betaLines. More... | |
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. More... | |
~AlphaCube () | |
Destroys the AlphaCube object. More... | |
int | AlphaLines () const |
Returns the number of lines in the alpha cube. More... | |
int | AlphaSamples () const |
Returns the number of samples in the alpha cube. More... | |
int | BetaLines () const |
Returns the number of lines in the beta cube. More... | |
int | BetaSamples () const |
Returns the number of samples in the beta cube. More... | |
double | AlphaLine (double betaLine) |
Returns an alpha line given a beta line. More... | |
double | AlphaSample (double betaSample) |
Returns an alpha sample given a beta sample. More... | |
double | BetaLine (double alphaLine) |
Returns a beta line given an alpha line. More... | |
double | BetaSample (double alphaSample) |
Returns a beta sample given an alpha sample. More... | |
void | UpdateGroup (Cube &cube) |
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples, etc) in the proper group in a PVL object. More... | |
void | Rehash (AlphaCube &alphaCube) |
Merges two AlphaCube objects. More... | |
Private Member Functions | |
void | ComputeSlope () |
Computes the line and sample slopes. More... | |
Private Attributes | |
int | p_alphaLines |
The number of alpha lines in the cube. More... | |
int | p_alphaSamples |
The number of alpha samples in the cube. More... | |
int | p_betaLines |
The number of beta lines in the cube. More... | |
int | p_betaSamples |
The number of beta samples in the cube. More... | |
double | p_alphaStartingLine |
The starting alpha line. More... | |
double | p_alphaStartingSample |
The starting alpha sample. More... | |
double | p_alphaEndingLine |
The ending alpha line. More... | |
double | p_alphaEndingSample |
The ending alpha sample. More... | |
double | p_lineSlope |
The slope of the line. More... | |
double | p_sampSlope |
The slope of the sample set. More... | |
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.
Definition at line 46 of file AlphaCube.h.
Isis::AlphaCube::AlphaCube | ( | Cube & | cube | ) |
Constructs an AlphaCube object using a PVL object.
cube | The cube to write to |
Definition at line 20 of file AlphaCube.cpp.
References Isis::PvlObject::findGroup(), Isis::PvlObject::findObject(), Isis::PvlObject::hasGroup(), Isis::Cube::label(), Isis::Cube::lineCount(), and Isis::Cube::sampleCount().
Isis::AlphaCube::AlphaCube | ( | int | alphaSamples, |
int | alphaLines, | ||
int | betaSamples, | ||
int | betaLines | ||
) |
Constructs an AlphaCube object given alphaSamples, alphaLines, betaSamples and betaLines.
alphaSamples | Number of alpha samples in the cube |
alphaLines | Number of alpha lines in the cube |
betaSamples | Number of beta samples in the cube |
betaLines | Number of beta lines in the cube |
Definition at line 87 of file AlphaCube.cpp.
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.
alphaSamples | Number of alpha samples in the cube |
alphaLines | Number of alpha lines in the cube |
betaSamples | Number of beta samples in the cube |
betaLines | Number of beta lines in the cube |
alphaSs | Starting alpha sample |
alphaSl | Starting alpha line |
alphaEs | Ending alpha sample |
alphaEl | Ending alpha line |
Definition at line 61 of file AlphaCube.cpp.
|
inline |
Destroys the AlphaCube object.
Definition at line 60 of file AlphaCube.h.
|
inline |
Returns an alpha line given a beta line.
betaLine | The beta line |
Definition at line 109 of file AlphaCube.h.
References p_alphaStartingLine, and p_lineSlope.
Referenced by Isis::CSMCamera::parentLine(), Rehash(), Isis::Camera::SetImage(), and Isis::CSMCamera::SetImage().
|
inline |
Returns the number of lines in the alpha cube.
Definition at line 67 of file AlphaCube.h.
References p_alphaLines.
Referenced by Isis::Camera::ParentLines(), and Isis::MocLabels::ReadLabels().
|
inline |
Returns an alpha sample given a beta sample.
betaSample | The beta sample |
Definition at line 121 of file AlphaCube.h.
References p_alphaStartingSample, and p_sampSlope.
Referenced by Isis::CSMCamera::parentSample(), Rehash(), Isis::Camera::SetImage(), and Isis::CSMCamera::SetImage().
|
inline |
Returns the number of samples in the alpha cube.
Definition at line 77 of file AlphaCube.h.
References p_alphaSamples.
Referenced by Isis::Camera::ParentSamples(), and Isis::MocLabels::ReadLabels().
|
inline |
Returns a beta line given an alpha line.
alphaLine | The alpha line |
Definition at line 133 of file AlphaCube.h.
References p_alphaStartingLine, and p_lineSlope.
Referenced by Isis::Camera::RawFocalPlanetoImage(), Isis::CSMCamera::SetGround(), and Isis::Camera::SetRightAscensionDeclination().
|
inline |
Returns the number of lines in the beta cube.
Definition at line 87 of file AlphaCube.h.
References p_betaLines.
Referenced by Isis::Camera::CacheSize(), Isis::Camera::LoadCache(), Rehash(), and Isis::Camera::StartEndEphemerisTimes().
|
inline |
Returns a beta sample given an alpha sample.
alphaSample | The alpha sample |
Definition at line 145 of file AlphaCube.h.
References p_alphaStartingSample, and p_sampSlope.
Referenced by Isis::Camera::RawFocalPlanetoImage(), Isis::CSMCamera::SetGround(), and Isis::Camera::SetRightAscensionDeclination().
|
inline |
Returns the number of samples in the beta cube.
Definition at line 97 of file AlphaCube.h.
References p_betaSamples.
Referenced by Isis::Camera::LoadCache(), Rehash(), and Isis::Camera::StartEndEphemerisTimes().
|
private |
Computes the line and sample slopes.
(Starting and ending alpha lines/samples divided by the number of beta lines/samples).
Definition at line 178 of file AlphaCube.cpp.
void Isis::AlphaCube::Rehash | ( | AlphaCube & | add | ) |
Merges two AlphaCube objects.
This facilities combinations of programs crop-enlarge, crop-crop, reduce-pad, etc.
add | The AlphaCube object to be merged. |
Definition at line 108 of file AlphaCube.cpp.
References AlphaLine(), AlphaSample(), BetaLines(), and BetaSamples().
Referenced by 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.
&cube | The cube to write to. |
Definition at line 134 of file AlphaCube.cpp.
References Isis::PvlObject::addGroup(), Isis::PvlObject::findGroup(), Isis::PvlObject::findObject(), Isis::PvlObject::hasGroup(), Isis::Cube::label(), Rehash(), and Isis::toString().
Referenced by Isis::SubArea::UpdateLabel().
|
private |
The ending alpha line.
Definition at line 161 of file AlphaCube.h.
|
private |
The ending alpha sample.
Definition at line 162 of file AlphaCube.h.
|
private |
The number of alpha lines in the cube.
Definition at line 155 of file AlphaCube.h.
Referenced by AlphaLines().
|
private |
The number of alpha samples in the cube.
Definition at line 156 of file AlphaCube.h.
Referenced by AlphaSamples().
|
private |
The starting alpha line.
Definition at line 159 of file AlphaCube.h.
Referenced by AlphaLine(), and BetaLine().
|
private |
The starting alpha sample.
Definition at line 160 of file AlphaCube.h.
Referenced by AlphaSample(), and BetaSample().
|
private |
The number of beta lines in the cube.
Definition at line 157 of file AlphaCube.h.
Referenced by BetaLines().
|
private |
The number of beta samples in the cube.
Definition at line 158 of file AlphaCube.h.
Referenced by BetaSamples().
|
private |
The slope of the line.
Definition at line 163 of file AlphaCube.h.
Referenced by AlphaLine(), and BetaLine().
|
private |
The slope of the sample set.
Definition at line 164 of file AlphaCube.h.
Referenced by AlphaSample(), and BetaSample().