25 #ifndef __TERRALIB_RP_INTERNAL_ARITHMETICOPERATIONS_H
26 #define __TERRALIB_RP_INTERNAL_ARITHMETICOPERATIONS_H
36 #include <boost/shared_ptr.hpp>
77 std::vector< boost::shared_ptr<te::rst::Raster> >
m_rasterVec;
92 void reset() throw( te::rp::Exception );
98 AbstractParameters* clone() const;
122 void reset() throw( te::rp::Exception );
128 AbstractParameters* clone() const;
136 bool execute( AlgorithmOutputParameters& outputParams ) throw( te::rp::Exception );
139 void reset() throw( te::rp::Exception );
144 bool isInitialized() const;
167 : m_isRaster( false ), m_isRealNumber( false ), m_realNumberValue( 0 ),
187 bool executeString(
const std::string& aStr,
188 std::vector< boost::shared_ptr<te::rst::Raster> > inRasters,
189 boost::shared_ptr<te::rst::Raster>& outRaster,
190 bool generateOutput )
const;
197 void inFix2PostFix(
const std::vector< std::string >& input,
198 std::vector< std::string >& output )
const;
204 void printTokens(
const std::vector< std::string >& input )
const;
211 bool isOperator(
const std::string& inputToken )
const;
218 bool isBinaryOperator(
const std::string& inputToken )
const;
225 bool isUnaryOperator(
const std::string& inputToken )
const;
233 bool op1HasGreaterOrEqualPrecedence(
const std::string& operator1,
234 const std::string& operator2 )
const;
243 bool isRasterBandToken(
const std::string& token,
unsigned int& rasterIdx,
244 unsigned int& bandIdx )
const;
253 bool execBinaryOperator(
const std::string& token, ExecStackT&
254 execStack,
bool generateOutput )
const;
263 bool execUnaryOperator(
const std::string& token, ExecStackT&
264 execStack,
bool generateOutput )
const;
272 bool isRealNumberToken(
const std::string& token,
double& realValue )
const;
281 bool allocResultRaster(
unsigned int nLines,
unsigned int nCols,
282 boost::shared_ptr<te::rst::Raster>& rasterPtr )
const;
289 void getTokensStrs(
const std::string& inputStr,
290 std::vector< std::string >& outTokens )
const;
295 #endif // __TERRALIB_RP_INTERNAL_ARITHMETICOPERATIONS_H
std::string m_rType
Output raster data source type (as described in te::raster::RasterFactory ).
bool m_isInitialized
Tells if this instance is initialized.
Raster Processing algorithm output parameters base interface.
ArithmeticOperations::InputParameters m_inputParameters
Input execution parameters.
std::map< std::string, std::string > m_rInfo
The necessary information to create the output rasters (as described in te::raster::RasterFactory).
double m_realNumberValue
Real number value.
bool m_isRaster
true if this is a raster pointer element.
std::stack< ExecStackElement > ExecStackT
Execution stack type definition.
Raster Processing algorithm base interface.
ArithmeticOperations output parameters.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Raster Processing algorithm base interface class.
std::auto_ptr< te::rst::Raster > m_outputRasterPtr
The generated output registered raster.
unsigned int m_rasterBand
Raster band index.
Performs arithmetic operation over raster data.
bool m_isRealNumber
true if this is a real number element.
boost::shared_ptr< te::rst::Raster > m_raster
Raster pointer.