18 #ifndef itkRescaleIntensityImageFilter_h
19 #define itkRescaleIntensityImageFilter_h
30 template<
typename TInput,
typename TOutput >
41 #if defined (__GNUC__) && (__GNUC__ == 5) && (__GNUC_MINOR__ == 2) && defined(NDEBUG) && defined(__i386__)
42 m_EpsilonCompensation =
static_cast<RealType>(std::numeric_limits<TOutput>::epsilon());
43 if (m_EpsilonCompensation == 0)
45 m_EpsilonCompensation = std::numeric_limits<RealType>::epsilon();
69 return !( *
this != other );
74 #if defined (__GNUC__) && (__GNUC__ == 5) && (__GNUC_MINOR__ == 2) && defined(NDEBUG) && defined(__i386__)
75 RealType value =
static_cast< RealType >( x ) * m_Factor + m_Offset + m_EpsilonCompensation;
76 TOutput result =
static_cast< TOutput
>( value ) - static_cast< TOutput >( m_EpsilonCompensation );
79 TOutput result =
static_cast< TOutput
>( value );
81 result = ( result > m_Maximum ) ? m_Maximum : result;
82 result = ( result < m_Minimum ) ? m_Minimum : result;
91 #if defined (__GNUC__) && (__GNUC__ == 5) && (__GNUC_MINOR__ == 2) && defined(NDEBUG) && defined(__i386__)
135 template<
typename TInputImage,
typename TOutputImage = TInputImage >
139 Functor::IntensityLinearTransform<
140 typename TInputImage::PixelType,
141 typename TOutputImage::PixelType > >
147 TInputImage, TOutputImage,
149 typename TInputImage::PixelType,
174 itkGetConstReferenceMacro(Scale,
RealType);
175 itkGetConstReferenceMacro(Shift,
RealType);
185 void BeforeThreadedGenerateData() ITK_OVERRIDE;
188 void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
190 #ifdef ITK_USE_CONCEPT_CHECKING
221 #ifndef ITK_MANUAL_INSTANTIATION
222 #include "itkRescaleIntensityImageFilter.hxx"
InputPixelType m_InputMinimum
SmartPointer< Self > Pointer
SmartPointer< const Self > ConstPointer
Base class for all process objects that output image data.
virtual ~RescaleIntensityImageFilter() override
static ITK_CONSTEXPR_FUNC T max(const T &)
OutputPixelType m_OutputMinimum
bool NotExactlyEquals(const TInput1 &x1, const TInput2 &x2)
static ITK_CONSTEXPR_FUNC T NonpositiveMin()
OutputPixelType m_OutputMaximum
Implements pixel-wise generic operation on one image.
TInputImage::PixelType InputPixelType
Applies a linear transformation to the intensity levels of the input Image.
UnaryFunctorImageFilter< TInputImage, TOutputImage, Functor::IntensityLinearTransform< typename TInputImage::PixelType, typename TOutputImage::PixelType > > Superclass
Control indentation during Print() invocation.
Define additional traits for native types such as int or float.
InputPixelType m_InputMaximum
#define itkConceptMacro(name, concept)
NumericTraits< InputPixelType >::RealType RealType
RescaleIntensityImageFilter Self
TOutputImage::PixelType OutputPixelType