Isis 3 Developer Reference
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 
62  class AlphaCube {
63  public:
64 
65  AlphaCube(Cube &cube);
66  AlphaCube(int alphaSamples, int alphaLines,
67  int betaSamples, int betaLines);
68  AlphaCube(int alphaSamples, int alphaLines,
69  int betaSamples, int betaLines,
70  double alphaSs, double alphaSl,
71  double alphaEs, double alphaEl);
72 
76  ~AlphaCube() {};
77 
83  inline int AlphaLines() const {
84  return p_alphaLines;
85  };
86 
87 
93  inline int AlphaSamples() const {
94  return p_alphaSamples;
95  };
96 
97 
103  inline int BetaLines() const {
104  return p_betaLines;
105  };
106 
107 
113  inline int BetaSamples() const {
114  return p_betaSamples;
115  };
116 
117 
125  inline double AlphaLine(double betaLine) {
126  return p_lineSlope * (betaLine - 0.5) + p_alphaStartingLine;
127  };
128 
129 
137  inline double AlphaSample(double betaSample) {
138  return p_sampSlope * (betaSample - 0.5) + p_alphaStartingSample;
139  };
140 
141 
149  inline double BetaLine(double alphaLine) {
150  return (alphaLine - p_alphaStartingLine) / p_lineSlope + 0.5;
151  };
152 
153 
161  inline double BetaSample(double alphaSample) {
162  return (alphaSample - p_alphaStartingSample) / p_sampSlope + 0.5;
163  };
164 
165  void UpdateGroup(Cube &cube);
166 
167  void Rehash(AlphaCube &alphaCube);
168 
169  private:
170  void ComputeSlope();
171  int p_alphaLines;
172  int p_alphaSamples;
173  int p_betaLines;
174  int p_betaSamples;
175  double p_alphaStartingLine;
176  double p_alphaStartingSample;
177  double p_alphaEndingLine;
178  double p_alphaEndingSample;
179  double p_lineSlope;
180  double p_sampSlope;
181  };
182 };
183 
184 #endif
int BetaLines() const
Returns the number of lines in the beta cube.
Definition: AlphaCube.h:103
int AlphaLines() const
Returns the number of lines in the alpha cube.
Definition: AlphaCube.h:83
int AlphaSamples() const
Returns the number of samples in the alpha cube.
Definition: AlphaCube.h:93
AlphaCube(Cube &cube)
Constructs an AlphaCube object using a PVL object.
Definition: AlphaCube.cpp:35
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
Definition: AlphaCube.h:149
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group...
Definition: AlphaCube.h:62
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Definition: AlphaCube.h:125
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
Definition: AlphaCube.h:137
int BetaSamples() const
Returns the number of samples in the beta cube.
Definition: AlphaCube.h:113
void Rehash(AlphaCube &alphaCube)
Merges two AlphaCube objects.
Definition: AlphaCube.cpp:123
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:149
double BetaSample(double alphaSample)
Returns a beta sample given an alpha sample.
Definition: AlphaCube.h:161
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
~AlphaCube()
Destroys the AlphaCube object.
Definition: AlphaCube.h:76
IO Handler for Isis Cubes.
Definition: Cube.h:170