20 #ifndef MIRTK_ImageSequence_H 21 #define MIRTK_ImageSequence_H 23 #include "mirtk/Object.h" 24 #include "mirtk/BaseImage.h" 25 #include "mirtk/Array.h" 40 template <
class TImage = BaseImage>
61 ImageChannel(ImageType *image = NULL,
bool manage =
false,
bool copy =
false);
81 template <
class TOtherImage>
102 template <
class TOtherImage>
116 void Image(ImageType *image,
bool manage =
false,
bool copy =
false);
119 ImageType *
Image()
const;
147 template <
class TChannel = ImageChannel<BaseImage> >
187 void Add(ImageType *image,
bool manage =
false,
bool copy =
false);
200 void NumberOfChannels(
int);
203 int NumberOfChannels()
const;
206 ChannelType &Channel(
int = 0);
209 const ChannelType &Channel(
int = 0)
const;
217 void Image(
int idx, ImageType *image,
bool manage =
false,
bool copy =
false);
220 ImageType *
Image(
int = 0)
const;
237 int NumberOfVoxels()
const;
249 double XSize()
const;
252 double YSize()
const;
255 double ZSize()
const;
258 void GetPixelSize(
double *,
double *,
double *)
const;
261 void ImageToWorld(
double &,
double &,
double &)
const;
273 Array<ChannelType> _Channel;
284 template <
class TFrame = ImageFrame<> >
323 void Add(ImageType *image,
bool manage =
false,
bool copy =
false);
332 void NumberOfFrames(
int)
const;
335 int NumberOfFrames()
const;
338 FrameType &Frame(
int);
341 const FrameType &Frame(
int)
const;
347 void NumberOfChannels(
int)
const;
350 int NumberOfChannels()
const;
355 ChannelType &Channel(
int idx);
360 const ChannelType &Channel(
int idx)
const;
366 ChannelType &Channel(
int f,
int c);
372 const ChannelType &Channel(
int f,
int c)
const;
378 int NumberOfImages()
const;
387 void Image(
int f,
int c, ImageType *image,
bool manage,
bool copy);
394 void Image(
int f,
int c,
const ImageType *image);
399 ImageType *
Image(
int idx)
const;
405 ImageType *
Image(
int f,
int c)
const;
420 int NumberOfVoxels()
const;
435 double XSize()
const;
438 double YSize()
const;
441 double ZSize()
const;
444 void GetPixelSize(
double *,
double *,
double *)
const;
447 void ImageToWorld(
double &,
double &,
double &)
const;
453 double Time(
int)
const;
459 Array<FrameType> _Frame;
468 #include "mirtk/ImageSequence.hh" 471 #endif // MIRTK_ImageSequence_H TImage ImageType
Type of image associated with this channel.
TChannel::ImageType ImageType
Type of channel image.
ImageType * _Image
Image associated with this channel.
TFrame::ImageType ImageType
Type of images.
TFrame FrameType
Type of frames.
TChannel ChannelType
Type of a channel.
virtual ~ImageChannel()
Destructor.
bool _Manage
Whether to manage the associated image.
vtkSmartPointer< vtkPointSet > WorldToImage(vtkSmartPointer< vtkPointSet > pointset, const BaseImage *image)
Map point set points to voxel coordinates.
ImageChannel & operator=(const ImageChannel &)
ImageType * Image() const
Get image associated with this channel.
TFrame::ChannelType ChannelType
Type of channels.