CVD 0.8
Public Member Functions
CVD::ImageCreationIterator< T > Class Template Reference

An input iterator which just returns N copies of the same value over and over again. More...

#include <image.h>

List of all members.

Public Member Functions

void operator++ (int)
void operator++ ()
bool operator== (const ImageCreationIterator &i)
bool operator!= (const ImageCreationIterator &i)
const T & operator* ()
 ImageCreationIterator (const T &data)
 ImageCreationIterator (int i)

Detailed Description

template<class T>
class CVD::ImageCreationIterator< T >

An input iterator which just returns N copies of the same value over and over again.

This can be used for construction of containers of images. For intstance the code:

    vector<Image<float> > foo(3, ImageRef(10,10));

All elements of foo point to the same 10x10 image, which is probably not the desired behaviour. The desired behaviour can be obtained with the ImageCreationIterator:

    ImageCreationIterator<ImageRef> begin(10,10), end(3);
    vector<Image<float> > foo(begin, end);

In this case, foo contains 3 distinct images.

See also

Definition at line 568 of file image.h.


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