Isis 3.0 Programmer Reference
Back | Home
AlphaCube.h
Go to the documentation of this file.
1 
23 #ifndef AlphaCube_h
24 #define AlphaCube_h
25 
26 #include "Pvl.h"
27 
28 namespace Isis {
29  class Cube;
30 
61  class AlphaCube {
62  public:
63  AlphaCube(Cube &cube);
64  AlphaCube(int alphaSamples, int alphaLines,
65  int betaSamples, int betaLines);
66  AlphaCube(int alphaSamples, int alphaLines,
67  int betaSamples, int betaLines,
68  double alphaSs, double alphaSl,
69  double alphaEs, double alphaEl);
71  ~AlphaCube() {};
72 
74  inline int AlphaLines() const {
75  return p_alphaLines;
76  };
78  inline int AlphaSamples() const {
79  return p_alphaSamples;
80  };
82  inline int BetaLines() const {
83  return p_betaLines;
84  };
86  inline int BetaSamples() const {
87  return p_betaSamples;
88  };
90  inline double AlphaLine(double betaLine) {
91  return p_lineSlope * (betaLine - 0.5) + p_alphaStartingLine;
92  }
94  inline double AlphaSample(double betaSample) {
95  return p_sampSlope * (betaSample - 0.5) + p_alphaStartingSample;
96  }
98  inline double BetaLine(double alphaLine) {
99  return (alphaLine - p_alphaStartingLine) / p_lineSlope + 0.5;
100  }
102  inline double BetaSample(double alphaSample) {
103  return (alphaSample - p_alphaStartingSample) / p_sampSlope + 0.5;
104  }
105 
106  void UpdateGroup(Cube &cube);
107 
108  void Rehash(AlphaCube &alphaCube);
109 
110  private:
111  void ComputeSlope();
120  double p_lineSlope;
121  double p_sampSlope;
122  };
123 };
124 
125 #endif
int p_alphaLines
The number of alpha lines in the cube.
Definition: AlphaCube.h:112
int BetaLines() const
Returns the number of lines in the beta cube.
Definition: AlphaCube.h:82
double p_alphaEndingLine
The ending alpha line.
Definition: AlphaCube.h:118
int AlphaLines() const
Returns the number of lines in the alpha cube.
Definition: AlphaCube.h:74
int p_betaSamples
The number of beta samples in the cube.
Definition: AlphaCube.h:115
int p_alphaSamples
The number of alpha samples in the cube.
Definition: AlphaCube.h:113
AlphaCube(Cube &cube)
Constructs an AlphaCube object using a PVL object.
Definition: AlphaCube.cpp:31
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
Definition: AlphaCube.h:98
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group...
Definition: AlphaCube.h:61
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Definition: AlphaCube.h:90
double p_alphaStartingLine
The starting alpha line.
Definition: AlphaCube.h:116
void ComputeSlope()
Computes the line and sample slopes.
Definition: AlphaCube.cpp:173
int BetaSamples() const
Returns the number of samples in the beta cube.
Definition: AlphaCube.h:86
int p_betaLines
The number of beta lines in the cube.
Definition: AlphaCube.h:114
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
Definition: AlphaCube.h:94
void Rehash(AlphaCube &alphaCube)
Merges two AlphaCube objects.
Definition: AlphaCube.cpp:103
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples, etc) in the proper group in a PVL object.
Definition: AlphaCube.cpp:129
double p_alphaStartingSample
The starting alpha sample.
Definition: AlphaCube.h:117
double BetaSample(double alphaSample)
Returns a beta sample given an alpha sample.
Definition: AlphaCube.h:102
double p_sampSlope
The slope of the sample set.
Definition: AlphaCube.h:121
double p_alphaEndingSample
The ending alpha sample.
Definition: AlphaCube.h:119
double p_lineSlope
The slope of the line.
Definition: AlphaCube.h:120
~AlphaCube()
Destroys the AlphaCube object.
Definition: AlphaCube.h:71
int AlphaSamples() const
Returns the number of samples in the alpha cube.
Definition: AlphaCube.h:78
IO Handler for Isis Cubes.
Definition: Cube.h:158

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 ISIS Support Center
File Modified: 07/12/2023 23:14:09