MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
mds::img::CvImage< T > Class Template Reference

Class template providing basic image operations. More...

#include <mdsCvImage.h>

Inheritance diagram for mds::img::CvImage< T >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { CLASS_IMAGE }
 Templates that require members of an image class may use this enum to check the existence. More...
enum  { CLASS_SERIALIZABLE }
 Templates that require members of the CSerializable class may use this enum to check the existence. More...
enum  { VERSION = 0x33 }
 Current serialization interface version. More...
enum  { MAX_NAME_LENGTH = 32 }
 Maximal length of a data entity name in characters. More...
enum  { CLASS_OBJECT }
 Templates that require members of the CObject class can use this enum to check the existence. More...
enum  { HEAP_OBJECT = 0x70616568 }
 Signature used to recognize objects on the heap. More...
typedef CImageBase< CvImage< T > > tBase
 Base class.
typedef CvImageRef< T > tDataStorage
 Image data storage.
typedef CvImage< T > tImage
 Image type.
typedef T tPixel
 Image pixel type.
typedef CRect< CvImage > tRect
 View of the image (i.e. rectangle).
typedef CImageRow< CvImage > tRow
 Image row (the x coordinate is varying while the y is fixed).

Public Member Functions

CvImage & abs ()
 Absolute value of all pixels.
const IplImage * asIpl () const
 Returns pointer to the underlying OpenCV image.
IplImage * asIpl ()
T & at (tSize x, tSize y)
 Returns reference to the pixel [x][y].
const T & at (tSize x, tSize y) const
T & at (tSize i)
 Returns the subscripted pixel.
const T & at (tSize i) const
bool checkPosition (tSize x, tSize y) const
 Checks the pixel position.
T color2Pixel (CColor color) const
 Converts a specified color to the image pixel format and range.
template<typename Derived >
CvImage & convert (const CImageBase< Derived > &Image)
 Conversion of images of different types.
template<typename Derived >
CvImage< T > & convert (const CImageBase< Derived > &Image)
CvImage & create (tSize XSize, tSize YSize, tSize Margin=0)
 Creates a new image.
CvImage & create (const CSize2i &Size, tSize Margin=0)
 Creates a new image.
CvImage & create (const CvImage &Image, tSize x, tSize y, tSize XSize, tSize YSize)
 Creates a subimage of a given image.
CvImage & create (const CvImage &Image, tSize x, tSize y, tSize XSize, tSize YSize, EMakeRef)
 Creates a subimage of a given image.
CvImage & create (const tRect &Image)
 Creates copy of a given image rectangle.
CvImage & create (const tRect &Image, EMakeRef)
 Creates reference to a given image rectangle.
CvImage & create (const CvImage &Image)
 Creates a new image.
CvImage & create (IplImage *pImage)
 Creates image from OpenCV image.
CvImage & create (const CvImage &Image, EMakeRef)
 Creates a new image.
CvImage & cut (const T &Lower, const T &Upper)
 Cuts range of pixel values.
 CvImage ()
 Default constructor creates a new image having zero size.
 CvImage (tSize XSize, tSize YSize, tSize Margin=0)
 Constructor.
 CvImage (const CSize2i &Size, tSize Margin=0)
 Constructor.
 CvImage (const CvImage &Image, tSize x, tSize y, tSize XSize, tSize YSize)
 Constructor.
 CvImage (const CvImage &Image, tSize x, tSize y, tSize XSize, tSize YSize, EMakeRef)
 Constructor.
 CvImage (const tRect &Image)
 Constructor.
 CvImage (const tRect &Image, EMakeRef)
 Constructor.
 CvImage (const CvImage &Image)
 Copy constructor.
 CvImage (IplImage *pImage)
 Direct constructor from OpenCV image.
 CvImage (const CvImage &Image, EMakeRef)
 Copy constructor.
template<class S >
void deserialize (mds::mod::CChannelSerializer< S > &Reader)
 Deserializes all class members.
template<class S >
void deserialize (mds::mod::CChannelSerializer< S > &Reader)
CvImage & fill (const T &c)
 Fills the image using a given pixel value.
CvImage & fillEntire (const T &c)
 Fills the entire image including its margin using a given pixel value.
CvImage & fillMargin (const T &c)
 Pads the image margin with constant value.
template<class Function >
Function forEach (Function Func)
 Calls function object for every image pixel.
template<class Function >
Function forEach (Function Func) const
 Calls function object for every image pixel.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every image pixel.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every image pixel.
tSize getIdx (tSize x, tSize y) const
 Calculates index of a specified pixel.
tImage & getImpl ()
 Returns reference to the image implementation.
const tImage & getImpl () const
tSize getMargin () const
 Returns the image margin size in pixels.
T * getPtr ()
 Returns pointer to the image data.
const T * getPtr () const
T * getPtr (tSize x, tSize y)
 Returns pointer to the pixel [x][y].
const T * getPtr (tSize x, tSize y) const
int getReferencesCount () const
 Returns the number of references.
T * getRowPtr (tSize y)
 Returns pointer to the first element of the image row.
const T * getRowPtr (tSize y) const
CSize2i & getSize ()
 Returns size of the image.
CSize2i getSize () const
 Returns size of the rectangle.
tSize getXOffset () const
 Returns offset between two neighbouring image pixels in a row.
tSize getXSize () const
 Returns the image size (dimensions).
tSize getYOffset () const
 Returns offset between two neighbouring image pixels in a column.
tSize getYSize () const
tSize height () const
T interpolate (const CPoint3D &Point) const
 Bilinear subpixel value interpolation.
bool isOnHeap () const
 Returns true if the object is allocated on the heap.
CvImage & limit (const T &Lower, const T &Upper)
 Clips a range of pixel values.
 MDS_ENTITY_COMPRESSION (mds::mod::CC_GZIP)
 Standard method getEntityCompression().
 MDS_ENTITY_TEMPLATE_NAME ("Image", CPixelTraits< T >::getPixelName())
 MDS_ITERATOR (CvImage, tPixel, CImageIterator)
 Iterator type.
 MDS_SHAREDPTR (CvImage)
 Smart pointer type.
CvImage & mirrorMargin ()
 Pads the image margin using a simple mirroring.
T & operator() (tSize x, tSize y)
 Returns reference to the subscripted pixel [x][y].
const T & operator() (tSize x, tSize y) const
T & operator() (tSize i)
 Returns the subscripted pixel.
const T & operator() (tSize i) const
template<class Derived >
CvImage & operator*= (const CImageBase< Derived > &Image)
 Pixel wise product.
template<typename U >
CvImage & operator*= (const CScalar< U > &c)
 Multiplies all pixels by scalar.
template<class Derived >
CvImage< T > & operator*= (const CImageBase< Derived > &Image)
template<typename U >
CvImage< T > & operator*= (const CScalar< U > &c)
template<class Derived >
CvImage & operator+= (const CImageBase< Derived > &Image)
 Pixel wise addition.
template<typename U >
CvImage & operator+= (const CScalar< U > &c)
 Adds scalar to all pixels.
template<class Derived >
CvImage< T > & operator+= (const CImageBase< Derived > &Image)
template<typename U >
CvImage< T > & operator+= (const CScalar< U > &c)
template<class Derived >
CvImage & operator-= (const CImageBase< Derived > &Image)
 Pixel wise subtraction.
template<typename U >
CvImage & operator-= (const CScalar< U > &c)
 Subtracts scalar from all pixels.
template<class Derived >
CvImage< T > & operator-= (const CImageBase< Derived > &Image)
template<typename U >
CvImage< T > & operator-= (const CScalar< U > &c)
template<class Derived >
CvImage & operator/= (const CImageBase< Derived > &Image)
 Pixel wise division.
template<typename U >
CvImage & operator/= (const CScalar< U > &c)
 Divides all pixels by scalar.
template<class Derived >
CvImage< T > & operator/= (const CImageBase< Derived > &Image)
template<typename U >
CvImage< T > & operator/= (const CScalar< U > &c)
CvImage & operator= (const CvImage &Image)
 Assignment operator.
CvImage & operator= (IplImage *pImage)
 Assignment operator.
template<class Function >
Function pforEach (Function Func)
 Calls function object for every image pixel.
template<class Function >
Function pforEach (Function Func) const
 Calls function object for every image pixel.
template<class Function >
Function pforEach (Function Func)
 Calls a function object for every image pixel.
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every image pixel.
tRect rect (const CPoint2i &Position, const CSize2i &Size)
 Returns a specified sub-image (i.e. rectangle).
const tRect rect (const CPoint2i &Position, const CSize2i &Size) const
tRect rect (const CRange &XRange, const CRange &YRange)
 Returns a specified sub-image (i.e. rectangle).
const tRect rect (const CRange &XRange, const CRange &YRange) const
CvImage & replace (const T &Value, const T &NewValue)
 Replaces all pixels of a given value by a specified value.
tRow row (tSize y)
 Returns a specified row.
const tRow row (tSize y) const
template<class S >
void serialize (mds::mod::CChannelSerializer< S > &Writer)
 Serializes all class members.
template<class S >
void serialize (mds::mod::CChannelSerializer< S > &Writer)
tImage & set (tSize x, tSize y, const tPixel &Value)
 Sets the pixel at the position [x][y][z].
tImage & set (tSize i, const tPixel &Value)
 Sets the subscripted pixel.
void set (tSize x, tSize y, const T &Value)
 Sets the pixel at the position [x][y].
CvImage & set (tSize i, const T &Value)
 Sets the subscripted voxel.
CvImage & subSample (const CvImage &Image, tSize k=2, tSize l=2)
 Subsamples a given image and stores the result.
tSize width () const
 Returns the image size (dimensions).
virtual ~CvImage ()
 Destructor.

Static Public Member Functions

static int getBlockSize ()
 Default block size.
static int getCompression ()
 Default compression method.
static const char * getName ()
 Default class name.
static void * operator new (std::size_t Size)
 Allocates a new object on the heap.

Protected Member Functions

void addReference () const
 Increase the reference counter.
bool delReference () const
 Decrease the reference counter.

Protected Attributes

tDataStorage m_Data
 Image data.
int m_iHeapObject
 Flag initialized if the object is on the heap.
int m_iReferences
 The number of references to the object.
tSize m_Margin
 Image margin.
T * m_pData
 Direct pointer to the image data.

Detailed Description

template<typename T>
class mds::img::CvImage< T >

Class template providing basic image operations.

Image data are stored in OpenCV format internaly.


Member Typedef Documentation

template<typename T >
typedef CImageBase<CvImage<T> > mds::img::CvImage< T >::tBase

Base class.

template<typename T >
typedef CvImageRef<T> mds::img::CvImage< T >::tDataStorage

Image data storage.

typedef CvImage< T > mds::img::CImageBase< CvImage< T > >::tImage [inherited]

Image type.

template<typename T >
typedef T mds::img::CvImage< T >::tPixel

Image pixel type.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
typedef CRect<CvImage> mds::img::CvImage< T >::tRect

View of the image (i.e. rectangle).

template<typename T >
typedef CImageRow<CvImage> mds::img::CvImage< T >::tRow

Image row (the x coordinate is varying while the y is fixed).


Member Enumeration Documentation

template<typename T >
anonymous enum

Templates that require members of an image class may use this enum to check the existence.

Enumerator:
CLASS_IMAGE 
anonymous enum [inherited]

Templates that require members of the CSerializable class may use this enum to check the existence.

Enumerator:
CLASS_SERIALIZABLE 
anonymous enum [inherited]

Current serialization interface version.

Enumerator:
VERSION 
anonymous enum [inherited]

Maximal length of a data entity name in characters.

Enumerator:
MAX_NAME_LENGTH 
anonymous enum [inherited]

Templates that require members of the CObject class can use this enum to check the existence.

Enumerator:
CLASS_OBJECT 
anonymous enum [inherited]

Signature used to recognize objects on the heap.

Enumerator:
HEAP_OBJECT 

Constructor & Destructor Documentation

template<typename T >
CvImage::CvImage ( )

Default constructor creates a new image having zero size.

template<typename T >
mds::img::CvImage< T >::CvImage ( tSize  XSize,
tSize  YSize,
tSize  Margin = 0 
)

Constructor.

template<typename T >
mds::img::CvImage< T >::CvImage ( const CSize2i &  Size,
tSize  Margin = 0 
)

Constructor.

template<typename T >
mds::img::CvImage< T >::CvImage ( const CvImage< T > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize 
)

Constructor.

  • Creates a subimage of a given image.
  • Makes own copy of the data.
template<typename T >
mds::img::CvImage< T >::CvImage ( const CvImage< T > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize,
EMakeRef   
)

Constructor.

  • Creates a subimage of a given image.
  • Makes reference to the data.
template<typename T >
CvImage::CvImage ( const tRect &  Image)

Constructor.

  • Makes own copy of the data.
template<typename T >
CvImage::CvImage ( const tRect &  Image,
EMakeRef   
)

Constructor.

  • Makes only a reference to the data.
template<typename T >
mds::img::CvImage< T >::CvImage ( const CvImage< T > &  Image)

Copy constructor.

  • Makes own copy of the data.
template<typename T >
CvImage::CvImage ( IplImage *  pImage)

Direct constructor from OpenCV image.

  • Takes full control over the image including deallocation of the memory.
template<typename T >
mds::img::CvImage< T >::CvImage ( const CvImage< T > &  Image,
EMakeRef   
)

Copy constructor.

  • Makes reference to the data.
template<typename T >
CvImage::~CvImage ( ) [virtual]

Destructor.


Member Function Documentation

template<typename T >
CvImage< T > & CvImage::abs ( )

Absolute value of all pixels.

  • Returns reference to this.
void mds::base::CObject::addReference ( ) const [protected, inherited]

Increase the reference counter.

template<typename T >
const IplImage* mds::img::CvImage< T >::asIpl ( ) const

Returns pointer to the underlying OpenCV image.

  • The returned image represents image data including the margin!
template<typename T >
IplImage* mds::img::CvImage< T >::asIpl ( )
template<typename T >
T& mds::img::CvImage< T >::at ( tSize  x,
tSize  y 
)

Returns reference to the pixel [x][y].

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
const T& mds::img::CvImage< T >::at ( tSize  x,
tSize  y 
) const
template<typename T >
T& mds::img::CvImage< T >::at ( tSize  i)

Returns the subscripted pixel.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
const T& mds::img::CvImage< T >::at ( tSize  i) const
template<typename T >
bool CvImage::checkPosition ( tSize  x,
tSize  y 
) const

Checks the pixel position.

  • Returns 'true' if a specified position is satisfactory.
template<typename T >
T CvImage::color2Pixel ( CColor  color) const

Converts a specified color to the image pixel format and range.

template<typename T >
template<typename Derived >
CvImage< T > & mds::img::CvImage< T >::convert ( const CImageBase< Derived > &  Image)

Conversion of images of different types.

template<typename T >
template<typename Derived >
CvImage<T>& mds::img::CvImage< T >::convert ( const CImageBase< Derived > &  Image)
template<typename T >
CvImage< T > & mds::img::CvImage< T >::create ( tSize  XSize,
tSize  YSize,
tSize  Margin = 0 
)

Creates a new image.

template<typename T >
CvImage< T > & mds::img::CvImage< T >::create ( const CSize2i &  Size,
tSize  Margin = 0 
)

Creates a new image.

template<typename T >
CvImage< T > & mds::img::CvImage< T >::create ( const CvImage< T > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize 
)

Creates a subimage of a given image.

  • Makes own copy of the data.
template<typename T >
CvImage< T > & mds::img::CvImage< T >::create ( const CvImage< T > &  Image,
tSize  x,
tSize  y,
tSize  XSize,
tSize  YSize,
EMakeRef   
)

Creates a subimage of a given image.

  • Makes reference to the data.
template<typename T >
CvImage< T > & CvImage::create ( const tRect &  Image)

Creates copy of a given image rectangle.

  • Makes own copy of the data.
template<typename T >
CvImage< T > & CvImage::create ( const tRect &  Image,
EMakeRef   
)

Creates reference to a given image rectangle.

  • Makes only a reference to the data.
template<typename T >
CvImage< T > & mds::img::CvImage< T >::create ( const CvImage< T > &  Image)

Creates a new image.

  • Makes own copy of the data.
template<typename T >
CvImage< T > & CvImage::create ( IplImage *  pImage)

Creates image from OpenCV image.

  • Takes full control over the image including deallocation of the memory.
  • Returns reference to this.
template<typename T >
CvImage< T > & mds::img::CvImage< T >::create ( const CvImage< T > &  Image,
EMakeRef   
)

Creates a new image.

  • Makes reference to the data of a given image.
template<typename T >
CvImage< T > & CvImage::cut ( const T &  Lower,
const T &  Upper 
)

Cuts range of pixel values.

  • Returns reference to this.
bool mds::base::CObject::delReference ( ) const [protected, inherited]

Decrease the reference counter.

  • Returns true if the decremented number of references is lower or equal to zero and object must be deleted.
template<typename T >
template<class S >
void mds::img::CvImage< T >::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)

Deserializes all class members.

template<typename T >
template<class S >
void mds::img::CvImage< T >::deserialize ( mds::mod::CChannelSerializer< S > &  Reader)
template<typename T >
CvImage< T > & CvImage::fill ( const T &  c)

Fills the image using a given pixel value.

  • Returns reference to this.
template<typename T >
CvImage< T > & CvImage::fillEntire ( const T &  c)

Fills the entire image including its margin using a given pixel value.

  • Returns reference to this.
template<typename T >
CvImage< T > & CvImage::fillMargin ( const T &  c)

Pads the image margin with constant value.

  • Returns reference to this.
template<typename T >
template<class Function >
Function mds::img::CvImage< T >::forEach ( Function  Func)

Calls function object for every image pixel.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
template<class Function >
Function mds::img::CvImage< T >::forEach ( Function  Func) const

Calls function object for every image pixel.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
template<class Function >
Function mds::img::CvImage< T >::forEach ( Function  Func)

Calls a function object for every image pixel.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
template<class Function >
Function mds::img::CvImage< T >::forEach ( Function  Func) const

Calls a function object for every image pixel.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

static int mds::mod::CSerializable::getBlockSize ( ) [static, inherited]

Default block size.

static int mds::mod::CSerializable::getCompression ( ) [static, inherited]

Default compression method.

template<typename T >
tSize mds::img::CvImage< T >::getIdx ( tSize  x,
tSize  y 
) const

Calculates index of a specified pixel.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

tImage& mds::img::CImageBase< CvImage< T > >::getImpl ( ) [inherited]

Returns reference to the image implementation.

const tImage& mds::img::CImageBase< CvImage< T > >::getImpl ( ) const [inherited]
template<typename T >
tSize mds::img::CvImage< T >::getMargin ( ) const

Returns the image margin size in pixels.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

static const char* mds::mod::CSerializable::getName ( ) [static, inherited]

Default class name.

template<typename T >
T* mds::img::CvImage< T >::getPtr ( )

Returns pointer to the image data.

template<typename T >
const T* mds::img::CvImage< T >::getPtr ( ) const
template<typename T >
T* mds::img::CvImage< T >::getPtr ( tSize  x,
tSize  y 
)

Returns pointer to the pixel [x][y].

template<typename T >
const T* mds::img::CvImage< T >::getPtr ( tSize  x,
tSize  y 
) const

Returns the number of references.

template<typename T >
T* mds::img::CvImage< T >::getRowPtr ( tSize  y)

Returns pointer to the first element of the image row.

template<typename T >
const T* mds::img::CvImage< T >::getRowPtr ( tSize  y) const
CSize2i& mds::img::CImageBase< CvImage< T > >::getSize ( ) [inherited]

Returns size of the image.

template<typename T >
CSize2i mds::img::CvImage< T >::getSize ( ) const

Returns size of the rectangle.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
tSize mds::img::CvImage< T >::getXOffset ( ) const

Returns offset between two neighbouring image pixels in a row.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
tSize mds::img::CvImage< T >::getXSize ( ) const

Returns the image size (dimensions).

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
tSize mds::img::CvImage< T >::getYOffset ( ) const

Returns offset between two neighbouring image pixels in a column.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
tSize mds::img::CvImage< T >::getYSize ( ) const
template<typename T >
tSize mds::img::CvImage< T >::height ( ) const
template<typename T >
T CvImage::interpolate ( const CPoint3D &  Point) const

Bilinear subpixel value interpolation.

bool mds::base::CObject::isOnHeap ( ) const [inherited]

Returns true if the object is allocated on the heap.

template<typename T >
CvImage< T > & CvImage::limit ( const T &  Lower,
const T &  Upper 
)

Clips a range of pixel values.

  • Returns reference to this.
template<typename T >
mds::img::CvImage< T >::MDS_ENTITY_COMPRESSION ( mds::mod::CC_GZIP  )

Standard method getEntityCompression().

template<typename T >
mds::img::CvImage< T >::MDS_ENTITY_TEMPLATE_NAME ( "Image"  ,
CPixelTraits< T >::  getPixelName() 
)
template<typename T >
mds::img::CvImage< T >::MDS_ITERATOR ( CvImage< T >  ,
tPixel  ,
CImageIterator   
)

Iterator type.

  • Declares type tIterator.
template<typename T >
mds::img::CvImage< T >::MDS_SHAREDPTR ( CvImage< T >  )

Smart pointer type.

  • Declares type tSmartPtr.
template<typename T >
CvImage< T > & CvImage::mirrorMargin ( )

Pads the image margin using a simple mirroring.

  • Returns reference to this.
static void* mds::base::CObject::operator new ( std::size_t  Size) [static, inherited]

Allocates a new object on the heap.

template<typename T >
T& mds::img::CvImage< T >::operator() ( tSize  x,
tSize  y 
)

Returns reference to the subscripted pixel [x][y].

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
const T& mds::img::CvImage< T >::operator() ( tSize  x,
tSize  y 
) const
template<typename T >
T& mds::img::CvImage< T >::operator() ( tSize  i)

Returns the subscripted pixel.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
const T& mds::img::CvImage< T >::operator() ( tSize  i) const
template<typename T >
template<class Derived >
CvImage< T > & mds::img::CvImage< T >::operator*= ( const CImageBase< Derived > &  Image)

Pixel wise product.

template<typename T >
template<typename U >
CvImage< T > & mds::img::CvImage< T >::operator*= ( const CScalar< U > &  c)

Multiplies all pixels by scalar.

  • An operator that allow conversion U -> T must be defined!
template<typename T >
template<class Derived >
CvImage<T>& mds::img::CvImage< T >::operator*= ( const CImageBase< Derived > &  Image)
template<typename T >
template<typename U >
CvImage<T>& mds::img::CvImage< T >::operator*= ( const CScalar< U > &  c)
template<typename T >
template<class Derived >
CvImage< T > & mds::img::CvImage< T >::operator+= ( const CImageBase< Derived > &  Image)

Pixel wise addition.

template<typename T >
template<typename U >
CvImage< T > & mds::img::CvImage< T >::operator+= ( const CScalar< U > &  c)

Adds scalar to all pixels.

  • An operator that allow conversion U -> T must be defined!
template<typename T >
template<class Derived >
CvImage<T>& mds::img::CvImage< T >::operator+= ( const CImageBase< Derived > &  Image)
template<typename T >
template<typename U >
CvImage<T>& mds::img::CvImage< T >::operator+= ( const CScalar< U > &  c)
template<typename T >
template<class Derived >
CvImage< T > & mds::img::CvImage< T >::operator-= ( const CImageBase< Derived > &  Image)

Pixel wise subtraction.

template<typename T >
template<typename U >
CvImage< T > & mds::img::CvImage< T >::operator-= ( const CScalar< U > &  c)

Subtracts scalar from all pixels.

  • An operator that allow conversion U -> T must be defined!
template<typename T >
template<class Derived >
CvImage<T>& mds::img::CvImage< T >::operator-= ( const CImageBase< Derived > &  Image)
template<typename T >
template<typename U >
CvImage<T>& mds::img::CvImage< T >::operator-= ( const CScalar< U > &  c)
template<typename T >
template<class Derived >
CvImage< T > & mds::img::CvImage< T >::operator/= ( const CImageBase< Derived > &  Image)

Pixel wise division.

template<typename T >
template<typename U >
CvImage< T > & mds::img::CvImage< T >::operator/= ( const CScalar< U > &  c)

Divides all pixels by scalar.

  • An operator that allow conversion U -> T must be defined!
template<typename T >
template<class Derived >
CvImage<T>& mds::img::CvImage< T >::operator/= ( const CImageBase< Derived > &  Image)
template<typename T >
template<typename U >
CvImage<T>& mds::img::CvImage< T >::operator/= ( const CScalar< U > &  c)
template<typename T >
CvImage< T > & mds::img::CvImage< T >::operator= ( const CvImage< T > &  Image)

Assignment operator.

template<typename T >
CvImage< T > & CvImage::operator= ( IplImage *  pImage)

Assignment operator.

  • Takes full control over OpenCV image including deallocation of the memory.
template<typename T >
template<class Function >
Function mds::img::CvImage< T >::pforEach ( Function  Func)

Calls function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
template<class Function >
Function mds::img::CvImage< T >::pforEach ( Function  Func) const

Calls function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
template<class Function >
Function mds::img::CvImage< T >::pforEach ( Function  Func)

Calls a function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
template<class Function >
Function mds::img::CvImage< T >::pforEach ( Function  Func) const

Calls a function object for every image pixel.

  • Parallel version.

Reimplemented from mds::img::CImageBase< CvImage< T > >.

template<typename T >
CvImage< T >::tRect CvImage::rect ( const CPoint2i &  Position,
const CSize2i &  Size 
)

Returns a specified sub-image (i.e. rectangle).

template<typename T >
const CvImage< T >::tRect mds::img::CvImage< T >::rect ( const CPoint2i &  Position,
const CSize2i &  Size 
) const
template<typename T >
CvImage< T >::tRect CvImage::rect ( const CRange &  XRange,
const CRange &  YRange 
)

Returns a specified sub-image (i.e. rectangle).

template<typename T >
const CvImage< T >::tRect mds::img::CvImage< T >::rect ( const CRange &  XRange,
const CRange &  YRange 
) const
template<typename T >
CvImage< T > & CvImage::replace ( const T &  Value,
const T &  NewValue 
)

Replaces all pixels of a given value by a specified value.

  • Returns reference to this.
template<typename T >
CvImage< T >::tRow CvImage::row ( tSize  y)

Returns a specified row.

template<typename T >
const CvImage< T >::tRow mds::img::CvImage< T >::row ( tSize  y) const
template<typename T >
template<class S >
void mds::img::CvImage< T >::serialize ( mds::mod::CChannelSerializer< S > &  Writer)

Serializes all class members.

template<typename T >
template<class S >
void mds::img::CvImage< T >::serialize ( mds::mod::CChannelSerializer< S > &  Writer)
tImage& mds::img::CImageBase< CvImage< T > >::set ( tSize  x,
tSize  y,
const tPixel &  Value 
) [inherited]

Sets the pixel at the position [x][y][z].

tImage& mds::img::CImageBase< CvImage< T > >::set ( tSize  i,
const tPixel &  Value 
) [inherited]

Sets the subscripted pixel.

template<typename T >
void mds::img::CvImage< T >::set ( tSize  x,
tSize  y,
const T &  Value 
)

Sets the pixel at the position [x][y].

template<typename T >
CvImage& mds::img::CvImage< T >::set ( tSize  i,
const T &  Value 
)

Sets the subscripted voxel.

template<typename T >
CvImage< T > & CvImage::subSample ( const CvImage< T > &  Image,
tSize  k = 2,
tSize  l = 2 
)

Subsamples a given image and stores the result.

  • Returns reference to this.
template<typename T >
tSize mds::img::CvImage< T >::width ( ) const

Returns the image size (dimensions).

Reimplemented from mds::img::CImageBase< CvImage< T > >.


Member Data Documentation

template<typename T >
tDataStorage mds::img::CvImage< T >::m_Data [protected]

Image data.

int mds::base::CObject::m_iHeapObject [mutable, protected, inherited]

Flag initialized if the object is on the heap.

int mds::base::CObject::m_iReferences [mutable, protected, inherited]

The number of references to the object.

  • Zero if there is no reference.
template<typename T >
tSize mds::img::CvImage< T >::m_Margin [protected]

Image margin.

template<typename T >
T* mds::img::CvImage< T >::m_pData [protected]

Direct pointer to the image data.


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