#include <image.h>
This interface can be used as a model for algorithm inputs and outputs. Simply copy this file and start your own implementation of your own image type.
Internally, it keeps a continuous memory of the image data
Public Types | |
enum | { dim = N } |
typedef T | type |
type of image (eg. float, uchar, color) | |
typedef unsigned int | uint |
typedef T * | iterator |
iterator definition | |
typedef const T * | const_iterator |
const iterator definition | |
Public Member Functions | |
Image () | |
index type | |
Image (uint width, uint height) | |
2D image | |
Image (uint width, uint height, uint depth) | |
3D image | |
Image (const T *data, uint width, uint height) | |
2D image with data | |
Image (const T *data, uint width, uint height, uint depth) | |
3D image with data | |
Image (const uint size[]) | |
N-D. | |
Image (const Image &) | |
copy constructor | |
~Image () | |
destructor | |
void | setSize (const uint size[]) |
set image size | |
const uint * | getSize () const |
get image size | |
uint | getSize (uint n) const |
Get size of a dimension. | |
const uint * | size () const |
get image size | |
uint | size (uint n) const |
Get size of a dimension. | |
void | setSize (uint width, uint height) |
set size in 2D | |
void | setSize (uint width, uint height, uint depth) |
set size in 3D | |
const T & | get (const uint index[]) const |
get data | |
void | set (const uint index[], const T &val) |
set data | |
const T & | get (uint i, uint j) const |
get data in 2D | |
const T & | get (uint i, uint j, uint k) const |
get data in 3D | |
void | set (uint i, uint j, const T &val) |
set data in 2D | |
void | set (uint i, uint j, uint k, const T &val) |
set data in 3D | |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
Protected Attributes | |
T * | m_data |
image data | |
uint | m_size [N] |
image size (width, height) |
type of image (eg. float, uchar, color)
typedef const T* Image< T, N >::const_iterator |
const iterator definition
copy constructor
References Image< T, N >::m_data, Image< T, N >::m_size, and Image< T, N >::setSize().
set image size
References CHECK, Image< T, N >::m_data, and Image< T, N >::m_size.
Referenced by Image< T, N >::Image().
get an iterator pointing at the beginning of the image data
References Image< T, N >::m_data.
get an iterator pointing at the end of the image data
References Image< T, N >::m_data, Image< T, N >::m_size, and Image< T, N >::size().
const_iterator Image< T, N >::begin | ( | ) | const [inline] |
get an iterator pointing at the beginning of the image data
References Image< T, N >::m_data.
const_iterator Image< T, N >::end | ( | ) | const [inline] |
get an iterator pointing at the end of the image data
References Image< T, N >::m_data, Image< T, N >::m_size, and Image< T, N >::size().
image data
Referenced by Image< T, N >::begin(), Image< T, N >::end(), Image< T, N >::get(), Image< T, N >::Image(), Image< T, N >::set(), Image< T, N >::setSize(), and Image< T, N >::~Image().
image size (width, height)
Referenced by Image< T, N >::end(), Image< T, N >::get(), Image< T, N >::getSize(), Image< T, N >::Image(), Image< T, N >::set(), Image< T, N >::setSize(), and Image< T, N >::size().