18#ifndef itkWindowedSincInterpolateImageFunction_h
19#define itkWindowedSincInterpolateImageFunction_h
38template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
47 static constexpr double factor =
Math::pi / (2 * VRadius);
48 return static_cast<TOutput
>(std::cos(A * factor));
60template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
69 static constexpr double factor =
Math::pi / VRadius;
70 return static_cast<TOutput
>(0.54 + 0.46 * std::cos(A * factor));
81template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
90 static constexpr double factor = 1.0 / (VRadius * VRadius);
91 return static_cast<TOutput
>(1.0 - A * factor * A);
105template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
114 return static_cast<TOutput
>(1.0);
118 static constexpr double factor =
Math::pi / VRadius;
119 const double z = factor * A;
120 return static_cast<TOutput
>(std::sin(z) / z);
131template <
unsigned int VRadius,
typename TInput =
double,
typename TOutput =
double>
140 static constexpr double factor1 =
Math::pi / VRadius;
143 static constexpr double factor2 = 2.0 *
Math::pi / VRadius;
144 return static_cast<TOutput
>(0.42 + 0.5 * std::cos(A * factor1) + 0.08 * std::cos(A * factor2));
255template <
typename TInputImage,
256 unsigned int VRadius,
257 typename TWindowFunction = Function::HammingWindowFunction<VRadius>,
258 class TBoundaryCondition = ZeroFluxNeumannBoundaryCondition<TInputImage, TInputImage>,
259 class TCoordinate =
double>
320 constexpr auto radius = SizeType::Filled(VRadius);
355 return (x == 0.0) ? 1.0 : std::sin(px) / px;
361#ifndef ITK_MANUAL_INSTANTIATION
362# include "itkWindowedSincInterpolateImageFunction.hxx"
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
Window function for sinc interpolation.
TOutput operator()(const TInput &A) const
Window function for sinc interpolation.
TOutput operator()(const TInput &A) const
Window function for sinc interpolation.
TOutput operator()(const TInput &A) const
Window function for sinc interpolation.
TOutput operator()(const TInput &A) const
Window function for sinc interpolation.
TOutput operator()(const TInput &A) const
Control indentation during Print() invocation.
typename NumericTraits< typename TInputImage::PixelType >::RealType RealType
InterpolateImageFunction()=default
typename InputImageType::IndexValueType IndexValueType
typename InputImageType::SizeType SizeType
typename InputImageType::IndexType IndexType
ContinuousIndex< TCoordinate, Self::ImageDimension > ContinuousIndexType
TInputImage InputImageType
static constexpr unsigned int ImageDimension
Implements transparent reference counting.
TWindowFunction m_WindowFunction
static constexpr unsigned int m_WindowSize
ContinuousIndex< TCoordinate, Self::ImageDimension > ContinuousIndexType
SizeType GetRadius() const override
InterpolateImageFunction< TInputImage, TCoordinate > Superclass
SmartPointer< Self > Pointer
static constexpr unsigned int ImageDimension
~WindowedSincInterpolateImageFunction() override=default
unsigned int m_WeightOffsetTable[m_OffsetTableSize][ImageDimension]
static constexpr unsigned int m_OffsetTableSize
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::SizeType SizeType
SmartPointer< const Self > ConstPointer
WindowedSincInterpolateImageFunction()=default
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
unsigned int m_OffsetTable[m_OffsetTableSize]
ConstNeighborhoodIterator< ImageType, TBoundaryCondition > IteratorType
void SetInputImage(const ImageType *image) override
static double Sinc(const double x)
WindowedSincInterpolateImageFunction Self
constexpr TReturnType UnsignedPower(const uintmax_t base, const uintmax_t exponent) noexcept
static constexpr double pi
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....