ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members

#include <itkMRFImageFilter.h>

+ Inheritance diagram for itk::MRFImageFilter< TInputImage, TClassifiedImage >:
+ Collaboration diagram for itk::MRFImageFilter< TInputImage, TClassifiedImage >:

Public Types

using ClassifierType = ImageClassifierBase< TInputImage, TClassifiedImage >
 
using ConstPointer = SmartPointer< const Self >
 
using IndexValueType = typename LabelledImageIndexType::IndexValueType
 
using InputImageConstPointer = typename TInputImage::ConstPointer
 
using InputImageFaceListIterator = typename InputImageFaceListType::iterator
 
using InputImageFaceListType = typename InputImageFacesCalculator::FaceListType
 
using InputImageFacesCalculator = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TInputImage >
 
using InputImageNeighborhoodIterator = ConstNeighborhoodIterator< TInputImage >
 
using InputImageNeighborhoodRadiusType = typename InputImageNeighborhoodIterator::RadiusType
 
using InputImagePixelType = typename TInputImage::PixelType
 
using InputImagePointer = typename TInputImage::Pointer
 
using InputImageRegionConstIterator = ImageRegionConstIterator< TInputImage >
 
using InputImageRegionIterator = ImageRegionIterator< TInputImage >
 
using InputImageRegionType = typename TInputImage::RegionType
 
using InputImageType = TInputImage
 
using LabelledImageFaceListIterator = typename LabelledImageFaceListType::iterator
 
using LabelledImageFaceListType = typename LabelledImageFacesCalculator::FaceListType
 
using LabelledImageFacesCalculator = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TClassifiedImage >
 
using LabelledImageIndexType = typename TClassifiedImage::IndexType
 
using LabelledImageNeighborhoodIterator = NeighborhoodIterator< TClassifiedImage >
 
using LabelledImageNeighborhoodRadiusType = typename LabelledImageNeighborhoodIterator::RadiusType
 
using LabelledImageOffsetType = typename TClassifiedImage::OffsetType
 
using LabelledImagePixelType = typename TClassifiedImage::PixelType
 
using LabelledImagePointer = typename TClassifiedImage::Pointer
 
using LabelledImageRegionIterator = ImageRegionIterator< TClassifiedImage >
 
using LabelledImageRegionType = typename TClassifiedImage::RegionType
 
using NeighborhoodRadiusType = typename TInputImage::SizeType
 
using OutputImagePointer = typename Superclass::OutputImagePointer
 
using Pointer = SmartPointer< Self >
 
using Self = MRFImageFilter
 
using SizeType = typename TInputImage::SizeType
 
using Superclass = ImageToImageFilter< TInputImage, TClassifiedImage >
 
using TrainingImagePixelType = typename TClassifiedImage::PixelType
 
using TrainingImagePointer = typename TClassifiedImage::Pointer
 
- Public Types inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage >
using ConstPointer = SmartPointer< const Self >
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImagePixelType = typename InputImageType::PixelType
 
using InputImagePointer = typename InputImageType::Pointer
 
using InputImageRegionType = typename InputImageType::RegionType
 
using InputImageType = TInputImage
 
using OutputImagePixelType = typename Superclass::OutputImagePixelType
 
using OutputImageRegionType = typename Superclass::OutputImageRegionType
 
using Pointer = SmartPointer< Self >
 
using Self = ImageToImageFilter
 
using Superclass = ImageSource< TClassifiedImage >
 
- Public Types inherited from itk::ImageSource< TClassifiedImage >
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = Superclass::DataObjectIdentifierType
 
using DataObjectPointer = DataObject::Pointer
 
using DataObjectPointerArraySizeType = Superclass::DataObjectPointerArraySizeType
 
using OutputImagePixelType = typename OutputImageType::PixelType
 
using OutputImagePointer = typename OutputImageType::Pointer
 
using OutputImageRegionType = typename OutputImageType::RegionType
 
using OutputImageType = TClassifiedImage
 
using Pointer = SmartPointer< Self >
 
using Self = ImageSource
 
using Superclass = ProcessObject
 
- Public Types inherited from itk::ProcessObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = DataObject::DataObjectIdentifierType
 
using DataObjectPointer = DataObject::Pointer
 
using DataObjectPointerArray = std::vector< DataObjectPointer >
 
using DataObjectPointerArraySizeType = DataObjectPointerArray::size_type
 
using MultiThreaderType = MultiThreaderBase
 
using NameArray = std::vector< DataObjectIdentifierType >
 
using Pointer = SmartPointer< Self >
 
using Self = ProcessObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
void SetClassifier (typename ClassifierType::Pointer ptrToClassifier)
 
- Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage >
const InputImageTypeGetInput () const
 
const InputImageTypeGetInput (unsigned int idx) const
 
void PopBackInput () override
 
void PopFrontInput () override
 
virtual void PushBackInput (const InputImageType *image)
 
virtual void PushFrontInput (const InputImageType *image)
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetInput (const InputImageType *image)
 
virtual void SetInput (unsigned int, const TInputImage *image)
 
virtual void SetCoordinateTolerance (double _arg)
 
virtual double GetCoordinateTolerance () const
 
virtual void SetDirectionTolerance (double _arg)
 
virtual double GetDirectionTolerance () const
 
- Public Member Functions inherited from itk::ImageSource< TClassifiedImage >
OutputImageTypeGetOutput ()
 
const OutputImageTypeGetOutput () const
 
OutputImageTypeGetOutput (unsigned int idx)
 
virtual void GraftOutput (DataObject *output)
 
virtual void GraftOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void GraftNthOutput (unsigned int idx, DataObject *output)
 
ProcessObject::DataObjectPointer MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 
ProcessObject::DataObjectPointer MakeOutput (const ProcessObject::DataObjectIdentifierType &) override
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual DataObjectPointerArraySizeType GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual float GetProgress () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
void IncrementProgress (float increment)
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual bool GetReleaseDataFlag () const
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void SetNumberOfWorkUnits (ThreadIdType _arg)
 
virtual const ThreadIdTypeGetNumberOfWorkUnits () const
 
MultiThreaderTypeGetMultiThreader () const
 
void SetMultiThreader (MultiThreaderType *threader)
 
virtual void PrepareOutputs ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage >
static void SetGlobalDefaultDirectionTolerance (double)
 
static double GetGlobalDefaultDirectionTolerance ()
 
static void SetGlobalDefaultCoordinateTolerance (double)
 
static double GetGlobalDefaultCoordinateTolerance ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int ClassifiedImageDimension = TClassifiedImage::ImageDimension
 
static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension
 
- Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage >
static constexpr unsigned int InputImageDimension
 
static constexpr unsigned int OutputImageDimension
 
- Static Public Attributes inherited from itk::ImageSource< TClassifiedImage >
static constexpr unsigned int OutputImageDimension
 
using MRFStopEnum = MRFImageFilterEnums::MRFStop
 
using LabelStatusImageType = Image< int, Self::InputImageDimension >
 
using LabelStatusIndexType = typename LabelStatusImageType::IndexType
 
using LabelStatusRegionType = typename LabelStatusImageType::RegionType
 
using LabelStatusImagePointer = typename LabelStatusImageType::Pointer
 
using LabelStatusImageIterator = ImageRegionIterator< LabelStatusImageType >
 
using LabelStatusImageNeighborhoodIterator = NeighborhoodIterator< LabelStatusImageType >
 
using InputImageSizeType = typename TInputImage::SizeType
 
using LabelStatusImageNeighborhoodRadiusType = typename LabelStatusImageNeighborhoodIterator::RadiusType
 
using LabelStatusImageFacesCalculator = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< LabelStatusImageType >
 
using LabelStatusImageFaceListType = typename LabelStatusImageFacesCalculator::FaceListType
 
using LabelStatusImageFaceListIterator = typename LabelStatusImageFaceListType::iterator
 
InputImageNeighborhoodRadiusType m_InputImageNeighborhoodRadius
 
LabelledImageNeighborhoodRadiusType m_LabelledImageNeighborhoodRadius
 
LabelStatusImageNeighborhoodRadiusType m_LabelStatusImageNeighborhoodRadius
 
unsigned int m_NumberOfClasses { 0 }
 
unsigned int m_MaximumNumberOfIterations { 50 }
 
unsigned int m_KernelSize
 
int m_ErrorCounter { 0 }
 
int m_NeighborhoodSize { 27 }
 
int m_TotalNumberOfValidPixelsInOutputImage { 1 }
 
int m_TotalNumberOfPixelsInInputImage { 1 }
 
double m_ErrorTolerance { 0.2 }
 
double m_SmoothingFactor { 1 }
 
double * m_ClassProbability { nullptr }
 
unsigned int m_NumberOfIterations { 0 }
 
MRFStopEnum m_StopCondition { MRFStopEnum::MaximumNumberOfIterations }
 
LabelStatusImagePointer m_LabelStatusImage
 
std::vector< double > m_MRFNeighborhoodWeight
 
std::vector< double > m_NeighborInfluence
 
std::vector< double > m_MahalanobisDistance
 
std::vector< double > m_DummyVector
 
ClassifierType::Pointer m_ClassifierPtr
 
virtual void SetNumberOfClasses (unsigned int _arg)
 
virtual unsigned int GetNumberOfClasses () const
 
virtual void SetMaximumNumberOfIterations (unsigned int _arg)
 
virtual unsigned int GetMaximumNumberOfIterations () const
 
virtual void SetErrorTolerance (double _arg)
 
virtual double GetErrorTolerance () const
 
virtual void SetSmoothingFactor (double _arg)
 
virtual double GetSmoothingFactor () const
 
void SetNeighborhoodRadius (const NeighborhoodRadiusType &)
 
void SetNeighborhoodRadius (const SizeValueType)
 
void SetNeighborhoodRadius (const SizeValueType *radiusArray)
 
const NeighborhoodRadiusType GetNeighborhoodRadius () const
 
virtual void SetMRFNeighborhoodWeight (std::vector< double > BetaMatrix)
 
virtual std::vector< double > GetMRFNeighborhoodWeight ()
 
virtual const MRFStopEnumGetStopCondition () const
 
virtual const unsigned int & GetNumberOfIterations () const
 
 MRFImageFilter ()
 
 ~MRFImageFilter () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void Allocate ()
 
virtual void ApplyMRFImageFilter ()
 
virtual void MinimizeFunctional ()
 
virtual void DoNeighborhoodOperation (const InputImageNeighborhoodIterator &imageIter, LabelledImageNeighborhoodIterator &labelledIter, LabelStatusImageNeighborhoodIterator &labelStatusIter)
 
void GenerateData () override
 
void GenerateInputRequestedRegion () override
 
void EnlargeOutputRequestedRegion (DataObject *) override
 
void GenerateOutputInformation () override
 
virtual void SetDefaultMRFNeighborhoodWeight ()
 
void ApplyICMLabeller ()
 

Additional Inherited Members

- Protected Types inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage >
using InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension >
 
using OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension >
 
- Protected Member Functions inherited from itk::ImageToImageFilter< TInputImage, TClassifiedImage >
void PushBackInput (const DataObject *input) override
 
void PushFrontInput (const DataObject *input) override
 
 ImageToImageFilter ()
 
 ~ImageToImageFilter () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void VerifyInputInformation () ITKv5_CONST override
 
void GenerateInputRequestedRegion () override
 
virtual void CallCopyOutputRegionToInputRegion (InputImageRegionType &destRegion, const OutputImageRegionType &srcRegion)
 
virtual void CallCopyInputRegionToOutputRegion (OutputImageRegionType &destRegion, const InputImageRegionType &srcRegion)
 
- Protected Member Functions inherited from itk::ImageSource< TClassifiedImage >
 ImageSource ()
 
 ~ImageSource () override=default
 
void GenerateData () override
 
void ClassicMultiThread (ThreadFunctionType callbackFunction)
 
virtual void ThreadedGenerateData (const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
 
virtual void DynamicThreadedGenerateData (const OutputImageRegionType &outputRegionForThread)
 
virtual void AllocateOutputs ()
 
virtual void BeforeThreadedGenerateData ()
 
virtual void AfterThreadedGenerateData ()
 
virtual const ImageRegionSplitterBaseGetImageRegionSplitter () const
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int pieces, OutputImageRegionType &splitRegion)
 
virtual bool GetDynamicMultiThreading () const
 
virtual void SetDynamicMultiThreading (bool _arg)
 
virtual void DynamicMultiThreadingOn ()
 
virtual void DynamicMultiThreadingOff ()
 
- Protected Member Functions inherited from itk::ProcessObject
 ProcessObject ()
 
 ~ProcessObject () override
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void AddInput (DataObject *input)
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName () const
 
virtual void SetPrimaryInput (DataObject *input)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual const DataObjectPointerArraySizeTypeGetNumberOfRequiredInputs () const
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
void SetRequiredInputNames (const NameArray &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
void AddOptionalInputName (const DataObjectIdentifierType &)
 
void AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName () const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
virtual void AddOutput (DataObject *output)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual const DataObjectPointerArraySizeTypeGetNumberOfRequiredOutputs () const
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
virtual void VerifyPreconditions () ITKv5_CONST
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
virtual void PropagateResetPipeline ()
 
virtual void ReleaseInputs ()
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual bool GetThreaderUpdateProgress () const
 
virtual void ThreaderUpdateProgressOn ()
 
virtual void ThreaderUpdateProgressOff ()
 
virtual void SetThreaderUpdateProgress (bool arg)
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Static Protected Member Functions inherited from itk::ImageSource< TClassifiedImage >
static const ImageRegionSplitterBaseGetGlobalDefaultSplitter ()
 
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ThreaderCallback (void *arg)
 
- Static Protected Member Functions inherited from itk::ProcessObject
static constexpr float progressFixedToFloat (uint32_t fixed)
 
static uint32_t progressFloatToFixed (float f)
 
- Protected Attributes inherited from itk::ImageSource< TClassifiedImage >
bool m_DynamicMultiThreading
 
- Protected Attributes inherited from itk::ProcessObject
bool m_Updating
 
TimeStamp m_OutputInformationMTime
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TInputImage, typename TClassifiedImage>
class itk::MRFImageFilter< TInputImage, TClassifiedImage >

Implementation of a labeller object that uses Markov Random Fields to classify pixels in an image data set.

This object classifies pixels based on a Markov Random Field (MRF) model. This implementation uses the maximum a posteriori (MAP) estimates for modeling the MRF. The object traverses the data set and uses the model generated by the Mahalanobis distance classifier to get the distance between each pixel in the data set to a set of known classes, updates the distances by evaluating the influence of its neighboring pixels (based on a MRF model) and finally, classifies each pixel to the class which has the minimum distance to that pixel (taking the neighborhood influence under consideration). DoNeighborhoodOperation is the function that can be modified to achieve different falvors of MRF filters in derived classes.

The classified initial labeled image is needed. It is important that the number of expected classes be set before calling the classifier. In our case we have used the ImageClassifier using a Gaussian model to generate the initial labels. This classifier requires the user to ensure that an appropriate membership function is provided. See the documentation of the image classifier class for more information.

The influence of a neighborhood on a given pixel's classification (the MRF term) is computed by calculating a weighted sum of number of class labels in a three dimensional neighborhood. The basic idea of this neighborhood influence is that if a large number of neighbors of a pixel are of one class, then the current pixel is likely to be of the same class.

The dimensions of the neighborhood are the same as the input image dimensions, and values of the weighting parameters are either specified by the user or through the beta matrix parameter. The default weighting table is generated during object construction. The following table shows an example of a 3 x 3 x 3 neighborhood and the weighting values used. A 3 x 3 x 3 kernel is used where each value is a nonnegative parameter, which encourages neighbors to be of the same class. In this example, the influence of the pixels in the same slice is assigned a weight 1.7. The influence of the pixels in the same location in the previous and next slice is assigned a weight 1.5. A weight of 1.3 is assigned to the influence of the north, south, east, west, and diagonal pixels in the previous and next slices.

\[\begin{tabular}{ccc} \begin{tabular}{|c|c|c|} 1.3 & 1.3 & 1.3 \\ 1.3 & 1.5 & 1.3 \\ 1.3 & 1.3 & 1.3 \\ \end{tabular} & \begin{tabular}{|c|c|c|} 1.7 & 1.7 & 1.7 \\ 1.7 & 0 & 1.7 \\ 1.7 & 1.7 & 1.7 \\ \end{tabular} & \begin{tabular}{|c|c|c|} 1.3 & 1.3 & 1.3 \\ 1.5 & 1.5 & 1.3 \\ 1.3 & 1.3 & 1.3 \\ \end{tabular} \\ \end{tabular}\]

The user needs to set the neighborhood size using the SetNeighborhoodRadius function. The details on the semantics of a neighborhood can be found in the documentation associated with the itkNeighborhood and related objects. NOTE: The size of the neighborhood must match the size of the neighborhood weighting parameters set by the user.

For minimization of the MRF labeling function the MinimizeFunctional virtual method is called. For our current implementation we use the iterated conditional modes (ICM) algorithm described by Besag in the paper "On the Statistical Analysis of Dirty Pictures" in J. Royal Stat. Soc. B, Vol. 48, 1986.

In each iteration, the algorithm visits each pixel in turn and determines whether to update its classification by computing the influence of the classification of the pixel's neighbors and of the intensity data. On each iteration after the first, we reexamine the classification of a pixel only if the classification of some of its neighbors has changed in the previous iteration. The pixels' classification is updated using a synchronous scheme (iteration by iteration) until the error reaches less than the threshold or the number of iteration exceed the maximum set number of iterations. Note: The current implementation supports betaMatrix default weight for two and three dimensional images only. The default for higher dimension is set to unity. This should be overridden by custom weights after filter initialization.

See also
Neighborhood
ImageIterator
NeighborhoodIterator
Classifier
Examples
Examples/Statistics/ScalarImageMarkovRandomField1.cxx.

Definition at line 149 of file itkMRFImageFilter.h.

Member Typedef Documentation

◆ ClassifierType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::ClassifierType = ImageClassifierBase<TInputImage, TClassifiedImage>

Type definitions for classifier to be used for the MRF lavbelling.

Definition at line 218 of file itkMRFImageFilter.h.

◆ ConstPointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::ConstPointer = SmartPointer<const Self>

Definition at line 159 of file itkMRFImageFilter.h.

◆ IndexValueType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::IndexValueType = typename LabelledImageIndexType::IndexValueType

Definition at line 206 of file itkMRFImageFilter.h.

◆ InputImageConstPointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageConstPointer = typename TInputImage::ConstPointer

Definition at line 171 of file itkMRFImageFilter.h.

◆ InputImageFaceListIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageFaceListIterator = typename InputImageFaceListType::iterator

Definition at line 235 of file itkMRFImageFilter.h.

◆ InputImageFaceListType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageFaceListType = typename InputImageFacesCalculator::FaceListType

Definition at line 233 of file itkMRFImageFilter.h.

◆ InputImageFacesCalculator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageFacesCalculator = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TInputImage>

Definition at line 231 of file itkMRFImageFilter.h.

◆ InputImageNeighborhoodIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageNeighborhoodIterator = ConstNeighborhoodIterator<TInputImage>

Input image neighborhood iterator and kernel size type alias

Definition at line 227 of file itkMRFImageFilter.h.

◆ InputImageNeighborhoodRadiusType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageNeighborhoodRadiusType = typename InputImageNeighborhoodIterator::RadiusType

Definition at line 229 of file itkMRFImageFilter.h.

◆ InputImagePixelType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImagePixelType = typename TInputImage::PixelType

Type definition for the input image pixel type.

Definition at line 174 of file itkMRFImageFilter.h.

◆ InputImagePointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImagePointer = typename TInputImage::Pointer

Definition at line 170 of file itkMRFImageFilter.h.

◆ InputImageRegionConstIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageRegionConstIterator = ImageRegionConstIterator<TInputImage>

Definition at line 181 of file itkMRFImageFilter.h.

◆ InputImageRegionIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageRegionIterator = ImageRegionIterator<TInputImage>

Type definition for the input image region iterator

Definition at line 180 of file itkMRFImageFilter.h.

◆ InputImageRegionType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageRegionType = typename TInputImage::RegionType

Type definition for the input image region type.

Definition at line 177 of file itkMRFImageFilter.h.

◆ InputImageSizeType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageSizeType = typename TInputImage::SizeType
private

Labelled status image neighborhood iterator type alias

Definition at line 392 of file itkMRFImageFilter.h.

◆ InputImageType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageType = TInputImage

Type definition for the input image.

Definition at line 169 of file itkMRFImageFilter.h.

◆ LabelledImageFaceListIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageFaceListIterator = typename LabelledImageFaceListType::iterator

Definition at line 246 of file itkMRFImageFilter.h.

◆ LabelledImageFaceListType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageFaceListType = typename LabelledImageFacesCalculator::FaceListType

Definition at line 244 of file itkMRFImageFilter.h.

◆ LabelledImageFacesCalculator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageFacesCalculator = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TClassifiedImage>

Definition at line 242 of file itkMRFImageFilter.h.

◆ LabelledImageIndexType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageIndexType = typename TClassifiedImage::IndexType

Type definition for the classified image index type.

Definition at line 205 of file itkMRFImageFilter.h.

◆ LabelledImageNeighborhoodIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageNeighborhoodIterator = NeighborhoodIterator<TClassifiedImage>

Labelled image neighborhood interator type alias

Definition at line 238 of file itkMRFImageFilter.h.

◆ LabelledImageNeighborhoodRadiusType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageNeighborhoodRadiusType = typename LabelledImageNeighborhoodIterator::RadiusType

Definition at line 240 of file itkMRFImageFilter.h.

◆ LabelledImageOffsetType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageOffsetType = typename TClassifiedImage::OffsetType

Type definition for the classified image offset type.

Definition at line 209 of file itkMRFImageFilter.h.

◆ LabelledImagePixelType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImagePixelType = typename TClassifiedImage::PixelType

Type definitions for the classified image pixel type. It has to be the same type as the training image.

Definition at line 198 of file itkMRFImageFilter.h.

◆ LabelledImagePointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImagePointer = typename TClassifiedImage::Pointer

Type definitions for the labelled image. It is derived from the training image.

Definition at line 194 of file itkMRFImageFilter.h.

◆ LabelledImageRegionIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageRegionIterator = ImageRegionIterator<TClassifiedImage>

Type definition for the input image region iterator

Definition at line 212 of file itkMRFImageFilter.h.

◆ LabelledImageRegionType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelledImageRegionType = typename TClassifiedImage::RegionType

Type definitions for the classified image pixel type. It has to be the same type as the training image.

Definition at line 202 of file itkMRFImageFilter.h.

◆ LabelStatusImageFaceListIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImageFaceListIterator = typename LabelStatusImageFaceListType::iterator
private

Labelled status image neighborhood iterator type alias

Definition at line 400 of file itkMRFImageFilter.h.

◆ LabelStatusImageFaceListType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImageFaceListType = typename LabelStatusImageFacesCalculator::FaceListType
private

Labelled status image neighborhood iterator type alias

Definition at line 398 of file itkMRFImageFilter.h.

◆ LabelStatusImageFacesCalculator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImageFacesCalculator = NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<LabelStatusImageType>
private

Labelled status image neighborhood iterator type alias

Definition at line 396 of file itkMRFImageFilter.h.

◆ LabelStatusImageIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImageIterator = ImageRegionIterator<LabelStatusImageType>
protected

Labelled status image neighborhood iterator type alias

Definition at line 368 of file itkMRFImageFilter.h.

◆ LabelStatusImageNeighborhoodIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImageNeighborhoodIterator = NeighborhoodIterator<LabelStatusImageType>
protected

Labelled status image neighborhood iterator type alias

Definition at line 371 of file itkMRFImageFilter.h.

◆ LabelStatusImageNeighborhoodRadiusType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImageNeighborhoodRadiusType = typename LabelStatusImageNeighborhoodIterator::RadiusType
private

Labelled status image neighborhood iterator type alias

Definition at line 394 of file itkMRFImageFilter.h.

◆ LabelStatusImagePointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImagePointer = typename LabelStatusImageType::Pointer
protected

Labelled status image neighborhood iterator type alias

Definition at line 367 of file itkMRFImageFilter.h.

◆ LabelStatusImageType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusImageType = Image<int, Self::InputImageDimension>
protected

Labelled status image neighborhood iterator type alias

Definition at line 364 of file itkMRFImageFilter.h.

◆ LabelStatusIndexType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusIndexType = typename LabelStatusImageType::IndexType
protected

Labelled status image neighborhood iterator type alias

Definition at line 365 of file itkMRFImageFilter.h.

◆ LabelStatusRegionType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::LabelStatusRegionType = typename LabelStatusImageType::RegionType
protected

Labelled status image neighborhood iterator type alias

Definition at line 366 of file itkMRFImageFilter.h.

◆ MRFStopEnum

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::MRFStopEnum = MRFImageFilterEnums::MRFStop

Labelled status image neighborhood iterator type alias

Definition at line 315 of file itkMRFImageFilter.h.

◆ NeighborhoodRadiusType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::NeighborhoodRadiusType = typename TInputImage::SizeType

Radius type alias support

Definition at line 224 of file itkMRFImageFilter.h.

◆ OutputImagePointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::OutputImagePointer = typename Superclass::OutputImagePointer

Definition at line 160 of file itkMRFImageFilter.h.

◆ Pointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::Pointer = SmartPointer<Self>

Definition at line 158 of file itkMRFImageFilter.h.

◆ Self

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::Self = MRFImageFilter

Standard class type aliases.

Definition at line 156 of file itkMRFImageFilter.h.

◆ SizeType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::SizeType = typename TInputImage::SizeType

Size and value type alias support

Definition at line 221 of file itkMRFImageFilter.h.

◆ Superclass

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::Superclass = ImageToImageFilter<TInputImage, TClassifiedImage>

Definition at line 157 of file itkMRFImageFilter.h.

◆ TrainingImagePixelType

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::TrainingImagePixelType = typename TClassifiedImage::PixelType

Type definitions for the training image pixel type.

Definition at line 190 of file itkMRFImageFilter.h.

◆ TrainingImagePointer

template<typename TInputImage , typename TClassifiedImage >
using itk::MRFImageFilter< TInputImage, TClassifiedImage >::TrainingImagePointer = typename TClassifiedImage::Pointer

Type definitions for the training image.

Definition at line 187 of file itkMRFImageFilter.h.

Constructor & Destructor Documentation

◆ MRFImageFilter()

template<typename TInputImage , typename TClassifiedImage >
itk::MRFImageFilter< TInputImage, TClassifiedImage >::MRFImageFilter ( )
protected

Labelled status image neighborhood iterator type alias

◆ ~MRFImageFilter()

template<typename TInputImage , typename TClassifiedImage >
itk::MRFImageFilter< TInputImage, TClassifiedImage >::~MRFImageFilter ( )
overrideprotecteddefault

Labelled status image neighborhood iterator type alias

Member Function Documentation

◆ Allocate()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::Allocate ( )
protected

Allocate memory for labelled images.

◆ ApplyICMLabeller()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::ApplyICMLabeller ( )
private

Labelled status image neighborhood iterator type alias

◆ ApplyMRFImageFilter()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::ApplyMRFImageFilter ( )
protectedvirtual

Apply MRF Classifier. In this example the images are labelled using Iterated Conditional Mode algorithm by J. Besag, "On statistical analysis of dirty pictures," J. Royal Stat. Soc. B, vol. 48, pp. 259-302, 1986.

◆ CreateAnother()

template<typename TInputImage , typename TClassifiedImage >
virtual::itk::LightObject::Pointer itk::MRFImageFilter< TInputImage, TClassifiedImage >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ DoNeighborhoodOperation()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::DoNeighborhoodOperation ( const InputImageNeighborhoodIterator imageIter,
LabelledImageNeighborhoodIterator labelledIter,
LabelStatusImageNeighborhoodIterator labelStatusIter 
)
protectedvirtual

Labelled status image neighborhood iterator type alias

◆ EnlargeOutputRequestedRegion()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::EnlargeOutputRequestedRegion ( DataObject )
overrideprotectedvirtual

Labelled status image neighborhood iterator type alias

Reimplemented from itk::ProcessObject.

◆ GenerateData()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::GenerateData ( )
overrideprotectedvirtual

Labelled status image neighborhood iterator type alias

Reimplemented from itk::ProcessObject.

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ GenerateInputRequestedRegion()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::GenerateInputRequestedRegion ( )
overrideprotectedvirtual

Labelled status image neighborhood iterator type alias

Reimplemented from itk::ProcessObject.

◆ GenerateOutputInformation()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::GenerateOutputInformation ( )
overrideprotectedvirtual

Labelled status image neighborhood iterator type alias

Reimplemented from itk::ProcessObject.

◆ GetErrorTolerance()

template<typename TInputImage , typename TClassifiedImage >
virtual double itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetErrorTolerance ( ) const
virtual

Labelled status image neighborhood iterator type alias

◆ GetMaximumNumberOfIterations()

template<typename TInputImage , typename TClassifiedImage >
virtual unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetMaximumNumberOfIterations ( ) const
virtual

Labelled status image neighborhood iterator type alias

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ GetMRFNeighborhoodWeight()

template<typename TInputImage , typename TClassifiedImage >
virtual std::vector<double> itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetMRFNeighborhoodWeight ( )
inlinevirtual

Labelled status image neighborhood iterator type alias

Definition at line 310 of file itkMRFImageFilter.h.

◆ GetNameOfClass()

template<typename TInputImage , typename TClassifiedImage >
virtual const char* itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ImageToImageFilter< TInputImage, TClassifiedImage >.

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ GetNeighborhoodRadius()

template<typename TInputImage , typename TClassifiedImage >
const NeighborhoodRadiusType itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetNeighborhoodRadius ( ) const
inline

Get the neighborhood radius

Definition at line 290 of file itkMRFImageFilter.h.

◆ GetNumberOfClasses()

template<typename TInputImage , typename TClassifiedImage >
virtual unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetNumberOfClasses ( ) const
virtual

Labelled status image neighborhood iterator type alias

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ GetNumberOfIterations()

template<typename TInputImage , typename TClassifiedImage >
virtual const unsigned int& itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetNumberOfIterations ( ) const
virtual

Labelled status image neighborhood iterator type alias

◆ GetSmoothingFactor()

template<typename TInputImage , typename TClassifiedImage >
virtual double itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetSmoothingFactor ( ) const
virtual

Labelled status image neighborhood iterator type alias

◆ GetStopCondition()

template<typename TInputImage , typename TClassifiedImage >
virtual const MRFStopEnum& itk::MRFImageFilter< TInputImage, TClassifiedImage >::GetStopCondition ( ) const
virtual

Get condition that stops the MRF filter (Number of Iterations / Error tolerance )

◆ MinimizeFunctional()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::MinimizeFunctional ( )
protectedvirtual

Minimization algorithm to be used.

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ New()

template<typename TInputImage , typename TClassifiedImage >
static Pointer itk::MRFImageFilter< TInputImage, TClassifiedImage >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Labelled status image neighborhood iterator type alias

Reimplemented from itk::ProcessObject.

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ SetClassifier()

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetClassifier ( typename ClassifierType::Pointer  ptrToClassifier)

Set the pointer to the classifer being used.

◆ SetDefaultMRFNeighborhoodWeight()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetDefaultMRFNeighborhoodWeight ( )
privatevirtual

Set/Get the weighting parameters (Beta Matrix). A default 3 x 3 x 3 matrix is provided. However, the user is allowed to override it with their choice of weights for a 3 x 3 x 3 matrix.

◆ SetErrorTolerance()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetErrorTolerance ( double  _arg)
virtual

Set/Get the error tolerance level which is used as a threshold to quit the iterations

◆ SetMaximumNumberOfIterations()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetMaximumNumberOfIterations ( unsigned int  _arg)
virtual

Set/Get the number of iteration of the Iterated Conditional Mode (ICM) algorithm. A default value is set at 50 iterations.

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ SetMRFNeighborhoodWeight()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetMRFNeighborhoodWeight ( std::vector< double >  BetaMatrix)
virtual

Set the weighting parameters (used in MRF algorithms). This is a function allowing the users to set the weight matrix by providing a a 1D array of weights. The default implementation supports a 3 x 3 x 3 kernel. The labeler needs to be extended for a different kernel size.

◆ SetNeighborhoodRadius() [1/3]

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetNeighborhoodRadius ( const NeighborhoodRadiusType )

Set the neighborhood radius

◆ SetNeighborhoodRadius() [2/3]

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetNeighborhoodRadius ( const SizeValueType radiusArray)

Labelled status image neighborhood iterator type alias

◆ SetNeighborhoodRadius() [3/3]

template<typename TInputImage , typename TClassifiedImage >
void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetNeighborhoodRadius ( const  SizeValueType)

Sets the radius for the neighborhood, calculates size from the radius, and allocates storage.

◆ SetNumberOfClasses()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetNumberOfClasses ( unsigned int  _arg)
virtual

Set/Get the number of classes.

Reimplemented in itk::RGBGibbsPriorFilter< TInputImage, TClassifiedImage >.

◆ SetSmoothingFactor()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::MRFImageFilter< TInputImage, TClassifiedImage >::SetSmoothingFactor ( double  _arg)
virtual

Set/Get the degree of smoothing desired

Member Data Documentation

◆ ClassifiedImageDimension

template<typename TInputImage , typename TClassifiedImage >
constexpr unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::ClassifiedImageDimension = TClassifiedImage::ImageDimension
staticconstexpr

Labelled Image dimension

Definition at line 215 of file itkMRFImageFilter.h.

◆ InputImageDimension

template<typename TInputImage , typename TClassifiedImage >
constexpr unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::InputImageDimension = TInputImage::ImageDimension
staticconstexpr

Image dimension

Definition at line 184 of file itkMRFImageFilter.h.

◆ m_ClassifierPtr

template<typename TInputImage , typename TClassifiedImage >
ClassifierType::Pointer itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_ClassifierPtr
private

Pointer to the classifier to be used for the MRF labelling.

Definition at line 428 of file itkMRFImageFilter.h.

◆ m_ClassProbability

template<typename TInputImage , typename TClassifiedImage >
double* itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_ClassProbability { nullptr }
private

Labelled status image neighborhood iterator type alias

Definition at line 416 of file itkMRFImageFilter.h.

◆ m_DummyVector

template<typename TInputImage , typename TClassifiedImage >
std::vector<double> itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_DummyVector
private

Labelled status image neighborhood iterator type alias

Definition at line 425 of file itkMRFImageFilter.h.

◆ m_ErrorCounter

template<typename TInputImage , typename TClassifiedImage >
int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_ErrorCounter { 0 }
private

Labelled status image neighborhood iterator type alias

Definition at line 410 of file itkMRFImageFilter.h.

◆ m_ErrorTolerance

template<typename TInputImage , typename TClassifiedImage >
double itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_ErrorTolerance { 0.2 }
private

Labelled status image neighborhood iterator type alias

Definition at line 414 of file itkMRFImageFilter.h.

◆ m_InputImageNeighborhoodRadius

template<typename TInputImage , typename TClassifiedImage >
InputImageNeighborhoodRadiusType itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_InputImageNeighborhoodRadius
private

Labelled status image neighborhood iterator type alias

Definition at line 402 of file itkMRFImageFilter.h.

◆ m_KernelSize

template<typename TInputImage , typename TClassifiedImage >
unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_KernelSize
private

Labelled status image neighborhood iterator type alias

Definition at line 408 of file itkMRFImageFilter.h.

◆ m_LabelledImageNeighborhoodRadius

template<typename TInputImage , typename TClassifiedImage >
LabelledImageNeighborhoodRadiusType itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_LabelledImageNeighborhoodRadius
private

Labelled status image neighborhood iterator type alias

Definition at line 403 of file itkMRFImageFilter.h.

◆ m_LabelStatusImage

template<typename TInputImage , typename TClassifiedImage >
LabelStatusImagePointer itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_LabelStatusImage
private

Labelled status image neighborhood iterator type alias

Definition at line 420 of file itkMRFImageFilter.h.

◆ m_LabelStatusImageNeighborhoodRadius

template<typename TInputImage , typename TClassifiedImage >
LabelStatusImageNeighborhoodRadiusType itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_LabelStatusImageNeighborhoodRadius
private

Labelled status image neighborhood iterator type alias

Definition at line 404 of file itkMRFImageFilter.h.

◆ m_MahalanobisDistance

template<typename TInputImage , typename TClassifiedImage >
std::vector<double> itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_MahalanobisDistance
private

Labelled status image neighborhood iterator type alias

Definition at line 424 of file itkMRFImageFilter.h.

◆ m_MaximumNumberOfIterations

template<typename TInputImage , typename TClassifiedImage >
unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_MaximumNumberOfIterations { 50 }
private

Labelled status image neighborhood iterator type alias

Definition at line 407 of file itkMRFImageFilter.h.

◆ m_MRFNeighborhoodWeight

template<typename TInputImage , typename TClassifiedImage >
std::vector<double> itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_MRFNeighborhoodWeight
private

Labelled status image neighborhood iterator type alias

Definition at line 422 of file itkMRFImageFilter.h.

◆ m_NeighborhoodSize

template<typename TInputImage , typename TClassifiedImage >
int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_NeighborhoodSize { 27 }
private

Labelled status image neighborhood iterator type alias

Definition at line 411 of file itkMRFImageFilter.h.

◆ m_NeighborInfluence

template<typename TInputImage , typename TClassifiedImage >
std::vector<double> itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_NeighborInfluence
private

Labelled status image neighborhood iterator type alias

Definition at line 423 of file itkMRFImageFilter.h.

◆ m_NumberOfClasses

template<typename TInputImage , typename TClassifiedImage >
unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_NumberOfClasses { 0 }
private

Labelled status image neighborhood iterator type alias

Definition at line 406 of file itkMRFImageFilter.h.

◆ m_NumberOfIterations

template<typename TInputImage , typename TClassifiedImage >
unsigned int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_NumberOfIterations { 0 }
private

Labelled status image neighborhood iterator type alias

Definition at line 417 of file itkMRFImageFilter.h.

◆ m_SmoothingFactor

template<typename TInputImage , typename TClassifiedImage >
double itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_SmoothingFactor { 1 }
private

Labelled status image neighborhood iterator type alias

Definition at line 415 of file itkMRFImageFilter.h.

◆ m_StopCondition

template<typename TInputImage , typename TClassifiedImage >
MRFStopEnum itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_StopCondition { MRFStopEnum::MaximumNumberOfIterations }
private

Labelled status image neighborhood iterator type alias

Definition at line 418 of file itkMRFImageFilter.h.

◆ m_TotalNumberOfPixelsInInputImage

template<typename TInputImage , typename TClassifiedImage >
int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_TotalNumberOfPixelsInInputImage { 1 }
private

Labelled status image neighborhood iterator type alias

Definition at line 413 of file itkMRFImageFilter.h.

◆ m_TotalNumberOfValidPixelsInOutputImage

template<typename TInputImage , typename TClassifiedImage >
int itk::MRFImageFilter< TInputImage, TClassifiedImage >::m_TotalNumberOfValidPixelsInOutputImage { 1 }
private

Labelled status image neighborhood iterator type alias

Definition at line 412 of file itkMRFImageFilter.h.


The documentation for this class was generated from the following file: