ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members
itk::ImageClassifierBase< TInputImage, TClassifiedImage > Class Template Reference

#include <itkImageClassifierBase.h>

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

Public Types

using ClassifiedImagePointer = typename TClassifiedImage::Pointer
 
using ConstPointer = SmartPointer< const Self >
 
using DecisionRuleType = typename Superclass::DecisionRuleType
 
using InputImageConstPointer = typename TInputImage::ConstPointer
 
using InputImagePointer = typename TInputImage::Pointer
 
using InputImageType = TInputImage
 
using MeasurementVectorType = typename Superclass::MeasurementVectorType
 
using MembershipFunctionPointer = typename Superclass::MembershipFunctionPointer
 
using MembershipFunctionPointerVector = typename Superclass::MembershipFunctionPointerVector
 
using MembershipFunctionType = typename Superclass::MembershipFunctionType
 
using Pointer = SmartPointer< Self >
 
using Self = ImageClassifierBase
 
using Superclass = ClassifierBase< TInputImage >
 
- Public Types inherited from itk::ClassifierBase< TInputImage >
using DecisionRuleType = Statistics::DecisionRule
 
using MeasurementVectorType = typename TInputImage ::ValueType
 
using MembershipFunctionPointer = typename MembershipFunctionType::Pointer
 
using MembershipFunctionPointerVector = std::vector< MembershipFunctionPointer >
 
using MembershipFunctionType = Statistics::MembershipFunctionBase< MeasurementVectorType >
 
using Self = ClassifierBase
 
using Superclass = LightProcessObject
 
- Public Types inherited from itk::LightProcessObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightProcessObject
 
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
 
- Public Member Functions inherited from itk::ClassifierBase< TInputImage >
unsigned int AddMembershipFunction (MembershipFunctionType *function)
 
DecisionRuleTypeGetDecisionRule ()
 
const MembershipFunctionTypeGetMembershipFunction (unsigned int index) const
 
virtual const unsigned int & GetNumberOfClasses () const
 
unsigned int GetNumberOfMembershipFunctions ()
 
void SetDecisionRule (DecisionRuleType *ptrToDecisionRule)
 
virtual void SetNumberOfClasses (unsigned int _arg)
 
void Update ()
 
- Public Member Functions inherited from itk::LightProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void SetProgress (float _arg)
 
virtual const float & GetProgress () const
 
void UpdateProgress (float amount)
 
virtual void UpdateOutputData ()
 
- 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::LightProcessObject
static Pointer New ()
 
- 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 ()
 
using InputImagePixelType = typename TInputImage::PixelType
 
using ClassifiedImagePixelType = typename TClassifiedImage::PixelType
 
using InputImageConstIterator = ImageRegionConstIterator< TInputImage >
 
using ClassifiedImageIterator = ImageRegionIterator< TClassifiedImage >
 
using InputImageSizeType = typename TInputImage::SizeType
 
InputImageConstPointer m_InputImage
 
ClassifiedImagePointer m_ClassifiedImage
 
virtual void SetInputImage (const InputImageType *_arg)
 
virtual const InputImageTypeGetInputImage () const
 
virtual void SetClassifiedImage (ClassifiedImagePointer _arg)
 
virtual ClassifiedImagePointer GetClassifiedImage () const
 
std::vector< double > GetPixelMembershipValue (const InputImagePixelType inputImagePixel)
 
 ImageClassifierBase ()=default
 
 ~ImageClassifierBase () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void Allocate ()
 
void GenerateData () override
 
virtual void Classify ()
 

Additional Inherited Members

- Protected Member Functions inherited from itk::ClassifierBase< TInputImage >
 ClassifierBase ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~ClassifierBase () override=default
 
- Protected Member Functions inherited from itk::LightProcessObject
 LightProcessObject ()
 
 ~LightProcessObject () override
 
- 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 ()
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

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

Base class for the ImageClassifierBase object.

itkImageClassifierBase is the base class for algorithms that take input data as images and preserve the image structure while performing classification. In other words, the data is not converted into a list, hence filters that require spatial information of a pixel can use the subclasses under this tree. It provides the basic function definitions that are inherent to an image classifier objects.

This is the Superclass for the image classifier tree of the classifier framework. This is the class for all the classification objects available through the classifier framework in the ITK toolkit that hold the input image and the classified image data.

It is templated over the type of input image, classified image. The second template parameter allows templating over the classified image type. The name "image" indicates that the basic data structure used for storing data/results are derived from the ITK image class.

This object supports data handling of multiband images. The object accepts the input image in vector format only, where each pixel is a vector and each element of the vector corresponds to an entry from 1 particular band of a multiband dataset. A single band image is treated as a vector image with a single element for every vector. The classified image is treated as a single band scalar image.

This class stores the input and output data as its private members. Before you call the Classify method to start the classification process, you should plug in all necessary parts as described in the superclass documentation.

The core computation is carried out here. The function requires that the number of classes be set to a non zero value and the membership functions be populated. In addition, the number of classes should be equal to the number of membership functions.

Examples
Examples/Segmentation/GibbsPriorImageFilter1.cxx, and Examples/Statistics/ScalarImageMarkovRandomField1.cxx.

Definition at line 71 of file itkImageClassifierBase.h.

Member Typedef Documentation

◆ ClassifiedImageIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::ClassifiedImageIterator = ImageRegionIterator<TClassifiedImage>

Type definition for the vector associated with input image pixel type.

Definition at line 132 of file itkImageClassifierBase.h.

◆ ClassifiedImagePixelType

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::ClassifiedImagePixelType = typename TClassifiedImage::PixelType

Type definitions for the vector holding training image pixel type.

Definition at line 128 of file itkImageClassifierBase.h.

◆ ClassifiedImagePointer

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::ClassifiedImagePointer = typename TClassifiedImage::Pointer

Type definitions for the classified image pixel type.

Definition at line 94 of file itkImageClassifierBase.h.

◆ ConstPointer

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

Definition at line 80 of file itkImageClassifierBase.h.

◆ DecisionRuleType

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::DecisionRuleType = typename Superclass::DecisionRuleType

Type alias for decision rule

Definition at line 109 of file itkImageClassifierBase.h.

◆ InputImageConstIterator

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::InputImageConstIterator = ImageRegionConstIterator<TInputImage>

Type definition for the input image/training iterator

Definition at line 131 of file itkImageClassifierBase.h.

◆ InputImageConstPointer

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

Definition at line 91 of file itkImageClassifierBase.h.

◆ InputImagePixelType

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

Type definition for the vector associated with input image pixel type.

Definition at line 124 of file itkImageClassifierBase.h.

◆ InputImagePointer

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

Definition at line 90 of file itkImageClassifierBase.h.

◆ InputImageSizeType

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

Type definition for the vector associated with input image pixel type.

Definition at line 153 of file itkImageClassifierBase.h.

◆ InputImageType

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

Type definition for the input image.

Definition at line 89 of file itkImageClassifierBase.h.

◆ MeasurementVectorType

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::MeasurementVectorType = typename Superclass::MeasurementVectorType

Type definitions from the Superclass Set the decision rule

Definition at line 99 of file itkImageClassifierBase.h.

◆ MembershipFunctionPointer

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::MembershipFunctionPointer = typename Superclass::MembershipFunctionPointer

Definition at line 104 of file itkImageClassifierBase.h.

◆ MembershipFunctionPointerVector

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::MembershipFunctionPointerVector = typename Superclass::MembershipFunctionPointerVector

Definition at line 106 of file itkImageClassifierBase.h.

◆ MembershipFunctionType

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::MembershipFunctionType = typename Superclass::MembershipFunctionType

Typedefs for membership function

Definition at line 102 of file itkImageClassifierBase.h.

◆ Pointer

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

Definition at line 79 of file itkImageClassifierBase.h.

◆ Self

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

Standard class type aliases.

Definition at line 77 of file itkImageClassifierBase.h.

◆ Superclass

template<typename TInputImage , typename TClassifiedImage >
using itk::ImageClassifierBase< TInputImage, TClassifiedImage >::Superclass = ClassifierBase<TInputImage>

Definition at line 78 of file itkImageClassifierBase.h.

Constructor & Destructor Documentation

◆ ImageClassifierBase()

template<typename TInputImage , typename TClassifiedImage >
itk::ImageClassifierBase< TInputImage, TClassifiedImage >::ImageClassifierBase ( )
protecteddefault

Type definition for the vector associated with input image pixel type.

◆ ~ImageClassifierBase()

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

Type definition for the vector associated with input image pixel type.

Member Function Documentation

◆ Allocate()

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

Allocate memory for the classified image.

◆ Classify()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::ImageClassifierBase< TInputImage, TClassifiedImage >::Classify ( )
privatevirtual

Define a virtual Classifier function to classify the whole image.

◆ CreateAnother()

template<typename TInputImage , typename TClassifiedImage >
virtual::itk::LightObject::Pointer itk::ImageClassifierBase< 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::LightProcessObject.

◆ GenerateData()

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

Starts the classification process

Implements itk::ClassifierBase< TInputImage >.

◆ GetClassifiedImage()

template<typename TInputImage , typename TClassifiedImage >
virtual ClassifiedImagePointer itk::ImageClassifierBase< TInputImage, TClassifiedImage >::GetClassifiedImage ( ) const
virtual

Get the classified image.

◆ GetInputImage()

template<typename TInputImage , typename TClassifiedImage >
virtual const InputImageType* itk::ImageClassifierBase< TInputImage, TClassifiedImage >::GetInputImage ( ) const
virtual

Type definition for the vector associated with input image pixel type.

◆ GetNameOfClass()

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

Run-time type information (and related methods).

Reimplemented from itk::ClassifierBase< TInputImage >.

◆ GetPixelMembershipValue()

template<typename TInputImage , typename TClassifiedImage >
std::vector<double> itk::ImageClassifierBase< TInputImage, TClassifiedImage >::GetPixelMembershipValue ( const InputImagePixelType  inputImagePixel)

Method to get the membership of a given pixel to the different classes

◆ New()

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

Method for creation through the object factory.

◆ PrintSelf()

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

Type definition for the vector associated with input image pixel type.

Reimplemented from itk::LightProcessObject.

◆ SetClassifiedImage()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::ImageClassifierBase< TInputImage, TClassifiedImage >::SetClassifiedImage ( ClassifiedImagePointer  _arg)
virtual

Set the classified image.

◆ SetInputImage()

template<typename TInputImage , typename TClassifiedImage >
virtual void itk::ImageClassifierBase< TInputImage, TClassifiedImage >::SetInputImage ( const InputImageType _arg)
virtual

Get/Set the input image.

Member Data Documentation

◆ m_ClassifiedImage

template<typename TInputImage , typename TClassifiedImage >
ClassifiedImagePointer itk::ImageClassifierBase< TInputImage, TClassifiedImage >::m_ClassifiedImage
private

Type definition for the vector associated with input image pixel type.

Definition at line 156 of file itkImageClassifierBase.h.

◆ m_InputImage

template<typename TInputImage , typename TClassifiedImage >
InputImageConstPointer itk::ImageClassifierBase< TInputImage, TClassifiedImage >::m_InputImage
private

Type definition for the vector associated with input image pixel type.

Definition at line 155 of file itkImageClassifierBase.h.


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