dlr::computerVision::ColorspaceConverter< FORMAT0, FORMAT1 > Class Template Reference

List of all members.

Public Member Functions

 ColorspaceConverter ()
 The default constructor simply dispatches to the std::unary_function constructor.
virtual ~ColorspaceConverter ()
 The destructor destroys the class instnace and cleans up any resources.
Image< FORMAT1 >::PixelType operator() (const typename Image< FORMAT0 >::PixelType &inputPixel)
 The application operator does the format conversion for one pixel.
void operator() (const typename Image< FORMAT0 >::PixelType &inputPixel, typename Image< FORMAT1 >::PixelType &outputPixel)
 The application operator does the format conversion for one pixel, returning the result through a reference argument.
template<>
void operator() (const Image< GRAY1 >::PixelType &inputPixel, Image< GRAY8 >::PixelType &outputPixel)
template<>
void operator() (const Image< GRAY1 >::PixelType &inputPixel, Image< RGB8 >::PixelType &outputPixel)
template<>
void operator() (const Image< GRAY8 >::PixelType &inputPixel, Image< RGB8 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB8 >::PixelType &inputPixel, Image< GRAY8 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB8 >::PixelType &inputPixel, Image< RGB_FLOAT32 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB8 >::PixelType &inputPixel, Image< RGB_FLOAT64 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB8 >::PixelType &inputPixel, Image< HSV_FLOAT64 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB8 >::PixelType &inputPixel, Image< BGRA8 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB8 >::PixelType &inputPixel, Image< RGBA8 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB_FLOAT32 >::PixelType &inputPixel, Image< GRAY8 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGB_FLOAT64 >::PixelType &inputPixel, Image< HSV_FLOAT64 >::PixelType &outputPixel)
template<>
void operator() (const Image< BGRA8 >::PixelType &inputPixel, Image< RGB8 >::PixelType &outputPixel)
template<>
void operator() (const Image< RGBA8 >::PixelType &inputPixel, Image< RGB8 >::PixelType &outputPixel)

Detailed Description

template<ImageFormat FORMAT0, ImageFormat FORMAT1>
class dlr::computerVision::ColorspaceConverter< FORMAT0, FORMAT1 >

Definition at line 27 of file colorspaceConverter.h.


Constructor & Destructor Documentation

template<ImageFormat FORMAT0, ImageFormat FORMAT1>
dlr::computerVision::ColorspaceConverter< FORMAT0, FORMAT1 >::ColorspaceConverter (  )  [inline]

The default constructor simply dispatches to the std::unary_function constructor.

Definition at line 37 of file colorspaceConverter.h.

template<ImageFormat FORMAT0, ImageFormat FORMAT1>
virtual dlr::computerVision::ColorspaceConverter< FORMAT0, FORMAT1 >::~ColorspaceConverter (  )  [inline, virtual]

The destructor destroys the class instnace and cleans up any resources.

Returns:
The return value

Definition at line 49 of file colorspaceConverter.h.


Member Function Documentation

template<ImageFormat FORMAT0, ImageFormat FORMAT1>
Image<FORMAT1>::PixelType dlr::computerVision::ColorspaceConverter< FORMAT0, FORMAT1 >::operator() ( const typename Image< FORMAT0 >::PixelType &  inputPixel  )  [inline]

The application operator does the format conversion for one pixel.

We somewhat awkwardly dispatch to the two-argument application operator because of the unfortunate way we've had to declare the non-scalar pixel types. The non-scalar pixel types are declared as structs with C linkage so we can guarantee their layout in memory. I don't know of a way to return a filled-in C struct which takes advantage of the return value optimization, so we provide the two-argument version of operator()() in order to sidestep the problem. The single-argument version dispatches to the two-argument version to avoid code duplication, which makes it slightly slower than it could be for scalar types.

Parameters:
inputPixel The pixel to be converted.
Returns:
The return value is the converted pixel.

Definition at line 73 of file colorspaceConverter.h.

template<ImageFormat FORMAT0, ImageFormat FORMAT1>
void dlr::computerVision::ColorspaceConverter< FORMAT0, FORMAT1 >::operator() ( const typename Image< FORMAT0 >::PixelType &  inputPixel,
typename Image< FORMAT1 >::PixelType &  outputPixel 
) [inline]

The application operator does the format conversion for one pixel, returning the result through a reference argument.

This is the fastest way to do a pixel conversion.

Parameters:
inputPixel The pixel to be converted.
outputPixel This reference argument is set to the result of the conversion.

Definition at line 92 of file colorspaceConverter.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