18 #ifndef itkRGBGibbsPriorFilter_h
19 #define itkRGBGibbsPriorFilter_h
21 #include "vnl/vnl_vector.h"
22 #include "vnl/vnl_matrix.h"
46 template<
typename TInputImage,
typename TClassifiedImage >
110 {
return m_LabelledImage; }
113 void SetClassifier(
typename ClassifierType::Pointer ptrToClassifier);
118 itkDebugMacro(
"setting NumberOfClasses to " << numberOfClasses );
119 if ( this->m_NumberOfClasses != numberOfClasses )
121 this->m_NumberOfClasses = numberOfClasses;
130 return this->m_NumberOfClasses;
137 itkDebugMacro(
"setting MaximumNumberOfIterations to " << numberOfIterations);
138 if ( this->m_MaximumNumberOfIterations != numberOfIterations )
140 this->m_MaximumNumberOfIterations = numberOfIterations;
150 return this->m_MaximumNumberOfIterations;
154 itkSetMacro(ClusterSize,
unsigned int);
157 itkSetMacro(ObjectLabel, LabelType);
160 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
164 itkSetMacro(BoundaryGradient,
unsigned int);
166 itkSetMacro(ObjectThreshold,
double);
169 itkSetMacro(CliqueWeight_1,
double);
170 itkGetConstMacro(CliqueWeight_1,
double);
171 itkSetMacro(CliqueWeight_2,
double);
172 itkGetConstMacro(CliqueWeight_2,
double);
173 itkSetMacro(CliqueWeight_3,
double);
174 itkGetConstMacro(CliqueWeight_3,
double);
175 itkSetMacro(CliqueWeight_4,
double);
176 itkGetConstMacro(CliqueWeight_4,
double);
177 itkSetMacro(CliqueWeight_5,
double);
178 itkGetConstMacro(CliqueWeight_5,
double);
179 itkSetMacro(CliqueWeight_6,
double);
180 itkGetConstMacro(CliqueWeight_6,
double);
189 void PrintSelf(std::ostream & os,
Indent indent)
const override;
193 void MinimizeFunctional()
override;
195 void GenerateData()
override;
197 virtual void ApplyGibbsLabeller();
199 virtual void ApplyGPImageFilter();
201 #ifdef ITK_USE_CONCEPT_CHECKING
205 Self::ClassifiedImageType::ImageDimension > ) );
213 void operator=(
const Self &) =
delete;
254 unsigned int m_ImageHeight{0};
255 unsigned int m_ImageDepth{0};
289 void GibbsTotalEnergy(
int i);
292 double GibbsEnergy(
unsigned int i,
unsigned int k,
unsigned int k1);
307 double m_ObjectThreshold{5.0};
310 #ifndef ITK_MANUAL_INSTANTIATION
311 #include "itkRGBGibbsPriorFilter.hxx"
void SetMaximumNumberOfIterations(const unsigned int numberOfIterations) override
typename TInputImage::ConstPointer InputImageConstPointer
TInputImage InputImageType
Light weight base class for most itk classes.
typename TClassifiedImage::IndexType LabelledImageIndexType
typename TInputImage::SizeType InputImageSizeType
typename TClassifiedImage::Pointer TrainingImageType
typename TInputImage::PixelType InputPixelType
typename TInputImage::PixelType InputImagePixelType
typename TClassifiedImage::Pointer LabelledImageType
ClassifierType::Pointer m_ClassifierPtr
Base class for the ImageClassifierBase object.
Implementation of a labeller object that uses Markov Random Fields to classify pixels in an image dat...
LabelledImageType GetLabelledImage()
void SetNumberOfClasses(const unsigned int numberOfClasses) override
typename TInputImage::IndexType IndexType
typename TInputImage::PixelType InputImageVecType
ImageBaseType::SizeType SizeType
ImageBaseType::IndexType IndexType
A multi-dimensional iterator templated over image type that walks a region of pixels.
signed long IndexValueType
vnl_matrix< double > MatrixType
typename TInputImage::Pointer InputImagePointer
typename TClassifiedImage::PixelType LabelledImagePixelType
The RGBGibbsPriorFilter applies Gibbs Prior model for the segmentation of MRF images.
Control indentation during Print() invocation.
typename LabelledImageIndexType::IndexValueType IndexValueType
unsigned int GetNumberOfClasses() const override
#define itkConceptMacro(name, concept)
TClassifiedImage ClassifiedImageType
A multi-dimensional iterator templated over image type that walks a region of pixels.
unsigned int GetMaximumNumberOfIterations() const override