18 #ifndef itkWindowedSincInterpolateImageFunction_h
19 #define itkWindowedSincInterpolateImageFunction_h
36 template<
unsigned int VRadius,
37 typename TInput = double,
typename TOutput =
double >
42 {
return static_cast<TOutput
>(std::cos(A * m_Factor)); }
57 template<
unsigned int VRadius,
58 typename TInput = double,
typename TOutput =
double >
63 {
return static_cast<TOutput
>(0.54 + 0.46 * std::cos(A * m_Factor) ); }
78 template<
unsigned int VRadius,
79 typename TInput = double,
typename TOutput =
double >
84 {
return static_cast<TOutput
>( 1.0 - A * m_Factor * A ); }
101 template<
unsigned int VRadius,
102 typename TInput = double,
typename TOutput =
double >
108 if ( A == 0.0 ) {
return static_cast<TOutput
>(1.0); }
109 double z = m_Factor * A;
110 return static_cast<TOutput
>( std::sin(z) / z );
126 template<
unsigned int VRadius,
127 typename TInput = double,
typename TOutput =
double >
133 return static_cast<TOutput
>
134 ( 0.42 + 0.5 * std::cos(A * m_Factor1) + 0.08 * std::cos(A * m_Factor2) );
258 typename TInputImage,
259 unsigned int VRadius,
262 class TCoordRep =
double >
344 inline double Sinc(
double x)
const
348 return ( x == 0.0 ) ? 1.0 : std::sin(px) / px;
353 #ifndef ITK_MANUAL_INSTANTIATION
354 #include "itkWindowedSincInterpolateImageFunction.hxx"
357 #endif // _itkWindowedSincInterpolateImageFunction_h
TOutput operator()(const TInput &A) const
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
Light weight base class for most itk classes.
typename Superclass::ContinuousIndexType ContinuousIndexType
static const double m_Factor2
WindowedSincInterpolateImageFunction()
Use the windowed sinc function to interpolate.
TOutput operator()(const TInput &A) const
typename Superclass::OutputType OutputType
~WindowedSincInterpolateImageFunction() override
static constexpr double pi
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
unsigned int ** m_WeightOffsetTable
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
typename NumericTraits< typename TInputImage::PixelType >::RealType RealType
static constexpr unsigned int ImageDimension
static const unsigned int m_WindowSize
static const double m_Factor
typename Superclass::IndexType IndexType
static const double m_Factor
unsigned int m_OffsetTableSize
Window function for sinc interpolation. .
double Sinc(double x) const
static const double m_Factor
TOutput operator()(const TInput &A) const
TWindowFunction m_WindowFunction
Window function for sinc interpolation. .
Window function for sinc interpolation. .
void SetInputImage(const ImageType *image) override
Base class for all image interpolaters.
typename Superclass::InputImageType InputImageType
unsigned int * m_OffsetTable
static const double m_Factor
Window function for sinc interpolation. Note: Paper referenced in WindowedSincInterpolateImageFuncti...
TOutput operator()(const TInput &A) const
static constexpr unsigned int ImageDimension
Control indentation during Print() invocation.
Window function for sinc interpolation. .
typename Superclass::IndexValueType IndexValueType
void PrintSelf(std::ostream &os, Indent indent) const override
TOutput operator()(const TInput &A) const
static const double m_Factor1