dlr::computerVision::Image< FORMAT > Class Template Reference

This class template represents a 2D image. More...

#include <image.h>

List of all members.

Public Types

typedef ImageFormatTraits<
FORMAT >::PixelType 
PixelType

Public Member Functions

 Image ()
 Default constructor initializes to zero size.
 Image (size_t rows, size_t columns)
 Constructs a "rows x columns" element image.
 Image (const Image< FORMAT > &source)
 The copy constructor does a shallow copy.
 Image (const Array2D< PixelType > &source)
 This constructor allows us to implicitly make an Image instance from an Array2D.
 Image (size_t rows, size_t columns, PixelType *const dataPtr)
 Construct an image around external data.
 Image (size_t rows, size_t columns, PixelType *const dataPtr, size_t *referenceCountPtr)
 Construct an image around external data with reference counting.
virtual ~Image ()
 Destroys the Image instance and deletes the internal data store if no remaining images point to it.
virtual Image< FORMAT > operator= (const PixelType &value)
 This assignment operator copies its argument into each pixel of the image.


Detailed Description

template<ImageFormat FORMAT>
class dlr::computerVision::Image< FORMAT >

This class template represents a 2D image.

The template parameter indicates the format of the image, such as GRAY8, RGB8, YUV420, etc. Please see the ImageFormat enum for legal values. Please see the ImageFormatTraits class template for the characteristics of the available image formats.

Definition at line 38 of file image.h.


Constructor & Destructor Documentation

template<ImageFormat FORMAT>
dlr::computerVision::Image< FORMAT >::Image (  )  [inline]

Default constructor initializes to zero size.

Definition at line 53 of file image.h.

template<ImageFormat FORMAT>
dlr::computerVision::Image< FORMAT >::Image ( size_t  rows,
size_t  columns 
) [inline]

Constructs a "rows x columns" element image.

Parameters:
rows Number of rows in the image after successful construction.
columns Number of columns in the image after successful construction.

Definition at line 66 of file image.h.

template<ImageFormat FORMAT>
dlr::computerVision::Image< FORMAT >::Image ( const Image< FORMAT > &  source  )  [inline]

The copy constructor does a shallow copy.

The newly created image points to the same data as copied image.

Parameters:
source The Image instance to be copied.

Definition at line 76 of file image.h.

template<ImageFormat FORMAT>
dlr::computerVision::Image< FORMAT >::Image ( const Array2D< PixelType > &  source  )  [inline]

This constructor allows us to implicitly make an Image instance from an Array2D.

As with the copy constructor, the newly created image points to the same data as copied array.

Parameters:
source The Array2D instance to be copied.

Definition at line 87 of file image.h.

template<ImageFormat FORMAT>
dlr::computerVision::Image< FORMAT >::Image ( size_t  rows,
size_t  columns,
PixelType *const  dataPtr 
) [inline]

Construct an image around external data.

Images constructed in this way will not implement reference counting, and will not delete dataPtr when done. The elements of the Image are generally organized in row-major order, however special case formats such as YUV420 may specify their own ordering.

Parameters:
rows Number of rows in the image after successful construction.
columns Number of columns in the image after successful construction.
dataPtr A C-style array of PixelType into which the newly constructed Image should index.

Definition at line 107 of file image.h.

template<ImageFormat FORMAT>
dlr::computerVision::Image< FORMAT >::Image ( size_t  rows,
size_t  columns,
PixelType *const  dataPtr,
size_t *  referenceCountPtr 
) [inline]

Construct an image around external data with reference counting.

Images constructed in this way will implement reference counting, and will delete dataPtr when done. This constructor is provide for ease of interaction with Array2D classes.

Parameters:
rows Number of rows in the image after successful construction.
columns Number of columns in the image after successful construction.
dataPtr A C-style array of PixelType into which the newly constructed Image should index.
referenceCountPtr A pointer to the associated reference count.

Definition at line 130 of file image.h.

template<ImageFormat FORMAT>
virtual dlr::computerVision::Image< FORMAT >::~Image (  )  [inline, virtual]

Destroys the Image instance and deletes the internal data store if no remaining images point to it.

Definition at line 140 of file image.h.


Member Function Documentation

template<ImageFormat FORMAT>
virtual Image<FORMAT> dlr::computerVision::Image< FORMAT >::operator= ( const PixelType value  )  [inline, virtual]

This assignment operator copies its argument into each pixel of the image.

It is provided avoid an implicit cast when using the corresponding Array2D operator.

Parameters:
value This argument is the value to be copied.
Returns:
The return value is a reference to *this.

Definition at line 154 of file image.h.


The documentation for this class was generated from the following file:
Generated on Mon Jul 9 20:34:20 2007 for dlrLibs Utility Libraries by  doxygen 1.5.2