Functions
core/vil/vil_transform.h File Reference

STL algorithm like methods. More...

#include <vcl_cassert.h>
#include <vil/vil_image_view.h>

Go to the source code of this file.

Functions

template<class T , class F >
void vil_transform (vil_image_view< T > &image, F functor)
 Apply a unary operation to each pixel in image.
template<class inP , class outP , class Op >
void vil_transform (const vil_image_view< inP > &src, vil_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 vil_transform2 (const vil_image_view< inP > &src, vil_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 vil_transform (const vil_image_view< inA > &srcA, const vil_image_view< inB > &srcB, vil_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 vil_transform (const vil_image_view< inA > &srcA, const vil_image_view< inB > &srcB, const vil_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:
Ian Scott.

Definition in file vil_transform.h.


Function Documentation

template<class T , class F >
void vil_transform ( vil_image_view< T > &  image,
functor 
) [inline]

Apply a unary operation to each pixel in image.

Parameters:
functorshould take a value of type T and return same type

Definition at line 19 of file vil_transform.h.

template<class inP , class outP , class Op >
void vil_transform ( const vil_image_view< inP > &  src,
vil_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 74 of file vil_transform.h.

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

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

Definition at line 134 of file vil_transform.h.

template<class inA , class inB , class outP , class BinOp >
void vil_transform ( const vil_image_view< inA > &  srcA,
const vil_image_view< inB > &  srcB,
const vil_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 151 of file vil_transform.h.

template<class inP , class outP , class Op >
void vil_transform2 ( const vil_image_view< inP > &  src,
vil_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 104 of file vil_transform.h.