Isis 3 Programmer Reference
AlphaCube.h
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();
163  double p_lineSlope;
164  double p_sampSlope;
165  };
166 };
167 
168 #endif
Isis::AlphaCube::ComputeSlope
void ComputeSlope()
Computes the line and sample slopes.
Definition: AlphaCube.cpp:178
Isis::AlphaCube::p_alphaEndingLine
double p_alphaEndingLine
The ending alpha line.
Definition: AlphaCube.h:161
Isis::AlphaCube::p_alphaLines
int p_alphaLines
The number of alpha lines in the cube.
Definition: AlphaCube.h:155
Isis::AlphaCube::p_alphaSamples
int p_alphaSamples
The number of alpha samples in the cube.
Definition: AlphaCube.h:156
Isis::AlphaCube::AlphaLine
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Definition: AlphaCube.h:109
Isis::AlphaCube::AlphaSample
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
Definition: AlphaCube.h:121
Isis::AlphaCube::p_betaSamples
int p_betaSamples
The number of beta samples in the cube.
Definition: AlphaCube.h:158
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::AlphaCube::p_alphaStartingSample
double p_alphaStartingSample
The starting alpha sample.
Definition: AlphaCube.h:160
Isis::AlphaCube::UpdateGroup
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples,...
Definition: AlphaCube.cpp:134
Isis::AlphaCube::p_alphaEndingSample
double p_alphaEndingSample
The ending alpha sample.
Definition: AlphaCube.h:162
Isis::AlphaCube::BetaLines
int BetaLines() const
Returns the number of lines in the beta cube.
Definition: AlphaCube.h:87
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::AlphaCube::BetaSamples
int BetaSamples() const
Returns the number of samples in the beta cube.
Definition: AlphaCube.h:97
Isis::AlphaCube::p_betaLines
int p_betaLines
The number of beta lines in the cube.
Definition: AlphaCube.h:157
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::AlphaCube::p_sampSlope
double p_sampSlope
The slope of the sample set.
Definition: AlphaCube.h:164
Isis::AlphaCube::p_lineSlope
double p_lineSlope
The slope of the line.
Definition: AlphaCube.h:163
Isis::AlphaCube::p_alphaStartingLine
double p_alphaStartingLine
The starting alpha line.
Definition: AlphaCube.h:159
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16