28#ifndef itkBSplineInterpolateImageFunction_h
29#define itkBSplineInterpolateImageFunction_h
32#include "vnl/vnl_matrix.h"
68template <
typename TImageType,
typename TCoordinate =
double,
typename TCoefficientType =
double>
133 this->
GetInputImage()->template TransformPhysicalPointToContinuousIndex<TCoordinate>(
point);
143 this->
GetInputImage()->template TransformPhysicalPointToContinuousIndex<TCoordinate>(
point);
171 this->
GetInputImage()->template TransformPhysicalPointToContinuousIndex<TCoordinate>(
point);
181 this->
GetInputImage()->template TransformPhysicalPointToContinuousIndex<TCoordinate>(
point);
213 this->
GetInputImage()->template TransformPhysicalPointToContinuousIndex<TCoordinate>(
point);
226 this->
GetInputImage()->template TransformPhysicalPointToContinuousIndex<TCoordinate>(
point);
247 x, value, deriv, evaluateIndex, weights, weightsDerivative);
269 itkGetConstMacro(SplineOrder,
unsigned int);
290 itkSetMacro(UseImageDirection,
bool);
291 itkGetConstMacro(UseImageDirection,
bool);
292 itkBooleanMacro(UseImageDirection);
322 vnl_matrix<long> & evaluateIndex,
323 vnl_matrix<double> & weights)
const;
329 vnl_matrix<long> & evaluateIndex,
330 vnl_matrix<double> & weights,
331 vnl_matrix<double> & weightsDerivative)
const;
335 vnl_matrix<long> & evaluateIndex,
336 vnl_matrix<double> & weights,
337 vnl_matrix<double> & weightsDerivative)
const;
359 const vnl_matrix<long> & EvaluateIndex,
360 vnl_matrix<double> & weights,
361 unsigned int splineOrder)
const;
366 const vnl_matrix<long> & EvaluateIndex,
367 vnl_matrix<double> & weights,
368 unsigned int splineOrder)
const;
379 unsigned int splineOrder)
const;
411#ifndef ITK_MANUAL_INSTANTIATION
412# include "itkBSplineInterpolateImageFunction.hxx"
Calculates the B-Spline coefficients of an image. Spline order may be from 0 to 5.
SmartPointer< Self > Pointer
typename CoefficientFilter::Pointer CoefficientFilterPointer
typename InputImageType::SizeType SizeType
virtual CovariantVectorType EvaluateDerivativeAtContinuousIndexInternal(const ContinuousIndexType &x, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights, vnl_matrix< double > &weightsDerivative) const
CovariantVectorType EvaluateDerivativeAtContinuousIndex(const ContinuousIndexType &x) const
OutputType Evaluate(const PointType &point) const override
ThreadIdType m_NumberOfWorkUnits
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &x, ThreadIdType threadId) const
TImageType::SizeType m_DataLength
ImageLinearIteratorWithIndex< TImageType > Iterator
std::unique_ptr< vnl_matrix< double >[]> m_ThreadedWeightsDerivative
SizeType GetRadius() const override
CovariantVector< OutputType, Self::ImageDimension > CovariantVectorType
BSplineInterpolateImageFunction()
void EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType &x, OutputType &value, CovariantVectorType &derivativeValue, ThreadIdType threadId) const
SmartPointer< Self > Pointer
std::vector< IndexType > m_PointsToIndex
virtual void EvaluateValueAndDerivativeAtContinuousIndexInternal(const ContinuousIndexType &x, OutputType &value, CovariantVectorType &derivativeValue, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights, vnl_matrix< double > &weightsDerivative) const
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
void PrintSelf(std::ostream &os, Indent indent) const override
void DetermineRegionOfSupport(vnl_matrix< long > &evaluateIndex, const ContinuousIndexType &x, unsigned int splineOrder) const
virtual OutputType EvaluateAtContinuousIndexInternal(const ContinuousIndexType &x, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights) const
static constexpr unsigned int ImageDimension
std::vector< CoefficientDataType > m_Scratch
void SetInputImage(const TImageType *inputData) override
std::unique_ptr< vnl_matrix< double >[]> m_ThreadedWeights
void EvaluateValueAndDerivative(const PointType &point, OutputType &value, CovariantVectorType &deriv) const
void EvaluateValueAndDerivative(const PointType &point, OutputType &value, CovariantVectorType &deriv, ThreadIdType threadId) const
void SetSplineOrder(unsigned int SplineOrder)
CoefficientImageType::ConstPointer m_Coefficients
~BSplineInterpolateImageFunction() override=default
BSplineInterpolateImageFunction Self
CovariantVectorType EvaluateDerivative(const PointType &point) const
void SetDerivativeWeights(const ContinuousIndexType &x, const vnl_matrix< long > &EvaluateIndex, vnl_matrix< double > &weights, unsigned int splineOrder) const
BSplineDecompositionImageFilter< TImageType, CoefficientImageType > CoefficientFilter
TCoefficientType CoefficientDataType
void SetNumberOfWorkUnits(ThreadIdType numWorkUnits)
unsigned int m_SplineOrder
SmartPointer< const Self > ConstPointer
CovariantVectorType EvaluateDerivativeAtContinuousIndex(const ContinuousIndexType &x, ThreadIdType threadId) const
CoefficientFilterPointer m_CoefficientFilter
void ApplyMirrorBoundaryConditions(vnl_matrix< long > &evaluateIndex, unsigned int splineOrder) const
void GeneratePointsToIndex()
void EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
InterpolateImageFunction< TImageType, TCoordinate > Superclass
std::unique_ptr< vnl_matrix< long >[]> m_ThreadedEvaluateIndex
unsigned long m_MaxNumberInterpolationPoints
virtual OutputType Evaluate(const PointType &point, ThreadIdType threadId) const
CovariantVectorType EvaluateDerivative(const PointType &point, ThreadIdType threadId) const
Image< CoefficientDataType, Self::ImageDimension > CoefficientImageType
void SetInterpolationWeights(const ContinuousIndexType &x, const vnl_matrix< long > &EvaluateIndex, vnl_matrix< double > &weights, unsigned int splineOrder) const
A templated class holding a n-Dimensional covariant vector.
const InputImageType * GetInputImage() const
A multi-dimensional image iterator that visits image pixels within a region in a "scan-line" order.
Templated n-dimensional image class.
SmartPointer< const Self > ConstPointer
Control indentation during Print() invocation.
InterpolateImageFunction()=default
typename InputImageType::SizeType SizeType
typename InputImageType::IndexType IndexType
Point< TCoordinate, Self::ImageDimension > PointType
ContinuousIndex< TCoordinate, Self::ImageDimension > ContinuousIndexType
TImageType InputImageType
static constexpr unsigned int ImageDimension
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned int ThreadIdType
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents