Isis 3 Programmer Reference
CubeCalculator.h
1 
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 
15 class QString;
16 template<class T> class QVector;
17 
18 namespace Isis {
19  class DataValue;
20  class CameraBuffers;
21 
58  public:
61 
66  void Clear();
67 
68  void prepareCalculations(QString equation,
69  QVector<Cube *> &inCubes,
70  Cube *outCube);
71 
73  int line, int band);
74 
75  private:
81  enum Calculations {
86  };
87 
88  void addMethodCall(void (Calculator::*method)(void));
89 
91 
93 
100 
102  QVector<void (Calculator:: *)(void)> *m_methods;
103 
106 
109 
115 
121 
123  };
124 
125 
132  class DataValue {
133  public:
153  PhacData
154  };
155 
156  DataValue();
159  DataValue(DataValueType type, double value);
160 
162  int cubeIndex();
163  double constant();
164 
165  private:
168 
170  };
171 
172 
188  public:
189  CameraBuffers(Camera *camera);
190  ~CameraBuffers();
191 
192  void enablePhaBuffer();
193  void enableInaBuffer();
194  void enableEmaBuffer();
195  void enableLatBuffer();
196  void enableLonBuffer();
197  void enableResBuffer();
198  void enableRadiusBuffer();
199  void enablePhalBuffer();
200  void enableInalBuffer();
201  void enableEmalBuffer();
202  void enablePhacBuffer();
203  void enableInacBuffer();
204  void enableEmacBuffer();
205 
206  // Accessors
207  QVector<double> *phaBuffer(int currentLine, int ns, int currentBand);
208  QVector<double> *inaBuffer(int currentLine, int ns, int currentBand);
209  QVector<double> *emaBuffer(int currentLine, int ns, int currentBand);
210  QVector<double> *latBuffer(int currentLine, int ns, int currentBand);
211  QVector<double> *lonBuffer(int currentLine, int ns, int currentBand);
212  QVector<double> *resBuffer(int currentLine, int ns, int currentBand);
213  QVector<double> *radiusBuffer(int currentLine, int ns, int currentBand);
214  QVector<double> *phalBuffer(int currentLine, int ns, int currentBand);
215  QVector<double> *inalBuffer(int currentLine, int ns, int currentBand);
216  QVector<double> *emalBuffer(int currentLine, int ns, int currentBand);
217  QVector<double> *phacBuffer(int currentLine, int ns, int currentBand);
218  QVector<double> *inacBuffer(int currentLine, int ns, int currentBand);
219  QVector<double> *emacBuffer(int currentLine, int ns, int currentBand);
220 
221 
222  private:
223  void loadBuffers(int currentLine, int ns, int currentBand);
224 
227 
241  };
242 }
243 #endif
Isis::CubeCalculator::lastPushToCubeStats
int lastPushToCubeStats(QVector< Cube * > &inCubes)
Creates statistics internally for the last cube data pushed to the data definitions.
Definition: CubeCalculator.cpp:699
Isis::CameraBuffers::m_lastLine
int m_lastLine
The number of the last line loaded into the enabled camera buffers.
Definition: CubeCalculator.h:226
Isis::DataValue::constant
double constant()
Accesses the constant value of the DataValue.
Definition: CubeCalculator.cpp:923
Isis::CameraBuffers::enableInaBuffer
void enableInaBuffer()
Enables the incidence angle buffer for use.
Definition: CubeCalculator.cpp:994
Isis::CameraBuffers::enablePhaBuffer
void enablePhaBuffer()
Enables the phase angle buffer for use.
Definition: CubeCalculator.cpp:988
Isis::DataValue::PhacData
@ PhacData
Center phase camera data.
Definition: CubeCalculator.h:153
Isis::DataValue::Line
@ Line
Current line number.
Definition: CubeCalculator.h:138
Isis::CubeCalculator::m_cameraBuffers
QVector< CameraBuffers * > * m_cameraBuffers
Stores the camera buffers that are enabled for camera related calculations.
Definition: CubeCalculator.h:120
Isis::CubeCalculator::CallNextMethod
@ CallNextMethod
The calculation requires calling one of the methods.
Definition: CubeCalculator.h:83
Isis::CameraBuffers::enableLatBuffer
void enableLatBuffer()
Enables the latitude buffer for use.
Definition: CubeCalculator.cpp:1006
Isis::CameraBuffers::m_radiusBuffer
QVector< double > * m_radiusBuffer
Radius buffer.
Definition: CubeCalculator.h:240
Isis::CameraBuffers::m_lonBuffer
QVector< double > * m_lonBuffer
Longitude buffer.
Definition: CubeCalculator.h:239
Isis::DataValue::m_cubeIndex
int m_cubeIndex
The index of the associated cube.
Definition: CubeCalculator.h:166
Isis::DataValue::RadiusData
@ RadiusData
DEM radius.
Definition: CubeCalculator.h:147
Isis::CameraBuffers::enablePhalBuffer
void enablePhalBuffer()
Enables the local phase angle buffer for use.
Definition: CubeCalculator.cpp:1030
Isis::CameraBuffers::enablePhacBuffer
void enablePhacBuffer()
Enables the center phase angle buffer for use.
Definition: CubeCalculator.cpp:1048
Isis::Calculator
Calculator for arrays.
Definition: Calculator.h:55
Isis::CubeCalculator
Calculator for arrays.
Definition: CubeCalculator.h:57
Isis::CameraBuffers::m_inalBuffer
QVector< double > * m_inalBuffer
Local incidence angle buffer.
Definition: CubeCalculator.h:232
Isis::CameraBuffers::m_emalBuffer
QVector< double > * m_emalBuffer
Local emission angle buffer.
Definition: CubeCalculator.h:233
Isis::CubeCalculator::runCalculations
QVector< double > runCalculations(QVector< Buffer * > &cubeData, int line, int band)
This method will execute the calculations built up when PrepareCalculations was called.
Definition: CubeCalculator.cpp:114
Isis::DataValue::type
DataValueType type()
Accesses the type of the DataValue.
Definition: CubeCalculator.cpp:903
Isis::CameraBuffers::m_phaBuffer
QVector< double > * m_phaBuffer
Phase angle buffer.
Definition: CubeCalculator.h:228
Isis::DataValue::PhalData
@ PhalData
Local phase camera data.
Definition: CubeCalculator.h:150
Isis::CubeCalculator::~CubeCalculator
~CubeCalculator()
Destroys the CubeCalculator object.
Definition: CubeCalculator.cpp:42
Isis::CubeCalculator::addMethodCall
void addMethodCall(void(Calculator::*method)(void))
This is a conveinience method for PrepareCalculations(...).
Definition: CubeCalculator.cpp:828
Isis::CameraBuffers::m_emaBuffer
QVector< double > * m_emaBuffer
Emission angle buffer.
Definition: CubeCalculator.h:230
Isis::CubeCalculator::CubeCalculator
CubeCalculator()
Constructs a CubeCalculator.
Definition: CubeCalculator.cpp:22
Isis::CameraBuffers::m_phalBuffer
QVector< double > * m_phalBuffer
Local phase angle buffer.
Definition: CubeCalculator.h:231
Isis::DataValue::InaData
@ InaData
Incidence camera data.
Definition: CubeCalculator.h:141
Isis::CubeCalculator::m_cubeCameras
QVector< Camera * > * m_cubeCameras
Stores the cameras for the input cubes.
Definition: CubeCalculator.h:114
Isis::Camera
Definition: Camera.h:236
Isis::CameraBuffers::m_inaBuffer
QVector< double > * m_inaBuffer
Incidence angle buffer.
Definition: CubeCalculator.h:229
Isis::DataValue::ResData
@ ResData
Pixel resolution camera data.
Definition: CubeCalculator.h:146
Isis::DataValue::Constant
@ Constant
A single constant value.
Definition: CubeCalculator.h:136
Isis::CameraBuffers::enableEmaBuffer
void enableEmaBuffer()
Enables the emission angle buffer for use.
Definition: CubeCalculator.cpp:1000
Isis::CameraBuffers::CameraBuffers
CameraBuffers(Camera *camera)
Constructs a CameraBuffers object.
Definition: CubeCalculator.cpp:933
Isis::DataValue::EmalData
@ EmalData
Local emission camera data.
Definition: CubeCalculator.h:149
Isis::CameraBuffers::enableInalBuffer
void enableInalBuffer()
Enables the local incidence angle buffer for use.
Definition: CubeCalculator.cpp:1036
Isis::CameraBuffers::m_inacBuffer
QVector< double > * m_inacBuffer
Center incidence angle buffer.
Definition: CubeCalculator.h:235
Isis::DataValue::InacData
@ InacData
Center incidence camera data.
Definition: CubeCalculator.h:151
Isis::CubeCalculator::m_outputSamples
int m_outputSamples
Number of samples in the output cube.
Definition: CubeCalculator.h:122
Isis::CameraBuffers::enableEmalBuffer
void enableEmalBuffer()
Enables the local emission angle buffer for use.
Definition: CubeCalculator.cpp:1042
Isis::CubeCalculator::m_cubeStats
QVector< Statistics * > * m_cubeStats
Stores the cube statistics for the input cubes.
Definition: CubeCalculator.h:108
Isis::CameraBuffers::m_camera
Camera * m_camera
Camera to obtain camera-related information from.
Definition: CubeCalculator.h:225
Isis::CameraBuffers::enableRadiusBuffer
void enableRadiusBuffer()
Enables the radius buffer for use.
Definition: CubeCalculator.cpp:1024
Isis::DataValue::Sample
@ Sample
Current sample number.
Definition: CubeCalculator.h:137
Isis::CameraBuffers::enableEmacBuffer
void enableEmacBuffer()
Enables the center emission angle buffer for use.
Definition: CubeCalculator.cpp:1060
Isis::DataValue::LonData
@ LonData
Longitude camera data.
Definition: CubeCalculator.h:145
Isis::CameraBuffers::enableInacBuffer
void enableInacBuffer()
Enables the center incidence angle buffer for use.
Definition: CubeCalculator.cpp:1054
Isis::DataValue::InalData
@ InalData
Local incidence camera data.
Definition: CubeCalculator.h:148
Isis::CubeCalculator::prepareCalculations
void prepareCalculations(QString equation, QVector< Cube * > &inCubes, Cube *outCube)
This method builds a list of actions to perform based on the postfix expression.
Definition: CubeCalculator.cpp:249
Isis::DataValue::DataValueType
DataValueType
This is used to tell what kind of data to push onto the RPN calculator.
Definition: CubeCalculator.h:135
Isis::CubeCalculator::lastPushToCubeCameras
int lastPushToCubeCameras(QVector< Cube * > &inCubes)
Creates internal camera for the last pushed cube data.
Definition: CubeCalculator.cpp:759
Isis::Cube
IO Handler for Isis Cubes.
Definition: Cube.h:167
Isis::DataValue::cubeIndex
int cubeIndex()
Accesses the cube index of the DataValue.
Definition: CubeCalculator.cpp:913
Isis::CubeCalculator::PushNextData
@ PushNextData
The calculation requires input data.
Definition: CubeCalculator.h:85
Isis::DataValue::Band
@ Band
Current band number.
Definition: CubeCalculator.h:139
Isis::DataValue::EmacData
@ EmacData
Center emission camera data.
Definition: CubeCalculator.h:152
Isis::CameraBuffers::enableLonBuffer
void enableLonBuffer()
Enables the longitude buffer for use.
Definition: CubeCalculator.cpp:1012
Isis::CameraBuffers::m_phacBuffer
QVector< double > * m_phacBuffer
Center phase angle buffer.
Definition: CubeCalculator.h:234
Isis::DataValue::CubeData
@ CubeData
A brick of cube data.
Definition: CubeCalculator.h:140
Isis::DataValue::PhaData
@ PhaData
Phase camera data.
Definition: CubeCalculator.h:143
Isis::CubeCalculator::Calculations
Calculations
This is used to define the overall action to perform in RunCalculations(..).
Definition: CubeCalculator.h:81
Isis::DataValue
This class is used to define what kind of data is being pushed onto the cube calculator.
Definition: CubeCalculator.h:132
Isis::CameraBuffers::~CameraBuffers
~CameraBuffers()
Destroys the CameraBuffers.
Definition: CubeCalculator.cpp:956
Isis::CubeCalculator::m_dataDefinitions
QVector< DataValue > * m_dataDefinitions
This defines what kind of data RunCalculations(...) will push onto the calculator.
Definition: CubeCalculator.h:105
Isis::DataValue::m_type
DataValueType m_type
Type of data stored.
Definition: CubeCalculator.h:169
QVector
This is free and unencumbered software released into the public domain.
Definition: Calculator.h:18
Isis::DataValue::m_constantValue
double m_constantValue
Stored constant value.
Definition: CubeCalculator.h:167
Isis::DataValue::EmaData
@ EmaData
Emission camera data.
Definition: CubeCalculator.h:142
Isis::CubeCalculator::Clear
void Clear()
This method completely resets the calculator.
Definition: CubeCalculator.cpp:64
Isis::CameraBuffers::m_resBuffer
QVector< double > * m_resBuffer
Resolution buffer.
Definition: CubeCalculator.h:237
Isis::CameraBuffers::m_emacBuffer
QVector< double > * m_emacBuffer
Center emission angle buffer.
Definition: CubeCalculator.h:236
Isis::DataValue::LatData
@ LatData
Latitude camera data.
Definition: CubeCalculator.h:144
Isis::CameraBuffers::m_latBuffer
QVector< double > * m_latBuffer
Latitude buffer.
Definition: CubeCalculator.h:238
Isis::CubeCalculator::m_methods
QVector< void(Calculator::*)(void)> * m_methods
This stores the addresses to the methods RunCalculations(...) will call.
Definition: CubeCalculator.h:102
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
Isis::CameraBuffers::enableResBuffer
void enableResBuffer()
Enables the resolution buffer for use.
Definition: CubeCalculator.cpp:1018
Isis::CameraBuffers
This class is used to manage buffers for calculating camera related information, such as angles,...
Definition: CubeCalculator.h:187
Isis::CubeCalculator::m_calculations
QVector< Calculations > * m_calculations
This is what RunCalculations(...) will loop over.
Definition: CubeCalculator.h:99
Isis::DataValue::DataValue
DataValue()
Constructs a default DataValue.
Definition: CubeCalculator.cpp:840