eLynx SDK v3.3.0
C++ image processing API reference
Public Member Functions | Protected Attributes

eLynx::Image::ImageImpl< Pixel > Class Template Reference

ImageImpl is the template class that defines abstract image implementation. More...

#include <ImageImpl.h>

Inheritance diagram for eLynx::Image::ImageImpl< Pixel >:
eLynx::Image::AbstractImage

List of all members.

Public Member Functions

bool CopyAndForget (boost::shared_ptr< ImageImpl< Pixel > > &iospImage)
 Low level service to copy and release input image.
uint32 sizeofWidth () const
 Retrieve the number of bytes per line.
uint32 sizeofMap () const
 Retrieve the number of bytes for whole map.
Constructors, destructor and assignment
 ImageImpl ()
 Default constructor.
 ImageImpl (uint32 iWidth, uint32 iHeight)
 Constructor with image dimension, map is allocated with unset pixels.
 ImageImpl (uint32 iWidth, uint32 iHeight, const Pixel &iPixel)
 Constructor with image dimension and pixel value, map is filled with pixel value.
 ImageImpl (const ImageImpl &iImage)
 Copy constructor with image dimension.
const ImageImploperator= (const ImageImpl &iImage)
 Assignment operator =.
AbstractImage implementation
virtual EPixelFormat GetPixelFormat () const
 Retrieve pixel format.
virtual bool IsValid () const
 Check image validity.
virtual boost::shared_ptr
< IPixelIterator
Begin ()
 Returns an iterator pointing to the beginning of the Pixel map.
virtual boost::shared_ptr
< IPixelIterator
Begin () const
 Returns an const iterator pointing to the beginning of the Pixel map.
virtual boost::shared_ptr
< IPixelIterator
End ()
 Returns an iterator pointing to the end of the Pixel map.
virtual boost::shared_ptr
< IPixelIterator
End () const
 Returns an const iterator pointing to the end of the Pixel map.

Protected Attributes

boost::scoped_array< Pixel > _spMap
 Aggregation of an array[width x height] of specialized pixels.

Pixel specialization

const Pixel * GetPixel (uint32 iX=0, uint32 iY=0) const
 Retrieve pointeur to read pixel.
Pixel * GetPixel (uint32 iX=0, uint32 iY=0)
 Retrieve pointeur to read/write pixel.
const Pixel * GetPixelEnd () const
 Retrieve const pointeur to lastest pixel of map.
Pixel * GetPixelEnd ()
 Retrieve pointeur to read/write lastest pixel of map.
const Pixel::type * GetSamples () const
 Retrieve pointeur to read only map as array of pixel::type samples.
Pixel::type * GetSamples ()
 Retrieve pointeur to read/write map as array of pixel::type samples.
const Pixel::type * GetSamplesEnd () const
 Retrieve pointeur to latest read only map as array of pixel::type.
Pixel::type * GetSamplesEnd ()
 Retrieve pointeur to lastest read/write map as array of pixel::type.
static Pixel Null ()
 Get a pixel with 0 value.
static Pixel White ()
static Pixel Black ()

Detailed Description

template<class Pixel>
class eLynx::Image::ImageImpl< Pixel >

ImageImpl is the template class that defines abstract image implementation.

It's a specialized image that can be instanciate. This is a pixel container, it has data descriptions and accessors but no processing method.


Constructor & Destructor Documentation

template<class Pixel>
eLynx::Image::ImageImpl< Pixel >::ImageImpl (  ) [explicit]

Default constructor.

Image is built as invalid.

template<class Pixel>
eLynx::Image::ImageImpl< Pixel >::ImageImpl ( uint32  iWidth,
uint32  iHeight 
) [explicit]

Constructor with image dimension, map is allocated with unset pixels.

Image is valid, map is allocated but pixels are uninitialized.

Parameters:
iWidthThe image width in pixels.
iHeightThe image height in pixels.
template<class Pixel>
eLynx::Image::ImageImpl< Pixel >::ImageImpl ( uint32  iWidth,
uint32  iHeight,
const Pixel &  iPixel 
) [explicit]

Constructor with image dimension and pixel value, map is filled with pixel value.

Parameters:
iWidthThe image width in pixels.
iHeightThe image height in pixels.
iPixelThe pixel value to fill the map.
template<class Pixel>
eLynx::Image::ImageImpl< Pixel >::ImageImpl ( const ImageImpl< Pixel > &  iImage )

Copy constructor with image dimension.

Parameters:
iImageThe image to copy.

Member Function Documentation

template<class Pixel>
virtual boost::shared_ptr<IPixelIterator> eLynx::Image::ImageImpl< Pixel >::Begin (  ) [virtual]

Returns an iterator pointing to the beginning of the Pixel map.

Returns:
an iterator pointing to the beginning of the Pixel map

Implements eLynx::Image::AbstractImage.

template<class Pixel>
virtual boost::shared_ptr<IPixelIterator> eLynx::Image::ImageImpl< Pixel >::Begin (  ) const [virtual]

Returns an const iterator pointing to the beginning of the Pixel map.

Returns:
an const iterator pointing to the beginning of the Pixel map

Implements eLynx::Image::AbstractImage.

template<class Pixel>
bool eLynx::Image::ImageImpl< Pixel >::CopyAndForget ( boost::shared_ptr< ImageImpl< Pixel > > &  iospImage )

Low level service to copy and release input image.


TO USE WITH SPECIAL CARE. YOU MUST UNDERSTAND OBJECT LIFE CYCLE.

Parameters:
iospImageimage to copy and be released.
Returns:
method success.
template<class Pixel>
virtual boost::shared_ptr<IPixelIterator> eLynx::Image::ImageImpl< Pixel >::End (  ) [virtual]

Returns an iterator pointing to the end of the Pixel map.

Returns:
an iterator pointing to the end of the Pixel map

Implements eLynx::Image::AbstractImage.

template<class Pixel>
virtual boost::shared_ptr<IPixelIterator> eLynx::Image::ImageImpl< Pixel >::End (  ) const [virtual]

Returns an const iterator pointing to the end of the Pixel map.

Returns:
an const iterator pointing to the end of the Pixel map

Implements eLynx::Image::AbstractImage.

template<class Pixel>
Pixel* eLynx::Image::ImageImpl< Pixel >::GetPixel ( uint32  iX = 0,
uint32  iY = 0 
)

Retrieve pointeur to read/write pixel.

Parameters:
iXThe x coordinate pixel in image in range [0, GetWidth()-1].
iYThe y coordinate pixel in image in range [0, GetHeight()-1].
Returns:
The read/write reference pointer on pixel at location (x,y).
template<class Pixel>
const Pixel* eLynx::Image::ImageImpl< Pixel >::GetPixel ( uint32  iX = 0,
uint32  iY = 0 
) const

Retrieve pointeur to read pixel.

Parameters:
iXThe x coordinate pixel in image in range [0, GetWidth()-1].
iYThe y coordinate pixel in image in range [0, GetHeight()-1].
Returns:
The read reference pointer on pixel at location (x,y).
template<class Pixel>
const Pixel* eLynx::Image::ImageImpl< Pixel >::GetPixelEnd (  ) const

Retrieve const pointeur to lastest pixel of map.

Returns:
The read only reference pointer on lastest pixel of map.
template<class Pixel>
Pixel* eLynx::Image::ImageImpl< Pixel >::GetPixelEnd (  )

Retrieve pointeur to read/write lastest pixel of map.

Returns:
The read/write reference pointer on to lastest pixel of map.
template<class Pixel>
virtual EPixelFormat eLynx::Image::ImageImpl< Pixel >::GetPixelFormat (  ) const [virtual]

Retrieve pixel format.

Returns:
The pixel format of the image, EPixelFormat.

Implements eLynx::Image::AbstractImage.

template<class Pixel>
const Pixel::type* eLynx::Image::ImageImpl< Pixel >::GetSamples (  ) const

Retrieve pointeur to read only map as array of pixel::type samples.

Returns:
The pointeur to read map.
template<class Pixel>
Pixel::type* eLynx::Image::ImageImpl< Pixel >::GetSamples (  )

Retrieve pointeur to read/write map as array of pixel::type samples.

Returns:
The pointeur to read/write map.
template<class Pixel>
Pixel::type* eLynx::Image::ImageImpl< Pixel >::GetSamplesEnd (  )

Retrieve pointeur to lastest read/write map as array of pixel::type.

Returns:
The pointeur to read/write map.
template<class Pixel>
const Pixel::type* eLynx::Image::ImageImpl< Pixel >::GetSamplesEnd (  ) const

Retrieve pointeur to latest read only map as array of pixel::type.

Returns:
The pointeur to read map.
template<class Pixel>
virtual bool eLynx::Image::ImageImpl< Pixel >::IsValid (  ) const [virtual]

Check image validity.

Returns:
return true if Image is valid, false otherwise.

Reimplemented from eLynx::Image::AbstractImage.

template<class Pixel>
static Pixel eLynx::Image::ImageImpl< Pixel >::Null (  ) [static]

Get a pixel with 0 value.

Returns:
The null pixel.
template<class Pixel>
const ImageImpl& eLynx::Image::ImageImpl< Pixel >::operator= ( const ImageImpl< Pixel > &  iImage )

Assignment operator =.

Parameters:
iImageThe image to assign to this.
Returns:
A const ImageImpl& as this. Disable writing a=b=c; .
template<class Pixel>
uint32 eLynx::Image::ImageImpl< Pixel >::sizeofMap (  ) const

Retrieve the number of bytes for whole map.

Returns:
The number of bytes for whole map.

Reimplemented from eLynx::Image::AbstractImage.

template<class Pixel>
uint32 eLynx::Image::ImageImpl< Pixel >::sizeofWidth (  ) const

Retrieve the number of bytes per line.

Returns:
The number of bytes per line.

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

Generated on Thu Dec 9 2010 by doxygen 1.7.2