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

ImagePyramid< ImageType, Alloc > Class Template Reference

Class template for logarithmically tapering image pyramids. More...

`#include <vigra/imagecontainer.hxx>`

## Public Types

typedef ImageType | value_type

## Public Member Functions

reference | back ()
const_reference | back () const
iterator | begin ()
const_iterator | begin () const
void | clear ()
bool | empty ()
iterator | end ()
const_iterator | end () const
reference | front ()
const_reference | front () const
int | highestLevel () const
| ImagePyramid (Alloc const &alloc=Alloc())
| ImagePyramid (int lowestLevel, int highestLevel, const Diff2D &imageSize, int sizeAppliesToLevel=0, Alloc const &alloc=Alloc())
| ImagePyramid (int lowestLevel, int highestLevel, const ImageType &image, int copyImageToLevel=0, Alloc const &alloc=Alloc())
template<class SrcIterator , class SrcAccessor >
| ImagePyramid (int lowestLevel, int highestLevel, SrcIterator ul, SrcIterator lr, SrcAccessor src, int copyImageToLevel=0, Alloc const &alloc=Alloc())
int | lowestLevel () const
bool | operator== (const ImagePyramid< ImageType, Alloc > &other) const
reference | operator[] (size_type index)
const_reference | operator[] (size_type index) const
reverse_iterator | rbegin ()
const_reverse_iterator | rbegin () const
reverse_iterator | rend ()
const_reverse_iterator | rend () const
void | resize (int lowestLevel, int highestLevel, const Diff2D &imageSize, int sizeAppliesToLevel=0)
size_type | size () const
void | swap (ImagePyramid< ImageType, Alloc > &other)

## Detailed Description

template<class ImageType, class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>
class vigra::ImagePyramid< ImageType, Alloc >

Class template for logarithmically tapering image pyramids.

An ImagePyramid manages an array of images of the type given as template parameter, where each level has half the width and height of its predecessor. It actually represents a sequence of pyramid levels whose start and end index are configurable.

To initialize all pyramid levels in the sense of a Gaussian pyramid, use pyramidReduceBurtFilter() and pyramidExpandBurtFilter(). To create and reconstruct a Laplcaian pyramid, use pyramidReduceBurtLaplacian() and pyramidExpandBurtLaplacian().

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

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

typedef ImageType value_type

the type of the contained values/images

## Constructor & Destructor Documentation

## ◆ ImagePyramid() [1/4]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

ImagePyramid | ( | int | lowestLevel,
|  | int | highestLevel,
|  | const Diff2D & | imageSize,
|  | int | sizeAppliesToLevel = `0`,
|  | Alloc const & | alloc = `Alloc()`
| ) |  |

Init a pyramid between the given levels (inclusive).

Allocate the given imageSize at the pyramid level given in sizeAppliesToLevel (default: level 0 / bottom) and size the other levels using recursive reduction/expansion by factors of 2. Use the specified allocator for image creation. The image type must be default constructible and resizable. sizeAppliesToLevel must be the in range lowestLevel..highestLevel (inclusive).

## ◆ ImagePyramid() [2/4]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

ImagePyramid | ( | int | lowestLevel,
|  | int | highestLevel,
|  | const ImageType & | image,
|  | int | copyImageToLevel = `0`,
|  | Alloc const & | alloc = `Alloc()`
| ) |  |

Init a pyramid between the given levels (inclusive).

Copy the given image into the pyramid level given in copyImageToLevel (default: level 0 / bottom) and size the other levels using recursive reduction/expansion by factors of 2 (their image data is not initialized). Use the specified allocator for image creation. The image type must be default constructible and resizable. sizeAppliesToLevel must be the in range lowestLevel..highestLevel (inclusive).

## ◆ ImagePyramid() [3/4]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>
template<class SrcIterator , class SrcAccessor >

ImagePyramid | ( | int | lowestLevel,
|  | int | highestLevel,
|  | SrcIterator | ul,
|  | SrcIterator | lr,
|  | SrcAccessor | src,
|  | int | copyImageToLevel = `0`,
|  | Alloc const & | alloc = `Alloc()`
| ) |  |

Init a pyramid between the given levels (inclusive).

Copy the image given by the range ul to lr into the pyramid level given in copyImageToLevel (default: level 0 / bottom) and size the other levels using recursive reduction/expansion by factors of 2 (their image data is not initialized). Use the specified allocator for image creation. The image type must be default constructible and resizable. sizeAppliesToLevel must be the in range lowestLevel..highestLevel (inclusive).

## ◆ ImagePyramid() [4/4]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

ImagePyramid | ( | Alloc const & | alloc = `Alloc()` | ) |

Init an empty pyramid. Use the specified allocator.

## Member Function Documentation

## ◆ lowestLevel()

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

int lowestLevel | ( |  | ) | const

Get the index of the lowest allocated level of the pyramid.

## ◆ highestLevel()

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

int highestLevel | ( |  | ) | const

Get the index of the highest allocated level of the pyramid.

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

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

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

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

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

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

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

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

## ◆ begin() [1/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

iterator begin | ( |  | ) |

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

## ◆ begin() [2/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

const_iterator begin | ( |  | ) | const

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

## ◆ end() [1/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

iterator end | ( |  | ) |

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

## ◆ end() [2/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

const_iterator end | ( |  | ) | const

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

## ◆ rbegin() [1/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

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]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

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]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

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]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

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

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

size_type size | ( |  | ) | const

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

## ◆ empty()

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

bool empty | ( |  | ) |

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

## ◆ operator==()

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

bool operator== | ( | const ImagePyramid< ImageType, Alloc > & | other | ) | const

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)

## ◆ clear()

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

void clear | ( |  | ) |

Empty this array. (STL-Sequence interface)

## ◆ resize()

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

void resize | ( | int | lowestLevel,
|  | int | highestLevel,
|  | const Diff2D & | imageSize,
|  | int | sizeAppliesToLevel = `0`
| ) |  |

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)

## ◆ front() [1/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

reference front | ( |  | ) |

return the first image (lowestLevel()). (STL-Sequence interface)

## ◆ front() [2/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

const_reference front | ( |  | ) | const

return the first image (lowestLevel()). (STL-Sequence interface)

## ◆ back() [1/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

reference back | ( |  | ) |

return the last image (highestLevel()). (STL-Vector interface)

## ◆ back() [2/2]

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

const_reference back | ( |  | ) | const

return the last image (highestLevel()). (STL-Vector interface)

## ◆ swap()

template<class ImageType , class Alloc = typename std::allocator_traits<typename ImageType::allocator_type>::template rebind_alloc<ImageType>>

void swap | ( | ImagePyramid< ImageType, Alloc > & | 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.12.2