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,
typename TOutputImage = Image<
double, TInputImage::ImageDimension>>
106 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
129 SetNumberOfPrincipalComponentsRequired(
unsigned int n);
131 itkGetConstMacro(NumberOfPrincipalComponentsRequired,
unsigned int);
135 SetNumberOfTrainingImages(
unsigned int n);
137 itkGetConstMacro(NumberOfTrainingImages,
unsigned int);
146 PrintSelf(std::ostream & os,
Indent indent)
const override;
152 EnlargeOutputRequestedRegion(
DataObject *)
override;
159 GenerateInputRequestedRegion()
override;
163 GenerateData()
override;
184 EstimateShapeModels()
override;
188 EstimatePCAShapeModelParameters();
193 CalculateInnerProduct();
209 unsigned int m_NumberOfPixels{ 0 };
211 unsigned int m_NumberOfTrainingImages{ 0 };
213 unsigned int m_NumberOfPrincipalComponentsRequired{};
218 #ifndef ITK_MANUAL_INSTANTIATION
219 # include "itkImagePCAShapeModelEstimator.hxx"