go home Home | Main Page | Topics | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Loading...
Searching...
No Matches
itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate > Class Template Reference

#include <itkAdvancedLinearInterpolateImageFunction.h>

Detailed Description

template<typename TInputImage, typename TCoordinate = double>
class itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >

Linearly interpolate an image at specified positions.

AdvancedLinearInterpolateImageFunction linearly interpolates image intensity at a non-integer pixel position. This class is templated over the input image type and the coordinate representation type (e.g. float or double).

This function works for N-dimensional images.

This function works for images with scalar and vector pixel types, and for images of type VectorImage.

Unlike the LinearInterpolateImageFunction, which implements a constant boundary condition, this class implements a mirroring boundary condition, which mimics the BSplineInterpolateImageFunction.

Edge cases, i.e. points exactly on the right most edge of the image, need to be dealt with separately. In this implementation we subtract a small number from the continuous index and interpolate at that position. Alternatively, you would need to implement 7 different possibilities in 3D, e.g.: x[0] is at end index -> interpolate in x-y plane x[0] and x[1] are at end index -> interpolate along z line all are at end index -> nearest neighbor interpolation We opt to subtract a small number from x, which is computationally efficient, gives cleaner code, and almost exactly the same interpolated value.

See also
VectorAdvancedLinearInterpolateImageFunction

\wiki \wikiexample{ImageProcessing/LinearInterpolateImageFunction,Linearly interpolate a position in an image} \endwiki

Definition at line 63 of file itkAdvancedLinearInterpolateImageFunction.h.

Inheritance diagram for itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >:

Classes

struct  Dispatch
struct  DispatchBase

Public Types

using ConstPointer = SmartPointer<const Self>
using ContinuousIndexValueType = typename ContinuousIndexType::ValueType
using CovariantVectorType = CovariantVector<OutputType, Self::ImageDimension>
using InputImageSpacingType = typename InputImageType::SpacingType
using Pointer = SmartPointer<Self>
using Self = AdvancedLinearInterpolateImageFunction
using Superclass = LinearInterpolateImageFunction<TInputImage, TCoordinate>

Public Member Functions

CovariantVectorType EvaluateDerivativeAtContinuousIndex (const ContinuousIndexType &x) const
void EvaluateValueAndDerivativeAtContinuousIndex (const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
 ITK_DISALLOW_COPY_AND_MOVE (AdvancedLinearInterpolateImageFunction)
 itkOverrideGetNameOfClassMacro (AdvancedLinearInterpolateImageFunction)
 itkStaticConstMacro (ImageDimension, unsigned int, Superclass::ImageDimension)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 AdvancedLinearInterpolateImageFunction ()=default
 ~AdvancedLinearInterpolateImageFunction () override=default

Private Member Functions

void EvaluateValueAndDerivativeOptimized (const Dispatch< 2 > &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
void EvaluateValueAndDerivativeOptimized (const Dispatch< 3 > &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
void EvaluateValueAndDerivativeOptimized (const DispatchBase &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
void EvaluateValueAndDerivativeUnOptimized (const ContinuousIndexType &, OutputType &, CovariantVectorType &) const

Member Typedef Documentation

◆ ConstPointer

template<typename TInputImage, typename TCoordinate = double>
using itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::ConstPointer = SmartPointer<const Self>

Definition at line 73 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ ContinuousIndexValueType

template<typename TInputImage, typename TCoordinate = double>
using itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::ContinuousIndexValueType = typename ContinuousIndexType::ValueType

Definition at line 102 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ CovariantVectorType

template<typename TInputImage, typename TCoordinate = double>
using itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::CovariantVectorType = CovariantVector<OutputType, Self::ImageDimension>

Derivative typedef support

Definition at line 105 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ InputImageSpacingType

template<typename TInputImage, typename TCoordinate = double>
using itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::InputImageSpacingType = typename InputImageType::SpacingType

Definition at line 86 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ Pointer

template<typename TInputImage, typename TCoordinate = double>
using itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::Pointer = SmartPointer<Self>

Definition at line 72 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ Self

template<typename TInputImage, typename TCoordinate = double>
using itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::Self = AdvancedLinearInterpolateImageFunction

Standard class typedefs.

Definition at line 70 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ Superclass

template<typename TInputImage, typename TCoordinate = double>
using itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::Superclass = LinearInterpolateImageFunction<TInputImage, TCoordinate>

Definition at line 71 of file itkAdvancedLinearInterpolateImageFunction.h.

Constructor & Destructor Documentation

◆ AdvancedLinearInterpolateImageFunction()

template<typename TInputImage, typename TCoordinate = double>
itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::AdvancedLinearInterpolateImageFunction ( )
protecteddefault

◆ ~AdvancedLinearInterpolateImageFunction()

template<typename TInputImage, typename TCoordinate = double>
itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::~AdvancedLinearInterpolateImageFunction ( )
overrideprotecteddefault

Member Function Documentation

◆ EvaluateDerivativeAtContinuousIndex()

template<typename TInputImage, typename TCoordinate = double>
CovariantVectorType itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::EvaluateDerivativeAtContinuousIndex ( const ContinuousIndexType & x) const

Method to compute the derivative.

◆ EvaluateValueAndDerivativeAtContinuousIndex()

template<typename TInputImage, typename TCoordinate = double>
void itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::EvaluateValueAndDerivativeAtContinuousIndex ( const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv ) const
inline

Method to compute both the value and the derivative.

Definition at line 113 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ EvaluateValueAndDerivativeOptimized() [1/3]

template<typename TInputImage, typename TCoordinate = double>
void itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::EvaluateValueAndDerivativeOptimized ( const Dispatch< 2 > & ,
const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv ) const
private

Method to compute both the value and the derivative. 2D specialization.

◆ EvaluateValueAndDerivativeOptimized() [2/3]

template<typename TInputImage, typename TCoordinate = double>
void itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::EvaluateValueAndDerivativeOptimized ( const Dispatch< 3 > & ,
const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv ) const
private

Method to compute both the value and the derivative. 3D specialization.

◆ EvaluateValueAndDerivativeOptimized() [3/3]

template<typename TInputImage, typename TCoordinate = double>
void itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::EvaluateValueAndDerivativeOptimized ( const DispatchBase & ,
const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv ) const
inlineprivate

Method to compute both the value and the derivative. Generic.

Definition at line 149 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ EvaluateValueAndDerivativeUnOptimized()

template<typename TInputImage, typename TCoordinate = double>
void itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::EvaluateValueAndDerivativeUnOptimized ( const ContinuousIndexType & ,
OutputType & ,
CovariantVectorType &  ) const
inlineprivate

Method to compute both the value and the derivative. Generic.

Definition at line 160 of file itkAdvancedLinearInterpolateImageFunction.h.

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<typename TInputImage, typename TCoordinate = double>
itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::ITK_DISALLOW_COPY_AND_MOVE ( AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate > )

◆ itkOverrideGetNameOfClassMacro()

template<typename TInputImage, typename TCoordinate = double>
itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::itkOverrideGetNameOfClassMacro ( AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate > )

Run-time type information (and related methods).

◆ itkStaticConstMacro()

template<typename TInputImage, typename TCoordinate = double>
itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::itkStaticConstMacro ( ImageDimension ,
unsigned int ,
Superclass::ImageDimension  )

Dimension underlying input image.

◆ New()

template<typename TInputImage, typename TCoordinate = double>
Pointer itk::AdvancedLinearInterpolateImageFunction< TInputImage, TCoordinate >::New ( )
static

Method for creation through the object factory.



Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo