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();
85 return !(*
this != other);
91 #if defined(__GNUC__) && (__GNUC__ == 5) && (__GNUC_MINOR__ == 2) && defined(NDEBUG) && defined(__i386__)
92 RealType value = static_cast<RealType>(x) * m_Factor + m_Offset + m_EpsilonCompensation;
93 TOutput result = static_cast<TOutput>(value) - static_cast<TOutput>(m_EpsilonCompensation);
95 RealType value = static_cast<RealType>(x) * m_Factor + m_Offset;
96 auto result = static_cast<TOutput>(value);
98 result = (result > m_Maximum) ? m_Maximum : result;
99 result = (result < m_Minimum) ? m_Minimum : result;
108 #if defined(__GNUC__) && (__GNUC__ == 5) && (__GNUC_MINOR__ == 2) && defined(NDEBUG) && defined(__i386__)
153 template <
typename TInputImage,
typename TOutputImage = TInputImage>
158 Functor::IntensityLinearTransform<typename TInputImage::PixelType, typename TOutputImage::PixelType>>
192 itkGetConstReferenceMacro(Scale,
RealType);
193 itkGetConstReferenceMacro(Shift,
RealType);
204 BeforeThreadedGenerateData()
override;
208 PrintSelf(std::ostream & os,
Indent indent)
const override;
210 #ifdef ITK_USE_CONCEPT_CHECKING
235 #ifndef ITK_MANUAL_INSTANTIATION
236 # include "itkRescaleIntensityImageFilter.hxx"