18#ifndef itkLogicOpsFunctors_h
19#define itkLogicOpsFunctors_h
58template <
typename TInput1,
typename TInput2 = TInput1,
typename TOutput = TInput1>
66 m_BackgroundValue = TOutput{};
83 m_ForegroundValue = FG;
88 m_BackgroundValue = BG;
94 return (m_ForegroundValue);
99 return (m_BackgroundValue);
117template <
typename TInput1,
typename TInput2 = TInput1,
typename TOutput = TInput1>
136 return this->m_ForegroundValue;
138 return this->m_BackgroundValue;
151template <
typename TInput1,
typename TInput2 = TInput1,
typename TOutput = TInput1>
170 return this->m_ForegroundValue;
172 return this->m_BackgroundValue;
186template <
typename TInput1,
typename TInput2 = TInput1,
typename TOutput = TInput1>
205 return this->m_ForegroundValue;
207 return this->m_BackgroundValue;
221template <
typename TInput1,
typename TInput2 = TInput1,
typename TOutput = TInput1>
240 return this->m_ForegroundValue;
242 return this->m_BackgroundValue;
256template <
typename TInput1,
typename TInput2 = TInput1,
typename TOutput = TInput1>
275 return this->m_ForegroundValue;
277 return this->m_BackgroundValue;
291template <
typename TInput1,
typename TInput2 = TInput1,
typename TOutput = TInput1>
310 return this->m_ForegroundValue;
312 return this->m_BackgroundValue;
322template <
typename TInput,
typename TOutput = TInput>
339 return this->m_ForegroundValue;
341 return this->m_BackgroundValue;
350template <
typename TInput1,
typename TInput2,
typename TInput3,
typename TOutput>
363 operator()(
const TInput1 & A,
const TInput2 & B,
const TInput3 & C)
const
367 return static_cast<TOutput
>(B);
371 return static_cast<TOutput
>(C);
Functor for == operation on images and constants.
bool operator==(const Self &) const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
TOutput operator()(const TInput1 &A, const TInput2 &B) const
Functor for >= operation on images and constants.
bool operator==(const Self &) const
TOutput operator()(const TInput1 &A, const TInput2 &B) const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
Functor for > operation on images and constants.
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
TOutput operator()(const TInput1 &A, const TInput2 &B) const
bool operator==(const Self &) const
Functor for <= operation on images and constants.
TOutput operator()(const TInput1 &A, const TInput2 &B) const
bool operator==(const Self &) const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
Functor for < operation on images and constants.
TOutput operator()(const TInput1 &A, const TInput2 &B) const
bool operator==(const Self &) const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
Base class for some logic functors. Provides the Foreground and background setting methods.
TOutput m_ForegroundValue
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
bool operator==(const Self &) const
void SetForegroundValue(const TOutput &FG)
TOutput m_BackgroundValue
void SetBackgroundValue(const TOutput &BG)
TOutput GetForegroundValue() const
TOutput GetBackgroundValue() const
Unary logical NOT functor.
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(NOT)
TOutput operator()(const TInput &A) const
bool operator==(const NOT &) const
Functor for != operation on images and constants.
bool operator==(const Self &) const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(Self)
TOutput operator()(const TInput1 &A, const TInput2 &B) const
Return argument 2 if argument 1 is false, and argument 3 otherwise.
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(TernaryOperator)
bool operator==(const TernaryOperator &) const
TOutput operator()(const TInput1 &A, const TInput2 &B, const TInput3 &C) const
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potentially different types.
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....