23 #ifndef otbBandMathXImageFilter_h
24 #define otbBandMathXImageFilter_h
26 #include "itkConstNeighborhoodIterator.h"
27 #include "itkImageToImageFilter.h"
64 template <
class TImage>
70 typedef itk::ImageToImageFilter<TImage, TImage>
Superclass;
85 typedef typename itk::ConstNeighborhoodIterator<TImage>::RadiusType
RadiusType;
101 using Superclass::SetNthInput;
110 void SetManyExpressions(
bool flag);
113 void SetExpression(
const std::string& expression);
116 std::string GetExpression(
unsigned int IDExpression)
const;
119 void SetMatrix(
const std::string& name,
const std::string& definition);
122 void SetConstant(
const std::string& name,
double value);
125 void ExportContext(
const std::string& filename);
128 void ImportContext(
const std::string& filename);
131 void ClearExpression();
134 std::vector<std::string> GetVarNames()
const;
138 return !m_StatsVarDetected.empty();
144 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
146 void GenerateOutputInformation()
override;
147 void GenerateInputRequestedRegion()
override;
149 void BeforeThreadedGenerateData()
override;
150 void ThreadedGenerateData(
const ImageRegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
151 void AfterThreadedGenerateData()
override;
167 void CheckImageDimensions();
168 void PrepareParsers();
169 void PrepareParsersGlobStats();
170 void OutputsDimensions();
173 std::vector<std::vector<ParserType::Pointer>>
m_VParser;
199 #ifndef OTB_MANUAL_INSTANTIATION
Performs mathematical operations on the input images according to the formula specified by the user.
std::vector< std::string > m_Expression
ImageType::SpacingType SpacingType
BandMathXImageFilter(const Self &)=delete
BandMathXImageFilter< TImage > Self
itk::SmartPointer< const Self > ConstPointer
ImageType::ConstPointer ConstImagePointer
std::vector< std::vector< adhocStruct > > m_AImage
itk::SmartPointer< Self > Pointer
ImageType::RegionType ImageRegionType
std::vector< RadiusType > m_NeighExtremaSizes
std::vector< int > m_StatsVarDetected
StreamingStatisticsVectorImageFilterType::Pointer StreamingStatisticsVectorImageFilterPointerType
itk::Array< long > m_ThreadUnderflow
ImageType::Pointer ImagePointer
std::vector< adhocStruct > m_VVarName
bool GlobalStatsDetected() const
itk::ConstNeighborhoodIterator< TImage >::RadiusType RadiusType
std::vector< std::vector< ParserType::Pointer > > m_VParser
std::vector< adhocStruct > m_VAllowedVarNameAddedByUser
itk::Array< long > m_ThreadOverflow
std::vector< adhocStruct > m_VNotAllowedVarName
ImageType::IndexType IndexType
std::vector< adhocStruct > m_VFinalAllowedVarName
StreamingStatisticsVectorImageFilterType::MatrixType MatrixType
std::vector< adhocStruct > m_VAllowedVarNameAuto
StreamingStatisticsVectorImageFilter< ImageType > StreamingStatisticsVectorImageFilterType
void operator=(const Self &)=delete
std::vector< unsigned int > m_outputsDimensions
itk::ImageToImageFilter< TImage, TImage > Superclass
ImageType::PointType OrigineType
itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
ImageType::PixelType PixelType
ImageType::PixelType::ValueType PixelValueType
ParserType::ValueType ValueType
unsigned int m_SizeNeighbourhood
std::vector< unsigned int > m_NeighDetected
Definition of the standard floating point parser. Standard implementation of the mathematical express...
This class streams the whole input image through the PersistentStatisticsImageFilter.
StatFilterType::MatrixType MatrixType
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.