Isis Developer Reference
Isis::CubeCalculator Class Reference

Calculator for arrays. More...

#include <CubeCalculator.h>

Inheritance diagram for Isis::CubeCalculator:
Inheritance graph
Collaboration diagram for Isis::CubeCalculator:
Collaboration graph

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.
 

Detailed Description

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.

Author
2008-03-26 Steven Lambright

Constructor & Destructor Documentation

◆ CubeCalculator()

Isis::CubeCalculator::CubeCalculator ( )

Constructs a CubeCalculator.

◆ ~CubeCalculator()

Isis::CubeCalculator::~CubeCalculator ( )

Destroys the CubeCalculator object.

References Clear().

Member Function Documentation

◆ Clear()

void Isis::CubeCalculator::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().

◆ prepareCalculations()

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.

Parameters
equationThe equation in postfix notation
inCubesThe input cubes
outCubeThe output cube
Exceptions
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.

◆ runCalculations()

QVector< double > Isis::CubeCalculator::runCalculations ( QVector< Buffer * > & cubeData,
int curLine,
int curBand )

The documentation for this class was generated from the following files: