Isis 3 Programmer Reference
CubeCalculator.h
Go to the documentation of this file.
1 
23 // Calculator.h
24 #ifndef CUBE_CALCULATOR_H_
25 #define CUBE_CALCULATOR_H_
26 
27 #include "Calculator.h"
28 #include "Cube.h"
29 
30 class QString;
31 template<class T> class QVector;
32 
33 namespace Isis {
34  class DataValue;
35  class CameraBuffers;
36 
73  public:
76 
81  void Clear();
82 
83  void prepareCalculations(QString equation,
84  QVector<Cube *> &inCubes,
85  Cube *outCube);
86 
88  int line, int band);
89 
90  private:
96  enum Calculations {
101  };
102 
103  void addMethodCall(void (Calculator::*method)(void));
104 
105  int lastPushToCubeStats(QVector<Cube *> &inCubes);
106 
108 
115 
118 
121 
124 
130 
136 
138  };
139 
140 
147  class DataValue {
148  public:
169  };
170 
171  DataValue();
174  DataValue(DataValueType type, double value);
175 
177  int cubeIndex();
178  double constant();
179 
180  private:
183 
185  };
186 
187 
203  public:
204  CameraBuffers(Camera *camera);
205  ~CameraBuffers();
206 
207  void enablePhaBuffer();
208  void enableInaBuffer();
209  void enableEmaBuffer();
210  void enableLatBuffer();
211  void enableLonBuffer();
212  void enableResBuffer();
213  void enableRadiusBuffer();
214  void enablePhalBuffer();
215  void enableInalBuffer();
216  void enableEmalBuffer();
217  void enablePhacBuffer();
218  void enableInacBuffer();
219  void enableEmacBuffer();
220 
221  // Accessors
222  QVector<double> *phaBuffer(int currentLine, int ns, int currentBand);
223  QVector<double> *inaBuffer(int currentLine, int ns, int currentBand);
224  QVector<double> *emaBuffer(int currentLine, int ns, int currentBand);
225  QVector<double> *latBuffer(int currentLine, int ns, int currentBand);
226  QVector<double> *lonBuffer(int currentLine, int ns, int currentBand);
227  QVector<double> *resBuffer(int currentLine, int ns, int currentBand);
228  QVector<double> *radiusBuffer(int currentLine, int ns, int currentBand);
229  QVector<double> *phalBuffer(int currentLine, int ns, int currentBand);
230  QVector<double> *inalBuffer(int currentLine, int ns, int currentBand);
231  QVector<double> *emalBuffer(int currentLine, int ns, int currentBand);
232  QVector<double> *phacBuffer(int currentLine, int ns, int currentBand);
233  QVector<double> *inacBuffer(int currentLine, int ns, int currentBand);
234  QVector<double> *emacBuffer(int currentLine, int ns, int currentBand);
235 
236 
237  private:
238  void loadBuffers(int currentLine, int ns, int currentBand);
239 
242 
256  };
257 }
258 #endif
The calculation requires input data.
Center phase camera data.
void enableEmalBuffer()
Enables the local emission angle buffer for use.
void enableEmaBuffer()
Enables the emission angle buffer for use.
QVector< double > * m_inaBuffer
Incidence angle buffer.
void enableResBuffer()
Enables the resolution buffer for use.
This class is used to define what kind of data is being pushed onto the cube calculator.
int m_lastLine
The number of the last line loaded into the enabled camera buffers.
void prepareCalculations(QString equation, QVector< Cube *> &inCubes, Cube *outCube)
This method builds a list of actions to perform based on the postfix expression.
DataValue()
Constructs a default DataValue.
Current line number.
void enableRadiusBuffer()
Enables the radius buffer for use.
int lastPushToCubeStats(QVector< Cube *> &inCubes)
Creates statistics internally for the last cube data pushed to the data definitions.
QVector< double > * m_emalBuffer
Local emission angle buffer.
This class is used to manage buffers for calculating camera related information, such as angles...
QVector< double > * m_latBuffer
Latitude buffer.
Local phase camera data.
QVector< double > * m_resBuffer
Resolution buffer.
QVector< double > * m_phalBuffer
Local phase angle buffer.
QVector< double > * m_inalBuffer
Local incidence angle buffer.
Incidence camera data.
int m_cubeIndex
The index of the associated cube.
Pixel resolution camera data.
int m_outputSamples
Number of samples in the output cube.
A single constant value.
Local emission camera data.
QVector< Statistics * > * m_cubeStats
Stores the cube statistics for the input cubes.
Center incidence camera data.
QVector< CameraBuffers * > * m_cameraBuffers
Stores the camera buffers that are enabled for camera related calculations.
void enablePhaBuffer()
Enables the phase angle buffer for use.
QVector< void(Calculator::*)(void)> * m_methods
This stores the addresses to the methods RunCalculations(...) will call.
DataValueType type()
Accesses the type of the DataValue.
Current sample number.
QVector< Calculations > * m_calculations
This is what RunCalculations(...) will loop over.
The calculation requires calling one of the methods.
DataValueType
This is used to tell what kind of data to push onto the RPN calculator.
void addMethodCall(void(Calculator::*method)(void))
This is a conveinience method for PrepareCalculations(...).
Longitude camera data.
QVector< double > * m_emaBuffer
Emission angle buffer.
Calculations
This is used to define the overall action to perform in RunCalculations(..).
Camera * m_camera
Camera to obtain camera-related information from.
QVector< double > runCalculations(QVector< Buffer *> &cubeData, int line, int band)
This method will execute the calculations built up when PrepareCalculations was called.
void enableInaBuffer()
Enables the incidence angle buffer for use.
void enableInacBuffer()
Enables the center incidence angle buffer for use.
void enablePhalBuffer()
Enables the local phase angle buffer for use.
void enableEmacBuffer()
Enables the center emission angle buffer for use.
void enablePhacBuffer()
Enables the center phase angle buffer for use.
Local incidence camera data.
QVector< double > * m_phacBuffer
Center phase angle buffer.
int lastPushToCubeCameras(QVector< Cube *> &inCubes)
Creates internal camera for the last pushed cube data.
Calculator for arrays.
int cubeIndex()
Accesses the cube index of the DataValue.
QVector< double > * m_lonBuffer
Longitude buffer.
Current band number.
QVector< DataValue > * m_dataDefinitions
This defines what kind of data RunCalculations(...) will push onto the calculator.
Center emission camera data.
DataValueType m_type
Type of data stored.
CameraBuffers(Camera *camera)
Constructs a CameraBuffers object.
A brick of cube data.
QVector< double > * m_radiusBuffer
Radius buffer.
void Clear()
This method completely resets the calculator.
Phase camera data.
~CubeCalculator()
Destroys the CubeCalculator object.
void enableLonBuffer()
Enables the longitude buffer for use.
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
double constant()
Accesses the constant value of the DataValue.
QVector< Camera * > * m_cubeCameras
Stores the cameras for the input cubes.
Latitude camera data.
QVector< double > * m_emacBuffer
Center emission angle buffer.
QVector< double > * m_phaBuffer
Phase angle buffer.
void enableLatBuffer()
Enables the latitude buffer for use.
~CameraBuffers()
Destroys the CameraBuffers.
Emission camera data.
double m_constantValue
Stored constant value.
void enableInalBuffer()
Enables the local incidence angle buffer for use.
QVector< double > * m_inacBuffer
Center incidence angle buffer.
Calculator for arrays.
Definition: Calculator.h:70
CubeCalculator()
Constructs a CubeCalculator.
IO Handler for Isis Cubes.
Definition: Cube.h:170