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 134 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 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 Superclass::FixedParametersType | FixedParametersType |
|
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 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< double, NDimensions, NDimensions > | Superclass |
|
typedef Superclass::TransformCategoryEnum | TransformCategoryEnum |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef Superclass::DerivativeType | DerivativeType |
|
typedef Superclass::FixedParametersType | FixedParametersType |
|
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< double, NInputDimensions, NOutputDimensions > | Superclass |
|
typedef Transform< double, NInputDimensions, NOutputDimensions > | TransformType |
|
typedef TransformType::ConstPointer | TransformTypeConstPointer |
|
typedef TransformType::Pointer | TransformTypePointer |
|
|
void | EvaluateJacobianWithImageGradientProduct (const InputPointType &ipp, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
|
virtual const char * | GetClassName () const |
|
void | GetJacobian (const InputPointType &ipp, JacobianType &j, NonZeroJacobianIndicesType &nzji) const override |
|
void | GetJacobianOfSpatialHessian (const InputPointType &ipp, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
|
void | GetJacobianOfSpatialHessian (const InputPointType &ipp, SpatialHessianType &sh, JacobianOfSpatialHessianType &jsh, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
|
void | GetJacobianOfSpatialJacobian (const InputPointType &ipp, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
|
void | GetJacobianOfSpatialJacobian (const InputPointType &ipp, SpatialJacobianType &sj, JacobianOfSpatialJacobianType &jsj, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const override |
|
unsigned int | GetNumberOfAffectedWeights (void) const override |
|
NumberOfParametersType | GetNumberOfNonZeroJacobianIndices (void) const override |
|
unsigned long | GetNumberOfWeights (void) const |
|
void | GetSpatialHessian (const InputPointType &ipp, SpatialHessianType &sh) const override |
|
void | GetSpatialJacobian (const InputPointType &ipp, SpatialJacobianType &sj) const override |
|
| itkStaticConstMacro (SpaceDimension, unsigned int, NDimensions) |
|
| itkStaticConstMacro (SplineOrder, unsigned int, VSplineOrder) |
|
void | SetGridRegion (const RegionType ®ion) override |
|
virtual void | TransformPoint (const InputPointType &inputPoint, OutputPointType &outputPoint, WeightsType &weights, ParameterIndexArrayType &indices, bool &inside) const |
|
OutputPointType | TransformPoint (const InputPointType &point) const override |
|
virtual const char * | GetClassName () const |
|
virtual const ImagePointer * | GetCoefficientImages (void) const |
|
const FixedParametersType & | GetFixedParameters (void) const override |
|
virtual DirectionType | GetGridDirection () const |
|
virtual OriginType | GetGridOrigin () const |
|
virtual RegionType | GetGridRegion () const |
|
virtual SpacingType | GetGridSpacing () const |
|
virtual unsigned int | GetNumberOfAffectedWeights (void) const=0 |
|
NumberOfParametersType | GetNumberOfNonZeroJacobianIndices (void) const override=0 |
|
NumberOfParametersType | GetNumberOfParameters (void) const override |
|
virtual NumberOfParametersType | GetNumberOfParametersPerDimension (void) const |
|
const ParametersType & | GetParameters (void) const override |
|
TransformCategoryEnum | GetTransformCategory (void) const override |
|
virtual const RegionType & | GetValidRegion () |
|
bool | IsLinear (void) const override |
|
| itkStaticConstMacro (SpaceDimension, unsigned int, NDimensions) |
|
virtual void | SetCoefficientImages (ImagePointer images[]) |
|
void | SetFixedParameters (const FixedParametersType ¶meters) override |
|
virtual void | SetGridDirection (const DirectionType &direction) |
|
virtual void | SetGridOrigin (const OriginType &origin) |
|
virtual void | SetGridRegion (const RegionType ®ion)=0 |
|
virtual void | SetGridSpacing (const SpacingType &spacing) |
|
void | SetIdentity (void) |
|
void | SetParameters (const ParametersType ¶meters) override |
|
void | SetParametersByValue (const ParametersType ¶meters) override |
|
OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &) const override |
|
OutputVectorType | TransformVector (const InputVectorType &) const override |
|
OutputVnlVectorType | TransformVector (const InputVnlVectorType &) const override |
|
void | ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const override |
|
virtual void | EvaluateJacobianWithImageGradientProduct (const InputPointType &ipp, const MovingImageGradientType &movingImageGradient, DerivativeType &imageJacobian, NonZeroJacobianIndicesType &nonZeroJacobianIndices) const |
|
virtual const char * | GetClassName () 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 NumberOfParametersType | GetNumberOfNonZeroJacobianIndices (void) const |
|
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) |
|