22 #ifndef otbStatisticsAttributesLabelMapFilter_h
23 #define otbStatisticsAttributesLabelMapFilter_h
26 #include "itkMatrix.h"
27 #include "itkVector.h"
41 template <
class TLabelObject,
class TFeatureImage>
49 typedef typename itk::Matrix<double, TFeatureImage::ImageDimension, TFeatureImage::ImageDimension>
MatrixType;
51 typedef typename itk::Vector<double, TFeatureImage::ImageDimension>
VectorType;
127 template <
class TImage,
class TFeatureImage>
130 typename Functor::StatisticsAttributesLabelObjectFunctor<typename TImage::LabelObjectType, TFeatureImage>>
148 itkStaticConstMacro(ImageDimension,
unsigned int, TImage::ImageDimension);
157 void SetFeatureImage(
const TFeatureImage* input);
163 void SetInput1(
const TImage* input);
166 const TImage* GetInput1()
const;
169 void SetInput2(
const TFeatureImage* input);
172 const TFeatureImage* GetInput2()
const;
175 void SetFeatureName(
const std::string& name);
178 const std::string& GetFeatureName()
const;
181 void SetReducedAttributeSet(
bool flag);
184 bool GetReducedAttributeSet()
const;
186 itkBooleanMacro(ReducedAttributeSet);
196 void BeforeThreadedGenerateData()
override;
199 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
208 #ifndef OTB_MANUAL_INSTANTIATION
Functor to compute statistics attributes of one LabelObject.
void SetFeatureImage(const TFeatureImage *img)
bool GetReducedAttributeSet() const
virtual ~StatisticsAttributesLabelObjectFunctor()
itk::Matrix< double, TFeatureImage::ImageDimension, TFeatureImage::ImageDimension > MatrixType
itk::Vector< double, TFeatureImage::ImageDimension > VectorType
TFeatureImage::PixelType FeatureType
Typedef of the feature image type.
TLabelObject LabelObjectType
Typedef of the label object.
std::string m_FeatureName
const std::string & GetFeatureName() const
bool operator==(const Self &self)
StatisticsAttributesLabelObjectFunctor Self
TFeatureImage::ConstPointer m_FeatureImage
bool operator!=(const Self &self)
StatisticsAttributesLabelObjectFunctor()
void SetReducedAttributeSet(bool flag)
LabelObjectType::ConstLineIterator ConstLineIteratorType
void SetFeatureName(const std::string &name)
bool m_ReducedAttributeSet
const TFeatureImage * GetFeatureImage() const
void operator()(LabelObjectType *lo) const
This class applies a functor to compute new features.
This class is a fork of itk::StasticsLabelMapFilter to support AttributesMapLabelObject.
itk::SmartPointer< const Self > ConstPointer
StatisticsAttributesLabelMapFilter(const Self &)=delete
Functor::StatisticsAttributesLabelObjectFunctor< LabelObjectType, FeatureImageType > FunctorType
TFeatureImage FeatureImageType
ImageType::LabelObjectType LabelObjectType
itk::SmartPointer< Self > Pointer
StatisticsAttributesLabelMapFilter Self
void operator=(const Self &)=delete
LabelMapFeaturesFunctorImageFilter< ImageType, FunctorType > Superclass
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.