ncut::Image< ELEMENT_TYPE > Class Template Reference

#include <ncutImage.h>

List of all members.

Public Member Functions

ELEMENT_TYPE & val (unsigned int elm)
 Get the value of the colour channel of the specified element.
ELEMENT_TYPE & val (unsigned int pxl, unsigned int chl)
 Get the value of the colour channel of the specified pixel and channel.
const ELEMENT_TYPE & val (unsigned int elm) const
 Get the constant value of the colour channel of the specified element.
const ELEMENT_TYPE & val (unsigned int pxl, unsigned int chl) const
 Get the value of the colour channel of the specified pixel and channel.
unsigned int width () const
 Get the with of the image.
unsigned int height () const
 Get the height of the image.
unsigned int nChl () const
 Get the number of channels of the image.
 Image ()
 Image empty constructor.
 Image (int width, int height, int nChl)
 Image custom constructor.
 Image (const Image &clone)
 Image copy constructor.
virtual ~Image ()
 Image destructor.
virtual Imageoperator= (const Image &clone)
 Image assignment operator.

Protected Attributes

std::vector< ELEMENT_TYPE > imageData_
unsigned int width_
unsigned int height_
unsigned int nChl_


Detailed Description

template<class ELEMENT_TYPE = unsigned char>
class ncut::Image< ELEMENT_TYPE >

Image is the base class for PNGImage and BSIImage. Image is a small wrapper around a STL vector containing the raw image values, providing additional information, such as width and height, and more convenient image element access functions.


Constructor & Destructor Documentation

template<class ELEMENT_TYPE>
ncut::Image< ELEMENT_TYPE >::Image  ) 
 

Image empty constructor.

Creates an empty image with width=height=channels=0.

template<class ELEMENT_TYPE>
ncut::Image< ELEMENT_TYPE >::Image int  width,
int  height,
int  nChl
 

Image custom constructor.

Parameters:
width The width of the image.
height The height of the image.
nChl The number of channels of the image.
Creates an empty image with the specified dimensions and initializes the data to zero.

template<class ELEMENT_TYPE>
ncut::Image< ELEMENT_TYPE >::Image const Image< ELEMENT_TYPE > &  clone  ) 
 

Image copy constructor.

Parameters:
clone The Image to be cloned.


Member Function Documentation

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Image< ELEMENT_TYPE >::height  )  const [inline]
 

Get the height of the image.

Returns:
The height of the image

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Image< ELEMENT_TYPE >::nChl  )  const [inline]
 

Get the number of channels of the image.

Returns:
The number of channles

template<class ELEMENT_TYPE>
Image< ELEMENT_TYPE > & ncut::Image< ELEMENT_TYPE >::operator= const Image< ELEMENT_TYPE > &  clone  )  [virtual]
 

Image assignment operator.

Parameters:
clone The Image to be cloned.
Returns:
This object.

template<class ELEMENT_TYPE = unsigned char>
const ELEMENT_TYPE& ncut::Image< ELEMENT_TYPE >::val unsigned int  pxl,
unsigned int  chl
const [inline]
 

Get the value of the colour channel of the specified pixel and channel.

Parameters:
pxl the specified pixel
chl the colour channel
Returns:
The value of the colour channel

template<class ELEMENT_TYPE = unsigned char>
const ELEMENT_TYPE& ncut::Image< ELEMENT_TYPE >::val unsigned int  elm  )  const [inline]
 

Get the constant value of the colour channel of the specified element.

Parameters:
elm the element
Returns:
The constant value of the colour channel

template<class ELEMENT_TYPE = unsigned char>
ELEMENT_TYPE& ncut::Image< ELEMENT_TYPE >::val unsigned int  pxl,
unsigned int  chl
[inline]
 

Get the value of the colour channel of the specified pixel and channel.

Parameters:
pxl the specified pixel
chl the colour channel
Returns:
the value of the colour channel

template<class ELEMENT_TYPE = unsigned char>
ELEMENT_TYPE& ncut::Image< ELEMENT_TYPE >::val unsigned int  elm  )  [inline]
 

Get the value of the colour channel of the specified element.

Parameters:
elm the element
Returns:
the value of the colour channel

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Image< ELEMENT_TYPE >::width  )  const [inline]
 

Get the with of the image.

Returns:
The width of the image


Member Data Documentation

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Image< ELEMENT_TYPE >::height_ [protected]
 

The height of this image.

template<class ELEMENT_TYPE = unsigned char>
std::vector<ELEMENT_TYPE> ncut::Image< ELEMENT_TYPE >::imageData_ [protected]
 

The raw image values stored sequentially in the form pxl0chl0, pxl0chl1, ... , pxl1chl0, ...

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Image< ELEMENT_TYPE >::nChl_ [protected]
 

The number of channels of this image.

template<class ELEMENT_TYPE = unsigned char>
unsigned int ncut::Image< ELEMENT_TYPE >::width_ [protected]
 

The width of this image.


The documentation for this class was generated from the following file:
Generated on Thu Jun 22 14:47:22 2006 for ncut.kdevelop by  doxygen 1.4.6