open_iA  2020.04
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision > Class Template Reference

Base class for fuzzy classifiers that take an image as input and produce a membership itk::VectorImage as output. More...

#include <itkFuzzyClassifierInitializationImageFilter.h>

Inheritance diagram for itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >:
Collaboration diagram for itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >:

Classes

struct  ThreadStruct
 Internal structure used for passing image data into the threading library. More...
 

Public Types

typedef std::vector< CentroidTypeCentroidArrayType
 Typdef for the array of centroids. More...
 
typedef itk::Vector< CentroidValueType, InputImagePixelDimension > CentroidType
 Centroid typedef. More...
 
typedef NumericTraits< CentroidValueTypeCentroidValueNumericTraitsType
 Other centroid typedefs. More...
 
typedef TCentroidValuePrecision CentroidValueType
 
typedef SmartPointer< const SelfConstPointer
 
typedef ImageRegionConstIterator< InputImageTypeInputImageConstIterator
 
typedef Superclass::InputImageConstPointer InputImageConstPointer
 
typedef InputImageType::IndexType InputImageIndexType
 
typedef NumericTraits< InputImagePixelTypeInputImagePixelNumericTraitsType
 Input image pixel typedefs. More...
 
typedef PixelTraits< InputImagePixelTypeInputImagePixelTraitsType
 
typedef Superclass::InputImagePixelType InputImagePixelType
 
typedef InputImagePixelTraitsType::ValueType InputImagePixelValueType
 
typedef Superclass::InputImagePointer InputImagePointer
 Input image typedef support (types inherited from the superclass). More...
 
typedef Superclass::InputImageRegionType InputImageRegionType
 
typedef InputImageType::SizeType InputImageSizeType
 Other input image typedefs. More...
 
typedef TInputImage InputImageType
 Convenient typedefs for simplifying declarations. More...
 
typedef ImageRegionConstIterator< InternalImageTypeInternalImageConstIterator
 
typedef InternalImageType::ConstPointer InternalImageConstPointer
 
typedef ImageRegionIterator< InternalImageTypeInternalImageIterator
 Other internal image typedefs. More...
 
typedef InternalImageType::Pointer InternalImagePointer
 
typedef Image< CentroidType, itkGetStaticConstMacro(InputImageDimension) > InternalImageType
 Internal image typedef support. More...
 
typedef ImageRegionIterator< MembershipImageTypeMembershipImageIterator
 
typedef MembershipImageType::PixelType MembershipImagePixelType
 
typedef MembershipImageType::Pointer MembershipImagePointer
 
typedef OutputImageType MembershipImageType
 Membership image typedef support. More...
 
typedef TProbabilityPrecision MembershipValueType
 
typedef VectorImage< MembershipValueType, itkGetStaticConstMacro(InputImageDimension) > OutputImageType
 Convenient typedefs for simplifying declarations. More...
 
typedef SmartPointer< SelfPointer
 
typedef FuzzyClassifierInitializationImageFilter Self
 Standard class typedefs. More...
 
typedef ImageToImageFilter< InputImageType, OutputImageTypeSuperclass
 Standard class typedefs. More...
 

Public Member Functions

virtual double ComputeDifference (const CentroidArrayType &arrayOfCentroids)
 Computes the mean square error between centroids and the centroid array passed as parameter. More...
 
virtual CentroidArrayType GetCentroids () const
 Get cluster centroids. More...
 
 itkBooleanMacro (IgnoreBackgroundPixels)
 Turn on and off the IgnoreBackgroundPixels flag. More...
 
 itkGetConstMacro (BackgroundPixel, InputImagePixelType)
 Get the pixel used as background value in the input image. More...
 
 itkGetConstMacro (Error, double)
 Get error between the new class centroids and their values from the previous iteration. More...
 
 itkGetConstMacro (IgnoreBackgroundPixels, bool)
 Get true/false depending on whether the algorithm ignores the background pixels or not. More...
 
 itkGetConstMacro (M, double)
 Get m fuzziness degree value. More...
 
 itkGetConstMacro (MaximumError, double)
 Get maximum error used to stop the algorithm. More...
 
 itkGetConstMacro (MaximumNumberOfIterations, unsigned int)
 Get maximum number of iterations. More...
 
 itkGetConstMacro (NumberOfClasses, unsigned int)
 Get the number of classes. More...
 
 itkGetConstMacro (NumberOfIterations, unsigned int)
 Get number of iterations performed. More...
 
 itkSetClampMacro (M, double, 1.0, NumericTraits< double >::max())
 Set m fuzziness degree value. More...
 
 itkSetClampMacro (MaximumError, double, 0.0, NumericTraits< double >::max())
 Set maximum error used to stop the algorithm. More...
 
 itkSetClampMacro (MaximumNumberOfIterations, unsigned int, 1, NumericTraits< unsigned int >::max())
 Set maximum number of iterations. More...
 
 itkSetMacro (BackgroundPixel, InputImagePixelType)
 Set the pixel used as background value in the input image. More...
 
 itkSetMacro (IgnoreBackgroundPixels, bool)
 Set true/false depending on whether the algorithm ignores the background pixels or not. More...
 
 itkStaticConstMacro (InputImageDimension, unsigned int, InputImageType::ImageDimension)
 Extract dimension from input image. More...
 
 itkStaticConstMacro (InputImagePixelDimension, unsigned int, InputImagePixelTraitsType::Dimension)
 Extract dimension from the pixel of the input image. More...
 
 itkTypeMacro (FuzzyClassifierInitializationImageFilter, ImageToImageFilter)
 Run-time type information (and related methods). More...
 
virtual void SetCentroids (const CentroidArrayType newCentroids)
 Set class centroids. More...
 
virtual void SetNumberOfClasses (const unsigned int &numOfClasses)
 Set the number of classes. More...
 

Protected Member Functions

void ComputeImageToProcess (InternalImageType *imageToProcess)
 Get the internal image to process. More...
 
void ComputePixelAsCentroid (const InputImagePixelType &pixel, CentroidType &pixelAsCentroid)
 Transforms a given pixel of the input image to the equivalent pixel of centroid type. More...
 
 FuzzyClassifierInitializationImageFilter ()
 Constructor. More...
 
void GenerateData () override
 A version of GenerateData() specific for fuzzy classifiers. More...
 
void GenerateOutputInformation () override
 Generate the information describing the output data. More...
 
virtual void Initialize ()
 If a subclass of FuzzyClassifierInitializationImageFilter needs to initialize some data or perform some calculations before to start the first iteration, it should provide an implementation of Initialize(). More...
 
void PrintSelf (std::ostream &os, Indent indent) const override
 Write the name-value pairs of the filter data members to the supplied output stream. More...
 
virtual ~FuzzyClassifierInitializationImageFilter ()
 Destructor. More...
 

Protected Attributes

InputImagePixelType m_BackgroundPixel
 Pixel of the input image used as background value. More...
 
CentroidArrayType m_Centroids
 Array of class centroids. More...
 
double m_Error
 Error obtained between the new class centroids and the old values of the centroids (i.e. More...
 
bool m_IgnoreBackgroundPixels
 Flag indicating whether to ignore the background pixels. More...
 
InternalImagePointer m_ImageToProcess
 Pointer to the image to be used internally by the algorithm. More...
 
double m_M
 Fuzzification parameter (m) in the range [1, n], which determines the degree of fuzziness in the clusters. More...
 
double m_MaximumError
 Error threshold used to stop the algorithm. More...
 
unsigned int m_MaximumNumberOfIterations
 Maximum number of iterations allowed. More...
 
unsigned int m_NumberOfClasses
 Number of fuzzy clusters used to classify the image. More...
 
unsigned int m_NumberOfIterations
 Number of iterations performed. More...
 

Detailed Description

template<class TInputImage, class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
class itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >

Base class for fuzzy classifiers that take an image as input and produce a membership itk::VectorImage as output.

FuzzyClassifierInitializationImageFilter class provides the infrastructure for supporting multithread. This class provides a GenerateData() method based on the superclass (ImageSource) implementation. If a derived class provides an implementation of ThreadedGenerateData(), this implementation of GenerateData() allocates the output buffer and an image used internally. It also calls the method called Initialize(). This method is used by derived classes that need to initialize some data or perform some calculations before to start the first iteration. Then it performs the iterations of the fuzzy algorithm. At each iteration, the BeforeThreadedGenerateData() method is called (if provided). Then, the image is divided into a number of pieces and a number of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). To halt the iteration process the error (usually the difference between the new values of the centroids and the previous values) must lie below a determined threshold or the number of iteration must exceed the maximum number of iterations, otherwise a new iteration will start.

If a derived class provides an implementation of GenerateData() instead, the fuzzy algorithm will run in a single thread and the implementation is responsible for allocating its output data.

Inputs and Outputs
The input to this filter is the image to classify.
The output of the filter is an itk::VectorImage, that represents pixel memberships to 'n' classes.
Template parameters
This filter is templated over the input image type, the data type used to represent the probabilities (defaults to double) and the data type used to represent the values of the centroids (defaults to double). Note that the precision types used to instantiate this filter should be real valued scalar types. In other words: doubles or floats.
Internal image
This class uses an internal image to speed up execution. This image is obtained by a numeric conversion of the pixels of the input image to the type of centroids. This will avoid doing a conversion each time the algorithm accesses the pixels.
Caveats
When using Iterators on the output vector image, you cannot use the it.Value(). You must use Set/Get() methods instead.
Version
0.1
Author
Alberto Rey, Alfonso Castro and Bernardino Arcay. University of A Coruña. Spain
See also
FuzzyClassifierImageFilter
FCMClassifierInitializationImageFilter
KFCMSClassifierInitializationImageFilter
MSKFCMClassifierInitializationImageFilter
MSFKCMClassifierInitializationImageFilter
VectorImage

Member Typedef Documentation

◆ CentroidArrayType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef std::vector< CentroidType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::CentroidArrayType

Typdef for the array of centroids.

◆ CentroidType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef itk::Vector< CentroidValueType, InputImagePixelDimension > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::CentroidType

Centroid typedef.

The type of the components of the centroid is the template parameter TCentroidValuePrecision (i.e. CentroidValueType).

◆ CentroidValueNumericTraitsType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef NumericTraits< CentroidValueType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::CentroidValueNumericTraitsType

Other centroid typedefs.

◆ CentroidValueType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef TCentroidValuePrecision itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::CentroidValueType

◆ ConstPointer

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef SmartPointer< const Self > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::ConstPointer

◆ InputImageConstIterator

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef ImageRegionConstIterator< InputImageType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImageConstIterator

◆ InputImageConstPointer

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef Superclass::InputImageConstPointer itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImageConstPointer

◆ InputImageIndexType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef InputImageType::IndexType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImageIndexType

◆ InputImagePixelNumericTraitsType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef NumericTraits< InputImagePixelType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImagePixelNumericTraitsType

Input image pixel typedefs.

◆ InputImagePixelTraitsType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef PixelTraits< InputImagePixelType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImagePixelTraitsType

◆ InputImagePixelType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef Superclass::InputImagePixelType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImagePixelType

◆ InputImagePixelValueType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef InputImagePixelTraitsType::ValueType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImagePixelValueType

◆ InputImagePointer

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef Superclass::InputImagePointer itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImagePointer

Input image typedef support (types inherited from the superclass).

◆ InputImageRegionType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef Superclass::InputImageRegionType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImageRegionType

◆ InputImageSizeType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef InputImageType::SizeType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImageSizeType

Other input image typedefs.

◆ InputImageType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef TInputImage itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InputImageType

Convenient typedefs for simplifying declarations.

◆ InternalImageConstIterator

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef ImageRegionConstIterator< InternalImageType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InternalImageConstIterator

◆ InternalImageConstPointer

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef InternalImageType::ConstPointer itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InternalImageConstPointer

◆ InternalImageIterator

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef ImageRegionIterator< InternalImageType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InternalImageIterator

Other internal image typedefs.

◆ InternalImagePointer

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef InternalImageType::Pointer itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InternalImagePointer

◆ InternalImageType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef Image< CentroidType, itkGetStaticConstMacro(InputImageDimension) > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::InternalImageType

Internal image typedef support.

This image is used for internal processing. It's obtained by converting the pixels of the input image to the type of centroid.

◆ MembershipImageIterator

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef ImageRegionIterator< MembershipImageType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::MembershipImageIterator

◆ MembershipImagePixelType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef MembershipImageType::PixelType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::MembershipImagePixelType

◆ MembershipImagePointer

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef MembershipImageType::Pointer itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::MembershipImagePointer

◆ MembershipImageType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef OutputImageType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::MembershipImageType

Membership image typedef support.

The pixels of the vector image represent the membership of that pixel to each particular class. The pixels are arrays and the number of elements in the array is the same as the number of classes to be used.

◆ MembershipValueType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef TProbabilityPrecision itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::MembershipValueType

◆ OutputImageType

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef VectorImage< MembershipValueType, itkGetStaticConstMacro(InputImageDimension) > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::OutputImageType

Convenient typedefs for simplifying declarations.

◆ Pointer

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef SmartPointer< Self > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::Pointer

◆ Self

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef FuzzyClassifierInitializationImageFilter itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::Self

Standard class typedefs.

◆ Superclass

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
typedef ImageToImageFilter< InputImageType, OutputImageType > itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::Superclass

Standard class typedefs.

Constructor & Destructor Documentation

◆ FuzzyClassifierInitializationImageFilter()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::FuzzyClassifierInitializationImageFilter ( )
protected

Constructor.

◆ ~FuzzyClassifierInitializationImageFilter()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
virtual itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::~FuzzyClassifierInitializationImageFilter ( )
inlineprotectedvirtual

Destructor.

Member Function Documentation

◆ ComputeDifference()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
virtual double itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::ComputeDifference ( const CentroidArrayType arrayOfCentroids)
virtual

Computes the mean square error between centroids and the centroid array passed as parameter.

◆ ComputeImageToProcess()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::ComputeImageToProcess ( InternalImageType imageToProcess)
protected

Get the internal image to process.

This image will be used for internal processing and is obtained from the original input image by transforming its pixels to the type of centroids.

◆ ComputePixelAsCentroid()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::ComputePixelAsCentroid ( const InputImagePixelType pixel,
CentroidType pixelAsCentroid 
)
inlineprotected

Transforms a given pixel of the input image to the equivalent pixel of centroid type.

◆ GenerateData()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::GenerateData ( )
overrideprotected

A version of GenerateData() specific for fuzzy classifiers.

This implementation will split the processing across multiple threads. The buffer is allocated by this method. It also calls Initialize(). Then it performs the iterations of the fuzzy algorithm. At each iteration the BeforeThreadedGenerateData() method is called (if provided). Then, the image is divided into a number of pieces and a number of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). To halt the iteration process the error (i.e., the difference between the new values of the centroids and the previous values) must lie below a determined thresold or the number of iteration must exceed the maximum number of iterations, otherwise a new iteration will start. If a derived class cannot be threaded, that class should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a subclass can be threaded, it should NOT provide a GenerateData() method but should provide a ThreadedGenerateData() instead.

See also
ThreadedGenerateData()

◆ GenerateOutputInformation()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::GenerateOutputInformation ( )
overrideprotected

Generate the information describing the output data.

The default implementation of this method will copy information from the input to the output. The filter calls that superclass' implementation of this method and then it sets the length of the output image pixel (i.e., the array of memberships) to the number of classes.

◆ GetCentroids()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
virtual CentroidArrayType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::GetCentroids ( ) const
virtual

Get cluster centroids.

◆ Initialize()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
virtual void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::Initialize ( )
inlineprotectedvirtual

If a subclass of FuzzyClassifierInitializationImageFilter needs to initialize some data or perform some calculations before to start the first iteration, it should provide an implementation of Initialize().

Reimplemented in itk::MSKFCMClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >, and itk::KFCMSClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >.

◆ itkBooleanMacro()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkBooleanMacro ( IgnoreBackgroundPixels  )

Turn on and off the IgnoreBackgroundPixels flag.

◆ itkGetConstMacro() [1/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( BackgroundPixel  ,
InputImagePixelType   
)

Get the pixel used as background value in the input image.

◆ itkGetConstMacro() [2/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( Error  ,
double   
)

Get error between the new class centroids and their values from the previous iteration.

◆ itkGetConstMacro() [3/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( IgnoreBackgroundPixels  ,
bool   
)

Get true/false depending on whether the algorithm ignores the background pixels or not.

◆ itkGetConstMacro() [4/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( ,
double   
)

Get m fuzziness degree value.

◆ itkGetConstMacro() [5/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( MaximumError  ,
double   
)

Get maximum error used to stop the algorithm.

◆ itkGetConstMacro() [6/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( MaximumNumberOfIterations  ,
unsigned int   
)

Get maximum number of iterations.

◆ itkGetConstMacro() [7/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( NumberOfClasses  ,
unsigned int   
)

Get the number of classes.

◆ itkGetConstMacro() [8/8]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkGetConstMacro ( NumberOfIterations  ,
unsigned int   
)

Get number of iterations performed.

◆ itkSetClampMacro() [1/3]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkSetClampMacro ( ,
double  ,
1.  0,
NumericTraits< double >  ::max() 
)

Set m fuzziness degree value.

This value should be greater than 1 .

◆ itkSetClampMacro() [2/3]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkSetClampMacro ( MaximumError  ,
double  ,
0.  0,
NumericTraits< double >  ::max() 
)

Set maximum error used to stop the algorithm.

This error value can't be negative.

◆ itkSetClampMacro() [3/3]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkSetClampMacro ( MaximumNumberOfIterations  ,
unsigned int  ,
,
NumericTraits< unsigned int >  ::max() 
)

Set maximum number of iterations.

This value should be positive and greater than 1.

◆ itkSetMacro() [1/2]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkSetMacro ( BackgroundPixel  ,
InputImagePixelType   
)

Set the pixel used as background value in the input image.

The image pixels with this value will be ignored.

◆ itkSetMacro() [2/2]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkSetMacro ( IgnoreBackgroundPixels  ,
bool   
)

Set true/false depending on whether the algorithm ignores the background pixels or not.

◆ itkStaticConstMacro() [1/2]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkStaticConstMacro ( InputImageDimension  ,
unsigned int  ,
InputImageType::ImageDimension   
)

Extract dimension from input image.

◆ itkStaticConstMacro() [2/2]

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkStaticConstMacro ( InputImagePixelDimension  ,
unsigned int  ,
InputImagePixelTraitsType::Dimension   
)

Extract dimension from the pixel of the input image.

◆ itkTypeMacro()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::itkTypeMacro ( FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >  ,
ImageToImageFilter   
)

Run-time type information (and related methods).

◆ PrintSelf()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

Write the name-value pairs of the filter data members to the supplied output stream.

◆ SetCentroids()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
virtual void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::SetCentroids ( const CentroidArrayType  newCentroids)
virtual

Set class centroids.

The number of centroids must equal the number of classes.

◆ SetNumberOfClasses()

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
virtual void itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::SetNumberOfClasses ( const unsigned int &  numOfClasses)
virtual

Member Data Documentation

◆ m_BackgroundPixel

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
InputImagePixelType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_BackgroundPixel
protected

Pixel of the input image used as background value.

◆ m_Centroids

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
CentroidArrayType itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_Centroids
protected

Array of class centroids.

◆ m_Error

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
double itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_Error
protected

Error obtained between the new class centroids and the old values of the centroids (i.e.

the values in the previous iteration). During the execution of the algorithm it represents the current error and it's updated at each iteration.

◆ m_IgnoreBackgroundPixels

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
bool itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_IgnoreBackgroundPixels
protected

Flag indicating whether to ignore the background pixels.

◆ m_ImageToProcess

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
InternalImagePointer itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_ImageToProcess
protected

Pointer to the image to be used internally by the algorithm.

This image is obtained by a numeric conversion of the pixels of the input image to the type of centroids.

◆ m_M

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
double itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_M
protected

Fuzzification parameter (m) in the range [1, n], which determines the degree of fuzziness in the clusters.

When m = 1 the effect is a crisp clustering of points. When m > 1 the degree of fuzziness among points in the decision space increases.

◆ m_MaximumError

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
double itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_MaximumError
protected

Error threshold used to stop the algorithm.

◆ m_MaximumNumberOfIterations

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
unsigned int itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_MaximumNumberOfIterations
protected

Maximum number of iterations allowed.

◆ m_NumberOfClasses

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
unsigned int itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_NumberOfClasses
protected

Number of fuzzy clusters used to classify the image.

The number of classes will determine the number of membership images that will be generated. The user must specify the number of expected classes before calling the classifier.

◆ m_NumberOfIterations

template<class TInputImage , class TProbabilityPrecision = double, class TCentroidValuePrecision = double>
unsigned int itk::FuzzyClassifierInitializationImageFilter< TInputImage, TProbabilityPrecision, TCentroidValuePrecision >::m_NumberOfIterations
protected

Number of iterations performed.

During the execution of the algorithm it represents the current iteration.


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