spectral::image< T > Class Template Reference

Generic image template. More...

#include <image.h>

List of all members.

Public Member Functions

 image (uint32_t width, uint32_t height, uint32_t channels=1, const T *buf=NULL)
size_t get_index (uint32_t x, uint32_t y) const
 Get the index of a pixel.
const T * get_pixel (uint32_t x, uint32_t y) const
 Get address of a pixel. This returns NULL if coordinates are invalid.
const T * get_constrained_pixel (uint32_t x, uint32_t y, bool wrap_x=false, bool wrap_y=false) const
T * get_buffer (void) const
 Get pointer to image buffer.
uint32_t get_width (void) const
 Get image width.
uint32_t get_height (void) const
 Get image height.
uint32_t get_channels (void) const
 Get number of channels.
void set_pixel (uint32_t x, uint32_t y, const T *pixel)
 Copy data to a pixel, provided that coordinates are valid.

Detailed Description

template<typename T>
class spectral::image< T >

Generic image template.


Member Function Documentation

template<typename T>
const T* spectral::image< T >::get_constrained_pixel ( uint32_t  x,
uint32_t  y,
bool  wrap_x = false,
bool  wrap_y = false 
) const [inline]

Get address of a pixel. If coordinates are out of range then a point within the image will be selected according to wrapping rules.


The documentation for this class was generated from the following file:
 All Classes Functions Variables
Generated on Sat Jan 8 12:12:50 2011 by  doxygen 1.6.3