VIGRA - Algorithms to Copy Images

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

| Algorithms to Copy Images |
--- | --- | ---

## Functions
template<...> void | copyImage (SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, DestImageIterator dest_upperleft, DestAccessor da)
| Copy source image into destination image.
template<...> void | copyImageIf (SrcImageIterator src_upperleft, SrcImageIterator src_lowerright, SrcAccessor sa, MaskImageIterator mask_upperleft, MaskAccessor ma, DestImageIterator dest_upperleft, DestAccessor da)
| Copy source ROI into destination image.

## Detailed Description

Copy images or regions

## Function Documentation

void copyImage (...)

| Copy source image into destination image. If necessary, type conversion takes place. The function uses accessors to access the pixel data. Declarations: pass arguments explicitly:
        namespace vigra {
            template <class SrcImageIterator, class SrcAccessor,
                  class DestImageIterator, class DestAccessor>
            void
            copyImage(SrcImageIterator src_upperleft,
                  SrcImageIterator src_lowerright, SrcAccessor sa,
                  DestImageIterator dest_upperleft, DestAccessor da)
        }
use argument objects in conjunction with Argument Object Factories:
        namespace vigra {
            template <class SrcImageIterator, class SrcAccessor,
                  class DestImageIterator, class DestAccessor>
            void
            copyImage(triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
                  pair<DestImageIterator, DestAccessor> dest)
        }
Usage: #include "vigra/copyimage.hxx" Namespace: vigra
        vigra::copyImage(srcImageRange(src), destImage(dest));
Required Interface:
        SrcImageIterator src_upperleft, src_lowerright;
        DestImageIterator      dest_upperleft;
        SrcImageIterator::row_iterator sx = src_upperleft.rowIterator();
        DestImageIterator::row_iterator dx = dest_upperleft.rowIterator();

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;

        dest_accessor.set(src_accessor(sx), dx);

void copyImageIf (...)

| Copy source ROI into destination image. Pixel values are copied whenever the return value of the mask's accessor is not zero. If necessary, type conversion takes place. The function uses accessors to access the pixel data. Declarations: pass arguments explicitly:
        namespace vigra {
            template <class SrcImageIterator, class SrcAccessor,
                  class MaskImageIterator, class MaskAccessor,
                  class DestImageIterator, clas DestAccessor>
            void
            copyImageIf(SrcImageIterator src_upperleft,
                SrcImageIterator src_lowerright, SrcAccessor sa,
                MaskImageIterator mask_upperleft, MaskAccessor ma,
                DestImageIterator dest_upperleft, DestAccessor da)
        }
use argument objects in conjunction with Argument Object Factories:
        namespace vigra {
            template <class SrcImageIterator, class SrcAccessor,
                  class MaskImageIterator, class MaskAccessor,
                  class DestImageIterator, clas DestAccessor>
            void
            copyImageIf(triple<SrcImageIterator, SrcImageIterator, SrcAccessor> src,
                pair<MaskImageIterator, MaskAccessor> mask,
                pair<DestImageIterator, DestAccessor> dest)
        }
Usage: #include "vigra/copyimage.hxx" Namespace: vigra
        vigra::copyImageIf(srcImageRange(src), maskImage(mask), destImage(dest));
Required Interface:
        SrcImageIterator src_upperleft, src_lowerright;
        DestImageIterator dest_upperleft;
        MaskImageIterator mask_upperleft;
        SrcImageIterator::row_iterator sx = src_upperleft.rowIterator();
        MaskImageIterator::row_iterator mx = mask_upperleft.rowIterator();
        DestImageIterator::row_iterator dx = dest_upperleft.rowIterator();

        SrcAccessor src_accessor;
        DestAccessor dest_accessor;
        MaskAccessor mask_accessor;
        Functor functor;

        if(mask_accessor(mx))
            dest_accessor.set(src_accessor(sx), dx);

© Ullrich Köthe (koethe@informatik.uni-hamburg.de) Cognitive Systems Group, University of Hamburg, Germany | html generated using doxygen and Python VIGRA 1.5.0 (7 Dec 2006)