classPiiImage::CutFunction
#include <PiiThresholding.h>
CutFunction
compares value to a threshold and outputs
either value or threshold based on the
comparison result.
Inherits Pii::BinaryFunction< T, T, U >
Description
You can use this struct for example with PiiMatrix<T>::binaryOp():
int threshold = 5; PiiMatrix<int> mat(1,9,1,2,3,4,5,6,7,8,9); mat.binaryOp(PiiImage::CutFunction<int>(), threshold); // mat = 1 2 3 4 5 5 5 5 5
Public member functions
|
U
|
(
|
Function details
-
U operator()
(- T value
- T threshold
[inline]
Add a note
Not a single note added yet. Be the first, add yours.