Isis Developer Reference
AlphaCube.h
Go to the documentation of this file.
1#ifndef AlphaCube_h
2#define AlphaCube_h
8/* SPDX-License-Identifier: CC0-1.0 */
9
10#include "Pvl.h"
11
12namespace 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
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
This class is used to rewrite the "alpha" keywords out of the AlphaCube group or Instrument group.
Definition AlphaCube.h:46
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples,...
Definition AlphaCube.cpp:134
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
Definition AlphaCube.h:121
int AlphaSamples() const
Returns the number of samples in the alpha cube.
Definition AlphaCube.h:77
~AlphaCube()
Destroys the AlphaCube object.
Definition AlphaCube.h:60
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
Definition AlphaCube.h:133
void Rehash(AlphaCube &alphaCube)
Merges two AlphaCube objects.
Definition AlphaCube.cpp:108
int BetaLines() const
Returns the number of lines in the beta cube.
Definition AlphaCube.h:87
AlphaCube(Cube &cube)
Constructs an AlphaCube object using a PVL object.
Definition AlphaCube.cpp:20
int AlphaLines() const
Returns the number of lines in the alpha cube.
Definition AlphaCube.h:67
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Definition AlphaCube.h:109
int BetaSamples() const
Returns the number of samples in the beta cube.
Definition AlphaCube.h:97
double BetaSample(double alphaSample)
Returns a beta sample given an alpha sample.
Definition AlphaCube.h:145
IO Handler for Isis Cubes.
Definition Cube.h:168
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16