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); }
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 >
283 typedef typename Superclass::OutputType
OutputType;
292 itkStaticConstMacro(ImageDimension,
unsigned int, Superclass::ImageDimension);
304 virtual void SetInputImage(
const ImageType *image) ITK_OVERRIDE;
312 virtual OutputType EvaluateAtContinuousIndex(
313 const ContinuousIndexType & index)
const ITK_OVERRIDE;
318 void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
322 void operator=(
const Self &) ITK_DELETE_FUNCTION;
329 static const
unsigned int m_WindowSize;
332 TWindowFunction m_WindowFunction;
336 unsigned int *m_OffsetTable;
339 unsigned int m_OffsetTableSize;
342 unsigned int **m_WeightOffsetTable;
345 inline
double Sinc(
double x)
const 349 return ( x == 0.0 ) ? 1.0 : std::sin(px) / px;
354 #ifndef ITK_MANUAL_INSTANTIATION 355 #include "itkWindowedSincInterpolateImageFunction.hxx" 358 #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...
Superclass::OutputType OutputType
static const double m_Factor2
Use the windowed sinc function to interpolate.
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
TOutput operator()(const TInput &A) const
signed long IndexValueType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes...
Const version of NeighborhoodIterator, defining iteration of a local N-dimensional neighborhood of pi...
static const double m_Factor
static const double m_Factor
Window function for sinc interpolation. .
static const double m_Factor
TOutput operator()(const TInput &A) const
Window function for sinc interpolation. .
Window function for sinc interpolation. .
WindowedSincInterpolateImageFunction Self
Base class for all image interpolaters.
Superclass::ContinuousIndexType ContinuousIndexType
Superclass::RealType RealType
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
Superclass::IndexType IndexType
TOutput operator()(const TInput &A) const
static const double m_Factor1
static ITK_CONSTEXPR double pi
SmartPointer< const Self > ConstPointer