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

details ImageArray< ImageType, Alloc > Class Template Reference VIGRA

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

#include <vigra/imagecontainer.hxx>

Inheritance diagram for ImageArray< ImageType, Alloc >:
GaborFilterFamily< 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 pos)
 
iterator erase (iterator begin, iterator end)
 
reference front ()
 
const_reference front () const
 
 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())
 
Size2D imageSize () const
 
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)
 
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

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.

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

reference operator[] ( size_type  index)

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

const_reference operator[] ( size_type  index) const

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

iterator begin ( )

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

const_iterator begin ( ) const

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

iterator end ( )

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

const_iterator end ( ) const

Returns an iterator pointing behind the last image (STL-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 rbegin ( ) const

Returns a reverse_iterator pointing to the first 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)

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_type size ( ) const

Query size of this ImageArray, that is: the number of images. (STL-Container 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 empty ( )

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

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)

iterator insert ( iterator  pos,
const_reference  image 
)

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

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

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

iterator erase ( iterator  pos)

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

iterator erase ( iterator  begin,
iterator  end 
)

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

void clear ( )

Empty this array. (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 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)

reference front ( )

return the first image. (STL-Sequence interface)

const_reference front ( ) const

return the first image. (STL-Sequence interface)

reference back ( )

return the last image. (STL-Vector interface)

const_reference back ( ) const

return the last image. (STL-Vector interface)

void push_back ( const_reference  image)

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

void pop_back ( )

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

void swap ( const_reference  other)

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

size_type capacity ( ) const

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

void reserve ( size_type  n)

increase capacity(). (STL-Vector 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.

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

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:

© 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 (Fri May 19 2017)