ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType > Class Template Reference

#include <itkBSplineInterpolateImageFunction.h>

+ Inheritance diagram for itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >:
+ Collaboration diagram for itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >:

Public Types

using CoefficientDataType = TCoefficientType
 
using CoefficientFilter = BSplineDecompositionImageFilter< TImageType, CoefficientImageType >
 
using CoefficientFilterPointer = typename CoefficientFilter::Pointer
 
using CoefficientImageType = Image< CoefficientDataType, Self::ImageDimension >
 
using ConstPointer = SmartPointer< const Self >
 
using ContinuousIndexType = typename Superclass::ContinuousIndexType
 
using CovariantVectorType = CovariantVector< OutputType, Self::ImageDimension >
 
using IndexType = typename Superclass::IndexType
 
using InputImageType = typename Superclass::InputImageType
 
using Iterator = ImageLinearIteratorWithIndex< TImageType >
 
using OutputType = typename Superclass::OutputType
 
using Pointer = SmartPointer< Self >
 
using PointType = typename Superclass::PointType
 
using Self = BSplineInterpolateImageFunction
 
using SizeType = typename Superclass::SizeType
 
using Superclass = InterpolateImageFunction< TImageType, TCoordRep >
 
- Public Types inherited from itk::InterpolateImageFunction< TImageType, TCoordRep >
using ConstPointer = SmartPointer< const Self >
 
using ContinuousIndexType = typename Superclass::ContinuousIndexType
 
using IndexType = typename Superclass::IndexType
 
using IndexValueType = typename Superclass::IndexValueType
 
using InputImageType = typename Superclass::InputImageType
 
using OutputType = typename Superclass::OutputType
 
using Pointer = SmartPointer< Self >
 
using PointType = typename Superclass::PointType
 
using RealType = typename NumericTraits< typename TImageType ::PixelType >::RealType
 
using Self = InterpolateImageFunction
 
using SizeType = typename InputImageType::SizeType
 
using Superclass = ImageFunction< TImageType, typename NumericTraits< typename TImageType ::PixelType >::RealType, TCoordRep >
 
- Public Types inherited from itk::ImageFunction< TImageType, NumericTraits< TImageType ::PixelType >::RealType, TCoordRep >
using ConstPointer = SmartPointer< const Self >
 
using ContinuousIndexType = ContinuousIndex< TCoordRep, Self::ImageDimension >
 
using CoordRepType = TCoordRep
 
using IndexType = typename InputImageType::IndexType
 
using IndexValueType = typename InputImageType::IndexValueType
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImageType = TImageType
 
using InputPixelType = typename InputImageType::PixelType
 
using OutputType = NumericTraits< TImageType ::PixelType >::RealType
 
using Pointer = SmartPointer< Self >
 
using PointType = Point< TCoordRep, Self::ImageDimension >
 
using Self = ImageFunction
 
using Superclass = FunctionBase< Point< TCoordRep, Self::ImageDimension >, NumericTraits< TImageType ::PixelType >::RealType >
 
- Public Types inherited from itk::FunctionBase< Point< TCoordRep, TImageType ::ImageDimension >, NumericTraits< TImageType ::PixelType >::RealType >
using ConstPointer = SmartPointer< const Self >
 
using InputType = Point< TCoordRep, TImageType ::ImageDimension >
 
using OutputType = NumericTraits< TImageType ::PixelType >::RealType
 
using Pointer = SmartPointer< Self >
 
using Self = FunctionBase
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother () const
 
OutputType Evaluate (const PointType &point) const override
 
virtual OutputType Evaluate (const PointType &point, ThreadIdType threadId) const
 
OutputType EvaluateAtContinuousIndex (const ContinuousIndexType &index) const override
 
virtual OutputType EvaluateAtContinuousIndex (const ContinuousIndexType &x, ThreadIdType threadId) const
 
CovariantVectorType EvaluateDerivative (const PointType &point) const
 
CovariantVectorType EvaluateDerivative (const PointType &point, ThreadIdType threadId) const
 
CovariantVectorType EvaluateDerivativeAtContinuousIndex (const ContinuousIndexType &x) const
 
CovariantVectorType EvaluateDerivativeAtContinuousIndex (const ContinuousIndexType &x, ThreadIdType threadId) const
 
void EvaluateValueAndDerivative (const PointType &point, OutputType &value, CovariantVectorType &deriv) const
 
void EvaluateValueAndDerivative (const PointType &point, OutputType &value, CovariantVectorType &deriv, ThreadIdType threadId) const
 
void EvaluateValueAndDerivativeAtContinuousIndex (const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
 
void EvaluateValueAndDerivativeAtContinuousIndex (const ContinuousIndexType &x, OutputType &value, CovariantVectorType &derivativeValue, ThreadIdType threadId) const
 
virtual const char * GetNameOfClass () const
 
virtual ThreadIdType GetNumberOfWorkUnits () const
 
virtual int GetSplineOrder () const
 
void SetInputImage (const TImageType *inputData) override
 
void SetNumberOfWorkUnits (ThreadIdType numThreads)
 
void SetSplineOrder (unsigned int SplineOrder)
 
- Public Member Functions inherited from itk::InterpolateImageFunction< TImageType, TCoordRep >
OutputType Evaluate (const PointType &point) const override
 
OutputType EvaluateAtContinuousIndex (const ContinuousIndexType &index) const override=0
 
OutputType EvaluateAtIndex (const IndexType &index) const override
 
- Public Member Functions inherited from itk::ImageFunction< TImageType, NumericTraits< TImageType ::PixelType >::RealType, TCoordRep >
const InputImageTypeGetInputImage () const
 
virtual bool IsInsideBuffer (const IndexType &index) const
 
virtual bool IsInsideBuffer (const ContinuousIndexType &index) const
 
virtual bool IsInsideBuffer (const PointType &point) const
 
void ConvertPointToNearestIndex (const PointType &point, IndexType &index) const
 
void ConvertPointToContinuousIndex (const PointType &point, ContinuousIndexType &cindex) const
 
void ConvertContinuousIndexToNearestIndex (const ContinuousIndexType &cindex, IndexType &index) const
 
virtual const IndexTypeGetStartIndex () const
 
virtual const IndexTypeGetEndIndex () const
 
virtual const ContinuousIndexTypeGetStartContinuousIndex () const
 
virtual const ContinuousIndexTypeGetEndContinuousIndex () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Static Public Attributes

static constexpr unsigned int ImageDimension = Superclass::ImageDimension
 
- Static Public Attributes inherited from itk::InterpolateImageFunction< TImageType, TCoordRep >
static constexpr unsigned int ImageDimension
 
- Static Public Attributes inherited from itk::ImageFunction< TImageType, NumericTraits< TImageType ::PixelType >::RealType, TCoordRep >
static constexpr unsigned int ImageDimension
 
std::vector< CoefficientDataTypem_Scratch
 
TImageType::SizeType m_DataLength
 
unsigned int m_SplineOrder
 
CoefficientImageType::ConstPointer m_Coefficients
 
Iterator m_CIterator
 
unsigned long m_MaxNumberInterpolationPoints
 
std::vector< IndexTypem_PointsToIndex
 
CoefficientFilterPointer m_CoefficientFilter
 
bool m_UseImageDirection
 
ThreadIdType m_NumberOfWorkUnits
 
vnl_matrix< long > * m_ThreadedEvaluateIndex
 
vnl_matrix< double > * m_ThreadedWeights
 
vnl_matrix< double > * m_ThreadedWeightsDerivative
 
virtual void SetUseImageDirection (bool _arg)
 
virtual bool GetUseImageDirection () const
 
virtual void UseImageDirectionOn ()
 
virtual void UseImageDirectionOff ()
 
SizeType GetRadius () const override
 
virtual OutputType EvaluateAtContinuousIndexInternal (const ContinuousIndexType &x, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights) const
 
virtual void EvaluateValueAndDerivativeAtContinuousIndexInternal (const ContinuousIndexType &x, OutputType &value, CovariantVectorType &derivativeValue, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights, vnl_matrix< double > &weightsDerivative) const
 
virtual CovariantVectorType EvaluateDerivativeAtContinuousIndexInternal (const ContinuousIndexType &x, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights, vnl_matrix< double > &weightsDerivative) const
 
 BSplineInterpolateImageFunction ()
 
 ~BSplineInterpolateImageFunction () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void SetInterpolationWeights (const ContinuousIndexType &x, const vnl_matrix< long > &EvaluateIndex, vnl_matrix< double > &weights, unsigned int splineOrder) const
 
void SetDerivativeWeights (const ContinuousIndexType &x, const vnl_matrix< long > &EvaluateIndex, vnl_matrix< double > &weights, unsigned int splineOrder) const
 
void GeneratePointsToIndex ()
 
void DetermineRegionOfSupport (vnl_matrix< long > &evaluateIndex, const ContinuousIndexType &x, unsigned int splineOrder) const
 
void ApplyMirrorBoundaryConditions (vnl_matrix< long > &evaluateIndex, unsigned int splineOrder) const
 

Additional Inherited Members

- Protected Member Functions inherited from itk::InterpolateImageFunction< TImageType, TCoordRep >
 InterpolateImageFunction ()=default
 
 ~InterpolateImageFunction () override=default
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
- Protected Member Functions inherited from itk::ImageFunction< TImageType, NumericTraits< TImageType ::PixelType >::RealType, TCoordRep >
 ImageFunction ()
 
 ~ImageFunction () override=default
 
- Protected Member Functions inherited from itk::FunctionBase< Point< TCoordRep, TImageType ::ImageDimension >, NumericTraits< TImageType ::PixelType >::RealType >
 FunctionBase ()=default
 
 ~FunctionBase () override=default
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Protected Attributes inherited from itk::ImageFunction< TImageType, NumericTraits< TImageType ::PixelType >::RealType, TCoordRep >
InputImageConstPointer m_Image
 
IndexType m_StartIndex
 
IndexType m_EndIndex
 
ContinuousIndexType m_StartContinuousIndex
 
ContinuousIndexType m_EndContinuousIndex
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
class itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, 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 BSplineDecompositionImageFilter

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

See also
BSplineDecompositionImageFilter
Examples
Examples/Filtering/ResampleImageFilter7.cxx, and SphinxExamples/src/Filtering/ImageGrid/UpsampleAnImage/Code.cxx.

Definition at line 82 of file itkBSplineInterpolateImageFunction.h.

Member Typedef Documentation

◆ CoefficientDataType

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::CoefficientDataType = TCoefficientType

Internal Coefficient type alias support

Definition at line 124 of file itkBSplineInterpolateImageFunction.h.

◆ CoefficientFilter

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::CoefficientFilter = BSplineDecompositionImageFilter<TImageType, CoefficientImageType>

Define filter for calculating the BSpline coefficients

Definition at line 128 of file itkBSplineInterpolateImageFunction.h.

◆ CoefficientFilterPointer

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::CoefficientFilterPointer = typename CoefficientFilter::Pointer

Definition at line 129 of file itkBSplineInterpolateImageFunction.h.

◆ CoefficientImageType

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

Definition at line 125 of file itkBSplineInterpolateImageFunction.h.

◆ ConstPointer

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

Definition at line 91 of file itkBSplineInterpolateImageFunction.h.

◆ ContinuousIndexType

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::ContinuousIndexType = typename Superclass::ContinuousIndexType

ContinuousIndex type alias support

Definition at line 115 of file itkBSplineInterpolateImageFunction.h.

◆ CovariantVectorType

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

Derivative type alias support

Definition at line 132 of file itkBSplineInterpolateImageFunction.h.

◆ IndexType

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::IndexType = typename Superclass::IndexType

Index type alias support

Definition at line 109 of file itkBSplineInterpolateImageFunction.h.

◆ InputImageType

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::InputImageType = typename Superclass::InputImageType

InputImageType type alias support

Definition at line 103 of file itkBSplineInterpolateImageFunction.h.

◆ Iterator

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::Iterator = ImageLinearIteratorWithIndex<TImageType>

Iterator type alias support

Definition at line 121 of file itkBSplineInterpolateImageFunction.h.

◆ OutputType

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::OutputType = typename Superclass::OutputType

OutputType type alias support

Definition at line 100 of file itkBSplineInterpolateImageFunction.h.

◆ Pointer

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::Pointer = SmartPointer<Self>

Definition at line 90 of file itkBSplineInterpolateImageFunction.h.

◆ PointType

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::PointType = typename Superclass::PointType

PointType type alias support

Definition at line 118 of file itkBSplineInterpolateImageFunction.h.

◆ Self

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::Self = BSplineInterpolateImageFunction

Standard class type aliases.

Definition at line 88 of file itkBSplineInterpolateImageFunction.h.

◆ SizeType

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::SizeType = typename Superclass::SizeType

Size type alias support

Definition at line 112 of file itkBSplineInterpolateImageFunction.h.

◆ Superclass

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
using itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::Superclass = InterpolateImageFunction<TImageType, TCoordRep>

Definition at line 89 of file itkBSplineInterpolateImageFunction.h.

Constructor & Destructor Documentation

◆ BSplineInterpolateImageFunction()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::BSplineInterpolateImageFunction ( )
protected

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 On.

◆ ~BSplineInterpolateImageFunction()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::~BSplineInterpolateImageFunction ( )
overrideprotected

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 On.

Member Function Documentation

◆ ApplyMirrorBoundaryConditions()

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

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

◆ CreateAnother()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual::itk::LightObject::Pointer itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::CreateAnother ( ) const
virtual

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

Reimplemented from itk::Object.

◆ DetermineRegionOfSupport()

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

Determines the indices to use give the splines region of support

◆ Evaluate() [1/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
OutputType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::Evaluate ( const PointType point) const
inlineoverride

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.

Definition at line 143 of file itkBSplineInterpolateImageFunction.h.

◆ Evaluate() [2/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual OutputType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::Evaluate ( const PointType point,
ThreadIdType  threadId 
) const
inlinevirtual

Definition at line 153 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateAtContinuousIndex() [1/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
OutputType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateAtContinuousIndex ( const ContinuousIndexType index) const
inlineoverride

Definition at line 162 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateAtContinuousIndex() [2/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual OutputType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateAtContinuousIndex ( const ContinuousIndexType x,
ThreadIdType  threadId 
) const
virtual

◆ EvaluateAtContinuousIndexInternal()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual OutputType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateAtContinuousIndexInternal ( const ContinuousIndexType x,
vnl_matrix< long > &  evaluateIndex,
vnl_matrix< double > &  weights 
) const
protectedvirtual

The following methods take working space (evaluateIndex, weights, weightsDerivative) that is managed by the caller. If threadId is known, the working variables are looked up in the thread indexed arrays. If threadId is not known, working variables are made on the stack and passed to these methods. The stack allocation should be ok since these methods do not store the working variables, i.e. they are not expected to be available beyond the scope of the function call.

This was done to allow for two types of re-entrancy. The first is when a threaded filter, e.g. InterpolateImagePointsFilter calls EvaluateAtContinuousIndex from multiple threads without passing a threadId. So, EvaluateAtContinuousIndex must be thread safe. This is handled with the stack-based allocation of the working space.

The second form of re-entrancy involves methods that call EvaluateAtContinuousIndex from multiple threads, but pass a threadId. In this case, we can gain a little efficiency (hopefully) by looking up pre-allocated working space in arrays that are indexed by thread. The efficiency gain is likely dependent on the size of the working variables, which are in-turn dependent on the dimensionality of the image and the order of the spline.

◆ EvaluateDerivative() [1/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
CovariantVectorType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateDerivative ( const PointType point) const
inline

Definition at line 178 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateDerivative() [2/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
CovariantVectorType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateDerivative ( const PointType point,
ThreadIdType  threadId 
) const
inline

Definition at line 188 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateDerivativeAtContinuousIndex() [1/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
CovariantVectorType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateDerivativeAtContinuousIndex ( const ContinuousIndexType x) const
inline

Definition at line 197 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateDerivativeAtContinuousIndex() [2/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
CovariantVectorType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateDerivativeAtContinuousIndex ( const ContinuousIndexType x,
ThreadIdType  threadId 
) const

◆ EvaluateDerivativeAtContinuousIndexInternal()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual CovariantVectorType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateDerivativeAtContinuousIndexInternal ( const ContinuousIndexType x,
vnl_matrix< long > &  evaluateIndex,
vnl_matrix< double > &  weights,
vnl_matrix< double > &  weightsDerivative 
) const
protectedvirtual

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 On.

◆ EvaluateValueAndDerivative() [1/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateValueAndDerivative ( const PointType point,
OutputType value,
CovariantVectorType deriv 
) const
inline

Definition at line 217 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateValueAndDerivative() [2/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateValueAndDerivative ( const PointType point,
OutputType value,
CovariantVectorType deriv,
ThreadIdType  threadId 
) const
inline

Definition at line 228 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateValueAndDerivativeAtContinuousIndex() [1/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateValueAndDerivativeAtContinuousIndex ( const ContinuousIndexType x,
OutputType value,
CovariantVectorType deriv 
) const
inline

Definition at line 240 of file itkBSplineInterpolateImageFunction.h.

◆ EvaluateValueAndDerivativeAtContinuousIndex() [2/2]

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateValueAndDerivativeAtContinuousIndex ( const ContinuousIndexType x,
OutputType value,
CovariantVectorType derivativeValue,
ThreadIdType  threadId 
) const

◆ EvaluateValueAndDerivativeAtContinuousIndexInternal()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::EvaluateValueAndDerivativeAtContinuousIndexInternal ( const ContinuousIndexType x,
OutputType value,
CovariantVectorType derivativeValue,
vnl_matrix< long > &  evaluateIndex,
vnl_matrix< double > &  weights,
vnl_matrix< double > &  weightsDerivative 
) const
protectedvirtual

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 On.

◆ GeneratePointsToIndex()

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

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

◆ GetNameOfClass()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual const char* itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::InterpolateImageFunction< TImageType, TCoordRep >.

Reimplemented in itk::BSplineResampleImageFunction< TImageType, TCoordRep >.

◆ GetNumberOfWorkUnits()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual ThreadIdType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::GetNumberOfWorkUnits ( ) const
virtual

◆ GetRadius()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
SizeType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::GetRadius ( ) const
inlineoverridevirtual

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 On.

Implements itk::InterpolateImageFunction< TImageType, TCoordRep >.

Definition at line 297 of file itkBSplineInterpolateImageFunction.h.

◆ GetSplineOrder()

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

◆ GetUseImageDirection()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual bool itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::GetUseImageDirection ( ) const
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 On.

◆ New()

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

New macro for creation of through a Smart Pointer

◆ PrintSelf()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

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 On.

Reimplemented from itk::Object.

◆ SetDerivativeWeights()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, 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 TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::SetInputImage ( const TImageType *  inputData)
overridevirtual

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

Reimplemented from itk::ImageFunction< TImageType, NumericTraits< TImageType ::PixelType >::RealType, TCoordRep >.

◆ SetInterpolationWeights()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, 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

◆ SetNumberOfWorkUnits()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::SetNumberOfWorkUnits ( ThreadIdType  numThreads)

◆ SetSplineOrder()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, 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 TCoordRep = double, typename TCoefficientType = double>
virtual void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, 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 On.

◆ UseImageDirectionOff()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::UseImageDirectionOff ( )
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 On.

◆ UseImageDirectionOn()

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
virtual void itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::UseImageDirectionOn ( )
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 On.

Member Data Documentation

◆ ImageDimension

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
constexpr unsigned int itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::ImageDimension = Superclass::ImageDimension
staticconstexpr

Dimension underlying input image.

Definition at line 106 of file itkBSplineInterpolateImageFunction.h.

◆ m_CIterator

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
Iterator itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_CIterator
private

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 On.

Definition at line 387 of file itkBSplineInterpolateImageFunction.h.

◆ m_CoefficientFilter

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
CoefficientFilterPointer itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_CoefficientFilter
private

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 On.

Definition at line 399 of file itkBSplineInterpolateImageFunction.h.

◆ m_Coefficients

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
CoefficientImageType::ConstPointer itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_Coefficients
protected

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 On.

Definition at line 354 of file itkBSplineInterpolateImageFunction.h.

◆ m_DataLength

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
TImageType::SizeType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_DataLength
protected

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 On.

Definition at line 349 of file itkBSplineInterpolateImageFunction.h.

◆ m_MaxNumberInterpolationPoints

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
unsigned long itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_MaxNumberInterpolationPoints
private

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 On.

Definition at line 390 of file itkBSplineInterpolateImageFunction.h.

◆ m_NumberOfWorkUnits

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
ThreadIdType itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_NumberOfWorkUnits
private

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 On.

Definition at line 405 of file itkBSplineInterpolateImageFunction.h.

◆ m_PointsToIndex

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
std::vector<IndexType> itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_PointsToIndex
private

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 On.

Definition at line 394 of file itkBSplineInterpolateImageFunction.h.

◆ m_Scratch

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
std::vector<CoefficientDataType> itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_Scratch
protected

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 On.

Definition at line 347 of file itkBSplineInterpolateImageFunction.h.

◆ m_SplineOrder

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
unsigned int itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_SplineOrder
protected

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 On.

Definition at line 351 of file itkBSplineInterpolateImageFunction.h.

◆ m_ThreadedEvaluateIndex

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
vnl_matrix<long>* itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_ThreadedEvaluateIndex
private

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 On.

Definition at line 406 of file itkBSplineInterpolateImageFunction.h.

◆ m_ThreadedWeights

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
vnl_matrix<double>* itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_ThreadedWeights
private

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 On.

Definition at line 407 of file itkBSplineInterpolateImageFunction.h.

◆ m_ThreadedWeightsDerivative

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
vnl_matrix<double>* itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_ThreadedWeightsDerivative
private

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 On.

Definition at line 408 of file itkBSplineInterpolateImageFunction.h.

◆ m_UseImageDirection

template<typename TImageType, typename TCoordRep = double, typename TCoefficientType = double>
bool itk::BSplineInterpolateImageFunction< TImageType, TCoordRep, TCoefficientType >::m_UseImageDirection
private

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 On.

Definition at line 403 of file itkBSplineInterpolateImageFunction.h.


The documentation for this class was generated from the following file: