template<class TScalarType = double, unsigned int NDimensions = 3, unsigned int VSplineOrder = 3>
class itk::AdvancedBSplineDeformableTransform< TScalarType, NDimensions, VSplineOrder >
Deformable transform using a B-spline representation.
This class encapsulates a deformable transform of points from one N-dimensional one space to another N-dimensional space. The deformation field is modeled using B-splines. A deformation is defined on a sparse regular grid of control points
and is varied by defining a deformation
of each control point. The deformation
at any point
is obtained by using a B-spline interpolation kernel.
The deformation field grid is defined by a user specified GridRegion, GridSpacing and GridOrigin. Each grid/control point has associated with it N deformation coefficients
, representing the N directional components of the deformation. Deformation outside the grid plus support region for the B-spline interpolation is assumed to be zero.
Additionally, the user can specified an addition bulk transform
such that the transformed point is given by:
The parameters for this transform is N x N-D grid of spline coefficients. The user specifies the parameters as one flat array: each N-D grid is represented by an array in the same way an N-D image is represented in the buffer; the N arrays are then concatentated together on form a single array.
For efficiency, this transform does not make a copy of the parameters. It only keeps a pointer to the input parameters and assumes that the memory is managed by the caller.
The following illustrates the typical usage of this class:
* typedef AdvancedBSplineDeformableTransform<double,2,3> TransformType;
* TransformType::Pointer transform = TransformType::New();
*
* transform->SetGridRegion( region );
* transform->SetGridSpacing( spacing );
* transform->SetGridOrigin( origin );
*
* // NB: the region must be set first before setting the parameters
*
* TransformType::ParametersType parameters(
* transform->GetNumberOfParameters() );
*
* // Fill the parameters with values
*
* transform->SetParameters( parameters )
*
* outputPoint = transform->TransformPoint( inputPoint );
*
*
An alternative way to set the B-spline coefficients is via array of images. The grid region, spacing and origin information is taken directly from the first image. It is assumed that the subsequent images are the same buffered region. The following illustrates the API:
*
* TransformType::ImageConstPointer images[2];
*
* // Fill the images up with values
*
* transform->SetCoefficientImages( images );
* outputPoint = transform->TransformPoint( inputPoint );
*
*
Warning: use either the SetParameters() or SetCoefficientImages() API. Mixing the two modes may results in unexpected results.
The class is templated coordinate representation type (float or double), the space dimension and the spline order.
Definition at line 133 of file itkAdvancedBSplineDeformableTransform.h.
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef WeightsFunctionType::ContinuousIndexType | ContinuousIndexType |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef DerivativeWeightsFunctionType::Pointer | DerivativeWeightsFunctionPointer |
|
typedef BSplineInterpolationDerivativeWeightFunction< ScalarType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SplineOrder) > | DerivativeWeightsFunctionType |
|
typedef Superclass::DirectionType | DirectionType |
|
typedef Superclass::GridOffsetType | GridOffsetType |
|
typedef Superclass::ImagePointer | ImagePointer |
|
typedef Superclass::ImageType | ImageType |
|
typedef Superclass::IndexType | IndexType |
|
typedef Superclass::InputCovariantVectorType | InputCovariantVectorType |
|
typedef Superclass::InputPointType | InputPointType |
|
typedef Superclass::InputVectorType | InputVectorType |
|
typedef Superclass::InputVnlVectorType | InputVnlVectorType |
|
typedef Superclass::InternalMatrixType | InternalMatrixType |
|
typedef Superclass::JacobianOfSpatialHessianType | JacobianOfSpatialHessianType |
|
typedef Superclass::JacobianOfSpatialJacobianType | JacobianOfSpatialJacobianType |
|
typedef Superclass::JacobianType | JacobianType |
|
typedef Superclass::MovingImageGradientType | MovingImageGradientType |
|
typedef Superclass::MovingImageGradientValueType | MovingImageGradientValueType |
|
typedef Superclass::NonZeroJacobianIndicesType | NonZeroJacobianIndicesType |
|
typedef Superclass::NumberOfParametersType | NumberOfParametersType |
|
typedef Superclass::OriginType | OriginType |
|
typedef Superclass::OutputCovariantVectorType | OutputCovariantVectorType |
|
typedef Superclass::OutputPointType | OutputPointType |
|
typedef Superclass::OutputVectorType | OutputVectorType |
|
typedef Superclass::OutputVnlVectorType | OutputVnlVectorType |
|
typedef Superclass::ParameterIndexArrayType | ParameterIndexArrayType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef Superclass::ParametersValueType | ParametersValueType |
|
typedef Superclass::PixelType | PixelType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Superclass::RegionType | RegionType |
|
typedef Superclass::ScalarType | ScalarType |
|
typedef AdvancedBSplineDeformableTransform | Self |
|
typedef Superclass::SizeType | SizeType |
|
typedef SODerivativeWeightsFunctionType::Pointer | SODerivativeWeightsFunctionPointer |
|
typedef BSplineInterpolationSecondOrderDerivativeWeightFunction< ScalarType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SplineOrder) > | SODerivativeWeightsFunctionType |
|
typedef Superclass::SpacingType | SpacingType |
|
typedef Superclass::SpatialHessianType | SpatialHessianType |
|
typedef Superclass::SpatialJacobianType | SpatialJacobianType |
|
typedef AdvancedBSplineDeformableTransformBase< TScalarType, NDimensions > | Superclass |
|
typedef WeightsFunctionType::Pointer | WeightsFunctionPointer |
|
typedef BSplineInterpolationWeightFunction2< ScalarType, itkGetStaticConstMacro(SpaceDimension), itkGetStaticConstMacro(SplineOrder) > | WeightsFunctionType |
|
typedef WeightsFunctionType::WeightsType | WeightsType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef ContinuousIndex< ScalarType, SpaceDimension > | ContinuousIndexType |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef ImageType::DirectionType | DirectionType |
|
typedef IndexType | GridOffsetType |
|
typedef ImageType::Pointer | ImagePointer |
|
typedef Image< PixelType, itkGetStaticConstMacro(SpaceDimension) > | ImageType |
|
typedef RegionType::IndexType | IndexType |
|
typedef Superclass::InputCovariantVectorType | InputCovariantVectorType |
|
typedef Superclass::InputPointType | InputPointType |
|
typedef Superclass::InputVectorType | InputVectorType |
|
typedef Superclass::InputVnlVectorType | InputVnlVectorType |
|
typedef Superclass::InternalMatrixType | InternalMatrixType |
|
typedef Superclass::JacobianOfSpatialHessianType | JacobianOfSpatialHessianType |
|
typedef Superclass::JacobianOfSpatialJacobianType | JacobianOfSpatialJacobianType |
|
typedef Superclass::JacobianType | JacobianType |
|
typedef Superclass::MovingImageGradientType | MovingImageGradientType |
|
typedef Superclass::MovingImageGradientValueType | MovingImageGradientValueType |
|
typedef Superclass::NonZeroJacobianIndicesType | NonZeroJacobianIndicesType |
|
typedef Superclass::NumberOfParametersType | NumberOfParametersType |
|
typedef ImageType::PointType | OriginType |
|
typedef Superclass::OutputCovariantVectorType | OutputCovariantVectorType |
|
typedef Superclass::OutputPointType | OutputPointType |
|
typedef Superclass::OutputVectorType | OutputVectorType |
|
typedef Superclass::OutputVnlVectorType | OutputVnlVectorType |
|
typedef Array< unsigned long > | ParameterIndexArrayType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef Superclass::ParametersValueType | ParametersValueType |
|
typedef ParametersType::ValueType | PixelType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef ImageRegion< itkGetStaticConstMacro(SpaceDimension) > | RegionType |
|
typedef Superclass::ScalarType | ScalarType |
|
typedef AdvancedBSplineDeformableTransformBase | Self |
|
typedef RegionType::SizeType | SizeType |
|
typedef ImageType::SpacingType | SpacingType |
|
typedef Superclass::SpatialHessianType | SpatialHessianType |
|
typedef Superclass::SpatialJacobianType | SpatialJacobianType |
|
typedef AdvancedTransform< TScalarType, NDimensions, NDimensions > | Superclass |
|
typedef Superclass::TransformCategoryType | TransformCategoryType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef Superclass::InputCovariantVectorType | InputCovariantVectorType |
|
typedef Superclass::InputPointType | InputPointType |
|
typedef Superclass::InputVectorType | InputVectorType |
|
typedef Superclass::InputVnlVectorType | InputVnlVectorType |
|
typedef SpatialJacobianType::InternalMatrixType | InternalMatrixType |
|
typedef Superclass::InverseTransformBasePointer | InverseTransformBasePointer |
|
typedef Superclass::InverseTransformBaseType | InverseTransformBaseType |
|
typedef std::vector< SpatialHessianType > | JacobianOfSpatialHessianType |
|
typedef std::vector< SpatialJacobianType > | JacobianOfSpatialJacobianType |
|
typedef Superclass::JacobianType | JacobianType |
|
typedef OutputCovariantVectorType | MovingImageGradientType |
|
typedef MovingImageGradientType::ValueType | MovingImageGradientValueType |
|
typedef std::vector< unsigned long > | NonZeroJacobianIndicesType |
|
typedef Superclass::NumberOfParametersType | NumberOfParametersType |
|
typedef Superclass::OutputCovariantVectorType | OutputCovariantVectorType |
|
typedef Superclass::OutputPointType | OutputPointType |
|
typedef Superclass::OutputVectorType | OutputVectorType |
|
typedef Superclass::OutputVnlVectorType | OutputVnlVectorType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef Superclass::ParametersValueType | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Superclass::ScalarType | ScalarType |
|
typedef AdvancedTransform | Self |
|
typedef FixedArray< Matrix< ScalarType, InputSpaceDimension, InputSpaceDimension >, OutputSpaceDimension > | SpatialHessianType |
|
typedef Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > | SpatialJacobianType |
|
typedef Transform< TScalarType, NInputDimensions, NOutputDimensions > | Superclass |
|
typedef Transform< TScalarType, NInputDimensions, NOutputDimensions > | TransformType |
|
typedef TransformType::ConstPointer | TransformTypeConstPointer |
|
typedef TransformType::Pointer | TransformTypePointer |
|
|
virtual void | EvaluateJacobianWithImageGradientProduct (const InputPointType &ipp, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const |
|
virtual const char * | GetClassName () const |
|
virtual void | GetJacobian (const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nzji) const |
|
virtual void | GetJacobianOfSpatialHessian (const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const |
|
virtual void | GetJacobianOfSpatialHessian (const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const |
|
virtual void | GetJacobianOfSpatialJacobian (const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const |
|
virtual void | GetJacobianOfSpatialJacobian (const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const |
|
unsigned int | GetNumberOfAffectedWeights (void) const |
|
virtual NumberOfParametersType | GetNumberOfNonZeroJacobianIndices (void) const |
|
unsigned long | GetNumberOfWeights (void) const |
|
virtual void | GetSpatialHessian (const InputPointType &ipp, SpatialHessianType &sh) const |
|
virtual void | GetSpatialJacobian (const InputPointType &ipp, SpatialJacobianType &sj) const |
|
| itkStaticConstMacro (SpaceDimension, unsigned int, NDimensions) |
|
| itkStaticConstMacro (SplineOrder, unsigned int, VSplineOrder) |
|
virtual void | SetGridRegion (const RegionType ®ion) |
|
OutputPointType | TransformPoint (const InputPointType &point) const |
|
virtual void | TransformPoint (const InputPointType &inputPoint, OutputPointType &outputPoint, WeightsType &weights, ParameterIndexArrayType &indices, bool &inside) const |
|
virtual const ImagePointer * | GetCoefficientImages (void) const |
|
virtual const ParametersType & | GetFixedParameters (void) const |
|
virtual DirectionType | GetGridDirection () const |
|
virtual OriginType | GetGridOrigin () const |
|
virtual RegionType | GetGridRegion () const |
|
virtual SpacingType | GetGridSpacing () const |
|
virtual NumberOfParametersType | GetNumberOfParameters (void) const |
|
virtual NumberOfParametersType | GetNumberOfParametersPerDimension (void) const |
|
virtual const ParametersType & | GetParameters (void) const |
|
virtual TransformCategoryType | GetTransformCategory (void) const |
|
virtual const RegionType & | GetValidRegion () |
|
virtual bool | IsLinear (void) const |
|
| itkStaticConstMacro (SpaceDimension, unsigned int, NDimensions) |
|
virtual void | SetCoefficientImages (ImagePointer images[]) |
|
void | SetFixedParameters (const ParametersType ¶meters) |
|
virtual void | SetGridDirection (const DirectionType &direction) |
|
virtual void | SetGridOrigin (const OriginType &origin) |
|
virtual void | SetGridSpacing (const SpacingType &spacing) |
|
void | SetIdentity (void) |
|
void | SetParameters (const ParametersType ¶meters) |
|
void | SetParametersByValue (const ParametersType ¶meters) |
|
virtual OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &) const |
|
virtual OutputVectorType | TransformVector (const InputVectorType &) const |
|
virtual OutputVnlVectorType | TransformVector (const InputVnlVectorType &) const |
|
virtual void | ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const |
|
virtual void | ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianType &) const |
|
virtual void | EvaluateJacobianWithImageGradientProduct (const InputPointType &ipp, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const |
|
virtual bool | GetHasNonZeroJacobianOfSpatialHessian () const |
|
virtual bool | GetHasNonZeroSpatialHessian () const |
|
virtual void | GetJacobian (const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0 |
|
virtual void | GetJacobianOfSpatialHessian (const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0 |
|
virtual void | GetJacobianOfSpatialHessian (const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0 |
|
virtual void | GetJacobianOfSpatialJacobian (const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0 |
|
virtual void | GetJacobianOfSpatialJacobian (const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const =0 |
|
virtual void | GetSpatialHessian (const InputPointType &ipp, SpatialHessianType &sh) const =0 |
|
virtual void | GetSpatialJacobian (const InputPointType &ipp, SpatialJacobianType &sj) const =0 |
|
| itkStaticConstMacro (InputSpaceDimension, unsigned int, NInputDimensions) |
|
| itkStaticConstMacro (OutputSpaceDimension, unsigned int, NOutputDimensions) |
|