18 #ifndef itkDivideOrZeroOutImageFilter_h
19 #define itkDivideOrZeroOutImageFilter_h
29 template<
typename TNumerator,
typename TDenominator=TNumerator,
typename TOutput=TNumerator >
43 return !(*
this == other);
53 inline TOutput
operator()(
const TNumerator & n,
const TDenominator & d )
59 return static_cast< TOutput
>( n ) / static_cast< TOutput >( d );
77 template<
typename TInputImage1,
78 typename TInputImage2=TInputImage1,
79 typename TOutputImage=TInputImage1 >
82 Functor::DivideOrZeroOut<
83 typename TInputImage1::PixelType,
84 typename TInputImage2::PixelType,
85 typename TOutputImage::PixelType > >
92 typename TInputImage1::PixelType,
93 typename TInputImage2::PixelType,
112 os << indent <<
"Threshold: " <<
GetThreshold() << std::endl;
120 if ( threshold != this->
GetFunctor().m_Threshold )
136 if ( constant != this->
GetFunctor().m_Constant )
TInputImage2::PixelType DenominatorPixelType
virtual ~DivideOrZeroOutImageFilter()
bool operator!=(const DivideOrZeroOut &other) const
void SetConstant(OutputPixelType constant)
SmartPointer< Self > Pointer
void SetThreshold(DenominatorPixelType threshold)
static const double e
The base of the natural logarithm or Euler's number
Base class for all process objects that output image data.
bool operator==(const DivideOrZeroOut &) const
void operator=(const Self &)
virtual void PrintSelf(std::ostream &os, Indent indent) const override
FunctorType & GetFunctor()
DivideOrZeroOutImageFilter Self
TOutputImage::PixelType OutputPixelType
virtual void Modified() const
DivideOrZeroOutImageFilter()
TInputImage1::PixelType NumeratorPixelType
TOutput operator()(const TNumerator &n, const TDenominator &d)
OutputPixelType GetConstant() const
BinaryFunctorImageFilter< TInputImage1, TInputImage2, TOutputImage, Functor::DivideOrZeroOut< typename TInputImage1::PixelType, typename TInputImage2::PixelType, typename TOutputImage::PixelType > > Superclass
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
DenominatorPixelType GetThreshold() const
void PrintSelf(std::ostream &os, Indent indent) const override
Implements pixel-wise generic operation of two images, or of an image and a constant.