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

details ImageArray Class Template Reference VIGRA

Fundamental class template for arrays of equal-sized images. More...

#include "vigra/imagecontainer.hxx"

Inheritance diagram for ImageArray:

GaborFilterFamily

Public Types

typedef ImageType value_type

Public Methods

 ImageArray (unsigned int numImages, const Diff2D &imageSize, Alloc const &alloc=Alloc())
 ImageArray (unsigned int numImages=0, Alloc const &alloc=Alloc())
 ImageArray (unsigned int numImages, const ImageType &image, Alloc const &alloc=Alloc())
template<class InputIterator>  ImageArray (InputIterator begin, InputIterator end, Alloc const &alloc=Alloc())
reference operator[] (size_type index)
const_reference operator[] (size_type index) const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
reverse_iterator rbegin ()
const_reverse_iterator rbegin () const
reverse_iterator rend ()
const_reverse_iterator rend () const
size_type size () const
size_type max_size () const
bool empty ()
bool operator== (const ImageArray< ImageType > &other)
iterator insert (iterator pos, const_reference image)
void insert (iterator pos, size_type count, const_reference image)
template<class InputIterator> void insert (iterator pos, InputIterator begin, InputIterator end)
iterator erase (iterator pos)
iterator erase (iterator begin, iterator end)
void clear ()
void resize (size_type newSize)
void resize (size_type newSize, ImageType &image)
reference front ()
const_reference front () const
reference back ()
const_reference back () const
void push_back (const_reference image)
void pop_back ()
void swap (const_reference other)
size_type capacity () const
void reserve (size_type n)
Size2D imageSize () const
virtual void resizeImages (const Diff2D &newSize)
void resizeImages (int width, int height)


Detailed Description


template<class ImageType, class Alloc = typename ImageType::allocator_type::template rebind<ImageType>::other>
class vigra::ImageArray< ImageType, Alloc >

Fundamental class template for arrays of equal-sized images.

An ImageArray manages an array of images of the type given as template parameter. Use it like a ArrayVector<ImageType>, it has the same interface, only operator< is missing from ImageArray. It offers additional functions for resizing the images and querying their common size. See imageSize() for additional notes.

A custimized allocator can be passed as a template argument and via the constructor. By default, the allocator of the ImageType is reused.

#include "vigra/imagecontainer.hxx"

Namespace: vigra


Member Typedef Documentation


typedef ImageType value_type

 

the type of the contained values/images


Constructor & Destructor Documentation


ImageArray unsigned int    numImages,
const Diff2D   imageSize,
Alloc const &    alloc = Alloc()
[inline]

 

init an array of numImages equal-sized images; use the specified allocator.


ImageArray unsigned int    numImages = 0,
Alloc const &    alloc = Alloc()
[inline]

 

Init an array of numImages equal-sized images. The size depends on ImageType's default constructor (so it will usually be 0x0); use the specified allocator.


ImageArray unsigned int    numImages,
const ImageType &    image,
Alloc const &    alloc = Alloc()
[inline]

 

fill constructor: Init an array with numImages copies of the given image. (STL-Sequence interface); use the specified allocator.


ImageArray InputIterator    begin,
InputIterator    end,
Alloc const &    alloc = Alloc()
[inline]

 

range constructor: Construct an array containing copies of the images in [begin, end). Those images must all have the same size, see imageSize(). (STL-Sequence interface); use the specified allocator.


Member Function Documentation


const_reference back   const [inline]

 

return the last image. (STL-Vector interface)


reference back   [inline]

 

return the last image. (STL-Vector interface)


const_iterator begin   const [inline]

 

Returns an iterator pointing to the first image (STL-Container interface)


iterator begin   [inline]

 

Returns an iterator pointing to the first image (STL-Container interface)


size_type capacity   const [inline]

 

number of image objects for which memory has been allocated (STL-Vector interface)


void clear   [inline]

 

Empty this array. (STL-Sequence interface)


bool empty   [inline]

 

Returns true if and only if there are no contained images. (STL-Container interface)


const_iterator end   const [inline]

 

Returns an iterator pointing behind the last image (STL-Container interface)


iterator end   [inline]

 

Returns an iterator pointing behind the last image (STL-Container interface)


iterator erase iterator    begin,
iterator    end
[inline]

 

Removes the images from [begin, end) from this array. (STL-Sequence interface)


iterator erase iterator    pos [inline]

 

Removes the image at pos from this array. (STL-Sequence interface)


const_reference front   const [inline]

 

return the first image. (STL-Sequence interface)


reference front   [inline]

 

return the first image. (STL-Sequence interface)


Size2D imageSize   const [inline]

 

Query the size of the contained images. ImageArray will maintain an array of equal-sized images of this size. However, do not resize the contained images manually. ImageArray currently has no way to detect or prevent this.


void insert iterator    pos,
InputIterator    begin,
InputIterator    end
[inline]

 

Insert copies of images from [begin, end) at/before pos. (STL-Sequence interface)


void insert iterator    pos,
size_type    count,
const_reference    image

 

Insert count copies of image at/before pos. (STL-Sequence interface)


iterator insert iterator    pos,
const_reference    image
[inline]

 

Insert image at/before pos. (STL-Sequence interface)


size_type max_size   const [inline]

 

Query maximum size of this ImageArray, that is: the max. parameter you may pass to resize(). (STL-Container interface)


bool operator== const ImageArray< ImageType > &    other [inline]

 

Returns true if and only if both ImageArrays have exactly the same contents and all images did compare equal with the corresponding image in the other ImageArray. (STL-Forward Container interface)


const_reference operator[] size_type    index const [inline]

 

Operator for a vector-like access to the contained images (STL-Vector interface)


reference operator[] size_type    index [inline]

 

Operator for a vector-like access to the contained images (STL-Vector interface)


void pop_back   [inline]

 

remove last image from array (STL-Back Insertion Sequence interface)


void push_back const_reference    image [inline]

 

append image to array (STL-Back Insertion Sequence interface)


const_reverse_iterator rbegin   const [inline]

 

Returns a reverse_iterator pointing to the first image of the reversed view of this array (STL-Reversable Container interface)


reverse_iterator rbegin   [inline]

 

Returns a reverse_iterator pointing to the first image of the reversed view of this array (STL-Reversable Container interface)


const_reverse_iterator rend   const [inline]

 

Returns a reverse_iterator pointing behind the last image of the reversed view of this array (STL-Reversable Container interface)


reverse_iterator rend   [inline]

 

Returns a reverse_iterator pointing behind the last image of the reversed view of this array (STL-Reversable Container interface)


void reserve size_type    n [inline]

 

increase capacity(). (STL-Vector interface)


void resize size_type    newSize,
ImageType &    image
[inline]

 

Resize this ImageArray, throwing the last images away if you make the array smaller or appending new copies of image at the end of the array if you make it larger. precondition: image.size() == imageSize() (STL-Sequence interface)


void resize size_type    newSize [inline]

 

Resize this ImageArray, throwing the last images away if you make the array smaller or appending new images of the right size at the end of the array if you make it larger. (STL-Sequence interface)


void resizeImages int    width,
int    height
[inline]

 

Resize all images to a common new size (No-op if newSize == imageSize()). See imageSize() for an important note about resizing the images.

(Convenience function, same as calling resizeImages(Diff2D(width, height));.)


virtual void resizeImages const Diff2D   newSize [inline, virtual]

 

Resize all images to a common new size (No-op if newSize == imageSize()). See imageSize() for an important note about resizing the images.

Reimplemented in GaborFilterFamily.


size_type size   const [inline]

 

Query size of this ImageArray, that is: the number of images. (STL-Container interface)


void swap const_reference    other [inline]

 

swap contents of this array with the contents of other (STL-Container interface)


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.3.3 (18 Aug 2005)