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...
static const unsigned int ImageDimension
Superclass::OutputType OutputType
Light weight base class for most itk classes.
static const double m_Factor2
WindowedSincInterpolateImageFunction()
Use the windowed sinc function to interpolate.
virtual ~WindowedSincInterpolateImageFunction() override
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
TOutput operator()(const TInput &A) const
static ITK_CONSTEXPR_VAR double pi
unsigned int ** m_WeightOffsetTable
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
Superclass::IndexType IndexType
static const unsigned int m_WindowSize
static const double m_Factor
Superclass::OutputType OutputType
static const double m_Factor
unsigned int m_OffsetTableSize
Window function for sinc interpolation. .
double Sinc(double x) const
static const double m_Factor
static const unsigned int ImageDimension
TOutput operator()(const TInput &A) const
TWindowFunction m_WindowFunction
Window function for sinc interpolation. .
Window function for sinc interpolation. .
WindowedSincInterpolateImageFunction Self
Superclass::InputImageType InputImageType
Superclass::ContinuousIndexType ContinuousIndexType
Base class for all image interpolaters.
Superclass::ContinuousIndexType ContinuousIndexType
Superclass::RealType RealType
virtual void SetInputImage(const ImageType *image) override
unsigned int * m_OffsetTable
static const double m_Factor
Window function for sinc interpolation. Note: Paper referenced in WindowedSincInterpolateImageFuncti...
SmartPointer< Self > Pointer
Superclass::InputImageType InputImageType
TOutput operator()(const TInput &A) const
Control indentation during Print() invocation.
Window function for sinc interpolation. .
Superclass::IndexValueType IndexValueType
void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::IndexValueType IndexValueType
Superclass::IndexType IndexType
TOutput operator()(const TInput &A) const
static const double m_Factor1
SmartPointer< const Self > ConstPointer
NumericTraits< typename TInputImage::PixelType >::RealType RealType