35 AlphaCube::AlphaCube(
Cube &cube) {
39 p_alphaSamples = alpha[
"AlphaSamples"];
40 p_alphaLines = alpha[
"AlphaLines"];
41 p_alphaStartingSample = alpha[
"AlphaStartingSample"];
42 p_alphaStartingLine = alpha[
"AlphaStartingLine"];
43 p_alphaEndingSample = alpha[
"AlphaEndingSample"];
44 p_alphaEndingLine = alpha[
"AlphaEndingLine"];
45 p_betaSamples = alpha[
"BetaSamples"];
46 p_betaLines = alpha[
"BetaLines"];
51 p_alphaStartingSample = 0.5;
52 p_alphaStartingLine = 0.5;
53 p_alphaEndingSample = (double) p_alphaSamples + 0.5;
54 p_alphaEndingLine = (double) p_alphaLines + 0.5;
55 p_betaSamples = p_alphaSamples;
56 p_betaLines = p_alphaLines;
76 AlphaCube::AlphaCube(
int alphaSamples,
int alphaLines,
77 int betaSamples,
int betaLines,
78 double alphaSs,
double alphaSl,
79 double alphaEs,
double alphaEl) {
80 p_alphaSamples = alphaSamples;
81 p_alphaLines = alphaLines;
82 p_alphaStartingSample = alphaSs;
83 p_alphaStartingLine = alphaSl;
84 p_alphaEndingSample = alphaEs;
85 p_alphaEndingLine = alphaEl;
87 p_betaSamples = betaSamples;
88 p_betaLines = betaLines;
102 AlphaCube::AlphaCube(
int alphaSamples,
int alphaLines,
103 int betaSamples,
int betaLines) {
104 p_alphaSamples = alphaSamples;
105 p_alphaLines = alphaLines;
106 p_alphaStartingSample = 0.5;
107 p_alphaStartingLine = 0.5;
108 p_alphaEndingSample = (double) alphaSamples + 0.5;
109 p_alphaEndingLine = (double) alphaLines + 0.5;
111 p_betaSamples = betaSamples;
112 p_betaLines = betaLines;
124 double sl = AlphaLine(add.
AlphaLine(0.5));
129 p_alphaStartingLine = sl;
130 p_alphaStartingSample = ss;
131 p_alphaEndingLine = el;
132 p_alphaEndingSample = es;
154 if(cubeObject.
hasGroup(
"Mapping"))
return;
157 if(cubeObject.
hasGroup(
"AlphaCube")) {
163 alpha[
"AlphaSamples"] =
toString(p_alphaSamples);
164 alpha[
"AlphaLines"] =
toString(p_alphaLines);
165 alpha[
"AlphaStartingSample"] =
toString(p_alphaStartingSample);
166 alpha[
"AlphaStartingLine"] =
toString(p_alphaStartingLine);
167 alpha[
"AlphaEndingSample"] =
toString(p_alphaEndingSample);
168 alpha[
"AlphaEndingLine"] =
toString(p_alphaEndingLine);
169 alpha[
"BetaSamples"] =
toString(p_betaSamples);
170 alpha[
"BetaLines"] =
toString(p_betaLines);
193 void AlphaCube::ComputeSlope() {
194 p_lineSlope = double(p_alphaEndingLine - p_alphaStartingLine) /
195 double((p_betaLines + 0.5) - 0.5);
196 p_sampSlope = double(p_alphaEndingSample - p_alphaStartingSample) /
197 double((p_betaSamples + 0.5) - 0.5);
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
int BetaLines() const
Returns the number of lines in the beta cube.
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Namespace for the standard library.
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group...
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Contains multiple PvlContainers.
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
A single keyword-value pair.
int BetaSamples() const
Returns the number of samples in the beta cube.
void Rehash(AlphaCube &alphaCube)
Merges two AlphaCube objects.
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Namespace for ISIS/Bullet specific routines.
Contains Pvl Groups and Pvl Objects.
IO Handler for Isis Cubes.