Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis 3 Programmer Reference
CubeCalculator.h
1
5
6/* SPDX-License-Identifier: CC0-1.0 */
7
8// Calculator.h
9#ifndef CUBE_CALCULATOR_H_
10#define CUBE_CALCULATOR_H_
11
12#include "Calculator.h"
13#include "Cube.h"
14
15class QString;
16
17namespace Isis {
18 class DataValue;
19 class CameraBuffers;
20
57 public:
60
65 void Clear();
66
67 void prepareCalculations(QString equation,
68 QVector<Cube *> &inCubes,
69 Cube *outCube);
70
72 int line, int band);
73
74 private:
86
87 void addMethodCall(void (Calculator::*method)(void));
88
90
92
99
101 QVector<void (Calculator:: *)(void)> *m_methods;
102
105
108
114
120
122 };
123
124
131 class DataValue {
132 public:
154
155 DataValue();
156 DataValue(DataValueType type);
157 DataValue(DataValueType type, int cubeIndex);
158 DataValue(DataValueType type, double value);
159
160 DataValueType type();
161 int cubeIndex();
162 double constant();
163
164 private:
167
169 };
170
171
187 public:
188 CameraBuffers(Camera *camera);
190
191 void enablePhaBuffer();
192 void enableInaBuffer();
193 void enableEmaBuffer();
194 void enableLatBuffer();
195 void enableLonBuffer();
196 void enableResBuffer();
197 void enableRadiusBuffer();
198 void enablePhalBuffer();
199 void enableInalBuffer();
200 void enableEmalBuffer();
201 void enablePhacBuffer();
202 void enableInacBuffer();
203 void enableEmacBuffer();
204
205 // Accessors
206 QVector<double> *phaBuffer(int currentLine, int ns, int currentBand);
207 QVector<double> *inaBuffer(int currentLine, int ns, int currentBand);
208 QVector<double> *emaBuffer(int currentLine, int ns, int currentBand);
209 QVector<double> *latBuffer(int currentLine, int ns, int currentBand);
210 QVector<double> *lonBuffer(int currentLine, int ns, int currentBand);
211 QVector<double> *resBuffer(int currentLine, int ns, int currentBand);
212 QVector<double> *radiusBuffer(int currentLine, int ns, int currentBand);
213 QVector<double> *phalBuffer(int currentLine, int ns, int currentBand);
214 QVector<double> *inalBuffer(int currentLine, int ns, int currentBand);
215 QVector<double> *emalBuffer(int currentLine, int ns, int currentBand);
216 QVector<double> *phacBuffer(int currentLine, int ns, int currentBand);
217 QVector<double> *inacBuffer(int currentLine, int ns, int currentBand);
218 QVector<double> *emacBuffer(int currentLine, int ns, int currentBand);
219
220
221 private:
222 void loadBuffers(int currentLine, int ns, int currentBand);
223
226
240 };
241}
242#endif
Calculator for arrays.
Definition Calculator.h:54
Calculator()
The code that performs math operations is designed to call a function and use the result.
This class is used to manage buffers for calculating camera related information, such as angles,...
QVector< double > * m_phacBuffer
Center phase angle buffer.
void enableLonBuffer()
Enables the longitude buffer for use.
void enableLatBuffer()
Enables the latitude buffer for use.
void enablePhalBuffer()
Enables the local phase angle buffer for use.
void enableResBuffer()
Enables the resolution buffer for use.
void enablePhaBuffer()
Enables the phase angle buffer for use.
void enableRadiusBuffer()
Enables the radius buffer for use.
CameraBuffers(Camera *camera)
Constructs a CameraBuffers object.
QVector< double > * m_inaBuffer
Incidence angle buffer.
QVector< double > * m_inalBuffer
Local incidence angle buffer.
QVector< double > * m_emacBuffer
Center emission angle buffer.
QVector< double > * m_emalBuffer
Local emission angle buffer.
void enableInalBuffer()
Enables the local incidence angle buffer for use.
int m_lastLine
The number of the last line loaded into the enabled camera buffers.
QVector< double > * m_inacBuffer
Center incidence angle buffer.
QVector< double > * m_phaBuffer
Phase angle buffer.
void enableInaBuffer()
Enables the incidence angle buffer for use.
void enableEmalBuffer()
Enables the local emission angle buffer for use.
Camera * m_camera
Camera to obtain camera-related information from.
QVector< double > * m_latBuffer
Latitude buffer.
QVector< double > * m_emaBuffer
Emission angle buffer.
QVector< double > * m_phalBuffer
Local phase angle buffer.
QVector< double > * m_radiusBuffer
Radius buffer.
~CameraBuffers()
Destroys the CameraBuffers.
void enableEmacBuffer()
Enables the center emission angle buffer for use.
void enableInacBuffer()
Enables the center incidence angle buffer for use.
void enableEmaBuffer()
Enables the emission angle buffer for use.
QVector< double > * m_resBuffer
Resolution buffer.
QVector< double > * m_lonBuffer
Longitude buffer.
void enablePhacBuffer()
Enables the center phase angle buffer for use.
int lastPushToCubeCameras(QVector< Cube * > &inCubes)
Creates internal camera for the last pushed cube data.
int m_outputSamples
Number of samples in the output cube.
void addMethodCall(void(Calculator::*method)(void))
This is a conveinience method for PrepareCalculations(...).
~CubeCalculator()
Destroys the CubeCalculator object.
int lastPushToCubeStats(QVector< Cube * > &inCubes)
Creates statistics internally for the last cube data pushed to the data definitions.
CubeCalculator()
Constructs a CubeCalculator.
QVector< Camera * > * m_cubeCameras
Stores the cameras for the input cubes.
Calculations
This is used to define the overall action to perform in RunCalculations(..).
@ CallNextMethod
The calculation requires calling one of the methods.
@ PushNextData
The calculation requires input data.
QVector< void(Calculator::*)(void)> * m_methods
This stores the addresses to the methods RunCalculations(...) will call.
void Clear()
This method completely resets the calculator.
QVector< double > runCalculations(QVector< Buffer * > &cubeData, int line, int band)
This method will execute the calculations built up when PrepareCalculations was called.
QVector< Calculations > * m_calculations
This is what RunCalculations(...) will loop over.
QVector< CameraBuffers * > * m_cameraBuffers
Stores the camera buffers that are enabled for camera related calculations.
void prepareCalculations(QString equation, QVector< Cube * > &inCubes, Cube *outCube)
This method builds a list of actions to perform based on the postfix expression.
QVector< DataValue > * m_dataDefinitions
This defines what kind of data RunCalculations(...) will push onto the calculator.
QVector< Statistics * > * m_cubeStats
Stores the cube statistics for the input cubes.
IO Handler for Isis Cubes.
Definition Cube.h:168
This class is used to define what kind of data is being pushed onto the cube calculator.
int cubeIndex()
Accesses the cube index of the DataValue.
double constant()
Accesses the constant value of the DataValue.
DataValue()
Constructs a default DataValue.
int m_cubeIndex
The index of the associated cube.
double m_constantValue
Stored constant value.
DataValueType
This is used to tell what kind of data to push onto the RPN calculator.
@ InaData
Incidence camera data.
@ PhacData
Center phase camera data.
@ EmalData
Local emission camera data.
@ PhaData
Phase camera data.
@ InalData
Local incidence camera data.
@ EmaData
Emission camera data.
@ LatData
Latitude camera data.
@ Sample
Current sample number.
@ Band
Current band number.
@ ResData
Pixel resolution camera data.
@ Constant
A single constant value.
@ InacData
Center incidence camera data.
@ PhalData
Local phase camera data.
@ Line
Current line number.
@ RadiusData
DEM radius.
@ LonData
Longitude camera data.
@ CubeData
A brick of cube data.
@ EmacData
Center emission camera data.
DataValueType m_type
Type of data stored.
DataValueType type()
Accesses the type of the DataValue.
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16