iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::ImageSet< T > Class Template Reference

#include <nrt/Core/Image/ImageSet.H>

template<class T>
class nrt::ImageSet< T >

A set of images, often used as a dyadic pyramid.

Provides a richer interface than just an std::vector of Image.

Examples:
tests/test-Image.C.

Definition at line 56 of file ImageSet.H.

Public Types

typedef std::deque< Image< T >
>::iterator 
iterator
 Iterator over the images in the set.
 
typedef std::deque< Image< T >
>::const_iterator 
const_iterator
 Constant iterator over the images in the set.
 

Public Member Functions

 ImageSet (size_t const n=0)
 Construct with a given number of empty images.
 
 ImageSet (size_t const n, Dims< int32 > const &dims, nrt::ImageInitPolicy const init=nrt::ImageInitPolicy::Zeros)
 Construct with a given number of images of the given size.
 
template<class TT >
 ImageSet (ImageSet< TT > const &iset)
 Copy-conversion constructor.
 
template<class TT >
ImageSet< T > & operator= (ImageSet< TT > const &iset)
 Converting assignment.
 
void swap (ImageSet< T > &that)
 Swap contents with another ImageSet.
 
void clear ()
 Keep the same number of images, but make all images empty (0-by-0 size). More...
 
void reset (size_t const newDepth=0)
 Reset to a new number of images, all images will be empty (0-by-0 size).
 
size_t size () const
 Return number of images in image set.
 
Image< T > const at (size_t const lev) const
 Get image from a given level.
 
Image< T > & operator() (size_t const lev)
 Get mutable image from a given level. More...
 
void push_back (Image< T > const img)
 push an image to the back of the set
 
void push_front (Image< T > const img)
 push an image to the front of the set
 
void pop_back ()
 Pop off the last image in the set.
 
void pop_front ()
 Pop off the first image in the set.
 
Image< T > const front () const
 return the last image in the set (without popping it off)
 
Image< T > const back () const
 return the first image in the set (without popping it off)
 
bool empty () const
 Return true if the pyramid has no non-empty images (width*height > 0).
 
ImageSet< T > subset (size_t const a, size_t const b) const
 Return a new ImageSet with images in the half-open range [a,b[.
 
iterator begin ()
 Iterator to the first image.
 
iterator end ()
 Iterator to one past the last image.
 
const_iterator begin () const
 Constant iterator to the first image.
 
const_iterator end () const
 Constant iterator to one past the last image.
 
template<class TT >
nrt::ImageSet< T > & operator= (nrt::ImageSet< TT > const &iset)
 

Friends

class cereal::access
 

Member Function Documentation

template<class T >
void nrt::ImageSet< T >::clear ( )
inline

Keep the same number of images, but make all images empty (0-by-0 size).

This returns the ImageSet to a state where empty() is true.

Definition at line 79 of file ImageSetImpl.H.

template<class T >
nrt::Image< T > & nrt::ImageSet< T >::operator() ( size_t const  lev)
inline

Get mutable image from a given level.

If you modify the returned image, it will affect the contents of the ImageSet, i.e., the Image stored in the set will be modified.

Definition at line 108 of file ImageSetImpl.H.


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