Main Page
Groups
Namespace List
Class Hierarchy
Alphabetical List
Compound List
File
List
Namespace Members
Compound Members
File Members
Concepts
itk::ImageMomentsCalculator< TImage > Class Template Reference
[Operators]
Compute moments of an n-dimensional image.
More...
#include <itkImageMomentsCalculator.h>
Collaboration diagram for itk::ImageMomentsCalculator< TImage >:
[legend]List of all members.
Detailed Description
template<class TImage>
class itk::ImageMomentsCalculator< TImage >
Compute moments of an n-dimensional image.
This class provides methods for computing the moments and related properties of a single-echo image. Computing the (non-central) moments of a large image can easily take a million times longer than computing the various other values derived from them, so we compute the moments only on explicit request, and save their values (in an ImageMomentsCalculator object) for later retrieval by the user.
The non-central moments computed by this class are not really intended for general use and are therefore in index coordinates; that is, we pretend that the index that selects a particular pixel also equals its physical coordinates. The center of gravity, central moments, principal moments and principal axes are all more generally useful and are computed in the physical coordinates defined by the Origin and Spacing parameters of the image.
The methods that return values return the values themselves rather than references because the cost is small compared to the cost of computing the moments and doing so simplifies memory management for the caller.
-
Todo:
-
It's not yet clear how multi-echo images should be handled here.
Definition at line 59 of file itkImageMomentsCalculator.h.
Member Typedef Documentation
template<class TImage> |
typedef AffineTransform<double,itkGetStaticConstMacro(ImageDimension) itk::ImageMomentsCalculator< TImage >::AffineTransformType)
|
|
template<class TImage> |
typedef ImageType::Pointer itk::ImageMomentsCalculator< TImage >::ImagePointer
|
|
template<class TImage> |
typedef TImage itk::ImageMomentsCalculator< TImage >::ImageType
|
|
template<class TImage> |
typedef Matrix<ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) itk::ImageMomentsCalculator< TImage >::MatrixType)
|
|
template<class TImage> |
typedef double itk::ImageMomentsCalculator< TImage >::ScalarType
|
|
template<class TImage> |
typedef ImageMomentsCalculator<TImage> itk::ImageMomentsCalculator< TImage >::Self
|
|
template<class TImage> |
typedef Vector<ScalarType,itkGetStaticConstMacro(ImageDimension) itk::ImageMomentsCalculator< TImage >::VectorType)
|
|
Constructor & Destructor Documentation
template<class TImage> |
itk::ImageMomentsCalculator< TImage >::ImageMomentsCalculator |
( |
|
) |
|
|
|
Construct an ImageMomentsCalculator object. This method constructs a new ImageMomentsCalculator object that contains no stored moments information; this information can be added later by calling the ComputeMoments method. |
template<class TImage> |
itk::ImageMomentsCalculator< TImage >::ImageMomentsCalculator |
( |
const ImageType * |
image |
) |
|
|
|
Compute moments of an image and save in an ImageMomentsCalculator object. This method constructs a new ImageMomentsCalculator object and stores in it the moments of the image given as argument. The values of these moments and related parameters can be retrieved by using * other methods of the object constructed. |
template<class TImage> |
itk::ImageMomentsCalculator< TImage >::~ImageMomentsCalculator |
( |
|
) |
|
|
Member Function Documentation
template<class TImage> |
void itk::ImageMomentsCalculator< TImage >::ComputeMoments |
( |
const ImageType * |
image |
) |
|
|
|
Compute moments of a new or modified image. This method computes the moments of the image given as a parameter and stores them in the object. The values of these moments and related parameters can then be retrieved by using other methods of this object. |
template<class TImage> |
VectorType itk::ImageMomentsCalculator< TImage >::GetCenterOfGravity |
( |
|
) |
|
|
|
Return center of gravity, in physical coordinates. This method returns the center of gravity of the image whose moments were last computed by this object. The center of gravity is computed in physical coordinates. |
template<class TImage> |
MatrixType itk::ImageMomentsCalculator< TImage >::GetCentralMoments |
( |
|
) |
|
|
|
Return second central moments, in physical coordinates. This method returns the central second moments of the image whose moments were last computed by this object. The central moments are computed in physical coordinates. |
template<class TImage> |
VectorType itk::ImageMomentsCalculator< TImage >::GetFirstMoments |
( |
|
) |
|
|
|
Return first moments about origin, in index coordinates. This method returns the first moments around the origin of the image whose moments were last computed by this object. For simplicity, these moments are computed in index coordinates rather than physical coordinates. |
template<class TImage> |
AffineTransformPointer itk::ImageMomentsCalculator< TImage >::GetPhysicalAxesToPrincipalAxesTransform |
( |
void |
|
) |
const |
|
|
Get the affine transform from physical axes to principal axes This method returns an affine transform which transforms from the physical coordinate system to the principal axes coordinate system. |
template<class TImage> |
MatrixType itk::ImageMomentsCalculator< TImage >::GetPrincipalAxes |
( |
|
) |
|
|
|
Return principal axes, in physical coordinates. This method returns the principal axes of the image whose moments were last computed by this object. The moments are returned as an orthogonal matrix, each row of which corresponds to one principal moment; for example, the principal axis corresponding to the smallest principal moment is the vector m[0], where m is the value returned by this method. The matrix of principal axes is guaranteed to be a proper rotation; that is, to have determinant +1 and to preserve parity. (Unless you have foolishly made one or more of the spacing values negative; in that case, _you_ get to figure out the consequences.) The moments are computed in physical coordinates. |
template<class TImage> |
AffineTransformPointer itk::ImageMomentsCalculator< TImage >::GetPrincipalAxesToPhysicalAxesTransform |
( |
void |
|
) |
const |
|
|
Get the affine transform from principal axes to physical axes This method returns an affine transform which transforms from the principal axes coordinate system to physical coordinates. |
template<class TImage> |
VectorType itk::ImageMomentsCalculator< TImage >::GetPrincipalMoments |
( |
|
) |
|
|
|
Return principal moments, in physical coordinates. This method returns the principal moments of the image whose moments were last computed by this object. The moments are returned as a vector, with the principal moments ordered from smallest to largest. The moments are computed in physical coordinates. |
template<class TImage> |
MatrixType itk::ImageMomentsCalculator< TImage >::GetSecondMoments |
( |
|
) |
|
|
|
Return second moments about origin, in index coordinates. This method returns the second moments around the origin of the image whose moments were last computed by this object. For simplicity, these moments are computed in index coordinates rather than physical coordinates. |
template<class TImage> |
ScalarType itk::ImageMomentsCalculator< TImage >::GetTotalMass |
( |
|
) |
|
|
|
Return the total mass (or zeroth moment) of an image. This method returns the sum of pixel intensities (also known as the zeroth moment or the total mass) of the image whose moments were last computed by this object. |
template<class TImage> |
itk::ImageMomentsCalculator< TImage >::itkStaticConstMacro |
( |
ImageDimension |
, |
|
|
unsigned |
int, |
|
|
TImage::ImageDimension |
|
|
) |
|
|
|
Extract the dimension of the image. |
The documentation for this class was generated from the following file:
Generated at Fri May 21 01:46:16 2004 for ITK by
1.2.15 written by Dimitri van Heesch,
© 1997-2000