Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::ScalarImageKmeansImageFilter< TInputImage > Class Template Reference
[Pixel Classification Filters]

Classifies the intensity values of a scalar image using the K-Means algorithm. More...

#include <itkScalarImageKmeansImageFilter.h>

Inheritance diagram for itk::ScalarImageKmeansImageFilter< TInputImage >:

Inheritance graph
[legend]
Collaboration diagram for itk::ScalarImageKmeansImageFilter< TInputImage >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef TInputImage InputImageType
typedef Image< unsigned char,
::itk::GetImageDimension<
TInputImage >::ImageDimension > 
OutputImageType
typedef ScalarImageKmeansImageFilter Self
typedef ImageToImageFilter<
InputImageType, OutputImageType
Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
typedef InputImageType::PixelType InputPixelType
typedef OutputImageType::PixelType OutputPixelType
typedef NumericTraits< InputPixelType
>::RealType 
RealPixelType
typedef itk::Statistics::ScalarImageToListAdaptor<
InputImageType
AdaptorType
typedef AdaptorType::MeasurementVectorType MeasurementVectorType
typedef itk::Statistics::WeightedCentroidKdTreeGenerator<
AdaptorType
TreeGeneratorType
typedef TreeGeneratorType::KdTreeType TreeType
typedef itk::Statistics::KdTreeBasedKmeansEstimator<
TreeType
EstimatorType
typedef EstimatorType::ParametersType ParametersType
typedef InputImageType::RegionType ImageRegionType
typedef RegionOfInterestImageFilter<
InputImageType, InputImageType
RegionOfInterestFilterType

Public Member Functions

 itkStaticConstMacro (ImageDimension, unsigned int, TInputImage::ImageDimension)
virtual const char * GetNameOfClass () const
void AddClassWithInitialMean (RealPixelType mean)
virtual const ParametersTypeGetFinalMeans ()
void SetImageRegion (const ImageRegionType &region)
virtual const ImageRegionTypeGetImageRegion ()
virtual void SetUseNonContiguousLabels (bool _arg)
virtual const bool & GetUseNonContiguousLabels ()
virtual void UseNonContiguousLabelsOn ()
virtual void UseNonContiguousLabelsOff ()

Static Public Member Functions

Pointer New ()

Protected Member Functions

 ScalarImageKmeansImageFilter ()
virtual ~ScalarImageKmeansImageFilter ()
void PrintSelf (std::ostream &os, Indent indent) const
void GenerateData ()

Detailed Description

template<class TInputImage>
class itk::ScalarImageKmeansImageFilter< TInputImage >

Classifies the intensity values of a scalar image using the K-Means algorithm.

Given an input image with scalar values, it uses the K-Means statistical classifier in order to define labels for every pixel in the image. The filter is templated over the type of the input image. The output image is predefined as having the same dimension of the input image and pixel type unsigned char, under the assumption that the classifier will generate less than 256 classes.

You may want to look also at the RelabelImageFilter that may be used as a postprocessing stage, in particular if you are interested in ordering the labels by their relative size in number of pixels.

See also:
Image

ImageKmeansModelEstimator

KdTreeBasedKmeansEstimator, WeightedCentroidKdTreeGenerator, KdTree

RelabelImageFilter

Definition at line 62 of file itkScalarImageKmeansImageFilter.h.


Member Typedef Documentation

template<class TInputImage>
typedef itk::Statistics::ScalarImageToListAdaptor< InputImageType > itk::ScalarImageKmeansImageFilter< TInputImage >::AdaptorType
 

Create a List from the scalar image

Definition at line 97 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef SmartPointer<const Self> itk::ScalarImageKmeansImageFilter< TInputImage >::ConstPointer
 

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

Definition at line 80 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef itk::Statistics::KdTreeBasedKmeansEstimator<TreeType> itk::ScalarImageKmeansImageFilter< TInputImage >::EstimatorType
 

Definition at line 107 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef InputImageType::RegionType itk::ScalarImageKmeansImageFilter< TInputImage >::ImageRegionType
 

Definition at line 111 of file itkScalarImageKmeansImageFilter.h.

Referenced by itk::ScalarImageKmeansImageFilter< TInputImage >::~ScalarImageKmeansImageFilter().

template<class TInputImage>
typedef TInputImage itk::ScalarImageKmeansImageFilter< TInputImage >::InputImageType
 

Convenient typedefs for simplifying declarations.

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

Definition at line 72 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef InputImageType::PixelType itk::ScalarImageKmeansImageFilter< TInputImage >::InputPixelType
 

Image typedef support.

Definition at line 89 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef AdaptorType::MeasurementVectorType itk::ScalarImageKmeansImageFilter< TInputImage >::MeasurementVectorType
 

Define the Measurement vector type from the AdaptorType

Definition at line 100 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef Image<unsigned char, ::itk::GetImageDimension<TInputImage>::ImageDimension> itk::ScalarImageKmeansImageFilter< TInputImage >::OutputImageType
 

Some convenient typedefs.

Reimplemented from itk::ImageSource< TOutputImage >.

Definition at line 74 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef OutputImageType::PixelType itk::ScalarImageKmeansImageFilter< TInputImage >::OutputPixelType
 

Definition at line 90 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef EstimatorType::ParametersType itk::ScalarImageKmeansImageFilter< TInputImage >::ParametersType
 

Definition at line 109 of file itkScalarImageKmeansImageFilter.h.

Referenced by itk::ScalarImageKmeansImageFilter< TInputImage >::~ScalarImageKmeansImageFilter().

template<class TInputImage>
typedef SmartPointer<Self> itk::ScalarImageKmeansImageFilter< TInputImage >::Pointer
 

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

Definition at line 79 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef NumericTraits< InputPixelType >::RealType itk::ScalarImageKmeansImageFilter< TInputImage >::RealPixelType
 

Type used for representing the Mean values

Definition at line 93 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef RegionOfInterestImageFilter< InputImageType, InputImageType > itk::ScalarImageKmeansImageFilter< TInputImage >::RegionOfInterestFilterType
 

Definition at line 115 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef ScalarImageKmeansImageFilter itk::ScalarImageKmeansImageFilter< TInputImage >::Self
 

Standard class typedefs.

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

Definition at line 77 of file itkScalarImageKmeansImageFilter.h.

Referenced by itk::ScalarImageKmeansImageFilter< TInputImage >::~ScalarImageKmeansImageFilter().

template<class TInputImage>
typedef ImageToImageFilter< InputImageType, OutputImageType> itk::ScalarImageKmeansImageFilter< TInputImage >::Superclass
 

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

Definition at line 78 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef itk::Statistics::WeightedCentroidKdTreeGenerator< AdaptorType > itk::ScalarImageKmeansImageFilter< TInputImage >::TreeGeneratorType
 

Create the K-d tree structure

Definition at line 105 of file itkScalarImageKmeansImageFilter.h.

template<class TInputImage>
typedef TreeGeneratorType::KdTreeType itk::ScalarImageKmeansImageFilter< TInputImage >::TreeType
 

Definition at line 106 of file itkScalarImageKmeansImageFilter.h.


Constructor & Destructor Documentation

template<class TInputImage>
itk::ScalarImageKmeansImageFilter< TInputImage >::ScalarImageKmeansImageFilter  )  [protected]
 

template<class TInputImage>
virtual itk::ScalarImageKmeansImageFilter< TInputImage >::~ScalarImageKmeansImageFilter  )  [inline, protected, virtual]
 

Definition at line 142 of file itkScalarImageKmeansImageFilter.h.

References itk::ScalarImageKmeansImageFilter< TInputImage >::ImageRegionType, itk::ScalarImageKmeansImageFilter< TInputImage >::ParametersType, and itk::ScalarImageKmeansImageFilter< TInputImage >::Self.


Member Function Documentation

template<class TInputImage>
void itk::ScalarImageKmeansImageFilter< TInputImage >::AddClassWithInitialMean RealPixelType  mean  ) 
 

Add a new class to the classification by specifying its initial mean.

template<class TInputImage>
void itk::ScalarImageKmeansImageFilter< TInputImage >::GenerateData  )  [protected, virtual]
 

This method runs the statistical methods that identify the means of the classes and the use the distances to those means in order to label the image pixels. *

See also:
ImageToImageFilter::GenerateData()

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage>
virtual const ParametersType& itk::ScalarImageKmeansImageFilter< TInputImage >::GetFinalMeans  )  [virtual]
 

Return the array of Means found after the classification

template<class TInputImage>
virtual const ImageRegionType& itk::ScalarImageKmeansImageFilter< TInputImage >::GetImageRegion  )  [virtual]
 

Get the region over which the statistics will be computed

template<class TInputImage>
virtual const char* itk::ScalarImageKmeansImageFilter< TInputImage >::GetNameOfClass  )  const [virtual]
 

Run-time type information (and related methods).

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

template<class TInputImage>
virtual const bool& itk::ScalarImageKmeansImageFilter< TInputImage >::GetUseNonContiguousLabels  )  [virtual]
 

Set/Get the UseNonContiguousLabels flag. When this is set to false the labels are numbered contiguously, like in {0,1,3..N}. When the flag is set to true, the labels are selected in order to span the dynamic range of the output image. This last option is useful when the output image is intended only for display. The default value is false.

template<class TInputImage>
itk::ScalarImageKmeansImageFilter< TInputImage >::itkStaticConstMacro ImageDimension  ,
unsigned  int,
TInputImage::ImageDimension 
 

Extract dimension from input and output image.

template<class TInputImage>
Pointer itk::ScalarImageKmeansImageFilter< TInputImage >::New  )  [static]
 

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage>
void itk::ScalarImageKmeansImageFilter< TInputImage >::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

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::ImageToImageFilter< TInputImage, TOutputImage >.

template<class TInputImage>
void itk::ScalarImageKmeansImageFilter< TInputImage >::SetImageRegion const ImageRegionType region  ) 
 

Set Region method to constrain classfication to a certain region

template<class TInputImage>
virtual void itk::ScalarImageKmeansImageFilter< TInputImage >::SetUseNonContiguousLabels bool  _arg  )  [virtual]
 

Set/Get the UseNonContiguousLabels flag. When this is set to false the labels are numbered contiguously, like in {0,1,3..N}. When the flag is set to true, the labels are selected in order to span the dynamic range of the output image. This last option is useful when the output image is intended only for display. The default value is false.

template<class TInputImage>
virtual void itk::ScalarImageKmeansImageFilter< TInputImage >::UseNonContiguousLabelsOff  )  [virtual]
 

Set/Get the UseNonContiguousLabels flag. When this is set to false the labels are numbered contiguously, like in {0,1,3..N}. When the flag is set to true, the labels are selected in order to span the dynamic range of the output image. This last option is useful when the output image is intended only for display. The default value is false.

template<class TInputImage>
virtual void itk::ScalarImageKmeansImageFilter< TInputImage >::UseNonContiguousLabelsOn  )  [virtual]
 

Set/Get the UseNonContiguousLabels flag. When this is set to false the labels are numbered contiguously, like in {0,1,3..N}. When the flag is set to true, the labels are selected in order to span the dynamic range of the output image. This last option is useful when the output image is intended only for display. The default value is false.


The documentation for this class was generated from the following file:
Generated at Thu May 25 02:14:20 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000