Public Member Functions | Public Attributes | List of all members
mirtk::ImageAttributes Struct Reference

#include <ImageAttributes.h>

Collaboration diagram for mirtk::ImageAttributes:
Collaboration graph

Public Member Functions

double Area () const
 Image slice area in world space.
 
bool ContainsInSpace (const ImageAttributes &attr) const
 Whether given lattice is fully contained by this image lattice.
 
bool EqualInSpace (const ImageAttributes &attr) const
 Whether spatial attributes are equal.
 
bool EqualInTime (const ImageAttributes &attr) const
 Whether temporal attributes are equal.
 
Matrix GetImageToWorldMatrix () const
 Alias for GetLatticeToWorldMatrix.
 
Matrix GetImageToWorldOrientation () const
 Alias for GetLatticeToWorldOrientation.
 
Matrix GetLatticeToWorldMatrix () const
 Return transformation matrix for lattice to world coordinates.
 
Matrix GetLatticeToWorldOrientation () const
 Return orientation part of lattice to world coordinate transformation.
 
Matrix GetWorldToImageMatrix () const
 Alias for GetWorldToLatticeMatrix.
 
Matrix GetWorldToImageOrientation () const
 Alias for GetWorldToLatticeOrientation.
 
Matrix GetWorldToLatticeMatrix () const
 Return transformation matrix for world to lattice coordinates.
 
Matrix GetWorldToLatticeOrientation () const
 Return orientation part of lattice to world coordinate transformation.
 
 ImageAttributes ()
 Constructor.
 
 ImageAttributes (int, int, double=1.0, double=1.0)
 Constructor.
 
 ImageAttributes (int, int, int, double=1.0, double=1.0, double=1.0)
 Constructor.
 
 ImageAttributes (int, int, int, int, double=1.0, double=1.0, double=1.0, double=1.0)
 Constructor.
 
 ImageAttributes (const ImageAttributes &)
 Copy constructor.
 
void IndexToLattice (int, int *, int *, int *=NULL, int *=NULL) const
 Get Index from Lattice.
 
void IndexToLattice (int, int &, int &) const
 Get Index from Lattice.
 
void IndexToLattice (int, int &, int &, int &) const
 Get Index from Lattice.
 
void IndexToLattice (int, int &, int &, int &, int &) const
 Get Index from Lattice.
 
void IndexToWorld (int, double &, double &) const
 Get world coordinates (in mm) of lattice point.
 
void IndexToWorld (int, double &, double &, double &) const
 Get world coordinates (in mm) of lattice point.
 
void IndexToWorld (int, Point &) const
 Get world coordinates (in mm) of lattice point.
 
Point IndexToWorld (int) const
 Get world coordinates (in mm) of lattice point.
 
bool IsBoundary (int) const
 Whether voxel index is at boundary of finite image domain.
 
bool IsBoundary (int, int) const
 Whether voxel indices are at boundary of finite 2D image domain.
 
bool IsBoundary (int, int, int) const
 Whether voxel indices are at boundary of finite 3D image domain.
 
bool IsBoundary (int, int, int, int) const
 Whether voxel indices are at boundary of finite 4D image domain.
 
bool IsInside (int) const
 Whether voxel index is within finite image domain.
 
bool IsInside (int, int) const
 Whether voxel indices are within finite 2D image domain.
 
bool IsInside (int, int, int) const
 Whether voxel indices are within finite 3D image domain.
 
bool IsInside (int, int, int, int) const
 Whether voxel indices are within finite 4D image domain.
 
bool IsOutside (int) const
 Whether voxel is index is outside finite image domain.
 
bool IsOutside (int, int) const
 Whether voxel indices are outside finite 4D image domain.
 
bool IsOutside (int, int, int) const
 Whether voxel indices are outside finite 4D image domain.
 
bool IsOutside (int, int, int, int) const
 Whether voxel indices are outside finite 4D image domain.
 
int LatticeToIndex (int, int, int=0, int=0) const
 Get Index from Lattice.
 
double LatticeToTime (double) const
 Convert lattice to time coordinate.
 
void LatticeToWorld (Point &) const
 Convert lattice to world coordinate.
 
void LatticeToWorld (double &, double &, double &) const
 Convert lattice to world coordinate.
 
void LatticeToWorld (double *, double *, double *) const
 Compute spatial world coordinates of lattice points (_x * _y * _z)
 
void LatticeToWorld (double *, double *, double *, double *) const
 Compute world coordinates of all lattice points (_x * _y * _z * _t)
 
int N (int) const
 Get number of lattice points in i-th dimension.
 
int NumberOfLatticePoints () const
 Number of lattice points in image domain.
 
int NumberOfPoints () const
 
int NumberOfSpatialPoints () const
 Number of spatial lattice points.
 
 operator bool () const
 Check if attributes are valid.
 
bool operator!= (const ImageAttributes &attr) const
 Inequality operator.
 
ImageAttributesoperator= (const ImageAttributes &)
 Copy operator.
 
bool operator== (const ImageAttributes &attr) const
 Equality operator.
 
void Print (ostream &, Indent=0) const
 Print attributes.
 
void Print (Indent=0) const
 Print attributes.
 
void PutAffineMatrix (const Matrix &m, bool apply=false)
 
double Space () const
 Amount of space occupied by the image in n-D world space (excluding time dimension)
 
double Spacing (int) const
 Get spacing of lattice points in i-th dimension.
 
int T () const
 Get number of lattice points in t dimension.
 
double TimeToLattice (double) const
 Convert time to lattice coordinate.
 
double TSize () const
 Get voxel size/spacing of lattice points in t dimension.
 
double TSpacing () const
 Get spacing of lattice points in t dimension.
 
double Volume () const
 Image volume in world space.
 
void WorldToLattice (double &, double &, double &) const
 Convert world to lattice coordinate.
 
void WorldToLattice (Point &) const
 Convert lattice to world coordinate.
 
int X () const
 Get number of lattice points in x dimension.
 
double XSize () const
 Get voxel size/spacing of lattice points in x dimension.
 
double XSpacing () const
 Get spacing of lattice points in x dimension.
 
int Y () const
 Get number of lattice points in y dimension.
 
double YSize () const
 Get voxel size/spacing of lattice points in y dimension.
 
double YSpacing () const
 Get spacing of lattice points in y dimension.
 
int Z () const
 Get number of lattice points in z dimension.
 
double ZSize () const
 Get voxel size/spacing of lattice points in z dimension.
 
double ZSpacing () const
 Get spacing of lattice points in z dimension.
 

Public Attributes

double _dt
 Voxel t-dimensions (in ms)
 
double _dx
 Voxel x-dimensions (in mm)
 
double _dy
 Voxel y-dimensions (in mm)
 
double _dz
 Voxel z-dimensions (in mm)
 
const Matrix_i2w
 Pointer to pre-computed image to world matrix (cf. BaseImage::_matI2W)
 
Matrix _smat
 Affine transformation matrix.
 
int _t
 Image t-dimension (in voxels)
 
double _torigin
 Image t-origin (in ms)
 
const Matrix_w2i
 Pointer to pre-computed world to image matrix (cf. BaseImage::_matW2I)
 
int _x
 Image x-dimension (in voxels)
 
double _xaxis [3]
 Direction of x-axis.
 
double _xorigin
 Image x-origin (in mm)
 
int _y
 Image y-dimension (in voxels)
 
double _yaxis [3]
 Direction of y-axis.
 
double _yorigin
 Image y-origin (in mm)
 
int _z
 Image z-dimension (in voxels)
 
double _zaxis [3]
 Direction of z-axis.
 
double _zorigin
 Image z-origin (in mm)
 

Detailed Description

Class which defines the attributes of the imaging geometry

Definition at line 36 of file ImageAttributes.h.

Member Function Documentation

§ NumberOfPoints()

int mirtk::ImageAttributes::NumberOfPoints ( ) const
inline

Number of lattice points (i.e., NumberOfLatticePoints if _dt != 0, otherwise NumberOfSpatialPoints)

Definition at line 450 of file ImageAttributes.h.

§ PutAffineMatrix()

void mirtk::ImageAttributes::PutAffineMatrix ( const Matrix m,
bool  apply = false 
)

Put affine world coordinate transformation which is applied after the image to world coordinate transformation derived from the imaging geometry when mapping voxel indices to world coordinates. This transformation can be the inverse of the affine transformation obtained by an affine registration with this image as source.

Parameters
[in]mHomogeneous transformation matrix.
[in]applyWhether to apply the translation, rotation, and scaling directly to the image attributes and store only the shearing (if any) as additional transformation.

The documentation for this struct was generated from the following file: