Loading [MathJax]/jax/output/NativeMML/config.js
Isis Developer Reference
AlphaCube.h
Go to the documentation of this file.
1 #ifndef AlphaCube_h
2 #define AlphaCube_h
3 
8 /* SPDX-License-Identifier: CC0-1.0 */
9 
10 #include "Pvl.h"
11 
12 namespace Isis {
13  class Cube;
14 
46  class AlphaCube {
47  public:
48 
49  AlphaCube(Cube &cube);
50  AlphaCube(int alphaSamples, int alphaLines,
51  int betaSamples, int betaLines);
52  AlphaCube(int alphaSamples, int alphaLines,
53  int betaSamples, int betaLines,
54  double alphaSs, double alphaSl,
55  double alphaEs, double alphaEl);
56 
60  ~AlphaCube() {};
61 
67  inline int AlphaLines() const {
68  return p_alphaLines;
69  };
70 
71 
77  inline int AlphaSamples() const {
78  return p_alphaSamples;
79  };
80 
81 
87  inline int BetaLines() const {
88  return p_betaLines;
89  };
90 
91 
97  inline int BetaSamples() const {
98  return p_betaSamples;
99  };
100 
101 
109  inline double AlphaLine(double betaLine) {
110  return p_lineSlope * (betaLine - 0.5) + p_alphaStartingLine;
111  };
112 
113 
121  inline double AlphaSample(double betaSample) {
122  return p_sampSlope * (betaSample - 0.5) + p_alphaStartingSample;
123  };
124 
125 
133  inline double BetaLine(double alphaLine) {
134  return (alphaLine - p_alphaStartingLine) / p_lineSlope + 0.5;
135  };
136 
137 
145  inline double BetaSample(double alphaSample) {
146  return (alphaSample - p_alphaStartingSample) / p_sampSlope + 0.5;
147  };
148 
149  void UpdateGroup(Cube &cube);
150 
151  void Rehash(AlphaCube &alphaCube);
152 
153  private:
154  void ComputeSlope();
155  int p_alphaLines;
156  int p_alphaSamples;
157  int p_betaLines;
158  int p_betaSamples;
159  double p_alphaStartingLine;
160  double p_alphaStartingSample;
161  double p_alphaEndingLine;
162  double p_alphaEndingSample;
163  double p_lineSlope;
164  double p_sampSlope;
165  };
166 };
167 
168 #endif
AlphaCube.h
Isis::PvlObject::findGroup
PvlGroupIterator findGroup(const QString &name, PvlGroupIterator beg, PvlGroupIterator end)
Find a group with the specified name, within these indexes.
Definition: PvlObject.h:129
Cube.h
Isis::PvlObject
Contains Pvl Groups and Pvl Objects.
Definition: PvlObject.h:61
Isis::PvlKeyword
A single keyword-value pair.
Definition: PvlKeyword.h:82
Isis::AlphaCube::AlphaLine
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Definition: AlphaCube.h:109
Isis::PvlObject::hasGroup
bool hasGroup(const QString &name) const
Returns a boolean value based on whether the object has the specified group or not.
Definition: PvlObject.h:210
Isis::AlphaCube::AlphaSample
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
Definition: AlphaCube.h:121
Isis::toString
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
Isis::AlphaCube::BetaLine
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
Definition: AlphaCube.h:133
Isis::AlphaCube::AlphaCube
AlphaCube(Cube &cube)
Constructs an AlphaCube object using a PVL object.
Definition: AlphaCube.cpp:20
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::Cube::lineCount
int lineCount() const
Definition: Cube.cpp:1734
Isis::AlphaCube::UpdateGroup
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples,...
Definition: AlphaCube.cpp:134
Isis::AlphaCube::BetaLines
int BetaLines() const
Returns the number of lines in the beta cube.
Definition: AlphaCube.h:87
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::Cube::sampleCount
int sampleCount() const
Definition: Cube.cpp:1807
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::AlphaCube
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group.
Definition: AlphaCube.h:46
Isis::AlphaCube::AlphaLines
int AlphaLines() const
Returns the number of lines in the alpha cube.
Definition: AlphaCube.h:67
Isis::AlphaCube::AlphaSamples
int AlphaSamples() const
Returns the number of samples in the alpha cube.
Definition: AlphaCube.h:77
Isis::AlphaCube::BetaSample
double BetaSample(double alphaSample)
Returns a beta sample given an alpha sample.
Definition: AlphaCube.h:145
Isis::PvlObject::addGroup
void addGroup(const Isis::PvlGroup &group)
Add a group to the object.
Definition: PvlObject.h:186
Isis::AlphaCube::BetaSamples
int BetaSamples() const
Returns the number of samples in the beta cube.
Definition: AlphaCube.h:97
std
Namespace for the standard library.
Isis::AlphaCube::~AlphaCube
~AlphaCube()
Destroys the AlphaCube object.
Definition: AlphaCube.h:60
Isis::AlphaCube::Rehash
void Rehash(AlphaCube &alphaCube)
Merges two AlphaCube objects.
Definition: AlphaCube.cpp:108
Isis::Cube::label
Pvl * label() const
Returns a pointer to the IsisLabel object associated with the cube.
Definition: Cube.cpp:1701
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/13/2023 15:10:30