18 #ifndef itkWindowedSincInterpolateImageFunction_h
19 #define itkWindowedSincInterpolateImageFunction_h
37 template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
44 return static_cast<TOutput>(std::cos(A * m_Factor));
60 template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
67 return static_cast<TOutput>(0.54 + 0.46 * std::cos(A * m_Factor));
83 template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
90 return static_cast<TOutput>(1.0 - A * m_Factor * A);
108 template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
117 return static_cast<TOutput>(1.0);
119 double z = m_Factor * A;
120 return static_cast<TOutput>(std::sin(z) / z);
136 template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
143 return static_cast<TOutput>(0.42 + 0.5 * std::cos(A * m_Factor1) + 0.08 * std::cos(A * m_Factor2));
266 template <
typename TInputImage,
267 unsigned int VRadius,
270 class TCoordRep =
double>
291 using typename Superclass::OutputType;
294 using typename Superclass::InputImageType;
297 using typename Superclass::RealType;
300 static constexpr
unsigned int ImageDimension = Superclass::ImageDimension;
313 using typename Superclass::ContinuousIndexType;
316 SetInputImage(
const ImageType * image)
override;
330 auto radius = SizeType::Filled(VRadius);
338 PrintSelf(std::ostream & os,
Indent indent)
const override;
345 static constexpr
unsigned int m_WindowSize{ 2 * VRadius };
348 TWindowFunction m_WindowFunction{};
355 unsigned int m_OffsetTable[m_OffsetTableSize]{};
358 unsigned int m_WeightOffsetTable[m_OffsetTableSize][ImageDimension]{};
366 return (x == 0.0) ? 1.0 : std::sin(px) / px;
371 #ifndef ITK_MANUAL_INSTANTIATION
372 # include "itkWindowedSincInterpolateImageFunction.hxx"
375 #endif // _itkWindowedSincInterpolateImageFunction_h