18 #ifndef itkMRFImageFilter_h
19 #define itkMRFImageFilter_h
21 #include "vnl/vnl_vector.h"
22 #include "vnl/vnl_matrix.h"
124 template<
typename TInputImage,
typename TClassifiedImage >
158 itkStaticConstMacro(InputImageDimension,
unsigned int,
159 TInputImage::ImageDimension);
191 itkStaticConstMacro(ClassifiedImageDimension,
unsigned int,
192 TClassifiedImage::ImageDimension);
207 typedef typename InputImageNeighborhoodIterator::RadiusType
216 typedef typename InputImageFaceListType::iterator
232 typedef typename LabelledImageFaceListType::iterator
239 itkSetMacro(NumberOfClasses,
unsigned int);
240 itkGetConstMacro(NumberOfClasses,
unsigned int);
245 itkSetMacro(MaximumNumberOfIterations,
unsigned int);
246 itkGetConstMacro(MaximumNumberOfIterations,
unsigned int);
251 itkSetMacro(ErrorTolerance,
double);
252 itkGetConstMacro(ErrorTolerance,
double);
257 itkSetMacro(SmoothingFactor,
double);
258 itkGetConstMacro(SmoothingFactor,
double);
269 void SetNeighborhoodRadius(
const SizeValueType *radiusArray);
276 for (
int i = 0; i < InputImageDimension; ++i )
278 radius[i] = m_InputImageNeighborhoodRadius[i];
288 virtual void SetMRFNeighborhoodWeight(std::vector< double > BetaMatrix);
292 return m_MRFNeighborhoodWeight;
297 MaximumNumberOfIterations = 1,
303 itkGetConstReferenceMacro(StopCondition, StopConditionType);
306 itkGetConstReferenceMacro(NumberOfIterations,
unsigned int);
308 #ifdef ITK_USE_CONCEPT_CHECKING
326 void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
335 virtual
void ApplyMRFImageFilter();
338 virtual
void MinimizeFunctional();
355 virtual
void GenerateData() ITK_OVERRIDE;
357 virtual
void GenerateInputRequestedRegion() ITK_OVERRIDE;
359 virtual
void EnlargeOutputRequestedRegion(
DataObject *) ITK_OVERRIDE;
361 virtual
void GenerateOutputInformation() ITK_OVERRIDE;
371 typedef NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< LabelStatusImageType >
384 unsigned int m_NumberOfClasses;
385 unsigned int m_MaximumNumberOfIterations;
386 unsigned int m_KernelSize;
389 int m_NeighborhoodSize;
390 int m_TotalNumberOfValidPixelsInOutputImage;
391 int m_TotalNumberOfPixelsInInputImage;
392 double m_ErrorTolerance;
393 double m_SmoothingFactor;
394 double * m_ClassProbability;
395 unsigned int m_NumberOfIterations;
398 LabelStatusImagePointer m_LabelStatusImage;
400 std::vector<
double > m_MRFNeighborhoodWeight;
401 std::vector<
double > m_NeighborInfluence;
402 std::vector<
double > m_MahalanobisDistance;
403 std::vector<
double > m_DummyVector;
411 virtual
void SetDefaultMRFNeighborhoodWeight();
414 void ApplyICMLabeller();
418 #ifndef ITK_MANUAL_INSTANTIATION
419 #include "itkMRFImageFilter.hxx"
TInputImage::RegionType InputImageRegionType
Light weight base class for most itk classes.
LabelledImageIndexType::IndexValueType IndexValueType
LabelledImageFacesCalculator::FaceListType LabelledImageFaceListType
InputImageFaceListType::iterator InputImageFaceListIterator
TClassifiedImage::PixelType LabelledImagePixelType
LabelStatusImageType::RegionType LabelStatusRegionType
TClassifiedImage::IndexType LabelledImageIndexType
signed long IndexValueType
SmartPointer< const Self > ConstPointer
InputImageFacesCalculator::FaceListType InputImageFaceListType
TInputImage::PixelType InputImagePixelType
ImageRegionIterator< TInputImage > InputImageRegionIterator
LabelStatusImageNeighborhoodIterator::RadiusType LabelStatusImageNeighborhoodRadiusType
InputImageNeighborhoodIterator::RadiusType InputImageNeighborhoodRadiusType
NeighborhoodIterator< TClassifiedImage > LabelledImageNeighborhoodIterator
TClassifiedImage::OffsetType LabelledImageOffsetType
LabelledImageNeighborhoodIterator::RadiusType LabelledImageNeighborhoodRadiusType
Base class for the ImageClassifierBase object.
unsigned long SizeValueType
TClassifiedImage::Pointer TrainingImagePointer
TClassifiedImage::RegionType LabelledImageRegionType
LabelStatusImageFaceListType::iterator LabelStatusImageFaceListIterator
Implementation of a labeller object that uses Markov Random Fields to classify pixels in an image dat...
ImageToImageFilter< TInputImage, TClassifiedImage > Superclass
ImageRegionIterator< TClassifiedImage > LabelledImageRegionIterator
Splits an image into a main region and several "face" regions which are used to handle computations o...
TClassifiedImage::PixelType TrainingImagePixelType
ImageRegionConstIterator< TInputImage > InputImageRegionConstIterator
ConstNeighborhoodIterator< TInputImage > InputImageNeighborhoodIterator
TClassifiedImage::Pointer LabelledImagePointer
A multi-dimensional iterator templated over image type that walks a region of pixels.
TInputImage::SizeType NeighborhoodRadiusType
Superclass::OutputImagePointer OutputImagePointer
LabelledImageFaceListType::iterator LabelledImageFaceListIterator
SmartPointer< Self > Pointer
TInputImage::SizeType SizeType
virtual std::vector< double > GetMRFNeighborhoodWeight()
NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TInputImage > InputImageFacesCalculator
Superclass::RadiusType RadiusType
const NeighborhoodRadiusType GetNeighborhoodRadius() const
TInputImage::Pointer InputImagePointer
std::list< RegionType > FaceListType
ImageClassifierBase< TInputImage, TClassifiedImage > ClassifierType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
ImageBaseType::SizeType SizeType
TInputImage::ConstPointer InputImageConstPointer
LabelStatusImageFacesCalculator::FaceListType LabelStatusImageFaceListType
TInputImage InputImageType
Base class for most ITK classes.
#define itkConceptMacro(name, concept)
NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TClassifiedImage > LabelledImageFacesCalculator
Base class for all data objects in ITK.
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.
Templated n-dimensional image class.
A multi-dimensional iterator templated over image type that walks a region of pixels.
ImageBaseType::IndexType IndexType
TInputImage::SizeType InputImageSizeType