Functions
contrib/mul/vil3d/vil3d_transform.h File Reference

STL algorithm like methods. More...

#include <vcl_cassert.h>
#include <vcl_algorithm.h>
#include <vil3d/vil3d_image_view.h>

Go to the source code of this file.

Functions

template<class inP , class outP , class Op >
void vil3d_transform (const vil3d_image_view< inP > &src, vil3d_image_view< outP > &dest, Op functor)
 Apply a unary operation to each pixel in src to get dest.
template<class inP , class outP , class Op >
void vil3d_transform2 (const vil3d_image_view< inP > &src, vil3d_image_view< outP > &dest, Op functor)
 Apply a binary function to each pixel in src and dest that modifies dest.
template<class inA , class inB , class outP , class BinOp >
void vil3d_transform (const vil3d_image_view< inA > &srcA, const vil3d_image_view< inB > &srcB, vil3d_image_view< outP > &dest, BinOp functor)
 Apply a binary operation to each pixel in srcA and srcB to get dest.
template<class inA , class inB , class outP , class BinOp >
void vil3d_transform (const vil3d_image_view< inA > &srcA, const vil3d_image_view< inB > &srcB, const vil3d_image_view< outP > &dest, BinOp functor)
 Apply a binary operation to each pixel in srcA and srcB to get dest.

Detailed Description

STL algorithm like methods.

Author:
Tim Cootes, Ian Scott.

Definition in file vil3d_transform.h.


Function Documentation

template<class inP , class outP , class Op >
void vil3d_transform ( const vil3d_image_view< inP > &  src,
vil3d_image_view< outP > &  dest,
Op  functor 
) [inline]

Apply a unary operation to each pixel in src to get dest.

Parameters:
functorshould take a value of type inP, and return a value of type outP

Definition at line 24 of file vil3d_transform.h.

template<class inA , class inB , class outP , class BinOp >
void vil3d_transform ( const vil3d_image_view< inA > &  srcA,
const vil3d_image_view< inB > &  srcB,
vil3d_image_view< outP > &  dest,
BinOp  functor 
) [inline]

Apply a binary operation to each pixel in srcA and srcB to get dest.

Definition at line 68 of file vil3d_transform.h.

template<class inA , class inB , class outP , class BinOp >
void vil3d_transform ( const vil3d_image_view< inA > &  srcA,
const vil3d_image_view< inB > &  srcB,
const vil3d_image_view< outP > &  dest,
BinOp  functor 
) [inline]

Apply a binary operation to each pixel in srcA and srcB to get dest.

non-const dest version, assumes dest is already correct size.

Definition at line 87 of file vil3d_transform.h.

template<class inP , class outP , class Op >
void vil3d_transform2 ( const vil3d_image_view< inP > &  src,
vil3d_image_view< outP > &  dest,
Op  functor 
) [inline]

Apply a binary function to each pixel in src and dest that modifies dest.

Parameters:
functorshould take two parameters (inP src, outP &dest);

Definition at line 53 of file vil3d_transform.h.