Isis 3 Programmer Reference
AlphaCube.h
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();
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
double p_alphaStartingLine
The starting alpha line.
Definition AlphaCube.h:159
void UpdateGroup(Cube &cube)
Writes or update the Alpha keywords (AlphaLines, AlphaSamples, AlphaStartingSamples,...
int p_alphaSamples
The number of alpha samples in the cube.
Definition AlphaCube.h:156
void ComputeSlope()
Computes the line and sample slopes.
double AlphaSample(double betaSample)
Returns an alpha sample given a beta sample.
Definition AlphaCube.h:121
int p_betaSamples
The number of beta samples in the cube.
Definition AlphaCube.h:158
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 p_alphaEndingSample
The ending alpha sample.
Definition AlphaCube.h:162
double p_sampSlope
The slope of the sample set.
Definition AlphaCube.h:164
double BetaLine(double alphaLine)
Returns a beta line given an alpha line.
Definition AlphaCube.h:133
void Rehash(AlphaCube &alphaCube)
Merges two AlphaCube objects.
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
int p_betaLines
The number of beta lines in the cube.
Definition AlphaCube.h:157
double p_alphaStartingSample
The starting alpha sample.
Definition AlphaCube.h:160
double p_alphaEndingLine
The ending alpha line.
Definition AlphaCube.h:161
double p_lineSlope
The slope of the line.
Definition AlphaCube.h:163
double AlphaLine(double betaLine)
Returns an alpha line given a beta line.
Definition AlphaCube.h:109
int p_alphaLines
The number of alpha lines in the cube.
Definition AlphaCube.h:155
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