Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
mirtk::BaseImage Class Referenceabstract

#include <BaseImage.h>

Inheritance diagram for mirtk::BaseImage:
Inheritance graph
Collaboration diagram for mirtk::BaseImage:
Collaboration graph

Public Types

enum  OrientationCode { ,
  L2R = 1, R2L = 2, P2A = 3, A2P = 4,
  I2S = 5, S2I = 6
}
 Orientation codes (same as defined in nifti1_io.h, e.g., NIFTI_L2R) More...
 
typedef double VoxelType
 

Public Member Functions

const ImageAttributesAttributes () const
 Gets the image attributes.
 
void BoundingBox (int &, int &, int &, int &) const
 Get 2D bounding box of image foreground.
 
void BoundingBox (int &, int &, int &, int &, int &, int &) const
 Get 3D bounding box of image foreground.
 
void BoundingBox (int &, int &, int &, int &, int &, int &, int &, int &) const
 Get 3D+t bounding box of image foreground.
 
int CenterOfForeground (Point &center) const
 
int CenterOfForeground (Point &center, double padding) const
 
virtual void Clear ()=0
 Clear image.
 
void ClearBackgroundValue ()
 Clear background value.
 
void ClearMask (bool=false)
 Clear mask upon n-th call after n preceeding InitializeMask calls.
 
virtual BaseImageCopy () const
 Create copy of this image.
 
virtual void FlipXT (bool modify_origin=false)=0
 Flip x and t axis, always also swaps voxel size.
 
virtual void FlipXY (bool modify_origin=false)=0
 Flip x and y axis, always also swaps voxel size.
 
virtual void FlipXZ (bool modify_origin=false)=0
 Flip x and z axis, always also swaps voxel size.
 
virtual void FlipYT (bool modify_origin=false)=0
 Flip y and t axis, always also swaps voxel size.
 
virtual void FlipYZ (bool modify_origin=false)=0
 Flip y and z axis, always also swaps voxel size.
 
virtual void FlipZT (bool modify_origin=false)=0
 Flip z and t axis, always also swaps voxel size.
 
ImageAttributes ForegroundDomain (int i1, int j1, int k1, int i2, int j2, int k2, bool orthogonal=true) const
 
ImageAttributes ForegroundDomain (bool orthogonal=true) const
 
ImageAttributes ForegroundDomain (double padding, bool orthogonal=true) const
 
VoxelType Get (int) const
 Get pixel value at voxel with given index.
 
VoxelType Get (int, int, int=0, int=0) const
 Get pixel value at voxel with given lattice coordinates.
 
const MatrixGetAffineMatrix () const
 
virtual double GetAsDouble (int) const
 Function for pixel get access as double.
 
virtual double GetAsDouble (int, int, int=0, int=0) const =0
 Function for pixel get access as double.
 
virtual void GetAsVector (Vector &, int) const
 Function for pixel get access as double.
 
virtual void GetAsVector (Vector &, int, int, int=0, int=0) const =0
 Function for pixel get access as double.
 
virtual Vector GetAsVector (int) const
 Function for pixel get access as double.
 
virtual Vector GetAsVector (int, int, int=0, int=0) const
 Function for pixel get access as double.
 
double GetBackgroundValueAsDouble () const
 Get background value.
 
virtual void * GetDataPointer (int=0)=0
 Function for pixel access via pointers.
 
virtual const void * GetDataPointer (int=0) const =0
 Function for pixel access via pointers.
 
virtual void * GetDataPointer (int, int, int=0, int=0)=0
 Function for pixel access via pointers.
 
virtual const void * GetDataPointer (int, int, int=0, int=0) const =0
 Function for pixel access via pointers.
 
virtual int GetDataType () const =0
 Function which returns pixel scalar type.
 
virtual double GetDataTypeMax () const =0
 Function which returns the minimum value the pixel can hold without overflowing.
 
virtual double GetDataTypeMin () const =0
 Function which returns the minimum value the pixel can hold without overflowing.
 
virtual int GetDataTypeSize () const =0
 Function which returns size of pixel scalar type in bytes.
 
virtual void GetFrame (BaseImage *&, int, int=-1) const =0
 Get time instance (i.e., frame) or channel of image.
 
const ImageAttributesGetImageAttributes () const
 
const MatrixGetImageToWorldMatrix () const
 Return transformation matrix for image to world coordinates.
 
BinaryImageGetMask (bool=false)
 Get foreground mask (optionally, take over ownership)
 
const BinaryImageGetMask () const
 Get foreground mask.
 
virtual void GetMinMaxAsDouble (double &, double &) const
 Minimum and maximum pixel values get accessor.
 
void GetMinMaxAsDouble (double *, double *) const
 Minimum and maximum pixel values get accessor.
 
int GetNumberOfVoxels () const
 
void GetOrientation (double *, double *, double *=NULL) const
 Get image x- and y-axis and z-axis.
 
Point GetOrigin () const
 Image origin get access.
 
void GetOrigin (double &, double &, double &) const
 Image origin get access.
 
void GetOrigin (double &, double &, double &, double &) const
 Image origin get access.
 
void GetPixelSize (double &, double &) const
 Voxel dimensions get access.
 
void GetPixelSize (double &, double &, double &) const
 Voxel dimensions get access.
 
void GetPixelSize (double &, double &, double &, double &) const
 Voxel dimensions get access.
 
void GetPixelSize (double *, double *, double *) const
 Voxel dimensions get access.
 
void GetPixelSize (double *, double *, double *, double *) const
 Voxel dimensions get access.
 
virtual void GetRegion (BaseImage *&, int, int) const =0
 Get image consisting of specified 2D slice.
 
virtual void GetRegion (BaseImage *&, int, int, int, int, int, int) const =0
 Get image consisting of specified 3D subregion.
 
virtual void GetRegion (BaseImage *&, int, int, int, int, int, int, int, int) const =0
 Get image consisting of specified 4D subregion.
 
void * GetScalarPointer (int=0, int=0, int=0, int=0)
 
const void * GetScalarPointer (int=0, int=0, int=0, int=0) const
 
int GetScalarType () const
 
double GetScalarTypeMax () const
 
double GetScalarTypeMin () const
 
int GetScalarTypeSize () const
 
int GetT () const
 Returns the number of voxels in the t-direction.
 
double GetTOrigin () const
 Get temporal origin.
 
double GetTSize () const
 Returns the size of a voxel in the t-direction.
 
const MatrixGetWorldToImageMatrix () const
 Return transformation matrix for world to image coordinates.
 
int GetX () const
 Returns the number of voxels in the x-direction.
 
double GetXSize () const
 Returns the size of a voxel in the x-direction.
 
int GetY () const
 Returns the number of voxels in the y-direction.
 
double GetYSize () const
 Returns the size of a voxel in the y-direction.
 
int GetZ () const
 Returns the number of voxels in the z-direction.
 
double GetZSize () const
 Returns the size of a voxel in the z-direction.
 
bool HasBackground () const
 Whether any voxel is within background.
 
bool HasBackgroundValue () const
 Whether a background value has been set.
 
bool HasMask () const
 
bool HasSpatialAttributesOf (const BaseImage *) const
 Checks if this image shares the same spatial attributes with another image.
 
double ImageToTime (double) const
 Image to time coordinate conversion.
 
void ImageToWorld (double &, double &) const
 Image to world coordinate conversion with two doubles.
 
void ImageToWorld (double &, double &, double &) const
 Image to world coordinate conversion with three doubles.
 
void ImageToWorld (Point &) const
 Image to world coordinate conversion with a given point.
 
void ImageToWorld (Vector3 &) const
 Convert vector w.r.t. image axes to vector w.r.t. world axes.
 
void ImageToWorld (WorldCoordsImage &i2w, bool _3D=true) const
 
void ImageToWorld (double *i2w, bool _3D=true) const
 
void ImageToWorld (PointSet &) const
 Adds world coordinates of each voxel to given point set.
 
void IndexToVoxel (int, int &, int &) const
 Function to convert index to pixel coordinates.
 
void IndexToVoxel (int, int &, int &, int &) const
 Function to convert index to pixel coordinates.
 
void IndexToVoxel (int, int &, int &, int &, int &) const
 Function to convert index to pixel coordinates.
 
void IndexToWorld (int, double &, double &) const
 Get world coordinates (in mm) of pixl.
 
void IndexToWorld (int, double &, double &, double &) const
 Get world coordinates (in mm) of pixel.
 
void IndexToWorld (int, Point &) const
 Get world coordinates (in mm) of pixel.
 
Point IndexToWorld (int) const
 Get world coordinates (in mm) of pixel.
 
virtual void Initialize (const ImageAttributes &, int=-1)=0
 Initialize image.
 
void InitializeMask (int t=-1, bool=false)
 Initialize mask if not done yet or none is set.
 
bool IsBackground (int) const
 Whether voxel is within background without index-out-of-bounds check.
 
bool IsBackground (int, int, int=0, int=0) const
 Whether voxel is within background without index-out-of-bounds check.
 
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 IsBoundingBoxInsideForeground (int, int, int, int) const
 Whether all voxels within a 2D bounding region are inside foreground region.
 
bool IsBoundingBoxInsideForeground (int, int, int, int, int, int) const
 Whether all voxels within a 3D bounding region are inside foreground region.
 
bool IsBoundingBoxInsideForeground (int, int, int, int, int, int, int, int) const
 Whether all voxels within a 4D bounding region are inside foreground region.
 
bool IsEmpty () const
 Whether image is uninitialized.
 
bool IsForeground (int) const
 Whether voxel is within foreground without index-out-of-bounds check.
 
bool IsForeground (int, int, int=0, int=0) const
 Whether voxel is within foreground without index-out-of-bounds check.
 
bool IsInFOV (double, double, double)
 Returns true if point is within the field of view of image.
 
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 IsInsideForeground (int) const
 Whether voxel is index is within finite image domain and part of foreground region.
 
bool IsInsideForeground (int, int, int=0, int=0) const
 Whether voxel indices are within finite image domain and part of foreground region.
 
bool IsNextToBackground (int) const
 Whether at least one neighboring voxel is outside the finite foreground region.
 
bool IsNextToBackground (int, int, int=0, int=0) const
 Whether at least one neighboring voxel is outside the finite foreground region.
 
bool IsNextToForeground (int) const
 Whether at least one neighboring voxel is inside the finite foreground region.
 
bool IsNextToForeground (int, int, int=0, int=0) const
 Whether at least one neighboring voxel is inside the finite foreground region.
 
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.
 
bool IsOutsideForeground (int) const
 Whether voxel is index is outside finite image domain or part of background region.
 
bool IsOutsideForeground (int, int, int=0, int=0) const
 Whether voxel indices are outside finite image domain or part of background region.
 
virtual int N () const
 Returns the number of vector components (i.e., 1 for scalar images)
 
int NumberOfSpatialVoxels () const
 Returns the total number of spatial voxels.
 
int NumberOfVoxels () const
 Returns the total number of voxels.
 
BaseImageoperator= (const BaseImage &)
 Assignment operator.
 
void Orientation (OrientationCode &, OrientationCode &, OrientationCode &) const
 Get orientation of axis relative to patient.
 
bool OwnsMask () const
 
virtual void Print (Indent=0) const
 Print image information.
 
void PutAffineMatrix (const Matrix &, bool=false)
 
virtual void PutAsDouble (int, double)
 Function for pixel put access.
 
virtual void PutAsDouble (int, int, double)
 Function for pixel put access.
 
virtual void PutAsDouble (int, int, int, double)
 Function for pixel put access.
 
virtual void PutAsDouble (int, int, int, int, double)=0
 Function for pixel put access.
 
virtual void PutAsVector (int, const Vector &)
 Function for pixel put access.
 
virtual void PutAsVector (int, int, const Vector &)
 Function for pixel put access.
 
virtual void PutAsVector (int, int, int, const Vector &)
 Function for pixel put access.
 
virtual void PutAsVector (int, int, int, int, const Vector &)=0
 Function for pixel put access.
 
void PutBackgroundValueAsDouble (double)
 Put background value.
 
virtual void PutBackgroundValueAsDouble (double, bool)
 Put background value.
 
void PutMask (BinaryImage *, bool=false)
 Set foreground mask.
 
virtual void PutMinMaxAsDouble (double, double)
 Minimum and maximum pixel values put accessor.
 
void PutOrientation (double *, double *, double *=NULL)
 Put image x- and y-axis and z-axis.
 
void PutOrigin (const Point &)
 Image origin put access.
 
void PutOrigin (double, double, double)
 Image origin put access.
 
void PutOrigin (double, double, double, double)
 Image origin put access.
 
void PutPixelSize (double, double, double)
 Voxel dimensions put access.
 
void PutPixelSize (double, double, double, double)
 Voxel dimensions put access.
 
void PutTOrigin (double)
 Put temporal origin.
 
void PutTSize (double)
 Set temporal voxel size, i.e., to zero for vector field and non-zero for temporal sequence.
 
virtual void Read (const char *)=0
 Read image from file.
 
virtual void ReflectT (bool modify_axes=false)=0
 Reflect image along t.
 
virtual void ReflectX (bool modify_axes=false)=0
 Reflect image along x.
 
virtual void ReflectY (bool modify_axes=false)=0
 Reflect image along y.
 
virtual void ReflectZ (bool modify_axes=false)=0
 Reflect image along z.
 
void ResetAffineMatrix ()
 
void ResetBackgroundValueAsDouble (double)
 
virtual void SwapXT (bool modify_axes=true)=0
 Swap x and t axis.
 
virtual void SwapXY (bool modify_axes=true)=0
 Swap x and y axis.
 
virtual void SwapXZ (bool modify_axes=true)=0
 Swap x and z axis.
 
virtual void SwapYT (bool modify_axes=true)=0
 Swap y and t axis.
 
virtual void SwapYZ (bool modify_axes=true)=0
 Swap y and z axis.
 
virtual void SwapZT (bool modify_axes=true)=0
 Swap z and t axis.
 
int T () const
 Returns the number of voxels in the t-direction.
 
double TimeToImage (double) const
 Time to image coordinate conversion.
 
double TSize () const
 Returns the size of a voxel in the t-direction.
 
int VoxelToIndex (int, int, int=0, int=0) const
 Function to convert pixel to index.
 
void WorldToImage (double &, double &) const
 World to image coordinate conversion with two doubles.
 
void WorldToImage (double &, double &, double &) const
 World to image coordinate conversion with three doubles.
 
void WorldToImage (Point &) const
 World to image coordinate conversion with a given point.
 
void WorldToImage (Vector3 &) const
 Convert vector w.r.t. world axes to vector w.r.t. image axes.
 
virtual void Write (const char *) const =0
 Write image to file.
 
int X () const
 Returns the number of voxels in the x-direction.
 
double XSize () const
 Returns the size of a voxel in the x-direction.
 
int Y () const
 Returns the number of voxels in the y-direction.
 
double YSize () const
 Returns the size of a voxel in the y-direction.
 
int Z () const
 Returns the number of voxels in the z-direction.
 
double ZSize () const
 Returns the size of a voxel in the z-direction.
 
virtual ~BaseImage ()
 Destructor.
 
- Public Member Functions inherited from mirtk::Object
virtual const char * NameOfClass () const =0
 Get name of class, which this object is an instance of.
 
virtual ParameterList Parameter () const
 Get parameter name/value pairs.
 
bool Parameter (const ParameterList &)
 Set parameters from name/value pairs.
 
virtual bool Set (const char *name, const char *value)
 
virtual ~Object ()
 Destructor.
 

Static Public Member Functions

static BaseImageNew (const char *)
 Read file and construct image.
 
static BaseImageNew (const BaseImage *)
 Construct image copy of same type.
 
static BaseImageNew (int)
 Construct image with given voxel type.
 
- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 

Protected Member Functions

 BaseImage ()
 Default constructor.
 
 BaseImage (const ImageAttributes &, int=-1)
 Constructor.
 
 BaseImage (const BaseImage &)
 Copy constructor.
 
void PutAttributes (const ImageAttributes &)
 Puts attributes of image.
 
void UpdateMatrix ()
 Update coordinate transformation.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 

Protected Attributes

ImageAttributes _attr
 Image attributes.
 
double _bg
 Background value - may also be NaN for floating point images.
 
bool _bgSet
 Whether a background value was set.
 
BinaryImage_mask
 Foreground mask.
 
int _maskOwner
 
Matrix _matI2W
 Transformation matrix from image coordinates to (transformed) world coordinates.
 
Matrix _matW2I
 Transformation matrix from (transformed) world coordinates to image coordinates.
 
int _NumberOfVoxels
 Total number of voxels.
 

Additional Inherited Members

- Static Protected Member Functions inherited from mirtk::Object
template<typename... Args>
static void ThrowStatic (ErrorType err, const char *cls, const char *func, Args... args)
 

Detailed Description

Abstract generic class for 2D or 3D images

This abstract base class provides generic support for 2D and 3D image classes. It provides functions for accessing image dimension and origin as well as voxel dimensions. It also provides functions for conversion between image and world coordinates.

Definition at line 72 of file BaseImage.h.

Member Typedef Documentation

§ VoxelType

Default voxel type used by generic interpolate/extrapolate image functions when instantiated with BaseImage as template argument as done by the general interpolate image functions which thus can interpolate any scalar image.

Definition at line 770 of file BaseImage.h.

Member Enumeration Documentation

§ OrientationCode

Orientation codes (same as defined in nifti1_io.h, e.g., NIFTI_L2R)

Enumerator
L2R 

Left to Right.

R2L 

Right to Left.

P2A 

Posterior to Anterior.

A2P 

Anterior to Posterior.

I2S 

Inferior to Superior.

S2I 

Superior to Inferior.

Definition at line 82 of file BaseImage.h.

Member Function Documentation

§ CenterOfForeground() [1/2]

int mirtk::BaseImage::CenterOfForeground ( Point center) const

Determine center of mass of image foreground

Parameters
[out]centerCentroid of image foreground.
Returns
Number of foreground intensities encountered or zero if the image does not contain any foreground, in which case the center is invalid.

§ CenterOfForeground() [2/2]

int mirtk::BaseImage::CenterOfForeground ( Point center,
double  padding 
) const

Determine center of mass of image foreground

Parameters
[out]centerCentroid of image foreground.
[in]paddingPadding value. Voxels with a value less or equal are considered background. When this value is NaN, all non-NaN image values are considered.
Returns
Number of foreground intensities encountered or zero if the image does not contain any foreground, in which case the center is invalid.

§ ForegroundDomain() [1/3]

ImageAttributes mirtk::BaseImage::ForegroundDomain ( int  i1,
int  j1,
int  k1,
int  i2,
int  j2,
int  k2,
bool  orthogonal = true 
) const

Get cropped image foreground bounding region

Parameters
[in]i1Lower voxel index in x direction.
[in]j1Lower voxel index in y direction.
[in]k1Lower voxel index in z direction.
[in]i2Upper voxel index in x direction.
[in]j2Upper voxel index in y direction.
[in]k2Upper voxel index in z direction.
[in]orthogonalWhether to orthogonalize image axes. Useful only in case of input images where a previous affine (12 DoFs) alignment has been applied to the attributes.
Returns
Attributes of foreground region.

§ ForegroundDomain() [2/3]

ImageAttributes mirtk::BaseImage::ForegroundDomain ( bool  orthogonal = true) const

Determine minimal axes-aligned foreground bounding region

Parameters
[in]orthogonalWhether to orthogonalize image axes. Useful only in case of input images where a previous affine (12 DoFs) alignment has been applied to the attributes.
Returns
Attributes of foreground region.

§ ForegroundDomain() [3/3]

ImageAttributes mirtk::BaseImage::ForegroundDomain ( double  padding,
bool  orthogonal = true 
) const

Determine minimal axes-aligned foreground bounding region

Parameters
[in]paddingPadding value. Voxels with a value less or equal the specified value are considered background. When the padding value is NaN, all NaN image values are considered background.
[in]orthogonalWhether to orthogonalize image axes. Useful only in case of input images where a previous affine (12 DoFs) alignment has been applied to the attributes.
Returns
Attributes of foreground region.

§ GetAffineMatrix()

const Matrix & mirtk::BaseImage::GetAffineMatrix ( ) const
inline

Get 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

Definition at line 1119 of file BaseImage.h.

§ GetImageAttributes()

const ImageAttributes & mirtk::BaseImage::GetImageAttributes ( ) const
inline

Gets the image attributes

Deprecated:
Use Attributes instead.

Definition at line 1735 of file BaseImage.h.

§ GetNumberOfVoxels()

int mirtk::BaseImage::GetNumberOfVoxels ( ) const
inline

Returns the total number of voxels

Deprecated:
Use NumberOfVoxels instead.

Definition at line 1741 of file BaseImage.h.

§ GetScalarPointer() [1/2]

void * mirtk::BaseImage::GetScalarPointer ( int  i = 0,
int  j = 0,
int  k = 0,
int  l = 0 
)
inline
Returns
Raw pointer to contiguous image data.
Deprecated:
Use GetDataPointer instead.

Definition at line 1770 of file BaseImage.h.

§ GetScalarPointer() [2/2]

const void * mirtk::BaseImage::GetScalarPointer ( int  i = 0,
int  j = 0,
int  k = 0,
int  l = 0 
) const
inline
Returns
Raw pointer to contiguous image data.
Deprecated:
Use GetDataPointer instead.

Definition at line 1776 of file BaseImage.h.

§ GetScalarType()

int mirtk::BaseImage::GetScalarType ( ) const
inline
Returns
Enumeration value corresponding to pixel scalar type.
Deprecated:
Use GetVoxelType instead.

Definition at line 1782 of file BaseImage.h.

§ GetScalarTypeMax()

double mirtk::BaseImage::GetScalarTypeMax ( ) const
inline
Returns
Maximum value a pixel can hold without overflowing.
Deprecated:
Use GetVoxelTypeMax instead.

Definition at line 1800 of file BaseImage.h.

§ GetScalarTypeMin()

double mirtk::BaseImage::GetScalarTypeMin ( ) const
inline
Returns
Minimum value a pixel can hold without overflowing.
Deprecated:
Use GetVoxelTypeMin instead.

Definition at line 1794 of file BaseImage.h.

§ GetScalarTypeSize()

int mirtk::BaseImage::GetScalarTypeSize ( ) const
inline
Returns
Size of pixel scalar type in bytes.
Deprecated:
Use GetVoxelTypeSize instead.

Definition at line 1788 of file BaseImage.h.

§ HasMask()

bool mirtk::BaseImage::HasMask ( ) const
inline

Whether this image has a foreground mask which has been either set via PutMask or created upon InitializeMask

Definition at line 1382 of file BaseImage.h.

§ ImageToWorld() [1/2]

void mirtk::BaseImage::ImageToWorld ( WorldCoordsImage i2w,
bool  _3D = true 
) const

Image to world coordinate map for image domain

Note
Stores x, y, and z components as vector image, i.e., in t dimension of image.
Parameters
[out]i2wVector image with world coordinates of voxels. Need not be initialized before. No reallocation takes place if the image has already the right size.
[in]_3DIf false, only the x and y coordinates are stored if the image is two dimensional. Otherwise, all three x, y, and z components are stored.

§ ImageToWorld() [2/2]

void mirtk::BaseImage::ImageToWorld ( double *  i2w,
bool  _3D = true 
) const

Image to world coordinate map for image domain

Note
Stores x, y, and z components at consecutive memory locations for faster access.
Parameters
[out]i2wMemory for pre-computed world coordinates.
[in]_3DIf false, only the x and y coordinates are stored if the image is two dimensional. Otherwise, all three x, y, and z components are stored.

§ OwnsMask()

bool mirtk::BaseImage::OwnsMask ( ) const
inline

Whether this image has a foreground mask either set via PutMask with ownership transver or created upon InitializeMask

Definition at line 1388 of file BaseImage.h.

§ PutAffineMatrix()

void mirtk::BaseImage::PutAffineMatrix ( const Matrix mat,
bool  apply = false 
)
inline

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.

Definition at line 1112 of file BaseImage.h.

§ ResetAffineMatrix()

void mirtk::BaseImage::ResetAffineMatrix ( )
inline

Reset 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.

Definition at line 1125 of file BaseImage.h.

§ ResetBackgroundValueAsDouble()

void mirtk::BaseImage::ResetBackgroundValueAsDouble ( double  )

Change background value

When a background value has been set before, this function replaces all image values equal to this previous background value by the new background value. Otherwise, it is equivalent to PutBackgroundValueAsDouble.

Member Data Documentation

§ _maskOwner

int mirtk::BaseImage::_maskOwner
protected

Whether this image owns the mask image

Set to a value above 1 when mask was generated by InitializeMask, in which case the mask will be deleted by the n-th ClearMask call, where n is the number of preceeding (nested) InitializeMask calls. A value of 1 denotes a mask image set by the owner which this image should delete upon destruction.

Definition at line 120 of file BaseImage.h.


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