21 #ifndef otbImageClassificationFilter_h
22 #define otbImageClassificationFilter_h
24 #include "itkImageToImageFilter.h"
43 template <
class TInputImage,
class TOutputImage,
class TMaskImage = TOutputImage>
49 typedef itk::ImageToImageFilter<TInputImage, TOutputImage>
Superclass;
61 typedef typename InputImageType::InternalPixelType
ValueType;
70 typedef typename OutputImageType::PixelType
LabelType;
94 itkSetMacro(UseConfidenceMap,
bool);
95 itkGetMacro(UseConfidenceMap,
bool);
99 itkSetMacro(UseProbaMap,
bool);
100 itkGetMacro(UseProbaMap,
bool);
103 itkSetMacro(BatchMode,
bool);
104 itkGetMacro(BatchMode,
bool);
105 itkBooleanMacro(BatchMode);
107 itkSetMacro(NumberOfClasses,
unsigned int);
108 itkGetMacro(NumberOfClasses,
unsigned int);
147 void PrintSelf(std::ostream& os, itk::Indent indent)
const override;
151 Superclass::GenerateOutputInformation();
153 this->GetOutputProba()->SetNumberOfComponentsPerPixel(m_NumberOfClasses);
173 #ifndef OTB_MANUAL_INSTANTIATION
This filter performs the classification of a VectorImage using a Model.
ModelType::Pointer ModelPointerType
ImageClassificationFilter(const Self &)=delete
OutputImageType::RegionType OutputImageRegionType
void BatchThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId)
ProbaImageType::Pointer ProbaImagePointerType
TInputImage InputImageType
OutputImageType::Pointer OutputImagePointerType
otb::Image< double > ConfidenceImageType
InputImageType::InternalPixelType ValueType
itk::SmartPointer< Self > Pointer
void operator=(const Self &)=delete
MachineLearningModel< ValueType, LabelType > ModelType
void SetInputMask(const MaskImageType *mask)
ConfidenceImageType::Pointer ConfidenceImagePointerType
ImageClassificationFilter Self
InputImageType::ConstPointer InputImageConstPointerType
itk::SmartPointer< const Self > ConstPointer
~ImageClassificationFilter() override
ImageClassificationFilter()
const MaskImageType * GetInputMask(void)
unsigned int m_NumberOfClasses
void ClassicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId)
OutputImageType::PixelType LabelType
otb::VectorImage< double > ProbaImageType
itk::VariableLengthVector< double > ProbaSampleType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType threadId) override
ConfidenceImageType * GetOutputConfidence(void)
TOutputImage OutputImageType
ProbaImageType * GetOutputProba(void)
MaskImageType::Pointer MaskImagePointerType
itkGetObjectMacro(Model, ModelType)
void GenerateOutputInformation() override
void PrintSelf(std::ostream &os, itk::Indent indent) const override
MaskImageType::ConstPointer MaskImageConstPointerType
void BeforeThreadedGenerateData() override
Creation of an "otb" image which contains metadata.
itk::SmartPointer< Self > Pointer
MachineLearningModel is the base class for all classifier objects (SVM, KNN, Random Forests,...
itk::SmartPointer< Self > Pointer
Creation of an "otb" vector image which contains metadata.
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.