18 #ifndef itkImageMomentsCalculator_h
19 #define itkImageMomentsCalculator_h
25 #include "vnl/vnl_vector_fixed.h"
26 #include "vnl/vnl_matrix_fixed.h"
27 #include "vnl/vnl_diag_matrix.h"
59 template<
typename TImage >
78 static constexpr
unsigned int ImageDimension = TImage::ImageDimension;
96 Self::ImageDimension >;
112 if ( m_Image != image )
124 if ( m_SpatialObjectMask != so )
126 m_SpatialObjectMask = so;
144 ScalarType GetTotalMass()
const;
158 MatrixType GetSecondMoments()
const;
170 MatrixType GetCentralMoments()
const;
192 MatrixType GetPrincipalAxes()
const;
198 AffineTransformPointer GetPrincipalAxesToPhysicalAxesTransform()
const;
204 AffineTransformPointer GetPhysicalAxesToPrincipalAxesTransform()
const;
209 void PrintSelf(std::ostream & os,
Indent indent)
const override;
226 #ifndef ITK_MANUAL_INSTANTIATION
227 #include "itkImageMomentsCalculator.hxx"
typename ImageType::Pointer ImagePointer
Light weight base class for most itk classes.
typename SpatialObjectType::ConstPointer SpatialObjectConstPointer
typename SpatialObjectType::Pointer SpatialObjectPointer
SpatialObjectConstPointer m_SpatialObjectMask
Compute moments of an n-dimensional image.
Implementation of the composite pattern.
typename AffineTransformType::Pointer AffineTransformPointer
virtual void SetSpatialObjectMask(const SpatialObject< Self::ImageDimension > *so)
Control indentation during Print() invocation.
ImageConstPointer m_Image
virtual void SetImage(const ImageType *image)
Base class for most ITK classes.
ImageBaseType::SpacingType VectorType
typename ImageType::ConstPointer ImageConstPointer