Isis Developer Reference
|
Calculator for arrays. More...
#include <CubeCalculator.h>
Public Member Functions | |
CubeCalculator () | |
Constructs a CubeCalculator. | |
~CubeCalculator () | |
Destroys the CubeCalculator object. | |
void | Clear () |
This method completely resets the calculator. | |
void | prepareCalculations (QString equation, QVector< Cube * > &inCubes, Cube *outCube) |
This method builds a list of actions to perform based on the postfix expression. | |
QVector< double > | runCalculations (QVector< Buffer * > &cubeData, int line, int band) |
This method will execute the calculations built up when PrepareCalculations was called. | |
Calculator for arrays.
This class is a RPN calculator on cubes. The base Calculator class is used in conjunction with methods to retrieve data from a cube and perform calculations.
Isis::CubeCalculator::CubeCalculator | ( | ) |
Constructs a CubeCalculator.
Isis::CubeCalculator::~CubeCalculator | ( | ) |
Destroys the CubeCalculator object.
References Clear().
|
virtual |
This method completely resets the calculator.
Frees dynamic memory in container members.
The prepared calculations will be erased when this is called.
Reimplemented from Isis::Calculator.
References Isis::Calculator::Clear().
Referenced by prepareCalculations(), and ~CubeCalculator().
void Isis::CubeCalculator::prepareCalculations | ( | QString | equation, |
QVector< Cube * > & | inCubes, | ||
Cube * | outCube ) |
This method builds a list of actions to perform based on the postfix expression.
Error checking is done using the inCubeInfos, and the outCubeInfo is necessary to tell the dimensions of the output cube. Call this method before calling RunCalculations(). This method will also erase all calculator history before building up a new set of calculations to run.
equation | The equation in postfix notation |
inCubes | The input cubes |
outCube | The output cube |
IException::Unknown | "Invalid file number" |
IException::Unknown | "Unidentified operator" |
References _FILEINFO_, Isis::Calculator::AbsoluteValue(), Isis::Calculator::Add(), Isis::Calculator::Arccosine(), Isis::Calculator::Arcsine(), Isis::Calculator::Arctangent(), Isis::Calculator::Arctangent2(), Isis::DataValue::Band, Clear(), Isis::DataValue::Constant, Isis::Calculator::Cosecant(), Isis::Calculator::Cosine(), Isis::Calculator::CosineH(), Isis::Calculator::Cotangent(), Isis::DataValue::CubeData, Isis::Calculator::Divide(), Isis::E, Isis::DataValue::EmacData, Isis::DataValue::EmaData, Isis::DataValue::EmalData, Isis::Calculator::Equal(), Isis::Calculator::Exponent(), Isis::Calculator::GreaterThan(), Isis::Calculator::GreaterThanOrEqual(), Isis::DataValue::InacData, Isis::DataValue::InaData, Isis::DataValue::InalData, Isis::DataValue::LatData, Isis::Calculator::LeftShift(), Isis::Calculator::LessThan(), Isis::Calculator::LessThanOrEqual(), Isis::DataValue::Line, Isis::Calculator::Log(), Isis::Calculator::Log10(), Isis::DataValue::LonData, Isis::Calculator::MaximumLine(), Isis::Calculator::MaximumPixel(), Isis::Calculator::MinimumLine(), Isis::Calculator::MinimumPixel(), Isis::Calculator::Modulus(), Isis::Calculator::Multiply(), Isis::Calculator::Negative(), Isis::Calculator::NotEqual(), Isis::DataValue::PhacData, Isis::DataValue::PhaData, Isis::DataValue::PhalData, Isis::PI, Isis::DataValue::RadiusData, Isis::DataValue::ResData, Isis::Calculator::RightShift(), Isis::DataValue::Sample, Isis::Calculator::Secant(), Isis::Calculator::Sine(), Isis::Calculator::SineH(), Isis::Calculator::SquareRoot(), Isis::Calculator::Subtract(), Isis::Calculator::Tangent(), Isis::Calculator::TangentH(), Isis::IString::Token(), and Isis::IException::Unknown.
QVector< double > Isis::CubeCalculator::runCalculations | ( | QVector< Buffer * > & | cubeData, |
int | curLine, | ||
int | curBand ) |
This method will execute the calculations built up when PrepareCalculations was called.
cubeData | The input cubes' data |
curLine | The current line in the output cube |
curBand | The current band in the output cube |
IException::Unknown | "Too many operands in the equation." |
References _FILEINFO_, Isis::DataValue::Band, Isis::DataValue::Constant, Isis::DataValue::constant(), Isis::DataValue::CubeData, Isis::DataValue::cubeIndex(), Isis::DataValue::EmacData, Isis::DataValue::EmaData, Isis::DataValue::EmalData, Isis::DataValue::InacData, Isis::DataValue::InaData, Isis::DataValue::InalData, Isis::DataValue::LatData, Isis::DataValue::Line, Isis::DataValue::LonData, Isis::DataValue::PhacData, Isis::DataValue::PhaData, Isis::DataValue::PhalData, Isis::Calculator::Pop(), Isis::Calculator::Push(), Isis::DataValue::RadiusData, Isis::DataValue::ResData, Isis::DataValue::Sample, Isis::Calculator::StackSize(), Isis::DataValue::type(), and Isis::IException::Unknown.