ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Private Attributes | List of all members
itk::Functor::Clamp< TInput, TOutput > Class Template Reference

#include <itkClampImageFilter.h>

Detailed Description

template<typename TInput, typename TOutput = TInput>
class itk::Functor::Clamp< TInput, TOutput >

Functor used to clamp a value to a specified range.

Default range corresponds to the range supported by the output type.

It is templated over an input and an output-type in order to be able to cast the output value.

Definition at line 43 of file itkClampImageFilter.h.

Public Types

using InputType = TInput
 
using OutputType = TOutput
 
using Self = Clamp
 

Public Member Functions

 Clamp ()
 
OutputType GetLowerBound () const
 
OutputType GetUpperBound () const
 
 ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION (Self)
 
OutputType operator() (const InputType &A) const
 
bool operator== (const Self &other) const
 
void SetBounds (const OutputType lowerBound, const OutputType upperBound)
 
 ~Clamp ()=default
 

Private Attributes

OutputType m_LowerBound
 
OutputType m_UpperBound
 

Member Typedef Documentation

◆ InputType

template<typename TInput , typename TOutput = TInput>
using itk::Functor::Clamp< TInput, TOutput >::InputType = TInput

Definition at line 48 of file itkClampImageFilter.h.

◆ OutputType

template<typename TInput , typename TOutput = TInput>
using itk::Functor::Clamp< TInput, TOutput >::OutputType = TOutput

Definition at line 49 of file itkClampImageFilter.h.

◆ Self

template<typename TInput , typename TOutput = TInput>
using itk::Functor::Clamp< TInput, TOutput >::Self = Clamp

Definition at line 46 of file itkClampImageFilter.h.

Constructor & Destructor Documentation

◆ Clamp()

template<typename TInput , typename TOutput = TInput>
itk::Functor::Clamp< TInput, TOutput >::Clamp ( )

Creates the functor and initializes the bounds to the output-type limits.

◆ ~Clamp()

template<typename TInput , typename TOutput = TInput>
itk::Functor::Clamp< TInput, TOutput >::~Clamp ( )
default

Member Function Documentation

◆ GetLowerBound()

template<typename TInput , typename TOutput = TInput>
OutputType itk::Functor::Clamp< TInput, TOutput >::GetLowerBound ( ) const

◆ GetUpperBound()

template<typename TInput , typename TOutput = TInput>
OutputType itk::Functor::Clamp< TInput, TOutput >::GetUpperBound ( ) const

◆ ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION()

template<typename TInput , typename TOutput = TInput>
itk::Functor::Clamp< TInput, TOutput >::ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION ( Self  )

◆ operator()()

template<typename TInput , typename TOutput >
auto itk::Functor::Clamp< TInput, TOutput >::operator() ( const InputType A) const
inline

Definition at line 93 of file itkClampImageFilter.h.

◆ operator==()

template<typename TInput , typename TOutput = TInput>
bool itk::Functor::Clamp< TInput, TOutput >::operator== ( const Self other) const

◆ SetBounds()

template<typename TInput , typename TOutput = TInput>
void itk::Functor::Clamp< TInput, TOutput >::SetBounds ( const OutputType  lowerBound,
const OutputType  upperBound 
)

Set the bounds of the range in which the data will be clamped. If the lower-bound is greater than the upper-bound, an itk::ExceptionObject will be thrown.

Member Data Documentation

◆ m_LowerBound

template<typename TInput , typename TOutput = TInput>
OutputType itk::Functor::Clamp< TInput, TOutput >::m_LowerBound
private

Definition at line 86 of file itkClampImageFilter.h.

◆ m_UpperBound

template<typename TInput , typename TOutput = TInput>
OutputType itk::Functor::Clamp< TInput, TOutput >::m_UpperBound
private

Definition at line 87 of file itkClampImageFilter.h.


The documentation for this class was generated from the following file: