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

| ImageArray< ImageType, Alloc > Class Template Reference |

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

`#include <vigra/imagecontainer.hxx>`

Inheritance diagram for ImageArray< ImageType, Alloc >:

## Public Types

typedef ImageType | value_type

## Public Member Functions

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

## ◆ value_type

typedef ImageType value_type

the type of the contained values/images

## Constructor & Destructor Documentation

## ◆ ImageArray() [1/4]

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

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

## ◆ ImageArray() [2/4]

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() [3/4]

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.

## ◆ ImageArray() [4/4]

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

## ◆ operator[]() [1/2]

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

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

## ◆ operator[]() [2/2]

const_reference operator[] | ( | size_type | index | ) | const

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

## ◆ begin() [1/2]

iterator begin | ( |  | ) |

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

## ◆ begin() [2/2]

const_iterator begin | ( |  | ) | const

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

## ◆ end() [1/2]

iterator end | ( |  | ) |

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

## ◆ end() [2/2]

const_iterator end | ( |  | ) | const

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

## ◆ rbegin() [1/2]

reverse_iterator rbegin | ( |  | ) |

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

## ◆ rbegin() [2/2]

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)

## ◆ rend() [1/2]

reverse_iterator rend | ( |  | ) |

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

## ◆ rend() [2/2]

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)

## ◆ size()

size_type size | ( |  | ) | const

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

## ◆ max_size()

size_type max_size | ( |  | ) | const

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

## ◆ empty()

bool empty | ( |  | ) |

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

## ◆ operator==()

bool operator== | ( | const ImageArray< ImageType, Alloc > & | 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)

## ◆ insert() [1/3]

iterator insert | ( | iterator | pos,
|  | const_reference | image
| ) |  |

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

## ◆ insert() [2/3]

void insert | ( | iterator | pos,
|  | size_type | count,
|  | const_reference | image
| ) |  |

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

## ◆ insert() [3/3]

void insert | ( | iterator | pos,
|  | InputIterator | begin,
|  | InputIterator | end
| ) |  |

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

## ◆ erase() [1/2]

iterator erase | ( | iterator | pos | ) |

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

## ◆ erase() [2/2]

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

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

## ◆ clear()

void clear | ( |  | ) |

Empty this array. (STL-Sequence interface)

## ◆ resize() [1/2]

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)

## ◆ resize() [2/2]

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)

## ◆ front() [1/2]

reference front | ( |  | ) |

return the first image. (STL-Sequence interface)

## ◆ front() [2/2]

const_reference front | ( |  | ) | const

return the first image. (STL-Sequence interface)

## ◆ back() [1/2]

reference back | ( |  | ) |

return the last image. (STL-Vector interface)

## ◆ back() [2/2]

const_reference back | ( |  | ) | const

return the last image. (STL-Vector interface)

## ◆ push_back()

void push_back | ( | const_reference | image | ) |

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

## ◆ pop_back()

void pop_back | ( |  | ) |

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

## ◆ swap()

void swap | ( | const_reference | other | ) |

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

## ◆ capacity()

size_type capacity | ( |  | ) | const

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

## ◆ reserve()

void reserve | ( | size_type | n | ) |

increase capacity(). (STL-Vector interface)

## ◆ imageSize()

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.

## ◆ resizeImages() [1/2]

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< ImageType, Alloc >.

## ◆ resizeImages() [2/2]

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));`.)

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.11.1