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::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType > Class Template Reference

#include <itkReducedDimensionBSplineInterpolateImageFunction.h>

Detailed Description

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
class itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >

Evaluates the B-Spline interpolation of an image. Spline order may be from 0 to 5.

This class defines N-Dimension B-Spline transformation. It is based on:
[1] M. Unser, "Splines: A Perfect Fit for Signal and Image Processing," IEEE Signal Processing Magazine, vol. 16, no. 6, pp. 22-38, November 1999.
[2] M. Unser, A. Aldroubi and M. Eden, "B-Spline Signal Processing: Part I--Theory," IEEE Transactions on Signal Processing, vol. 41, no. 2, pp. 821-832, February 1993.
[3] M. Unser, A. Aldroubi and M. Eden, "B-Spline Signal Processing: Part II--Efficient Design and Applications," IEEE Transactions on Signal Processing, vol. 41, no. 2, pp. 834-848, February 1993.
And code obtained from bigwww.epfl.ch by Philippe Thevenaz.

The B spline coefficients are calculated through the MultiOrderBSplineDecompositionImageFilter to enable a zero-th order for the last dimension.

Limitations: Spline order must be between 0 and 5. Spline order must be set before setting the image. Requires same spline order for every dimension. Uses mirror boundary conditions. Spline is determined in all dimensions, cannot selectively pick dimension for calculating spline.

See also
MultiOrderBSplineDecompositionImageFilter

Definition at line 85 of file itkReducedDimensionBSplineInterpolateImageFunction.h.

Inheritance diagram for itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >:

Public Types

using CoefficientDataType = TCoefficientType
using CoefficientFilter = MultiOrderBSplineDecompositionImageFilter<TImageType, CoefficientImageType>
using CoefficientFilterPointer = typename CoefficientFilter::Pointer
using CoefficientImageType = Image<CoefficientDataType, Self::ImageDimension>
using ConstPointer = SmartPointer<const Self>
using CovariantVectorType = CovariantVector<OutputType, Self::ImageDimension>
using Pointer = SmartPointer<Self>
using Self = ReducedDimensionBSplineInterpolateImageFunction
using SizeType = typename TImageType::SizeType
using Superclass = InterpolateImageFunction<TImageType, TCoordinate>

Public Member Functions

OutputType EvaluateAtContinuousIndex (const ContinuousIndexType &index) const override
CovariantVectorType EvaluateDerivative (const PointType &point) const
CovariantVectorType EvaluateDerivativeAtContinuousIndex (const ContinuousIndexType &x) const
virtual int GetSplineOrder () const
virtual bool GetUseImageDirection () const
 ITK_DISALLOW_COPY_AND_MOVE (ReducedDimensionBSplineInterpolateImageFunction)
 itkOverrideGetNameOfClassMacro (ReducedDimensionBSplineInterpolateImageFunction)
 itkStaticConstMacro (ImageDimension, unsigned int, Superclass::ImageDimension)
void SetInputImage (const TImageType *inputData) override
void SetSplineOrder (unsigned int SplineOrder)
virtual void SetUseImageDirection (bool _arg)
virtual void UseImageDirectionOff ()
virtual void UseImageDirectionOn ()

Static Public Member Functions

static Pointer New ()

Protected Member Functions

void PrintSelf (std::ostream &os, Indent indent) const override
 ReducedDimensionBSplineInterpolateImageFunction ()
 ~ReducedDimensionBSplineInterpolateImageFunction () override=default

Protected Attributes

CoefficientImageType::ConstPointer m_Coefficients {}
TImageType::SizeType m_DataLength {}
unsigned int m_SplineOrder {}

Private Member Functions

void ApplyMirrorBoundaryConditions (vnl_matrix< long > &evaluateIndex, unsigned int splineOrder) const
void DetermineRegionOfSupport (vnl_matrix< long > &evaluateIndex, const ContinuousIndexType &x, unsigned int splineOrder) const
void GeneratePointsToIndex ()
SizeType GetRadius () const override
void SetDerivativeWeights (const ContinuousIndexType &x, const vnl_matrix< long > &EvaluateIndex, vnl_matrix< double > &weights, unsigned int splineOrder) const
void SetInterpolationWeights (const ContinuousIndexType &x, const vnl_matrix< long > &EvaluateIndex, vnl_matrix< double > &weights, unsigned int splineOrder) const

Private Attributes

CoefficientFilterPointer m_CoefficientFilter {}
std::vector< IndexType > m_PointsToIndex {}
bool m_UseImageDirection {}

Member Typedef Documentation

◆ CoefficientDataType

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::CoefficientDataType = TCoefficientType

Internal Coefficient typedef support

Definition at line 124 of file itkReducedDimensionBSplineInterpolateImageFunction.h.

◆ CoefficientFilter

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::CoefficientFilter = MultiOrderBSplineDecompositionImageFilter<TImageType, CoefficientImageType>

Define filter for calculating the BSpline coefficients

Definition at line 128 of file itkReducedDimensionBSplineInterpolateImageFunction.h.

◆ CoefficientFilterPointer

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::CoefficientFilterPointer = typename CoefficientFilter::Pointer

◆ CoefficientImageType

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::CoefficientImageType = Image<CoefficientDataType, Self::ImageDimension>

◆ ConstPointer

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::ConstPointer = SmartPointer<const Self>

◆ CovariantVectorType

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::CovariantVectorType = CovariantVector<OutputType, Self::ImageDimension>

Derivative typedef support

Definition at line 144 of file itkReducedDimensionBSplineInterpolateImageFunction.h.

◆ Pointer

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::Pointer = SmartPointer<Self>

◆ Self

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::Self = ReducedDimensionBSplineInterpolateImageFunction

Standard class typedefs.

Definition at line 92 of file itkReducedDimensionBSplineInterpolateImageFunction.h.

◆ SizeType

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::SizeType = typename TImageType::SizeType

◆ Superclass

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
using itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::Superclass = InterpolateImageFunction<TImageType, TCoordinate>

Constructor & Destructor Documentation

◆ ReducedDimensionBSplineInterpolateImageFunction()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::ReducedDimensionBSplineInterpolateImageFunction ( )
protected

◆ ~ReducedDimensionBSplineInterpolateImageFunction()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::~ReducedDimensionBSplineInterpolateImageFunction ( )
overrideprotecteddefault

Member Function Documentation

◆ ApplyMirrorBoundaryConditions()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::ApplyMirrorBoundaryConditions ( vnl_matrix< long > & evaluateIndex,
unsigned int splineOrder ) const
private

Set the indicies in evaluateIndex at the boundaries based on mirror boundary conditions.

◆ DetermineRegionOfSupport()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::DetermineRegionOfSupport ( vnl_matrix< long > & evaluateIndex,
const ContinuousIndexType & x,
unsigned int splineOrder ) const
private

Determines the indicies to use give the splines region of support

◆ EvaluateAtContinuousIndex()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
OutputType itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::EvaluateAtContinuousIndex ( const ContinuousIndexType & index) const
override

Evaluate the function at a ContinuousIndex position.

Returns the B-Spline interpolated image intensity at a specified point position. No bounds checking is done. The point is assume to lie within the image buffer.

ImageFunction::IsInsideBuffer() can be used to check bounds before calling the method.

◆ EvaluateDerivative()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
CovariantVectorType itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::EvaluateDerivative ( const PointType & point) const
inline

◆ EvaluateDerivativeAtContinuousIndex()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
CovariantVectorType itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::EvaluateDerivativeAtContinuousIndex ( const ContinuousIndexType & x) const

◆ GeneratePointsToIndex()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::GeneratePointsToIndex ( )
private

Precomputation for converting the 1D index of the interpolation neighborhood to an N-dimensional index.

◆ GetRadius()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
SizeType itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::GetRadius ( ) const
inlineoverrideprivate

◆ GetSplineOrder()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
virtual int itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::GetSplineOrder ( ) const
virtual

◆ GetUseImageDirection()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
virtual bool itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::GetUseImageDirection ( ) const
virtual

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::ITK_DISALLOW_COPY_AND_MOVE ( ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType > )

◆ itkOverrideGetNameOfClassMacro()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::itkOverrideGetNameOfClassMacro ( ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType > )

Run-time type information (and related methods).

◆ itkStaticConstMacro()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::itkStaticConstMacro ( ImageDimension ,
unsigned int ,
Superclass::ImageDimension  )

Dimension underlying input image.

◆ New()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
Pointer itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::New ( )
static

New macro for creation of through a Smart Pointer

◆ PrintSelf()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::PrintSelf ( std::ostream & os,
Indent indent ) const
overrideprotected

◆ SetDerivativeWeights()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::SetDerivativeWeights ( const ContinuousIndexType & x,
const vnl_matrix< long > & EvaluateIndex,
vnl_matrix< double > & weights,
unsigned int splineOrder ) const
private

Determines the weights for the derivative portion of the value x

◆ SetInputImage()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::SetInputImage ( const TImageType * inputData)
override

Set the input image. This must be set by the user.

◆ SetInterpolationWeights()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::SetInterpolationWeights ( const ContinuousIndexType & x,
const vnl_matrix< long > & EvaluateIndex,
vnl_matrix< double > & weights,
unsigned int splineOrder ) const
private

Determines the weights for interpolation of the value x

◆ SetSplineOrder()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::SetSplineOrder ( unsigned int SplineOrder)

Get/Sets the Spline Order, supports 0th - 5th order splines. The default is a 3rd order spline.

◆ SetUseImageDirection()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
virtual void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::SetUseImageDirection ( bool _arg)
virtual

The UseImageDirection flag determines whether image derivatives are computed with respect to the image grid or with respect to the physical space. When this flag is ON the derivatives are computed with respect to the coordinate system of physical space. The difference is whether we take into account the image Direction or not. The flag ON will take into account the image direction and will result in an extra matrix multiplication compared to the amount of computation performed when the flag is OFF. The default value of this flag is the same as the CMAKE option ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE (i.e ON by default when ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE is ON, and OFF by default when ITK_IMAGE_BEHAVES_AS_ORIENTED_IMAGE is OFF).

◆ UseImageDirectionOff()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
virtual void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::UseImageDirectionOff ( )
virtual

◆ UseImageDirectionOn()

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
virtual void itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::UseImageDirectionOn ( )
virtual

Member Data Documentation

◆ m_CoefficientFilter

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
CoefficientFilterPointer itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::m_CoefficientFilter {}
private

◆ m_Coefficients

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
CoefficientImageType::ConstPointer itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::m_Coefficients {}
protected

◆ m_DataLength

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
TImageType::SizeType itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::m_DataLength {}
protected

◆ m_PointsToIndex

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
std::vector<IndexType> itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::m_PointsToIndex {}
private

◆ m_SplineOrder

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
unsigned int itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::m_SplineOrder {}
protected

◆ m_UseImageDirection

template<typename TImageType, typename TCoordinate = double, typename TCoefficientType = double>
bool itk::ReducedDimensionBSplineInterpolateImageFunction< TImageType, TCoordinate, TCoefficientType >::m_UseImageDirection {}
private


Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo