18 #ifndef __itkPSMProcrustesFunction_h 19 #define __itkPSMProcrustesFunction_h 22 #include <vnl/vnl_matrix.h> 23 #include <vnl/vnl_vector_fixed.h> 24 #include <vnl/vnl_matrix_fixed.h> 25 #include "itkSmartPointer.h" 27 #include "itkObject.h" 28 #include "itkObjectFactory.h" 42 template <
unsigned int VDimension>
47 struct SimilarityTransform3D
49 vnl_matrix_fixed<double, VDimension, VDimension> rotation;
51 vnl_vector_fixed<double, VDimension> translation;
55 typedef double RealType;
56 typedef vnl_vector_fixed<double, VDimension> PointType;
57 typedef std::vector<PointType> ShapeType;
58 typedef typename ShapeType::iterator ShapeIteratorType;
59 typedef std::vector<ShapeType> ShapeListType;
60 typedef typename ShapeListType::iterator ShapeListIteratorType;
61 typedef std::vector<SimilarityTransform3D> SimilarityTransformListType;
62 typedef typename SimilarityTransformListType::iterator SimilarityTransformListIteratorType;
66 typedef Object Superclass;
67 typedef SmartPointer< Self > Pointer;
68 typedef SmartPointer< const Self > ConstPointer;
77 void RunGeneralizedProcrustes(SimilarityTransformListType & transform,
78 ShapeListType & shapes);
83 RealType ComputeSumOfSquares(ShapeListType & shapes);
86 ShapeType TransformShape(ShapeType shape, SimilarityTransform3D & transform);
90 bool CheckDegenerateCase(PointType ssqShape, PointType ssqMean, PointType muShape,
91 PointType muMean,
int rows);
94 void LeaveOneOutMean(ShapeType & mean, ShapeListType & shapeList,
95 ShapeListIteratorType & leaveOutIt);
99 ShapeType RunProcrustes(SimilarityTransform3D & transform, ShapeType mean,
100 ShapeListIteratorType & leaveOutIt);
Generalized Procrustes Analysis is the rigid registration between different input shapes represented ...
PSMProcrustesFunction Self