 |
ITK
5.4.0
Insight Toolkit
|
Go to the documentation of this file.
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;
331 radius.Fill(VRadius);
339 PrintSelf(std::ostream & os,
Indent indent)
const override;
346 static constexpr
unsigned int m_WindowSize{ 2 * VRadius };
349 TWindowFunction m_WindowFunction{};
356 unsigned int m_OffsetTable[m_OffsetTableSize]{};
359 unsigned int m_WeightOffsetTable[m_OffsetTableSize][ImageDimension]{};
367 return (x == 0.0) ? 1.0 : std::sin(px) / px;
372 #ifndef ITK_MANUAL_INSTANTIATION
373 # include "itkWindowedSincInterpolateImageFunction.hxx"
376 #endif // _itkWindowedSincInterpolateImageFunction_h
TOutput operator()(const TInput &A) const
typename InputImageType::SizeType SizeType
TOutput operator()(const TInput &A) const
TOutput operator()(const TInput &A) const
static const double m_Factor2
ImageBaseType::SizeType SizeType
Window function for sinc interpolation.
Control indentation during Print() invocation.
NumericTraits< TInputImage::PixelType >::RealType OutputType
static const double m_Factor
ImageBaseType::IndexType IndexType
Light weight base class for most itk classes.
static const double m_Factor
constexpr TReturnType UnsignedPower(const uintmax_t base, const uintmax_t exponent) noexcept
TOutput operator()(const TInput &A) const
double Sinc(double x) const
static const double m_Factor
Window function for sinc interpolation.
Use the windowed sinc function to interpolate.
TOutput operator()(const TInput &A) const
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...
SizeType GetRadius() const override
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
static constexpr double pi
static const double m_Factor1
Window function for sinc interpolation.
static const double m_Factor
Base class for all image interpolators.
Window function for sinc interpolation.
Window function for sinc interpolation.