template<class TImageType, class TCoordRep = double, class 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
- Wiki Examples:
Definition at line 84 of file itkBSplineInterpolateImageFunction.h.
|
typedef TCoefficientType | CoefficientDataType |
|
typedef
BSplineDecompositionImageFilter
< TImageType,
CoefficientImageType > | CoefficientFilter |
|
typedef CoefficientFilter::Pointer | CoefficientFilterPointer |
|
typedef Image
< CoefficientDataType,
itkGetStaticConstMacro(ImageDimension) > | CoefficientImageType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef
Superclass::ContinuousIndexType | ContinuousIndexType |
|
typedef CovariantVector
< OutputType,
itkGetStaticConstMacro(ImageDimension) > | CovariantVectorType |
|
typedef Superclass::IndexType | IndexType |
|
typedef Superclass::InputImageType | InputImageType |
|
typedef
ImageLinearIteratorWithIndex
< TImageType > | Iterator |
|
typedef Superclass::OutputType | OutputType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Superclass::PointType | PointType |
|
typedef
BSplineInterpolateImageFunction | Self |
|
typedef
InterpolateImageFunction
< TImageType, TCoordRep > | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef
Superclass::ContinuousIndexType | ContinuousIndexType |
|
typedef Superclass::IndexType | IndexType |
|
typedef Superclass::IndexValueType | IndexValueType |
|
typedef Superclass::InputImageType | InputImageType |
|
typedef Superclass::OutputType | OutputType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Superclass::PointType | PointType |
|
typedef NumericTraits
< typename
TImageType::PixelType >
::RealType | RealType |
|
typedef InterpolateImageFunction | Self |
|
typedef ImageFunction
< TImageType, typename
NumericTraits< typename
TImageType::PixelType >
::RealType, TCoordRep > | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef ContinuousIndex
< TCoordRep,
itkGetStaticConstMacro(ImageDimension) > | ContinuousIndexType |
|
typedef TCoordRep | CoordRepType |
|
typedef InputImageType::IndexType | IndexType |
|
typedef
InputImageType::IndexValueType | IndexValueType |
|
typedef
InputImageType::ConstPointer | InputImageConstPointer |
|
typedef TImageType | InputImageType |
|
typedef InputImageType::PixelType | InputPixelType |
|
typedef NumericTraits
< TImageType::PixelType >
::RealType | OutputType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Point< TCoordRep,
itkGetStaticConstMacro(ImageDimension) > | PointType |
|
typedef ImageFunction | Self |
|
typedef FunctionBase< Point
< TCoordRep,
itkGetStaticConstMacro(ImageDimension) >
, NumericTraits
< TImageType::PixelType >
::RealType > | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef Point< TCoordRep,
TImageType::ImageDimension > | InputType |
|
typedef NumericTraits
< TImageType::PixelType >
::RealType | OutputType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef FunctionBase | Self |
|
typedef Object | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Object | Self |
|
typedef LightObject | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef SmartPointer< Self > | Pointer |
|
typedef LightObject | Self |
|
|
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
|
virtual OutputType | Evaluate (const PointType &point) const |
|
virtual OutputType | Evaluate (const PointType &point, ThreadIdType threadID) const |
|
virtual OutputType | EvaluateAtContinuousIndex (const ContinuousIndexType &index) const |
|
virtual OutputType | EvaluateAtContinuousIndex (const ContinuousIndexType &index, 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 &deriv, ThreadIdType threadID) const |
|
virtual const char * | GetNameOfClass () const |
|
virtual ThreadIdType | GetNumberOfThreads () const |
|
virtual int | GetSplineOrder () const |
|
virtual void | SetInputImage (const TImageType *inputData) |
|
void | SetNumberOfThreads (ThreadIdType numThreads) |
|
void | SetSplineOrder (unsigned int SplineOrder) |
|
|
virtual void | SetUseImageDirection (bool _arg) |
|
virtual bool | GetUseImageDirection () const |
|
virtual void | UseImageDirectionOn () |
|
virtual void | UseImageDirectionOff () |
|
virtual OutputType | Evaluate (const PointType &point) const |
|
virtual OutputType | EvaluateAtContinuousIndex (const ContinuousIndexType &index) const =0 |
|
virtual OutputType | EvaluateAtIndex (const IndexType &index) const |
|
void | ConvertContinuousIndexToNearestIndex (const ContinuousIndexType &cindex, IndexType &index) const |
|
void | ConvertPointToContinuousIndex (const PointType &point, ContinuousIndexType &cindex) const |
|
void | ConvertPointToNearestIndex (const PointType &point, IndexType &index) const |
|
virtual const ContinuousIndexType & | GetEndContinuousIndex () |
|
virtual const IndexType & | GetEndIndex () |
|
const InputImageType * | GetInputImage () const |
|
virtual const ContinuousIndexType & | GetStartContinuousIndex () |
|
virtual const IndexType & | GetStartIndex () |
|
virtual bool | IsInsideBuffer (const IndexType &index) const |
|
virtual bool | IsInsideBuffer (const ContinuousIndexType &index) const |
|
virtual bool | IsInsideBuffer (const PointType &point) const |
|
virtual OutputType | Evaluate (const InputType &input) const =0 |
|
unsigned long | AddObserver (const EventObject &event, Command *) |
|
unsigned long | AddObserver (const EventObject &event, Command *) const |
|
virtual void | DebugOff () const |
|
virtual void | DebugOn () const |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary (void) |
|
const MetaDataDictionary & | GetMetaDataDictionary (void) const |
|
virtual ModifiedTimeType | GetMTime () const |
|
virtual const TimeStamp & | GetTimeStamp () const |
|
bool | HasObserver (const EventObject &event) const |
|
void | InvokeEvent (const EventObject &) |
|
void | InvokeEvent (const EventObject &) const |
|
virtual void | Modified () const |
|
virtual void | Register () const |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) |
|
void | SetDebug (bool debugFlag) const |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
virtual void | SetReferenceCount (int) |
|
virtual void | UnRegister () const |
|
virtual void | Delete () |
|
virtual int | GetReferenceCount () const |
|
| itkCloneMacro (Self) |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
|
| BSplineInterpolateImageFunction () |
|
virtual OutputType | EvaluateAtContinuousIndexInternal (const ContinuousIndexType &index, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights) const |
|
virtual CovariantVectorType | EvaluateDerivativeAtContinuousIndexInternal (const ContinuousIndexType &x, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights, vnl_matrix< double > &weightsDerivative) const |
|
virtual void | EvaluateValueAndDerivativeAtContinuousIndexInternal (const ContinuousIndexType &x, OutputType &value, CovariantVectorType &derivativeValue, vnl_matrix< long > &evaluateIndex, vnl_matrix< double > &weights, vnl_matrix< double > &weightsDerivative) const |
|
void | PrintSelf (std::ostream &os, Indent indent) const |
|
| ~BSplineInterpolateImageFunction () |
|
| InterpolateImageFunction () |
|
void | PrintSelf (std::ostream &os, Indent indent) const |
|
| ~InterpolateImageFunction () |
|
| ImageFunction () |
|
| ~ImageFunction () |
|
| FunctionBase () |
|
| ~FunctionBase () |
|
| Object () |
|
bool | PrintObservers (std::ostream &os, Indent indent) const |
|
virtual void | SetTimeStamp (const TimeStamp &time) |
|
virtual | ~Object () |
|
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 () |
|
template<class TImageType, class TCoordRep = double, class TCoefficientType = double>
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.