18#ifndef itkNearestNeighborInterpolateImageFunction_h
19#define itkNearestNeighborInterpolateImageFunction_h
38template <
typename TInputImage,
typename TCoordRep =
double>
58 using typename Superclass::OutputType;
61 using typename Superclass::InputImageType;
64 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
73 using typename Superclass::ContinuousIndexType;
88 this->ConvertContinuousIndexToNearestIndex(index, nindex);
89 return static_cast<OutputType>(this->GetInputImage()->GetPixel(nindex));
104 Superclass::PrintSelf(os, indent);
NumericTraits< TInputImage::PixelType >::RealType OutputType
typename InputImageType::IndexType IndexType
Control indentation during Print() invocation.
Base class for all image interpolators.
Light weight base class for most itk classes.
Nearest neighbor interpolation of a scalar image.
~NearestNeighborInterpolateImageFunction() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
NearestNeighborInterpolateImageFunction()=default
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
SizeType GetRadius() const override
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....