degate  0.1.2
Public Member Functions
degate::Image< PixelPolicy, StoragePolicy > Class Template Reference

The generic templated class for image objects. More...

#include <Image.h>

Inheritance diagram for degate::Image< PixelPolicy, StoragePolicy >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Image (unsigned int _width, unsigned int _height)
 The constructor.
virtual ~Image ()
 The destructor.
template<typename PixelTypeDst >
PixelTypeDst get_pixel_as (unsigned int x, unsigned int y)
 Get pixel with conversion.
template<typename PixelTypeSrc >
void set_pixel_as (unsigned int x, unsigned int y, PixelTypeSrc p)
 Set pixel with conversion.

Detailed Description

template<class PixelPolicy, template< class _PixelPolicy > class StoragePolicy>
class degate::Image< PixelPolicy, StoragePolicy >

The generic templated class for image objects.

This class can be used with StoragePolicy_Memory and StoragePolicy_TempFile.

Every image constructor should have a two parameter version. This is necessary for image processing plugins, because plugins have to create temporary images. The two parameter constructor should then make reasonable default assumtions about storage. Temporary images are really always temporary. This means that we can create empty images in degate's temp directory. The constructor should only get the width and height of an image.

Definition at line 115 of file Image.h.


Constructor & Destructor Documentation

template<class PixelPolicy , template< class _PixelPolicy > class StoragePolicy>
degate::Image< PixelPolicy, StoragePolicy >::Image ( unsigned int  _width,
unsigned int  _height 
) [inline]

The constructor.

Definition at line 124 of file Image.h.

                                                     :
      ImageBase(_width, _height),
      StoragePolicy<PixelPolicy>(_width, _height) {}
template<class PixelPolicy , template< class _PixelPolicy > class StoragePolicy>
virtual degate::Image< PixelPolicy, StoragePolicy >::~Image ( ) [inline, virtual]

The destructor.

Definition at line 131 of file Image.h.

{}

Member Function Documentation

template<class PixelPolicy , template< class _PixelPolicy > class StoragePolicy>
template<typename PixelTypeDst >
PixelTypeDst degate::Image< PixelPolicy, StoragePolicy >::get_pixel_as ( unsigned int  x,
unsigned int  y 
) [inline]

Get pixel with conversion.

Definition at line 138 of file Image.h.

                                                                     {
      return convert_pixel<PixelTypeDst, typename PixelPolicy::pixel_type>(this->get_pixel(x, y));
    }
template<class PixelPolicy , template< class _PixelPolicy > class StoragePolicy>
template<typename PixelTypeSrc >
void degate::Image< PixelPolicy, StoragePolicy >::set_pixel_as ( unsigned int  x,
unsigned int  y,
PixelTypeSrc  p 
) [inline]

Set pixel with conversion.

Definition at line 146 of file Image.h.

                                                                             {
      this->set_pixel(x, y,
                      convert_pixel<typename PixelPolicy::pixel_type, PixelTypeSrc>(p));
    }

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