Public Types | Public Member Functions | Protected Attributes | List of all members
mirtk::ImageChannel< TImage > Class Template Reference

#include <ImageSequence.h>

Inheritance diagram for mirtk::ImageChannel< TImage >:
Inheritance graph
Collaboration diagram for mirtk::ImageChannel< TImage >:
Collaboration graph

Public Types

typedef TImage ImageType
 Type of image associated with this channel.
 

Public Member Functions

void Image (ImageType *image, bool manage=false, bool copy=false)
 
ImageTypeImage () const
 Get image associated with this channel.
 
 ImageChannel (ImageType *image=NULL, bool manage=false, bool copy=false)
 
 ImageChannel (const ImageChannel &)
 
template<class TOtherImage >
 ImageChannel (const ImageChannel< TOtherImage > &)
 
ImageChanneloperator= (const ImageChannel &)
 
template<class TOtherImage >
ImageChanneloperator= (const ImageChannel< TOtherImage > &)
 
virtual ~ImageChannel ()
 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.
 

Protected Attributes

ImageType_Image
 Image associated with this channel.
 
bool _Manage
 Whether to manage the associated image.
 

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 TImage = BaseImage>
class mirtk::ImageChannel< TImage >

Single channel of a multi-channel image

Note
The image associated with the channel cannot have a fourth dimension!

Definition at line 41 of file ImageSequence.h.

Constructor & Destructor Documentation

§ ImageChannel() [1/3]

template<class TImage >
mirtk::ImageChannel< TImage >::ImageChannel ( ImageType image = NULL,
bool  manage = false,
bool  copy = false 
)

Constructor

Parameters
[in]imageImage associated with channel.
[in]manageWhether to manage memory of image.
[in]copyWhether to copy image if manage is false.

Definition at line 55 of file ImageSequence.hh.

§ ImageChannel() [2/3]

template<class TImage >
mirtk::ImageChannel< TImage >::ImageChannel ( const ImageChannel< TImage > &  other)

Copy constructor

Attention
If the given channel object owns the associated image and thus would destruct it upon destruction of the channel itself, this copy constructor takes over ownership of the channel image. This is required for using ImageChannel as type for an STL container which creates copies of the elements.

Definition at line 85 of file ImageSequence.hh.

§ ImageChannel() [3/3]

template<class TImage = BaseImage>
template<class TOtherImage >
mirtk::ImageChannel< TImage >::ImageChannel ( const ImageChannel< TOtherImage > &  )

Copy constructor

Attention
If the given channel object owns the associated image and thus would destruct it upon destruction of the channel itself, this copy constructor takes over ownership of the channel image. This is required for using ImageChannel as type for an STL container which creates copies of the elements.
Note
Implemented only for TImage template argument BaseImage.

Member Function Documentation

§ Image()

template<class TImage >
void mirtk::ImageChannel< TImage >::Image ( ImageType image,
bool  manage = false,
bool  copy = false 
)

Set image associated with this channel

Parameters
[in]imageImage associated with this channel.
[in]manageWhether to manage memory of image.
[in]copyWhether to copy image if manage is false.

Definition at line 139 of file ImageSequence.hh.

§ operator=() [1/2]

template<class TImage >
ImageChannel< TImage > & mirtk::ImageChannel< TImage >::operator= ( const ImageChannel< TImage > &  other)

Assignment operator

Attention
If the given channel object owns the associated image and thus would destruct it upon destruction of the channel itself, this assignment transfer also the ownership of the channel image. This is required for using ImageChannel as type for an STL container which creates copies of the elements.

Definition at line 74 of file ImageSequence.hh.

§ operator=() [2/2]

template<class TImage = BaseImage>
template<class TOtherImage >
ImageChannel& mirtk::ImageChannel< TImage >::operator= ( const ImageChannel< TOtherImage > &  )

Assignment operator

Attention
If the given channel object owns the associated image and thus would destruct it upon destruction of the channel itself, this assignment transfer also the ownership of the channel image. This is required for using ImageChannel as type for an STL container which creates copies of the elements.
Note
Implemented only for TImage template argument BaseImage.

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