18#ifndef itkRGBGibbsPriorFilter_h
19#define itkRGBGibbsPriorFilter_h
21#include "vnl/vnl_vector.h"
22#include "vnl/vnl_matrix.h"
55template <
typename TInputImage,
typename TClassifiedImage>
74 using typename Superclass::InputImagePixelType;
75 using typename Superclass::InputImageRegionConstIterator;
76 using typename Superclass::InputImageRegionIterator;
77 using typename Superclass::LabelledImageRegionIterator;
78 using typename Superclass::LabelledImagePixelType;
125 return m_LabelledImage;
136 itkDebugMacro(
"setting NumberOfClasses to " << numberOfClasses);
137 if (this->m_NumberOfClasses != numberOfClasses)
139 this->m_NumberOfClasses = numberOfClasses;
149 return this->m_NumberOfClasses;
157 itkDebugMacro(
"setting MaximumNumberOfIterations to " << numberOfIterations);
158 if (this->m_MaximumNumberOfIterations != numberOfIterations)
160 this->m_MaximumNumberOfIterations = numberOfIterations;
171 return this->m_MaximumNumberOfIterations;
175 itkSetMacro(ClusterSize,
unsigned int);
176 itkGetConstMacro(ClusterSize,
unsigned int);
185 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
190 itkSetMacro(BoundaryGradient,
unsigned int);
191 itkGetConstMacro(BoundaryGradient,
unsigned int);
193 itkSetMacro(ObjectThreshold,
double);
194 itkGetConstMacro(ObjectThreshold,
double);
197 itkSetMacro(CliqueWeight_1,
double);
198 itkGetConstMacro(CliqueWeight_1,
double);
199 itkSetMacro(CliqueWeight_2,
double);
200 itkGetConstMacro(CliqueWeight_2,
double);
201 itkSetMacro(CliqueWeight_3,
double);
202 itkGetConstMacro(CliqueWeight_3,
double);
203 itkSetMacro(CliqueWeight_4,
double);
204 itkGetConstMacro(CliqueWeight_4,
double);
205 itkSetMacro(CliqueWeight_5,
double);
206 itkGetConstMacro(CliqueWeight_5,
double);
207 itkSetMacro(CliqueWeight_6,
double);
208 itkGetConstMacro(CliqueWeight_6,
double);
236#ifdef ITK_USE_CONCEPT_CHECKING
258 unsigned int m_NumberOfClasses{ 0 };
261 unsigned int m_MaximumNumberOfIterations{ 10 };
266 unsigned int m_BoundaryGradient{ 7 };
269 double m_BoundaryWeight{ 1 };
272 double m_GibbsPriorWeight{ 1 };
275 int m_StartRadius{ 10 };
278 int m_RecursiveNumber{ 0 };
281 std::unique_ptr<LabelType[]> m_LabelStatus{
nullptr };
287 unsigned int m_Temp{ 0 };
293 unsigned int m_ImageWidth{ 0 };
296 unsigned int m_ImageHeight{ 0 };
299 unsigned int m_ImageDepth{ 0 };
302 unsigned int m_ClusterSize{ 10 };
308 unsigned int m_VecDim{ 0 };
314 std::unique_ptr<unsigned short[]> m_Region{
nullptr };
317 std::unique_ptr<unsigned short[]> m_RegionCount{
nullptr };
322 double m_CliqueWeight_1{ 0.0 };
325 double m_CliqueWeight_2{ 0.0 };
328 double m_CliqueWeight_3{ 0.0 };
331 double m_CliqueWeight_4{ 0.0 };
334 double m_CliqueWeight_5{ 0.0 };
337 double m_CliqueWeight_6{ 0.0 };
370 double m_ObjectThreshold{ 5.0 };
373#ifndef ITK_MANUAL_INSTANTIATION
374# include "itkRGBGibbsPriorFilter.hxx"
Base class for the ImageClassifierBase object.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Implementation of a labeler object that uses Markov Random Fields to classify pixels in an image data...
typename TInputImage::ConstPointer InputImageConstPointer
typename TInputImage::SizeType InputImageSizeType
typename TClassifiedImage::IndexType LabelledImageIndexType
typename TInputImage::Pointer InputImagePointer
TInputImage InputImageType
The RGBGibbsPriorFilter applies Gibbs Prior model for the segmentation of MRF images.
~RGBGibbsPriorFilter() override=default
void SetMaximumNumberOfIterations(const unsigned int numberOfIterations) override
typename TInputImage::IndexType IndexType
vnl_matrix< double > MatrixType
void GibbsTotalEnergy(int i)
void GenerateData() override
void SetClassifier(typename ClassifierType::Pointer ptrToClassifier)
typename TInputImage::PixelType InputPixelType
unsigned int GetMaximumNumberOfIterations() const override
void SetNumberOfClasses(const unsigned int numberOfClasses) override
unsigned int LabelRegion(int i, int l, int change)
double GibbsEnergy(unsigned int i, unsigned int k, unsigned int k1)
typename TClassifiedImage::Pointer LabelledImageType
void GreyScalarBoundary(LabelledImageIndexType Index3D)
unsigned int GetNumberOfClasses() const override
LabelledImageType GetLabelledImage()
typename TClassifiedImage::Pointer TrainingImageType
void MinimizeFunctional() override
TClassifiedImage ClassifiedImageType
typename TInputImage::PixelType InputImageVecType
void GenerateMediumImage()
virtual void ApplyGPImageFilter()
void SetLabelledImage(LabelledImageType image)
virtual void ApplyGibbsLabeller()
void PrintSelf(std::ostream &os, Indent indent) const override
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....