VIGRA - VIGRA: ImageArray Class Template Reference

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

| ImageArray [Image Containers] |

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

`#include <vigra/imagecontainer.hxx>`

Inheritance diagram for ImageArray:

List of all members.

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

## 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()` |
| ) |  |  |

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

ImageArray | ( | unsigned int | numImages = `0`,
|  | Alloc const & | alloc = `Alloc()` |
| ) |  |  |

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()` |
| ) |  |  |

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

template<class InputIterator>
ImageArray | ( | InputIterator | begin,
|  | InputIterator | end,
|  | Alloc const & | alloc = `Alloc()` |
| ) |  |  |

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

return the last image. (STL-Vector interface)

reference back | ( |  | ) |

return the last image. (STL-Vector interface)

const_iterator begin | ( |  | ) | const

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

iterator begin | ( |  | ) |

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

size_type capacity | ( |  | ) | const

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

void clear | ( |  | ) |

Empty this array. (STL-Sequence interface)

bool empty | ( |  | ) |

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

const_iterator end | ( |  | ) | const

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

iterator end | ( |  | ) |

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

iterator erase | ( | iterator | begin,
|  | iterator | end |
| ) |  |  |

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

iterator erase | ( | iterator | pos | ) |

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

const_reference front | ( |  | ) | const

return the first image. (STL-Sequence interface)

reference front | ( |  | ) |

return the first image. (STL-Sequence interface)

Size2D imageSize | ( |  | ) | const

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.

template<class InputIterator>
void insert | ( | iterator | pos,
|  | InputIterator | begin,
|  | InputIterator | end |
| ) |  |  |

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 |
| ) |  |  |

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

size_type max_size | ( |  | ) | const

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 | ) |

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

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

reference operator[] | ( | size_type | index | ) |

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

void pop_back | ( |  | ) |

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

void push_back | ( | const_reference | image | ) |

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

const_reverse_iterator rbegin | ( |  | ) | const

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

reverse_iterator rbegin | ( |  | ) |

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

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

reverse_iterator rend | ( |  | ) |

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 | ) |

increase capacity(). (STL-Vector interface)

void resize | ( | size_type | newSize,
|  | ImageType & | image |
| ) |  |  |

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 | ) |

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 |
| ) |  |  |

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 | ) | `[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

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

void swap | ( | const_reference | other | ) |

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

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

- vigra/imagecontainer.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python VIGRA 1.6.0 (13 Aug 2008)