[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]
![]() |
Threshold Class Template Reference | ![]() |
---|
#include "vigra/transformimage.hxx"
Public Types | |
typedef SrcValueType | argument_type |
typedef DestValueType | result_type |
Public Methods | |
Threshold (argument_type lower, argument_type higher, result_type noresult, result_type yesresult) | |
result_type | operator() (argument_type s) const |
Detailed Description |
If a source pixel is above or equal the lower and below or equal the higher threshold (i.e. within the closed interval [lower, heigher]) the destination pixel is set to 'yesresult', otherwise to 'noresult'.
Traits defined:
Usage:
#include "vigra/transformimage.hxx"
Required Interface:
the functor's argument type
the functor's result type
init thresholds and return values
calculate transform
© Ullrich Köthe (koethe@informatik.uni-hamburg.de)
html generated using doxygen and Python
FunctorTraits::isUnaryFunctor
is true (VigraTrueType
)
Namespace: vigra
vigra::BImage src(width, height), dest(width, height);
...
vigra::transformImage(src.upperLeft(), src.lowerRight(), src.accessor(),
dest.upperLeft(), dest.accessor(),
vigra::Threshold<
vigra::BImage::PixelType, vigra::BImage::PixelType>(10, 100, 0, 255));
SrcValueType src;
DestValueType dest, yesresult, noresult;
dest = ((src < lower) || (higher < src)) ? noresult : yesresult;
Member Typedef Documentation
typedef SrcValueType argument_type
typedef DestValueType result_type
Constructor & Destructor Documentation
Threshold
(
argument_type
lower,
argument_type
higher,
result_type
noresult,
result_type
yesresult
)
[inline]
Member Function Documentation
result_type operator()
(
argument_type
s
)
const
[inline]
The documentation for this class was generated from the following file:
Cognitive Systems Group,
University of Hamburg, Germany
VIGRA 1.3.3 (18 Aug 2005)