18 #ifndef itkLogicOpsFunctors_h
19 #define itkLogicOpsFunctors_h
57 template<
typename TInput1,
typename TInput2=TInput1,
typename TOutput=TInput1 >
64 m_ForegroundValue=itk::NumericTraits<TOutput>::OneValue();
65 m_BackgroundValue=itk::NumericTraits<TOutput>::ZeroValue();
77 return !(*
this != other);
91 return(m_ForegroundValue);
95 return(m_BackgroundValue);
113 template<
typename TInput1,
typename TInput2=TInput1,
typename TOutput=TInput1 >
128 return !(*
this != other);
130 inline TOutput
operator()(
const TInput1 & A,
const TInput2 & B)
const
134 return this->m_ForegroundValue;
136 return this->m_BackgroundValue;
149 template<
typename TInput1,
typename TInput2=TInput1,
typename TOutput=TInput1 >
163 return !(*
this != other);
165 inline TOutput
operator()(
const TInput1 & A,
const TInput2 & B)
const
169 return this->m_ForegroundValue;
171 return this->m_BackgroundValue;
185 template<
typename TInput1,
typename TInput2=TInput1,
typename TOutput=TInput1 >
199 return !(*
this != other);
201 inline TOutput
operator()(
const TInput1 & A,
const TInput2 & B)
const
205 return this->m_ForegroundValue;
207 return this->m_BackgroundValue;
221 template<
typename TInput1,
typename TInput2=TInput1,
typename TOutput=TInput1 >
234 return !(*
this != other);
236 inline TOutput
operator()(
const TInput1 & A,
const TInput2 & B)
const
240 return this->m_ForegroundValue;
242 return this->m_BackgroundValue;
255 template<
typename TInput1,
typename TInput2=TInput1,
typename TOutput=TInput1 >
269 return !(*
this != other);
271 inline TOutput
operator()(
const TInput1 & A,
const TInput2 & B)
const
275 return this->m_ForegroundValue;
277 return this->m_BackgroundValue;
291 template<
typename TInput1,
typename TInput2=TInput1,
typename TOutput=TInput1 >
304 return !(*
this != other);
306 inline TOutput
operator()(
const TInput1 & A,
const TInput2 & B)
const
310 return this->m_ForegroundValue;
312 return this->m_BackgroundValue;
323 template<
typename TInput,
typename TOutput = TInput >
337 return !( *
this != other );
344 return this->m_ForegroundValue;
346 return this->m_BackgroundValue;
355 template<
typename TInput1,
typename TInput2,
typename TInput3,
typename TOutput >
369 return !( *
this != other );
374 const TInput3 & C)
const
378 return static_cast<TOutput
>( B );
382 return static_cast<TOutput
>( C );
TOutput m_ForegroundValue
bool operator!=(const Self &) const
bool operator==(const Self &other) const
bool operator!=(const Self &) const
void SetBackgroundValue(const TOutput &BG)
bool operator!=(const Self &) const
bool operator==(const Self &other) const
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potetially different types...
Functor for != operation on images and constants.
bool operator!=(const Self &) const
Return argument 2 if argument 1 is false, and argument 3 otherwise.
TOutput operator()(const TInput1 &A, const TInput2 &B) const
TOutput operator()(const TInput1 &A, const TInput2 &B) const
TOutput operator()(const TInput1 &A, const TInput2 &B) const
TOutput m_BackgroundValue
TOutput operator()(const TInput &A) const
bool operator!=(const TernaryOperator &) const
Functor for == operation on images and constants.
bool operator!=(const Self &) const
TOutput GetBackgroundValue() const
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Functor for > operation on images and constants.
Functor for >= operation on images and constants.
bool operator!=(const Self &) const
bool operator==(const TernaryOperator &other) const
Functor for < operation on images and constants.
bool operator==(const Self &other) const
Unary logical NOT functor.
void SetForegroundValue(const TOutput &FG)
TOutput operator()(const TInput1 &A, const TInput2 &B) const
Base class for some logic functors. Provides the Foreground and background setting methods...
TOutput operator()(const TInput1 &A, const TInput2 &B) const
TOutput operator()(const TInput1 &A, const TInput2 &B) const
bool operator==(const Self &other) const
bool operator==(const Self &other) const
bool operator==(const Self &other) const
Functor for <= operation on images and constants.
bool operator==(const NOT &other) const
bool operator!=(const NOT &) const
bool operator==(const Self &other) const
TOutput GetForegroundValue() const
bool operator!=(const Self &) const
TOutput operator()(const TInput1 &A, const TInput2 &B, const TInput3 &C) const