OTB
9.0.0
Orfeo Toolbox
|
#include <otbBandMathImageFilter.h>
Public Types | |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef itk::ProcessObject::DataObjectPointerArraySizeType | DataObjectPointerArraySizeType |
typedef ImageType::ConstPointer | ImagePointer |
typedef ImageType::RegionType | ImageRegionType |
typedef TImage | ImageType |
typedef ImageType::IndexType | IndexType |
typedef ImageType::PointType | OrigineType |
typedef Parser | ParserType |
typedef ImageType::PixelType | PixelType |
typedef itk::SmartPointer< Self > | Pointer |
typedef BandMathImageFilter< TImage > | Self |
typedef ImageType::SpacingType | SpacingType |
typedef itk::InPlaceImageFilter< TImage > | Superclass |
Public Member Functions | |
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
virtual const char * | GetNameOfClass () const |
Static Public Member Functions | |
static Pointer | New () |
std::string | m_Expression |
std::vector< ParserType::Pointer > | m_VParser |
std::vector< std::vector< double > > | m_AImage |
std::vector< std::string > | m_VVarName |
unsigned int | m_NbVar |
SpacingType | m_Spacing |
OrigineType | m_Origin |
long | m_UnderflowCount |
long | m_OverflowCount |
itk::Array< long > | m_ThreadUnderflow |
itk::Array< long > | m_ThreadOverflow |
void | SetNthInput (DataObjectPointerArraySizeType idx, const ImageType *image) |
void | SetNthInput (DataObjectPointerArraySizeType idx, const ImageType *image, const std::string &varName) |
void | SetNthInputName (DataObjectPointerArraySizeType idx, const std::string &expression) |
void | SetExpression (const std::string &expression) |
std::string | GetExpression () const |
std::string | GetNthInputName (DataObjectPointerArraySizeType idx) const |
ImageType * | GetNthInput (DataObjectPointerArraySizeType idx) |
BandMathImageFilter () | |
~BandMathImageFilter () override | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
void | BeforeThreadedGenerateData () override |
void | ThreadedGenerateData (const ImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) override |
void | AfterThreadedGenerateData () override |
BandMathImageFilter (const Self &)=delete | |
void | operator= (const Self &)=delete |
Performs a mathematical operation on the input images according to the formula specified by the user.
This filter is based on the mathematical parser library muParser. The built in functions and operators list is available at: http://muparser.sourceforge.net/mup_features.html#idDef2
OTB additional functions: ndvi(r, niri)
OTB additional constants: e - log2e - log10e - ln2 - ln10 - pi - euler
In order to use this filter, at least one input image is to be set. An associated variable name can be specified or not by using the corresponding SetNthInput method. For the nth input image, if no associated variable name has been specified, a default variable name is given by concatenating the letter "b" (for band) and the corresponding input index. Next step is to set the expression according to the variable names. For example, in the default case with three input images the following expression is valid : "ndvi(b1, b2)*b3"
As an additional functionality, the filter also granted access to indexes information under special virtual bands named idxX, idxY for the images indexes and idxPhyX, idxPhyY for the physical indexes. It allows the user to perform, for example a spatial processing aiming to suppress a determined area : "if(sqrt((idxPhyX-105.3)*(idxPhyX-105.3)+ (idxPhyY-207.1)*(idxPhyY-207.1))>100, b1, 0)" This expression replace the physical zone around the point of physical index (105.3; 207.1) by a black area This functionality assumes that all the band involved have the same spacing and origin.
Definition at line 83 of file otbBandMathImageFilter.h.
typedef itk::SmartPointer<const Self> otb::BandMathImageFilter< TImage >::ConstPointer |
Definition at line 90 of file otbBandMathImageFilter.h.
typedef itk::ProcessObject::DataObjectPointerArraySizeType otb::BandMathImageFilter< TImage >::DataObjectPointerArraySizeType |
Definition at line 107 of file otbBandMathImageFilter.h.
typedef ImageType::ConstPointer otb::BandMathImageFilter< TImage >::ImagePointer |
Definition at line 100 of file otbBandMathImageFilter.h.
typedef ImageType::RegionType otb::BandMathImageFilter< TImage >::ImageRegionType |
Definition at line 101 of file otbBandMathImageFilter.h.
typedef TImage otb::BandMathImageFilter< TImage >::ImageType |
Some convenient typedefs.
Definition at line 96 of file otbBandMathImageFilter.h.
typedef ImageType::IndexType otb::BandMathImageFilter< TImage >::IndexType |
Definition at line 103 of file otbBandMathImageFilter.h.
typedef ImageType::PointType otb::BandMathImageFilter< TImage >::OrigineType |
Definition at line 104 of file otbBandMathImageFilter.h.
typedef Parser otb::BandMathImageFilter< TImage >::ParserType |
Definition at line 106 of file otbBandMathImageFilter.h.
typedef ImageType::PixelType otb::BandMathImageFilter< TImage >::PixelType |
Definition at line 102 of file otbBandMathImageFilter.h.
typedef itk::SmartPointer<Self> otb::BandMathImageFilter< TImage >::Pointer |
Definition at line 89 of file otbBandMathImageFilter.h.
typedef BandMathImageFilter<TImage> otb::BandMathImageFilter< TImage >::Self |
Standard class typedefs.
Definition at line 87 of file otbBandMathImageFilter.h.
typedef ImageType::SpacingType otb::BandMathImageFilter< TImage >::SpacingType |
Definition at line 105 of file otbBandMathImageFilter.h.
typedef itk::InPlaceImageFilter<TImage> otb::BandMathImageFilter< TImage >::Superclass |
Definition at line 88 of file otbBandMathImageFilter.h.
|
protected |
Constructor
Definition at line 40 of file otbBandMathImageFilter.hxx.
|
overrideprotected |
Destructor
Definition at line 56 of file otbBandMathImageFilter.hxx.
|
privatedelete |
Change the nth filter input associated variable name
|
overrideprotected |
Change the nth filter input associated variable name
Definition at line 207 of file otbBandMathImageFilter.hxx.
References otbWarningMacro.
|
overrideprotected |
Change the nth filter input associated variable name
Definition at line 135 of file otbBandMathImageFilter.hxx.
virtual::itk::LightObject::Pointer otb::BandMathImageFilter< TImage >::CreateAnother | ( | void | ) | const |
std::string otb::BandMathImageFilter< TImage >::GetExpression |
Return the expression to be parsed
Definition at line 123 of file otbBandMathImageFilter.hxx.
|
virtual |
Run-time type information (and related methods).
TImage * otb::BandMathImageFilter< TImage >::GetNthInput | ( | DataObjectPointerArraySizeType | idx | ) |
Return a pointer on the nth filter input
Definition at line 109 of file otbBandMathImageFilter.hxx.
std::string otb::BandMathImageFilter< TImage >::GetNthInputName | ( | DataObjectPointerArraySizeType | idx | ) | const |
Return the nth filter input associated variable name
Definition at line 129 of file otbBandMathImageFilter.hxx.
|
static |
Method for creation through the object factory.
|
privatedelete |
Change the nth filter input associated variable name
|
overrideprotected |
Change the nth filter input associated variable name
Definition at line 61 of file otbBandMathImageFilter.hxx.
void otb::BandMathImageFilter< TImage >::SetExpression | ( | const std::string & | expression | ) |
Set the expression to be parsed
Definition at line 115 of file otbBandMathImageFilter.hxx.
void otb::BandMathImageFilter< TImage >::SetNthInput | ( | DataObjectPointerArraySizeType | idx, |
const ImageType * | image | ||
) |
Change the nth filter input associated variable name
Definition at line 74 of file otbBandMathImageFilter.hxx.
void otb::BandMathImageFilter< TImage >::SetNthInput | ( | DataObjectPointerArraySizeType | idx, |
const ImageType * | image, | ||
const std::string & | varName | ||
) |
Change the nth filter input associated variable name
Definition at line 90 of file otbBandMathImageFilter.hxx.
void otb::BandMathImageFilter< TImage >::SetNthInputName | ( | DataObjectPointerArraySizeType | idx, |
const std::string & | expression | ||
) |
Change the nth filter input associated variable name
Definition at line 103 of file otbBandMathImageFilter.hxx.
|
overrideprotected |
Change the nth filter input associated variable name
Definition at line 232 of file otbBandMathImageFilter.hxx.
|
private |
Change the nth filter input associated variable name
Definition at line 145 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 143 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 147 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 150 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 153 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 149 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 155 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 154 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 152 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 144 of file otbBandMathImageFilter.h.
|
private |
Change the nth filter input associated variable name
Definition at line 146 of file otbBandMathImageFilter.h.