Public Types | Public Member Functions | List of all members
mirtk::ImageFrame< TChannel > Class Template Reference

#include <ImageSequence.h>

Inheritance diagram for mirtk::ImageFrame< TChannel >:
Inheritance graph
Collaboration diagram for mirtk::ImageFrame< TChannel >:
Collaboration graph

Public Types

typedef TChannel ChannelType
 Type of a channel.
 
typedef TChannel::ImageType ImageType
 Type of channel image.
 

Public Member Functions

void Add (ImageType *image, bool manage=false, bool copy=false)
 
ImageAttributes Attributes () const
 
ChannelTypeChannel (int=0)
 Get image channel.
 
const ChannelTypeChannel (int=0) const
 Get image channel.
 
void Clear ()
 Clear frame.
 
void GetPixelSize (double *, double *, double *) const
 Get voxel size.
 
void Image (int idx, ImageType *image, bool manage=false, bool copy=false)
 
ImageTypeImage (int=0) const
 Get channel image.
 
 ImageFrame ()
 Default constructor.
 
 ImageFrame (const ImageFrame &)
 Copy constructor.
 
void ImageToWorld (double &, double &, double &) const
 Convert voxel to world coordinate.
 
void NumberOfChannels (int)
 
int NumberOfChannels () const
 Get number of image channels.
 
int NumberOfVoxels () const
 Get number of voxels per channel.
 
ImageFrameoperator= (const ImageFrame &)
 Assignment operator.
 
double Time () const
 Get time of temporal frame.
 
void WorldToImage (double &, double &, double &) const
 Convert world to voxel coordinate.
 
int X () const
 Get number of voxels in x dimension for each channel.
 
double XSize () const
 Get size of each voxel in x dimension.
 
int Y () const
 Get number of voxels in y dimension for each channel.
 
double YSize () const
 Get size of each voxel in y dimension.
 
int Z () const
 Get number of voxels in z dimension for each channel.
 
double ZSize () const
 Get size of each voxel in z dimension.
 
virtual ~ImageFrame ()
 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.
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::Object
static const char * NameOfType ()
 Get name of this class type.
 
- Protected Member Functions inherited from mirtk::Object
template<typename... Args>
void Throw (ErrorType err, const char *func, Args... args) const
 
- 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

template<class TChannel = ImageChannel<BaseImage>>
class mirtk::ImageFrame< TChannel >

Auxiliary type to store channels of a single frame of a temporal image sequence

All channels of a given frame have the same spatial image attributes. Moreover, the temporal origin and voxel size must be identical for all channels as well. The size of the channel images in the time domain is always one.

Note
This data type can also be used for single multi-channel images which are not part of a temporal sequence of images.

Definition at line 148 of file ImageSequence.h.

Member Function Documentation

§ Add()

template<class TChannel >
void mirtk::ImageFrame< TChannel >::Add ( ImageType image,
bool  manage = false,
bool  copy = false 
)
inline

Add image as channel to this frame

Parameters
[in]imageChannel image. If the image has a fourth dimension, a copy of each 2D/3D sub-image is added as separate channel.
[in]copyWhether to copy image even if it is 2D/3D only. Otherwise, the given image is associated with the channel which also takes over its ownership, i.e., destructing it when the channel object itself is destructed.
[in]manageWhether to manage memory of input image if not copied.

Definition at line 184 of file ImageSequence.hh.

§ Attributes()

template<class TChannel >
ImageAttributes mirtk::ImageFrame< TChannel >::Attributes ( ) const
inline

Get attributes of this frame

The spatial attributes of the frame correspond to those of its channels which are the same for all channels.

The temporal attributes are:

  • _t: Number of channels
  • _dt: Temporal voxel size of frame (in ms)
  • _torigin: Time coordinate of frame (in ms)

Definition at line 266 of file ImageSequence.hh.

§ Image()

template<class TChannel >
void mirtk::ImageFrame< TChannel >::Image ( int  idx,
ImageType image,
bool  manage = false,
bool  copy = false 
)
inline

Set channel image

Parameters
[in]idxIndex of channel.
[in]imageImage to associate with specified channel.
[in]manageWhether to manage memory of input image.
[in]copyWhether to copy image if manage is false.

Definition at line 248 of file ImageSequence.hh.

§ NumberOfChannels()

template<class TChannel >
void mirtk::ImageFrame< TChannel >::NumberOfChannels ( int  n)
inline

Set number of image channels

Newly added channels are initialized using the default constructor of the ChannelType, i.e., the associated image pointers set to NULL. Existing channels within the specified range of channels are not changed.

Definition at line 220 of file ImageSequence.hh.


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