Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkPCAAnalysisFilter Class Reference

#include <vtkPCAAnalysisFilter.h>

Inheritance diagram for vtkPCAAnalysisFilter:

Inheritance graph
[legend]
Collaboration diagram for vtkPCAAnalysisFilter:

Collaboration graph
[legend]
List of all members.

Detailed Description

Performs principal component analysis of a set of aligned pointsets.

vtkPCAAnalysisFilter is a filter that takes as input a set of aligned pointsets (any object derived from vtkPointSet) and performs a principal component analysis of the coordinates. This can be used to visualise the major or minor modes of variation seen in a set of similar biological objects with corresponding landmarks. vtkPCAAnalysisFilter is designed to work with the output from the vtkProcrustesAnalysisFilter

Call SetNumberOfInputs(n) before calling SetInput(0) ... SetInput(n-1). Retrieve the outputs using GetOutput(0) ... GetOutput(n-1).

vtkPCAAnalysisFilter is an implementation of (for example):

T. Cootes et al. : Active Shape Models - their training and application. Computer Vision and Image Understanding, 61(1):38-59, 1995.

The material can also be found in Tim Cootes' ever-changing online report published at his website: http://www.isbe.man.ac.uk/~bim/

Warning:
All of the input pointsets must have the same number of points.
Thanks:
Rasmus Paulsen and Tim Hutton who developed and contributed this class
See also:
vtkProcrustesAlignmentFilter
Created by:
  • Paulsen, Rasmus Reinhold
CVS contributions (if > 5%):
  • Paulsen, Rasmus Reinhold (84%)
  • Hutton, Tim (8%)
CVS logs (CVSweb):
  • .cxx (/Hybrid/vtkPCAAnalysisFilter.cxx)
  • .h (/Hybrid/vtkPCAAnalysisFilter.h)
Tests:
vtkPCAAnalysisFilter (Tests)

Definition at line 72 of file vtkPCAAnalysisFilter.h.

Public Types

typedef vtkSource Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetNumberOfInputs (int n)
void SetInput (int idx, vtkPointSet *p)
vtkPointSetGetOutput (int idx)
void GetParameterisedShape (vtkFloatArray *b, vtkPointSet *shape)
void GetShapeParameters (vtkPointSet *shape, vtkFloatArray *b, int bsize)
vtkPointSetGetInput (int idx)
int GetModesRequiredFor (double proportion)
virtual vtkFloatArrayGetEvals ()

Static Public Member Functions

int IsTypeOf (const char *type)
vtkPCAAnalysisFilterSafeDownCast (vtkObject *o)
vtkPCAAnalysisFilterNew ()

Protected Member Functions

 vtkPCAAnalysisFilter ()
 ~vtkPCAAnalysisFilter ()
void Execute ()


Member Typedef Documentation

typedef vtkSource vtkPCAAnalysisFilter::Superclass
 

Reimplemented from vtkSource.

Definition at line 75 of file vtkPCAAnalysisFilter.h.


Constructor & Destructor Documentation

vtkPCAAnalysisFilter::vtkPCAAnalysisFilter  )  [protected]
 

vtkPCAAnalysisFilter::~vtkPCAAnalysisFilter  )  [protected]
 


Member Function Documentation

virtual const char* vtkPCAAnalysisFilter::GetClassName  )  [virtual]
 

Reimplemented from vtkSource.

int vtkPCAAnalysisFilter::IsTypeOf const char *  type  )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkSource.

virtual int vtkPCAAnalysisFilter::IsA const char *  type  )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkSource.

vtkPCAAnalysisFilter* vtkPCAAnalysisFilter::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkSource.

void vtkPCAAnalysisFilter::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Prints information about the state of the filter.

Reimplemented from vtkSource.

vtkPCAAnalysisFilter* vtkPCAAnalysisFilter::New  )  [static]
 

Creates with similarity transform.

Reimplemented from vtkAlgorithm.

virtual vtkFloatArray* vtkPCAAnalysisFilter::GetEvals  )  [virtual]
 

Get the vector of eigenvalues sorted in descending order

void vtkPCAAnalysisFilter::SetNumberOfInputs int  n  ) 
 

Specify how many pointsets are going to be given as input.

Reimplemented from vtkProcessObject.

void vtkPCAAnalysisFilter::SetInput int  idx,
vtkPointSet p
 

Specify the input pointset with index idx. Call SetNumberOfInputs before calling this function.

vtkPointSet* vtkPCAAnalysisFilter::GetOutput int  idx  ) 
 

Retrieve the output point set with index idx. The output is the eigenvector sorted according to their eigenvalues (descending order)

Reimplemented from vtkSource.

void vtkPCAAnalysisFilter::GetParameterisedShape vtkFloatArray b,
vtkPointSet shape
 

Fills the shape with: mean + b[0] * sqrt(eigenvalue[0]) * eigenvector[0] + b[1] * sqrt(eigenvalue[1]) * eigenvector[1] ... + b[sizeb-1] * sqrt(eigenvalue[bsize-1]) * eigenvector[bsize-1] here b are the parameters expressed in standard deviations bsize is the number of parameters in the b vector This function assumes that shape is allready allocated with the right size, it just moves the points.

void vtkPCAAnalysisFilter::GetShapeParameters vtkPointSet shape,
vtkFloatArray b,
int  bsize
 

Return the bsize parameters b that best model the given shape (in standard deviations). That is that the given shape will be approximated by: shape ~ mean + b[0] * sqrt(eigenvalue[0]) * eigenvector[0] + b[1] * sqrt(eigenvalue[1]) * eigenvector[1] ... + b[bsize-1] * sqrt(eigenvalue[bsize-1]) * eigenvector[bsize-1]

vtkPointSet* vtkPCAAnalysisFilter::GetInput int  idx  ) 
 

Retrieve the input with index idx (usually only used for pipeline tracing).

int vtkPCAAnalysisFilter::GetModesRequiredFor double  proportion  ) 
 

Retrieve how many modes are necessary to model the given proportion of the variation. proportion should be between 0 and 1

void vtkPCAAnalysisFilter::Execute  )  [protected, virtual]
 

Usual data generation method.

Reimplemented from vtkSource.


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