ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkImagePCAShapeModelEstimator.h>
Base class for ImagePCAShapeModelEstimator object.
itkImagePCAShapeModelEstimator performs a principal component analysis (PCA) on a set of images. The user specifies the number of training images and also the number of desired largest principal components needed. The ITK pipeline mechanism sets up the storage for both input and output images. The number of output images are the user specified number of desired largest principal components plus 1 (for the mean image).
The algorithm uses the VNL library to perform the eigen analysis. To speed the computation of the instead of performing the eigen analysis of the covariance vector A*A' where A is a matrix with p x t, p = number of pixels or voxels in each images and t = number of training images, we calculate the eigen vectors of the inner product matrix A'*A. The resulting eigen vectors (E) are then multiplied with the the matrix A to get the principal compoenets. The covariance matrix has a dimension of p x p. Since number of pixels in any image being typically very high the eigen decomposition becomes computationally expensive. The inner product on the other hand has the dimension of t x t, where t is typically much smaller that p. Hence the eigen decomposition (most compute intensive part) is an orders of magnitude faster.
The Update() function enables the calculation of the various models, creates the membership function objects and populates them.
Definition at line 77 of file itkImagePCAShapeModelEstimator.h.
typedef SmartPointer< const Self > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::ConstPointer |
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
Definition at line 85 of file itkImagePCAShapeModelEstimator.h.
typedef TInputImage::SizeType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::ImageSizeType [private] |
Definition at line 169 of file itkImagePCAShapeModelEstimator.h.
typedef ImageRegionConstIterator< TInputImage > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImageConstIterator |
Definition at line 103 of file itkImagePCAShapeModelEstimator.h.
typedef TInputImage::ConstPointer itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImageConstPointer |
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 96 of file itkImagePCAShapeModelEstimator.h.
typedef ImageRegionIterator< TInputImage > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImageIterator |
Type definition for the input image iterator type.
Definition at line 102 of file itkImagePCAShapeModelEstimator.h.
typedef std::vector< InputImageConstIterator > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImageIteratorArray [private] |
Definition at line 167 of file itkImagePCAShapeModelEstimator.h.
typedef TInputImage::PixelType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImagePixelType |
Type definition for the input image pixel type.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 99 of file itkImagePCAShapeModelEstimator.h.
typedef TInputImage::Pointer itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImagePointer |
Type definitions for the training image.
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
Definition at line 95 of file itkImagePCAShapeModelEstimator.h.
typedef std::vector< InputImageConstPointer > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImagePointerArray [private] |
Local variable typedefs
Definition at line 166 of file itkImagePCAShapeModelEstimator.h.
typedef TInputImage itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImageType |
Type definition for the input image.
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
Definition at line 91 of file itkImagePCAShapeModelEstimator.h.
typedef TInputImage::PixelType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputPixelType [private] |
Set up the vector to store the image data.
Definition at line 172 of file itkImagePCAShapeModelEstimator.h.
typedef vnl_matrix< double > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::MatrixOfDoubleType |
Type definition for a double matrix.
Definition at line 117 of file itkImagePCAShapeModelEstimator.h.
typedef vnl_matrix< int > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::MatrixOfIntegerType |
Type definition for an integer vector.
Definition at line 120 of file itkImagePCAShapeModelEstimator.h.
typedef ImageRegionIterator< TOutputImage > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::OutputImageIterator |
Type definition for the input image iterator type.
Definition at line 114 of file itkImagePCAShapeModelEstimator.h.
typedef TOutputImage::Pointer itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::OutputImagePointer |
Reimplemented from itk::ImageSource< TOutputImage >.
Definition at line 111 of file itkImagePCAShapeModelEstimator.h.
typedef TOutputImage itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::OutputImageType |
Type definition for the output image
Reimplemented from itk::ImageSource< TOutputImage >.
Definition at line 110 of file itkImagePCAShapeModelEstimator.h.
typedef SmartPointer< Self > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::Pointer |
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
Definition at line 84 of file itkImagePCAShapeModelEstimator.h.
typedef ImagePCAShapeModelEstimator itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::Self |
Standard class typedefs.
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
Definition at line 82 of file itkImagePCAShapeModelEstimator.h.
typedef ImageShapeModelEstimatorBase< TInputImage, TOutputImage > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::Superclass |
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
Definition at line 83 of file itkImagePCAShapeModelEstimator.h.
typedef vnl_vector< double > itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::VectorOfDoubleType |
Type definition for a double vector.
Definition at line 123 of file itkImagePCAShapeModelEstimator.h.
itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::ImagePCAShapeModelEstimator | ( | ) | [protected] |
Get the eigen values
itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::~ImagePCAShapeModelEstimator | ( | ) | [protected] |
Get the eigen values
itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::ImagePCAShapeModelEstimator | ( | const Self & | ) | [private] |
void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::CalculateInnerProduct | ( | ) | [private] |
virtual::itk::LightObject::Pointer itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::CreateAnother | ( | void | ) | 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.
virtual void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::EnlargeOutputRequestedRegion | ( | DataObject * | ) | [protected, virtual] |
This filter must produce all of the outputs at once, as such it must override the EnlargeOutputRequestedRegion method to enlarge the output request region.
Reimplemented from itk::ProcessObject.
void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::EstimatePCAShapeModelParameters | ( | ) | [private] |
virtual void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::EstimateShapeModels | ( | ) | [private, virtual] |
Local functions A function that generates the cluster centers (model) corresponding to the estimates of the cluster centers (in the initial codebook). If no codebook is provided, then use the number of classes to determine the cluster centers or the Shape model. This is the the base function to call the K-means classifier.
Implements itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::GenerateData | ( | ) | [protected, virtual] |
Starts the image modelling process
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
virtual void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::GenerateInputRequestedRegion | ( | ) | [protected, virtual] |
This filter requires all the input image at once, as such it must override the GenerateInputRequestedRegion method. Additionally, this filter assumes that the input images are at least the size as the first input image.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
virtual VectorOfDoubleType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::GetEigenValues | ( | ) | const [virtual] |
Get the eigen values
virtual const char* itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::GetNameOfClass | ( | ) | const [virtual] |
Run-time type information (and related methods).
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
virtual unsigned int itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::GetNumberOfPrincipalComponentsRequired | ( | ) | const [virtual] |
virtual unsigned int itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::GetNumberOfTrainingImages | ( | ) | const [virtual] |
static Pointer itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::New | ( | ) | [static] |
Method for creation through the object factory.
Reimplemented from itk::Object.
void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::operator= | ( | const Self & | ) | [private] |
PushBackInput(), PushFronInput() in the public section force the input to be the type expected by an ImageToImageFilter. However, these methods end of "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass.
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
virtual void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::PrintSelf | ( | std::ostream & | os, |
Indent | indent | ||
) | const [protected, virtual] |
Get the eigen values
Reimplemented from itk::ImageShapeModelEstimatorBase< TInputImage, TOutputImage >.
virtual void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::SetNumberOfPrincipalComponentsRequired | ( | unsigned int | n | ) | [virtual] |
Set/Get the number of required largest principal components. The filter produces the required number of principal components plus one outputs. Output index 0 represents the mean image and the remaining outputs the requested principal components.
virtual void itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::SetNumberOfTrainingImages | ( | unsigned int | n | ) | [virtual] |
Set/Get the number of training images in the input.
const unsigned int itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::InputImageDimension = TInputImage::ImageDimension [static] |
Input Image dimension
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
Definition at line 107 of file itkImagePCAShapeModelEstimator.h.
VectorOfDoubleType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_EigenValues [private] |
Definition at line 197 of file itkImagePCAShapeModelEstimator.h.
VectorOfDoubleType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_EigenVectorNormalizedEnergy [private] |
Definition at line 199 of file itkImagePCAShapeModelEstimator.h.
MatrixOfDoubleType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_EigenVectors [private] |
Definition at line 195 of file itkImagePCAShapeModelEstimator.h.
MatrixOfDoubleType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_InnerProduct [private] |
Definition at line 193 of file itkImagePCAShapeModelEstimator.h.
InputImageIteratorArray itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_InputImageIteratorArray [private] |
Local storage variables
Definition at line 189 of file itkImagePCAShapeModelEstimator.h.
ImageSizeType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_InputImageSize [private] |
Definition at line 201 of file itkImagePCAShapeModelEstimator.h.
VectorOfDoubleType itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_Means [private] |
Definition at line 191 of file itkImagePCAShapeModelEstimator.h.
unsigned int itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_NumberOfPixels [private] |
Definition at line 203 of file itkImagePCAShapeModelEstimator.h.
unsigned int itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_NumberOfPrincipalComponentsRequired [private] |
Definition at line 209 of file itkImagePCAShapeModelEstimator.h.
unsigned int itk::ImagePCAShapeModelEstimator< TInputImage, TOutputImage >::m_NumberOfTrainingImages [private] |
Definition at line 206 of file itkImagePCAShapeModelEstimator.h.