[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]

details BasicImageView Class Template Reference VIGRA

BasicImage using foreign memory. More...

#include "vigra/basicimageview.hxx"


Public Types

typedef PIXELTYPE value_type
typedef PIXELTYPE PixelType
typedef PIXELTYPE & reference
typedef PIXELTYPE const & const_reference
typedef PIXELTYPE * pointer
typedef PIXELTYPE const * const_pointer
typedef PIXELTYPE * iterator
typedef PIXELTYPE * ScanOrderIterator
typedef PIXELTYPE const * const_iterator
typedef PIXELTYPE const * ConstScanOrderIterator
typedef ImageIterator< value_typetraverser
typedef ImageIterator< value_typeIterator
typedef ConstImageIterator<
value_type
const_traverser
typedef ConstImageIterator<
value_type
ConstIterator
typedef Diff2D difference_type
typedef Size2D size_type
typedef IteratorTraits< traverser
>::DefaultAccessor 
Accessor
typedef IteratorTraits< const_traverser
>::DefaultAccessor 
ConstAccessor

Public Methods

 BasicImageView ()
 BasicImageView (const_pointer data, int w, int h, int stride=0)
 BasicImageView (const_pointer data, difference_type const &size, int stride=0)
BasicImageView & init (value_type const &pixel)
int width () const
int height () const
int stride () const
size_type size () const
bool isInside (difference_type const &d) const
reference operator[] (difference_type const &d)
const_reference operator[] (difference_type const &d) const
reference operator() (int dx, int dy)
const_reference operator() (int dx, int dy) const
pointer operator[] (int dy)
const_pointer operator[] (int dy) const
traverser upperLeft ()
traverser lowerRight ()
const_traverser upperLeft () const
const_traverser lowerRight () const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
Accessor accessor ()
ConstAccessor accessor () const


Detailed Description


template<class PIXELTYPE>
class vigra::BasicImageView< PIXELTYPE >

BasicImage using foreign memory.

This class provides the same interface as vigra::BasicImage (with the exception of resize()) but the image's memory is provided from the outside instead of allocated internally.

#include "vigra/basicimageview.hxx"

Namespace: vigra


Member Typedef Documentation


typedef IteratorTraits<traverser>::DefaultAccessor Accessor

 

the BasicImageView's default accessor


typedef PIXELTYPE const* const_iterator

 

the BasicImageView's 1D random access const iterator (note: lower case 'const_iterator' is a STL compatible 1D random access const iterator)


typedef PIXELTYPE const* const_pointer

 

the BasicImageView's const pointer type


typedef PIXELTYPE const& const_reference

 

the BasicImageView's const reference type (i.e. the return type of image[diff] and image(dx,dy) when image is const)


typedef ConstImageIterator<value_type> const_traverser

 

the BasicImageView's 2D random access const iterator ('const traverser')


typedef IteratorTraits<const_traverser>::DefaultAccessor ConstAccessor

 

the BasicImageView's default const accessor


typedef ConstImageIterator<value_type> ConstIterator

 

deprecated, use const_traverser instead


typedef PIXELTYPE const* ConstScanOrderIterator

 

deprecated, use const_iterator instead


typedef Diff2D difference_type

 

the BasicImageView's difference type (argument type of image[diff])


typedef ImageIterator<value_type> Iterator

 

deprecated, use traverser instead


typedef PIXELTYPE* iterator

 

the BasicImageView's 1D random access iterator (note: lower case 'iterator' is a STL compatible 1D random access iterator, don't confuse with capitalized Iterator)


typedef PIXELTYPE PixelType

 

the BasicImageView's pixel type


typedef PIXELTYPE* pointer

 

the BasicImageView's pointer type


typedef PIXELTYPE& reference

 

the BasicImageView's reference type (i.e. the return type of image[diff] and image(dx,dy))


typedef PIXELTYPE* ScanOrderIterator

 

deprecated, use iterator instead


typedef Size2D size_type

 

the BasicImageView's size type (result type of image.size())


typedef ImageIterator<value_type> traverser

 

the BasicImageView's 2D random access iterator ('traverser')


typedef PIXELTYPE value_type

 

the BasicImageView's pixel type


Constructor & Destructor Documentation


BasicImageView   [inline]

 

construct image of size 0x0


BasicImageView const_pointer    data,
int    w,
int    h,
int    stride = 0
[inline]

 

construct view of size w x h


BasicImageView const_pointer    data,
difference_type const &    size,
int    stride = 0
[inline]

 

construct view of size size.x x size.y


Member Function Documentation


ConstAccessor accessor   const [inline]

 

return default const accessor


Accessor accessor   [inline]

 

return default accessor


const_iterator begin   const [inline]

 

init 1D random access const iterator pointing to first pixel. Note: Only works if stride equals width.


iterator begin   [inline]

 

init 1D random access iterator pointing to first pixel. Note: Only works if stride equals width.


const_iterator end   const [inline]

 

init 1D random access const iterator pointing past the end. Note: Only works if stride equals width.


iterator end   [inline]

 

init 1D random access iterator pointing past the end. Note: Only works if stride equals width.


int height   const [inline]

 

height of Image


BasicImageView& init value_type const &    pixel [inline]

 

set Image with const value


bool isInside difference_type const &    d const [inline]

 

test whether a given coordinate is inside the image


const_traverser lowerRight   const [inline]

 

init 2D random access const iterator poining to pixel(width, height), i.e. one pixel right and below lower right corner of the image as is common in C/C++.


traverser lowerRight   [inline]

 

init 2D random access iterator poining to pixel(width, height), i.e. one pixel right and below lower right corner of the image as is common in C/C++.


const_reference operator() int    dx,
int    dy
const [inline]

 

read pixel at given location.
usage: value_type value = image(1,2)


reference operator() int    dx,
int    dy
[inline]

 

access pixel at given location.
usage: value_type value = image(1,2)


const_pointer operator[] int    dy const [inline]

 

read pixel at given location. Note that the 'x' index is the trailing index.
usage: value_type value = image[2][1]


pointer operator[] int    dy [inline]

 

access pixel at given location. Note that the 'x' index is the trailing index.
usage: value_type value = image[2][1]


const_reference operator[] difference_type const &    d const [inline]

 

read pixel at given location.
usage: value_type value = image[Diff2D(1,2)]


reference operator[] difference_type const &    d [inline]

 

access pixel at given location.
usage: value_type value = image[Diff2D(1,2)]


size_type size   const [inline]

 

size of Image


int stride   const [inline]

 

stride of Image. Memory offset between the start of two successive rows.


const_traverser upperLeft   const [inline]

 

init 2D random access const iterator poining to upper left pixel


traverser upperLeft   [inline]

 

init 2D random access iterator poining to upper left pixel


int width   const [inline]

 

width of Image


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

© Ullrich Köthe (koethe@informatik.uni-hamburg.de)
Cognitive Systems Group, University of Hamburg, Germany

html generated using doxygen and Python
VIGRA 1.2.0 (7 Aug 2003)