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

Class template representing a single row of an existing image. More...

#include <mdsImageView.h>

Inheritance diagram for mds::img::CImageRow< I >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { CLASS_IMAGE_VIEW }
 Simple tag of "image view" classes. More...
enum  { TEMPLATE_PARAMETER_IS_NOT_IMAGE = I::CLASS_IMAGE }
 Check that I is a image. More...
typedef mds::math::CVectorBase
< CImageRow< I > > 
tBase
 Base class.
typedef CVectorTraits
< CImageRow< I > >::tElement 
tElement
 Element tyoe.
typedef I tImage
 Image type.
typedef I::tPixel tPixel
 Pixel type.
typedef CImageRow< I > tVector
 Vector type.

Public Member Functions

tPixel & at (tSize x)
 Returns a subscripted pixel of the row.
const tPixel & at (tSize x) const
 CImageRow (const tImage &Image, tSize y)
 Constructor.
 CImageRow (const CImageRow &Row)
 Copy constructor.
void copyFrom (const tPixel *pSrc)
 Fills the row using a given input buffer.
void copyTo (tPixel *pDst) const
 Copies the row data to the output buffer.
CImageRow & fill (const tPixel &c)
 Fills the row using a given pixel value.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every pixel in the row.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every pixel in the row.
template<class Function >
Function forEach (Function Func)
 Calls a function object for every vector element.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every vector element.
tVector & getImpl ()
 Returns reference to the vector implementation.
const tVector & getImpl () const
tSize getSize () const
 Returns the row size.
tSize getStride () const
 Returns stride between two neigbouring elements.
tPixel & operator() (tSize x)
 Returns a subscripted pixel of the row.
const tPixel & operator() (tSize x) const
template<class Derived >
CImageRow & operator*= (const mds::math::CVectorBase< Derived > &Row)
 Pixel wise product.
template<typename U >
CImageRow & operator*= (const U &c)
 Multiplies all pixels by scalar.
template<class Derived >
CImageRow< I > & operator*= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CImageRow< I > & operator*= (const U &c)
template<class Derived >
CImageRow & operator+= (const mds::math::CVectorBase< Derived > &Row)
 Pixel wise addition.
template<class Derived >
CImageRow< I > & operator+= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CImageRow & operator+= (const U &c)
 Adds scalar to all pixels.
template<typename U >
CImageRow< I > & operator+= (const U &c)
template<class Derived >
CImageRow & operator-= (const mds::math::CVectorBase< Derived > &Row)
 Pixel wise subtraction.
template<class Derived >
CImageRow< I > & operator-= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CImageRow & operator-= (const U &c)
 Subtracts scalar from all pixels.
template<typename U >
CImageRow< I > & operator-= (const U &c)
template<class Derived >
CImageRow & operator/= (const mds::math::CVectorBase< Derived > &Row)
 Pixel wise division.
template<typename U >
CImageRow & operator/= (const U &c)
 Divides all pixels by scalar.
template<class Derived >
CImageRow< I > & operator/= (const mds::math::CVectorBase< Derived > &Row)
template<typename U >
CImageRow< I > & operator/= (const U &c)
template<class Function >
Function pforEach (Function Func)
 Calls a function object for every pixel in the row.
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every pixel in the row.
template<class Function >
Function pforEach (Function Func)
template<class Function >
Function pforEach (Function Func) const
tVector & set (tSize i, const tElement &Value)
 Sets the vector element at the position [i].
CImageRow & set (tSize x, const tPixel &Value)
 Changes value of a pixel in the row.
tSize size () const
 Returns the row size.

Protected Member Functions

CImageRow & operator= (const CImageRow &)
 Proctected assignment operator.

Protected Attributes

tImage & m_Image
 Reference to the original image.
tSize m_y
 Coordinate of the image row.

Detailed Description

template<class I>
class mds::img::CImageRow< I >

Class template representing a single row of an existing image.


Member Typedef Documentation

template<class I >
typedef mds::math::CVectorBase<CImageRow<I> > mds::img::CImageRow< I >::tBase

Base class.

typedef CVectorTraits<CImageRow< I > >::tElement mds::math::CVectorBase< CImageRow< I > >::tElement [inherited]

Element tyoe.

template<class I >
typedef I mds::img::CImageRow< I >::tImage

Image type.

template<class I >
typedef I::tPixel mds::img::CImageRow< I >::tPixel

Pixel type.

typedef CImageRow< I > mds::math::CVectorBase< CImageRow< I > >::tVector [inherited]

Vector type.


Member Enumeration Documentation

anonymous enum [inherited]

Simple tag of "image view" classes.

Enumerator:
CLASS_IMAGE_VIEW 
template<class I >
anonymous enum

Check that I is a image.

You will see name of this enum somewhere in compiler error message if the type I is not image.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_IMAGE 

Constructor & Destructor Documentation

template<class I >
CImageRow::CImageRow ( const tImage &  Image,
tSize  y 
)

Constructor.

template<class I >
CImageRow::CImageRow ( const CImageRow< I > &  Row)

Copy constructor.


Member Function Documentation

template<class I >
tPixel& mds::img::CImageRow< I >::at ( tSize  x)

Returns a subscripted pixel of the row.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

template<class I >
const tPixel& mds::img::CImageRow< I >::at ( tSize  x) const
template<class I >
void CImageRow::copyFrom ( const tPixel *  pSrc)

Fills the row using a given input buffer.

template<class I >
void CImageRow::copyTo ( tPixel *  pDst) const

Copies the row data to the output buffer.

template<class I >
CImageRow< I > & CImageRow::fill ( const tPixel &  c)

Fills the row using a given pixel value.

template<class I >
template<class Function >
Function mds::img::CImageRow< I >::forEach ( Function  Func)

Calls a function object for every pixel in the row.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

template<class I >
template<class Function >
Function mds::img::CImageRow< I >::forEach ( Function  Func) const

Calls a function object for every pixel in the row.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

template<class I >
template<class Function >
Function mds::img::CImageRow< I >::forEach ( Function  Func)

Calls a function object for every vector element.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

template<class I >
template<class Function >
Function mds::img::CImageRow< I >::forEach ( Function  Func) const

Calls a function object for every vector element.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

tVector& mds::math::CVectorBase< CImageRow< I > >::getImpl ( ) [inherited]

Returns reference to the vector implementation.

const tVector& mds::math::CVectorBase< CImageRow< I > >::getImpl ( ) const [inherited]
template<class I >
tSize mds::img::CImageRow< I >::getSize ( ) const

Returns the row size.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

template<class I >
tSize mds::img::CImageRow< I >::getStride ( ) const

Returns stride between two neigbouring elements.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

template<class I >
tPixel& mds::img::CImageRow< I >::operator() ( tSize  x)

Returns a subscripted pixel of the row.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.

template<class I >
const tPixel& mds::img::CImageRow< I >::operator() ( tSize  x) const
template<class I >
template<class Derived >
CImageRow< I > & mds::img::CImageRow< I >::operator*= ( const mds::math::CVectorBase< Derived > &  Row)

Pixel wise product.

template<class I >
template<typename U >
CImageRow< I > & mds::img::CImageRow< I >::operator*= ( const U &  c)

Multiplies all pixels by scalar.

  • An operator that allows conversion U -> T must be defined!
template<class I >
template<class Derived >
CImageRow<I>& mds::img::CImageRow< I >::operator*= ( const mds::math::CVectorBase< Derived > &  Row)
template<class I >
template<typename U >
CImageRow<I>& mds::img::CImageRow< I >::operator*= ( const U &  c)
template<class I >
template<class Derived >
CImageRow< I > & mds::img::CImageRow< I >::operator+= ( const mds::math::CVectorBase< Derived > &  Row)

Pixel wise addition.

template<class I >
template<class Derived >
CImageRow<I>& mds::img::CImageRow< I >::operator+= ( const mds::math::CVectorBase< Derived > &  Row)
template<class I >
template<typename U >
CImageRow< I > & mds::img::CImageRow< I >::operator+= ( const U &  c)

Adds scalar to all pixels.

  • An operator that allows conversion from U to T must be defined!
template<class I >
template<typename U >
CImageRow<I>& mds::img::CImageRow< I >::operator+= ( const U &  c)
template<class I >
template<class Derived >
CImageRow< I > & mds::img::CImageRow< I >::operator-= ( const mds::math::CVectorBase< Derived > &  Row)

Pixel wise subtraction.

template<class I >
template<class Derived >
CImageRow<I>& mds::img::CImageRow< I >::operator-= ( const mds::math::CVectorBase< Derived > &  Row)
template<class I >
template<typename U >
CImageRow< I > & mds::img::CImageRow< I >::operator-= ( const U &  c)

Subtracts scalar from all pixels.

  • An operator that allows conversion U -> T must be defined!
template<class I >
template<typename U >
CImageRow<I>& mds::img::CImageRow< I >::operator-= ( const U &  c)
template<class I >
template<class Derived >
CImageRow< I > & mds::img::CImageRow< I >::operator/= ( const mds::math::CVectorBase< Derived > &  Row)

Pixel wise division.

template<class I >
template<typename U >
CImageRow< I > & mds::img::CImageRow< I >::operator/= ( const U &  c)

Divides all pixels by scalar.

  • An operator that allows conversion U -> T must be defined!
template<class I >
template<class Derived >
CImageRow<I>& mds::img::CImageRow< I >::operator/= ( const mds::math::CVectorBase< Derived > &  Row)
template<class I >
template<typename U >
CImageRow<I>& mds::img::CImageRow< I >::operator/= ( const U &  c)
template<class I >
CImageRow& mds::img::CImageRow< I >::operator= ( const CImageRow< I > &  ) [protected]

Proctected assignment operator.

template<class I >
template<class Function >
Function mds::img::CImageRow< I >::pforEach ( Function  Func)

Calls a function object for every pixel in the row.

  • Parallel version.
template<class I >
template<class Function >
Function mds::img::CImageRow< I >::pforEach ( Function  Func) const

Calls a function object for every pixel in the row.

  • Parallel version.
template<class I >
template<class Function >
Function mds::img::CImageRow< I >::pforEach ( Function  Func)
template<class I >
template<class Function >
Function mds::img::CImageRow< I >::pforEach ( Function  Func) const
tVector& mds::math::CVectorBase< CImageRow< I > >::set ( tSize  i,
const tElement &  Value 
) [inherited]

Sets the vector element at the position [i].

template<class I >
CImageRow& mds::img::CImageRow< I >::set ( tSize  x,
const tPixel &  Value 
)

Changes value of a pixel in the row.

template<class I >
tSize mds::img::CImageRow< I >::size ( ) const

Returns the row size.

Reimplemented from mds::math::CVectorBase< CImageRow< I > >.


Member Data Documentation

template<class I >
tImage& mds::img::CImageRow< I >::m_Image [protected]

Reference to the original image.

template<class I >
tSize mds::img::CImageRow< I >::m_y [protected]

Coordinate of the image row.


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