ITK  4.8.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | 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 >:

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.

Public Types

typedef ImageRegionIterator
< TClassifiedImage > 
ClassifiedImageIterator
 
typedef TClassifiedImage::PixelType ClassifiedImagePixelType
 
typedef TClassifiedImage::Pointer ClassifiedImagePointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef
Superclass::DecisionRuleType 
DecisionRuleType
 
typedef
ImageRegionConstIterator
< TInputImage > 
InputImageConstIterator
 
typedef TInputImage::ConstPointer InputImageConstPointer
 
typedef TInputImage::PixelType InputImagePixelType
 
typedef TInputImage::Pointer InputImagePointer
 
typedef TInputImage InputImageType
 
typedef
Superclass::MeasurementVectorType 
MeasurementVectorType
 
typedef
Superclass::MembershipFunctionPointer 
MembershipFunctionPointer
 
typedef
Superclass::MembershipFunctionPointerVector 
MembershipFunctionPointerVector
 
typedef
Superclass::MembershipFunctionType 
MembershipFunctionType
 
typedef SmartPointer< SelfPointer
 
typedef ImageClassifierBase Self
 
typedef ClassifierBase
< TInputImage > 
Superclass
 
- Public Types inherited from itk::ClassifierBase< TInputImage >
typedef Statistics::DecisionRule DecisionRuleType
 
typedef TInputImage::ValueType MeasurementVectorType
 
typedef
MembershipFunctionType::Pointer 
MembershipFunctionPointer
 
typedef std::vector
< MembershipFunctionPointer
MembershipFunctionPointerVector
 
typedef
Statistics::MembershipFunctionBase
< MeasurementVectorType
MembershipFunctionType
 
typedef ClassifierBase Self
 
typedef LightProcessObject Superclass
 
- Public Types inherited from itk::LightProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual ClassifiedImagePointer GetClassifiedImage () const
 
virtual const char * GetNameOfClass () const
 
std::vector< double > GetPixelMembershipValue (const InputImagePixelType inputImagePixel)
 
virtual void SetClassifiedImage (ClassifiedImagePointer _arg)
 
virtual void SetInputImage (const InputImageType *_arg)
 
virtual const InputImageTypeGetInputImage () const
 
- Public Member Functions inherited from itk::ClassifierBase< TInputImage >
unsigned int AddMembershipFunction (MembershipFunctionType *function)
 
DecisionRuleTypeGetDecisionRule (void)
 
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 UpdateOutputData ()
 
void UpdateProgress (float amount)
 
virtual void SetProgress (float _arg)
 
virtual const float & GetProgress () const
 
- 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
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
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 ()
 

Protected Member Functions

void Allocate ()
 
void GenerateData () override
 
 ImageClassifierBase ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~ImageClassifierBase ()
 
- Protected Member Functions inherited from itk::ClassifierBase< TInputImage >
 ClassifierBase ()
 
 ~ClassifierBase ()
 
- Protected Member Functions inherited from itk::LightProcessObject
 LightProcessObject ()
 
 ~LightProcessObject ()
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- 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 ()
 

Private Types

typedef TInputImage::SizeType InputImageSizeType
 

Private Member Functions

virtual void Classify ()
 
 ImageClassifierBase (const Self &)
 
void operator= (const Self &)
 

Private Attributes

ClassifiedImagePointer m_ClassifiedImage
 
InputImageConstPointer m_InputImage
 

Additional Inherited Members

- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

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

Definition at line 135 of file itkImageClassifierBase.h.

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

Type definitions for the vector holding training image pixel type.

Definition at line 129 of file itkImageClassifierBase.h.

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

Type definitions for the classified image pixel type.

Definition at line 93 of file itkImageClassifierBase.h.

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

Definition at line 79 of file itkImageClassifierBase.h.

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

Type alias for decision rule

Definition at line 110 of file itkImageClassifierBase.h.

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

Type definition for the input image/training iterator

Definition at line 133 of file itkImageClassifierBase.h.

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

Definition at line 90 of file itkImageClassifierBase.h.

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

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

Definition at line 121 of file itkImageClassifierBase.h.

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

Definition at line 89 of file itkImageClassifierBase.h.

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

Definition at line 156 of file itkImageClassifierBase.h.

template<typename TInputImage , typename TClassifiedImage >
typedef TInputImage itk::ImageClassifierBase< TInputImage, TClassifiedImage >::InputImageType

Type definition for the input image.

Definition at line 85 of file itkImageClassifierBase.h.

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

Type definitions from the Superclass Set the decision rule

Definition at line 98 of file itkImageClassifierBase.h.

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

Definition at line 104 of file itkImageClassifierBase.h.

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

Definition at line 107 of file itkImageClassifierBase.h.

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

Typedefs for membership funciton

Definition at line 101 of file itkImageClassifierBase.h.

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

Definition at line 78 of file itkImageClassifierBase.h.

template<typename TInputImage , typename TClassifiedImage >
typedef ImageClassifierBase itk::ImageClassifierBase< TInputImage, TClassifiedImage >::Self

Standard class typedefs.

Definition at line 76 of file itkImageClassifierBase.h.

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

Definition at line 77 of file itkImageClassifierBase.h.

Constructor & Destructor Documentation

template<typename TInputImage , typename TClassifiedImage >
itk::ImageClassifierBase< TInputImage, TClassifiedImage >::ImageClassifierBase ( )
protected
template<typename TInputImage , typename TClassifiedImage >
itk::ImageClassifierBase< TInputImage, TClassifiedImage >::~ImageClassifierBase ( )
protected
template<typename TInputImage , typename TClassifiedImage >
itk::ImageClassifierBase< TInputImage, TClassifiedImage >::ImageClassifierBase ( const Self )
private

Member Function Documentation

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

Allocate memory for the classified image.

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

Define a virtual Classifier function to classify the whole image.

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.

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

Starts the classification process

Implements itk::ClassifierBase< TInputImage >.

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

Get the classified image.

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

Get/Set the input image.

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 >.

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

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

Method for creation through the object factory.

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

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::ClassifierBase< TInputImage >.

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

Set the classified image.

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

Get/Set the input image.

Member Data Documentation

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

Definition at line 159 of file itkImageClassifierBase.h.

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

Definition at line 158 of file itkImageClassifierBase.h.


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