18 #ifndef itkImagePCAShapeModelEstimator_h
19 #define itkImagePCAShapeModelEstimator_h
25 #include "vnl/vnl_vector.h"
26 #include "vnl/vnl_matrix.h"
28 #include "vnl/algo/vnl_matrix_inverse.h"
36 #include "vnl/algo/vnl_generalized_eigensystem.h"
37 #include "vnl/algo/vnl_symmetric_eigensystem.h"
75 template<
typename TInputImage,
76 typename TOutputImage = Image< double, TInputImage::ImageDimension > >
108 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
130 virtual void SetNumberOfPrincipalComponentsRequired(
unsigned int n);
132 itkGetConstMacro(NumberOfPrincipalComponentsRequired,
unsigned int);
135 virtual void SetNumberOfTrainingImages(
unsigned int n);
137 itkGetConstMacro(NumberOfTrainingImages,
unsigned int);
145 void PrintSelf(std::ostream & os,
Indent indent)
const override;
150 void EnlargeOutputRequestedRegion(
DataObject *)
override;
156 void GenerateInputRequestedRegion()
override;
159 void GenerateData()
override;
180 void EstimateShapeModels()
override;
182 void EstimatePCAShapeModelParameters();
184 void CalculateInnerProduct();
201 unsigned int m_NumberOfPixels{0};
204 unsigned int m_NumberOfTrainingImages{0};
211 #ifndef ITK_MANUAL_INSTANTIATION
212 #include "itkImagePCAShapeModelEstimator.hxx"
typename OutputImageType::Pointer OutputImagePointer
vnl_vector< double > VectorOfDoubleType
VectorOfDoubleType m_Means
MatrixOfDoubleType m_InnerProduct
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
unsigned int m_NumberOfPrincipalComponentsRequired
ImageSizeType m_InputImageSize
Base class for all process objects that output image data.
TInputImage InputImageType
std::vector< InputImageConstPointer > InputImagePointerArray
typename InputImageType::PixelType InputImagePixelType
typename TInputImage::SizeType ImageSizeType
Base class for ImagePCAShapeModelEstimator object.
typename InputImageType::Pointer InputImagePointer
VectorOfDoubleType m_EigenVectorNormalizedEnergy
ImageBaseType::SizeType SizeType
MatrixOfDoubleType m_EigenVectors
A multi-dimensional iterator templated over image type that walks a region of pixels.
TOutputImage OutputImageType
InputImageIteratorArray m_InputImageIteratorArray
vnl_matrix< double > MatrixOfDoubleType
vnl_matrix< int > MatrixOfIntegerType
Control indentation during Print() invocation.
std::vector< InputImageConstIterator > InputImageIteratorArray
typename InputImageType::ConstPointer InputImageConstPointer
Base class for statistical shape model estimation.
Base class for all data objects in ITK.
VectorOfDoubleType m_EigenValues
typename TInputImage::PixelType InputPixelType
A multi-dimensional iterator templated over image type that walks a region of pixels.