17 #ifndef itkImageRegionMomentsCalculator_h 18 #define itkImageRegionMomentsCalculator_h 20 #include "itkAffineTransform.h" 23 #include "itkSpatialObject.h" 25 #include "vnl/vnl_vector_fixed.h" 26 #include "vnl/vnl_matrix_fixed.h" 27 #include "vnl/vnl_diag_matrix.h" 59 template <
class TImage>
77 TImage::ImageDimension);
85 typedef Vector<ScalarType, itkGetStaticConstMacro(ImageDimension)>
VectorType;
96 itkGetStaticConstMacro(ImageDimension),
113 if( m_Image != image )
124 if( m_SpatialObjectMask != so )
126 m_SpatialObjectMask = so;
138 if( m_RegionOfInterestPoint1 != point1 || m_RegionOfInterestPoint2 != point2 )
140 m_RegionOfInterestPoint1 = point1;
141 m_RegionOfInterestPoint2 = point2;
225 void PrintSelf(std::ostream& os, Indent indent)
const ITK_OVERRIDE;
229 void operator=(
const Self &);
240 bool m_UseRegionOfInterest;
241 PointType m_RegionOfInterestPoint1;
242 PointType m_RegionOfInterestPoint2;
244 ImageConstPointer m_Image;
245 SpatialObjectConstPointer m_SpatialObjectMask;
251 #ifndef ITK_MANUAL_INSTANTIATION 252 #include "itkImageRegionMomentsCalculator.txx" TImage::PointType PointType
VectorType GetCenterOfGravity() const
AffineTransformPointer GetPrincipalAxesToPhysicalAxesTransform(void) const
virtual void SetImage(const ImageType *image)
ScalarType GetTotalMass() const
Compute moments of an n-dimensional image.
AffineTransformType::Pointer AffineTransformPointer
VectorType GetPrincipalMoments() const
AffineTransform< double, itkGetStaticConstMacro(ImageDimension)> AffineTransformType
MatrixType GetPrincipalAxes() const
Simplified inverse ITK transforms.
SmartPointer< Self > Pointer
virtual ~ImageRegionMomentsCalculator()
Vector< ScalarType, itkGetStaticConstMacro(ImageDimension)> VectorType
ImageType::ConstPointer ImageConstPointer
Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension)> MatrixType
AffineTransformPointer GetPhysicalAxesToPrincipalAxesTransform(void) const
MatrixType GetSecondMoments() const
ImageRegionMomentsCalculator< TImage > Self
virtual void SetRegionOfInterest(const PointType &point1, const PointType &point2)
itkTypeMacro(ImageRegionMomentsCalculator, Object)
ImageType::Pointer ImagePointer
SpatialObjectType::ConstPointer SpatialObjectConstPointer
SpatialObject< itkGetStaticConstMacro(ImageDimension)> SpatialObjectType
SpatialObjectType::Pointer SpatialObjectPointer
itkSetMacro(UseRegionOfInterest, bool)
itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension)
ImageRegionMomentsCalculator()
virtual void SetSpatialObjectMask(const SpatialObject< itkGetStaticConstMacro(ImageDimension)> *so)
VectorType GetFirstMoments() const
void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE
SmartPointer< const Self > ConstPointer
MatrixType GetCentralMoments() const
itkGetMacro(UseRegionOfInterest, bool)