18 #ifndef itkSigmoidImageFilter_h 19 #define itkSigmoidImageFilter_h 50 template<
typename TInput,
typename TOutput >
77 return !( *
this != other );
82 const double x = (
static_cast< double >( A ) -
m_Beta ) /
m_Alpha;
83 const double e = 1.0 / ( 1.0 + std::exp(-x) );
87 return static_cast< TOutput
>( v );
138 template<
typename TInputImage,
typename TOutputImage >
143 typename TInputImage::PixelType,
144 typename TOutputImage::PixelType > >
150 TInputImage, TOutputImage,
171 this->GetFunctor().SetAlpha(alpha);
177 return this->GetFunctor().GetAlpha();
186 this->GetFunctor().SetBeta(beta);
192 return this->GetFunctor().GetBeta();
201 this->GetFunctor().SetOutputMinimum(min);
207 return this->GetFunctor().GetOutputMinimum();
216 this->GetFunctor().SetOutputMaximum(max);
222 return this->GetFunctor().GetOutputMaximum();
225 #ifdef ITK_USE_CONCEPT_CHECKING 246 void operator=(
const Self &) ITK_DELETE_FUNCTION;
void SetOutputMaximum(TOutput max)
bool operator==(const Sigmoid &other) const
SmartPointer< Self > Pointer
TOutput operator()(const TInput &A) const
TOutput GetOutputMinimum() const
void SetOutputMinimum(TOutput min)
void SetAlpha(double alpha)
TOutput GetOutputMaximum() const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
OutputPixelType GetOutputMaximum() const
bool ExactlyEquals(const TInput1 &x1, const TInput2 &x2)
Return the result of an exact comparison between two scalar values of potetially different types...
Computes the sigmoid function pixel-wise.
void SetOutputMinimum(OutputPixelType min)
static ITK_CONSTEXPR double e
The base of the natural logarithm or Euler's number
void SetAlpha(double alpha)
static ITK_CONSTEXPR_FUNC T max(const T &)
void SetBeta(double beta)
UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::Sigmoid< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
bool operator!=(const Sigmoid &other) const
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
TOutputImage::PixelType OutputPixelType
SmartPointer< const Self > ConstPointer
virtual ~SigmoidImageFilter()
static ITK_CONSTEXPR_FUNC T min(const T &)
Implements pixel-wise generic operation on one image.
void SetOutputMaximum(OutputPixelType max)
void SetBeta(double beta)
OutputPixelType GetOutputMinimum() const
#define itkConceptMacro(name, concept)