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
BSplineInterpolateVectorImageFunction< TImage, TInterpolator > Class Template Reference

#include <itkBSplineInterpolateVectorImageFunction.h>

Detailed Description

template<typename TImage, typename TInterpolator>
class BSplineInterpolateVectorImageFunction< TImage, TInterpolator >

Helper class to interpolate each component of a VectorImage using separate B-Spline interpolators.

This class enables feature-wise interpolation of ITK VectorImages using one B-Spline interpolator per channel. It supports evaluation at arbitrary physical points and returns the interpolated values or spatial derivatives as Torch tensors for downstream use in workflows.

Author
V. Boussot, Univ. Rennes, INSERM, LTSI- UMR 1099, F-35000 Rennes, France
Note
This work was funded by the French National Research Agency as part of the VATSop project (ANR-20-CE19-0015).
If you use the Impact anywhere we would appreciate if you cite the following article:
V. Boussot et al., IMPACT: A Generic Semantic Loss for Multimodal Medical Image Registration, arXiv preprint arXiv:2503.24121 (2025). https://doi.org/10.48550/arXiv.2503.24121

Definition at line 43 of file itkBSplineInterpolateVectorImageFunction.h.

Public Types

using ImageType = TImage
using InterpolatorType = TInterpolator

Public Member Functions

 BSplineInterpolateVectorImageFunction ()=default
torch::Tensor Evaluate (typename ImageType::PointType point, std::vector< unsigned int > subsetOfFeatures) const
torch::Tensor EvaluateDerivative (typename ImageType::PointType point, std::vector< unsigned int > subsetOfFeatures) const
void SetInputImage (typename ImageType::Pointer vectorImage)

Private Attributes

std::vector< typename InterpolatorType::Pointer > m_Interpolators

Member Typedef Documentation

◆ ImageType

template<typename TImage, typename TInterpolator>
using BSplineInterpolateVectorImageFunction< TImage, TInterpolator >::ImageType = TImage

Definition at line 46 of file itkBSplineInterpolateVectorImageFunction.h.

◆ InterpolatorType

template<typename TImage, typename TInterpolator>
using BSplineInterpolateVectorImageFunction< TImage, TInterpolator >::InterpolatorType = TInterpolator

Definition at line 47 of file itkBSplineInterpolateVectorImageFunction.h.

Constructor & Destructor Documentation

◆ BSplineInterpolateVectorImageFunction()

template<typename TImage, typename TInterpolator>
BSplineInterpolateVectorImageFunction< TImage, TInterpolator >::BSplineInterpolateVectorImageFunction ( )
default

Member Function Documentation

◆ Evaluate()

template<typename TImage, typename TInterpolator>
torch::Tensor BSplineInterpolateVectorImageFunction< TImage, TInterpolator >::Evaluate ( typename ImageType::PointType point,
std::vector< unsigned int > subsetOfFeatures ) const

Interpolates the selected feature channels at a given physical point.

Parameters
pointThe physical coordinate where interpolation is performed.
subsetOfFeaturesIndices of feature channels to interpolate.
Returns
A 1D torch::Tensor containing interpolated values for the requested channels.

◆ EvaluateDerivative()

template<typename TImage, typename TInterpolator>
torch::Tensor BSplineInterpolateVectorImageFunction< TImage, TInterpolator >::EvaluateDerivative ( typename ImageType::PointType point,
std::vector< unsigned int > subsetOfFeatures ) const

Evaluates the spatial derivative of selected features at a given point.

Computes gradients of the selected feature channels with respect to spatial dimensions using the underlying B-Spline interpolators.

Parameters
pointThe physical coordinate at which derivatives are computed.
subsetOfFeaturesIndices of feature channels to differentiate.
Returns
A 2D torch::Tensor (Channels × SpatialDimension) with spatial gradients per feature.

◆ SetInputImage()

template<typename TImage, typename TInterpolator>
void BSplineInterpolateVectorImageFunction< TImage, TInterpolator >::SetInputImage ( typename ImageType::Pointer vectorImage)

Initializes one B-Spline interpolator per feature channel in the input VectorImage.

Each channel of the vector image is assigned a separate B-Spline interpolator, as ITK's BSplineInterpolateImageFunction does not natively support VectorImages.

Parameters
vectorImageThe input VectorImage to initialize the B-Spline interpolators for each channel.

Member Data Documentation

◆ m_Interpolators

template<typename TImage, typename TInterpolator>
std::vector<typename InterpolatorType::Pointer> BSplineInterpolateVectorImageFunction< TImage, TInterpolator >::m_Interpolators
private

Definition at line 89 of file itkBSplineInterpolateVectorImageFunction.h.



Generated on 1774142652 for elastix by doxygen 1.15.0 elastix logo