Classes | Functions
vil_clamp.h File Reference
#include <vil/vil_image_resource.h>
#include <vil/vil_image_view.h>
#include <cassert>

Go to the source code of this file.

Classes

class  vil_clamp_image_resource
 A generic_image adaptor that behaves like a clamped version of its input. More...
 

Functions

template<class T >
void vil_clamp (const vil_image_view< T > &src, vil_image_view< T > &dest, T lo, T hi)
 Clamp an image view between two values. More...
 
vil_image_resource_sptr vil_clamp (const vil_image_resource_sptr &src, double low, double hi)
 Clamp an image resource between two values. More...
 
template<class T >
void vil_clamp_below (vil_image_view< T > &src, T t, T v)
 Clamp an image view above a given value t, setting it to v if below or on t. More...
 
template<class T >
void vil_clamp_above (vil_image_view< T > &src, T t, T v)
 Clamp an image view below a given value t, setting it to v if above or on t. More...
 
template<class T >
void vil_clamp_below (vil_image_view< T > &src, T t)
 Clamp an image view above a given value t, setting it to this t if below t. More...
 
template<class T >
void vil_clamp_above (vil_image_view< T > &src, T t)
 Clamp an image view below a given value t, setting it to this t if above t. More...
 

Detailed Description

Author
Ian Scott.
  Modifications
   06 May 2004 Jocelyn Marchadier - added vil_clamp_below

Definition in file vil_clamp.h.

Function Documentation

◆ vil_clamp() [1/2]

template<class T >
void vil_clamp ( const vil_image_view< T > &  src,
vil_image_view< T > &  dest,
lo,
hi 
)
inline

Clamp an image view between two values.

Definition at line 23 of file vil_clamp.h.

◆ vil_clamp() [2/2]

vil_image_resource_sptr vil_clamp ( const vil_image_resource_sptr src,
double  low,
double  hi 
)

Clamp an image resource between two values.

Definition at line 22 of file vil_clamp.cxx.

◆ vil_clamp_above() [1/2]

template<class T >
void vil_clamp_above ( vil_image_view< T > &  src,
t,
v 
)
inline

Clamp an image view below a given value t, setting it to v if above or on t.

Definition at line 105 of file vil_clamp.h.

◆ vil_clamp_above() [2/2]

template<class T >
void vil_clamp_above ( vil_image_view< T > &  src,
t 
)
inline

Clamp an image view below a given value t, setting it to this t if above t.

Definition at line 133 of file vil_clamp.h.

◆ vil_clamp_below() [1/2]

template<class T >
void vil_clamp_below ( vil_image_view< T > &  src,
t,
v 
)
inline

Clamp an image view above a given value t, setting it to v if below or on t.

Definition at line 85 of file vil_clamp.h.

◆ vil_clamp_below() [2/2]

template<class T >
void vil_clamp_below ( vil_image_view< T > &  src,
t 
)
inline

Clamp an image view above a given value t, setting it to this t if below t.

Definition at line 125 of file vil_clamp.h.