1 #ifndef _D_CHABARDES_LINE_ARITH_HPP_
2 #define _D_CHABARDES_LINE_ARITH_HPP_
7 typedef typename unaryLineFunctionBase<T>::lineType lineType;
8 T threshold, trueVal, falseVal;
12 virtual void _exec(
const lineType lIn,
const size_t size, lineType lOut)
14 for (
size_t i = 0; i < size; ++i)
15 lOut[i] = lIn[i] >
threshold ? trueVal : falseVal;
25 typedef typename unaryLineFunctionBase<T>::lineType lineType;
26 virtual void _exec(
const lineType lIn1,
const size_t size, lineType lOut)
28 for (
size_t i = 0; i < size; i++)
29 lOut[i] = lIn1[i] + val;
37 void _exec(
const T *lIn1,
const T *lIn2,
const T *lIn3,
const T *lIn4,
38 const size_t size, T *lOut)
40 for (
size_t i = 0; i < size; ++i) {
41 lOut[i] = lIn1[i] == lIn2[i] ? lIn3[i] : lIn4[i];
52 inline void _exec(T *lIn1, T *lIn2, T *lIn3, T *lIn4,
const size_t size,
56 eq._exec(lIn1, lIn2, size, buf);
57 tes._exec(buf, lIn3, lIn4, size, lOut);
98 template <
class T1,
class T2>
103 virtual void _exec(
const lineType1 lIn1,
const lineType1 lIn2,
104 const size_t size, lineType2 lOut)
106 for (
size_t i = 0; i < size; i++)
107 lOut[i] = lIn1[i] > lIn2[i] ? lIn2[i] : lOut[i];
RES_T threshold(const Image< T > &imIn, T minVal, T maxVal, T_out trueVal, T_out falseVal, Image< T_out > &imOut)
threshold() - Image threshold
Definition: DImageHistogram.hpp:269
Definition: DTypes.hpp:88
Definition: DLineArith.hpp:19
Definition: DBaseLineOperations.hpp:110
Definition: DLineArith.hpp:33
Definition: DLineArith.hpp:46
Definition: DLineArith.hpp:6
Definition: DLineArith.hpp:99
Definition: DBaseLineOperations.hpp:46