ITK
4.6.0
Insight Segmentation and Registration Toolkit
|
#include <itkBSplineBaseTransform.h>
A base class with common elements of BSplineTransform and BSplineDeformableTransform.
Definition at line 35 of file itkBSplineBaseTransform.h.
Static Public Attributes | |
static const unsigned int | SpaceDimension = NDimensions |
static const unsigned int | SplineOrder = VSplineOrder |
Static Public Attributes inherited from itk::Transform< TScalar, NDimensions, NDimensions > | |
static const unsigned int | InputSpaceDimension |
static const unsigned int | OutputSpaceDimension |
Protected Attributes | |
CoefficientImageArray | m_CoefficientImages |
ParametersType | m_InternalParametersBuffer |
WeightsFunctionType::Pointer | m_WeightsFunction |
Protected Attributes inherited from itk::Transform< TScalar, NDimensions, NDimensions > | |
DirectionChangeMatrix | m_DirectionChange |
ParametersType | m_FixedParameters |
ParametersType | m_Parameters |
Protected Attributes inherited from itk::LightObject | |
InternalReferenceCountType | m_ReferenceCount |
SimpleFastMutexLock | m_ReferenceCountLock |
Private Member Functions | |
CoefficientImageArray | ArrayOfImagePointerGeneratorHelper () const |
BSplineBaseTransform (const Self &) | |
void | operator= (const Self &) |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Protected Types inherited from itk::LightObject | |
typedef int | InternalReferenceCountType |
typedef FixedArray<ImagePointer, NDimensions> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::CoefficientImageArray |
Definition at line 175 of file itkBSplineBaseTransform.h.
typedef SmartPointer<const Self> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ConstPointer |
Definition at line 43 of file itkBSplineBaseTransform.h.
typedef WeightsFunctionType::ContinuousIndexType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ContinuousIndexType |
Definition at line 228 of file itkBSplineBaseTransform.h.
typedef Superclass::DerivativeType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::DerivativeType |
Definition at line 196 of file itkBSplineBaseTransform.h.
typedef ImageType::DirectionType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::DirectionType |
Definition at line 216 of file itkBSplineBaseTransform.h.
typedef ImageType::Pointer itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ImagePointer |
Definition at line 174 of file itkBSplineBaseTransform.h.
typedef Image<ParametersValueType, itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ImageType |
Definition at line 173 of file itkBSplineBaseTransform.h.
typedef RegionType::IndexType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::IndexType |
Definition at line 213 of file itkBSplineBaseTransform.h.
typedef CovariantVector<TScalar, itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::InputCovariantVectorType |
Standard covariant vector type for this class.
Definition at line 78 of file itkBSplineBaseTransform.h.
typedef Point<TScalar, itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::InputPointType |
Standard coordinate point type for this class.
Definition at line 87 of file itkBSplineBaseTransform.h.
typedef Vector<TScalar, itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::InputVectorType |
Standard vector type for this class.
Definition at line 73 of file itkBSplineBaseTransform.h.
typedef vnl_vector_fixed<TScalar, SpaceDimension> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::InputVnlVectorType |
Standard vnl_vector type for this class.
Definition at line 83 of file itkBSplineBaseTransform.h.
typedef Superclass::JacobianType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::JacobianType |
Standard Jacobian container.
Definition at line 64 of file itkBSplineBaseTransform.h.
typedef SizeType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::MeshSizeType |
Definition at line 304 of file itkBSplineBaseTransform.h.
typedef Superclass::NumberOfParametersType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::NumberOfParametersType |
The number of parameters defininig this transform.
Definition at line 70 of file itkBSplineBaseTransform.h.
typedef ImageType::PointType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::OriginType |
Definition at line 217 of file itkBSplineBaseTransform.h.
typedef CovariantVector<TScalar, itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::OutputCovariantVectorType |
Standard covariant vector type for this class.
Definition at line 79 of file itkBSplineBaseTransform.h.
typedef Point<TScalar, itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::OutputPointType |
Standard coordinate point type for this class.
Definition at line 88 of file itkBSplineBaseTransform.h.
typedef Vector<TScalar, itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::OutputVectorType |
Standard vector type for this class.
Definition at line 74 of file itkBSplineBaseTransform.h.
typedef vnl_vector_fixed<TScalar, SpaceDimension> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::OutputVnlVectorType |
Definition at line 84 of file itkBSplineBaseTransform.h.
typedef Array<unsigned long> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ParameterIndexArrayType |
Parameter index array type.
Definition at line 231 of file itkBSplineBaseTransform.h.
typedef Superclass::ParametersType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ParametersType |
Standard parameters container.
Definition at line 61 of file itkBSplineBaseTransform.h.
typedef ParametersType::ValueType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ParametersValueType |
Parameters as SpaceDimension number of images.
Definition at line 172 of file itkBSplineBaseTransform.h.
typedef ImageType::SpacingType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::PhysicalDimensionsType |
Definition at line 301 of file itkBSplineBaseTransform.h.
typedef ImageType::PixelType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::PixelType |
Definition at line 302 of file itkBSplineBaseTransform.h.
typedef SmartPointer<Self> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::Pointer |
Definition at line 42 of file itkBSplineBaseTransform.h.
typedef ImageRegion<itkGetStaticConstMacro( SpaceDimension )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::RegionType |
Typedefs for specifying the extent of the grid.
Definition at line 211 of file itkBSplineBaseTransform.h.
typedef Superclass::ScalarType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ScalarType |
Standard scalar type for this class.
Definition at line 58 of file itkBSplineBaseTransform.h.
typedef BSplineBaseTransform itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::Self |
Standard class typedefs.
Definition at line 40 of file itkBSplineBaseTransform.h.
typedef RegionType::SizeType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::SizeType |
Definition at line 214 of file itkBSplineBaseTransform.h.
typedef ImageType::SpacingType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::SpacingType |
Definition at line 215 of file itkBSplineBaseTransform.h.
typedef Transform<TScalar, NDimensions, NDimensions> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::Superclass |
Definition at line 41 of file itkBSplineBaseTransform.h.
typedef Superclass::TransformCategoryType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::TransformCategoryType |
Transform category type.
Definition at line 67 of file itkBSplineBaseTransform.h.
typedef BSplineInterpolationWeightFunction<ScalarType, itkGetStaticConstMacro( SpaceDimension ), itkGetStaticConstMacro( SplineOrder )> itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::WeightsFunctionType |
Interpolation weights function type.
Definition at line 225 of file itkBSplineBaseTransform.h.
typedef WeightsFunctionType::WeightsType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::WeightsType |
Definition at line 227 of file itkBSplineBaseTransform.h.
|
protected |
|
protectedvirtual |
|
private |
|
private |
void itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ComputeJacobianFromBSplineWeightsWithRespectToPosition | ( | const InputPointType & | , |
WeightsType & | , | ||
ParameterIndexArrayType & | |||
) | const |
Get Jacobian at a point. A very specialized function just for BSplines
|
pure virtual |
|
inlinevirtual |
Definition at line 282 of file itkBSplineBaseTransform.h.
References itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::GetNameOfClass().
|
inline |
Get the array of coefficient images.
Definition at line 191 of file itkBSplineBaseTransform.h.
References itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::m_CoefficientImages.
|
virtual |
Get the Transformation Fixed Parameters.
Reimplemented from itk::Transform< TScalar, NDimensions, NDimensions >.
|
protectedvirtual |
Get/Set to allow subclasses to access and manipulate the weights function.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::Transform< TScalar, NDimensions, NDimensions >.
Reimplemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
Referenced by itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::ComputeJacobianWithRespectToPosition().
unsigned int itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::GetNumberOfAffectedWeights | ( | ) | const |
|
inlinevirtual |
Return the number of local parameters
Reimplemented from itk::Transform< TScalar, NDimensions, NDimensions >.
Definition at line 307 of file itkBSplineBaseTransform.h.
References itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::GetNumberOfParameters().
|
pure virtual |
Return the number of parameters that completely define the Transfom
Reimplemented from itk::Transform< TScalar, NDimensions, NDimensions >.
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
Referenced by itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::GetNumberOfLocalParameters().
|
pure virtual |
Return the number of parameters per dimension
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
inline |
Get number of weights.
Definition at line 245 of file itkBSplineBaseTransform.h.
References itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::m_WeightsFunction.
|
virtual |
Get the Transformation Parameters.
Reimplemented from itk::Transform< TScalar, NDimensions, NDimensions >.
|
inlinevirtual |
Indicates the category transform. e.g. an affine transform, or a local one, e.g. a deformation field.
Reimplemented from itk::Transform< TScalar, NDimensions, NDimensions >.
Definition at line 294 of file itkBSplineBaseTransform.h.
References itk::TransformBaseTemplate< TScalar >::BSpline.
|
protectedvirtual |
Get/Set to allow subclasses to access and manipulate the weights function.
|
protectedpure virtual |
Check if a continuous index is inside the valid region.
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::itkCloneMacro | ( | Self | ) |
implement type-specific clone method
|
private |
|
protectedvirtual |
Print contents of an BSplineBaseTransform.
Reimplemented from itk::Object.
Reimplemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
protectedpure virtual |
Construct control point grid size from transform domain information
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
pure virtual |
Set the array of coefficient images.
This is an alternative API for setting the BSpline coefficients as an array of SpaceDimension images. The fixed parameters are taken from the first image. It is assumed that the buffered region of all the subsequent images are the same as the first image. Note that no error checking is done.
Warning: use either the SetParameters() or SetCoefficientImages() API. Mixing the two modes may results in unexpected results.
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
pure virtual |
This method sets the fixed parameters of the transform. For a BSpline deformation transform, the fixed parameters are the following: grid size, grid origin, grid spacing, and grid direction. However, all of these are set via the much more intuitive SetTransformDomainXXX() functions
The fixed parameters are the three times the size of the templated dimensions. This function has the effect of make the following non- existing functional calls: transform->SetGridSpacing( spacing ); transform->SetGridOrigin( origin ); transform->SetGridDirection( direction ); transform->SetGridRegion( bsplineRegion );
With recent updates to this transform, however, all these parameters are set indirectly by setting the transform domain parameters unless the user sets them with SetFixedParameters().
This function was added to allow the transform to work with the itkTransformReader/Writer I/O filters.
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
protected |
Construct control point grid from transform domain information
|
protectedpure virtual |
Construct control point grid direction from transform domain information
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
protectedpure virtual |
Construct control point grid origin from transform domain information
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
protectedpure virtual |
Construct control point grid size from transform domain information
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
protectedpure virtual |
Construct control point grid spacing from transform domain information
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
void itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::SetIdentity | ( | ) |
This method can ONLY be invoked AFTER calling SetParameters(). This restriction is due to the fact that the BSplineBaseTransform does not copy the array of parameters internally, instead it keeps a pointer to the user-provided array of parameters. This method is also in violation of the const-correctness of the parameters since the parameter array has been passed to the transform on a 'const' basis but the values get modified when the user invokes SetIdentity().
void itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::SetParameters | ( | const ParametersType & | parameters | ) |
This method sets the parameters of the transform. For a BSpline deformation transform, the parameters are the BSpline coefficients on a sparse grid.
The parameters are N number of N-D grid of coefficients. Each N-D grid is represented as a flat array of scalars (in the same configuration as an itk::Image). The N arrays are then concatenated to form one parameter array.
For efficiency, this transform does not make a copy of the parameters. It only keeps a pointer to the input parameters. It assumes that the memory is managed by the caller. Use SetParametersByValue to force the transform to call copy the parameters.
This method wraps each grid as itk::Image's using the user specified fixed parameters. NOTE: The transform domain must be set first.
void itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::SetParametersByValue | ( | const ParametersType & | parameters | ) |
This method sets the parameters of the transform. For a BSpline deformation transform, the parameters are the BSpline coefficients on a sparse grid.
The parameters are N number of N-D grid of coefficients. Each N-D grid is represented as a flat array of doubles (in the same configuration as an itk::Image). The N arrays are then concatenated to form one parameter array.
This methods makes a copy of the parameters while for efficiency the SetParameters method does not.
This method wraps each grid as itk::Image's using the user specified fixed parameters. NOTE: The fixed parameters must be set first.
|
protectedvirtual |
Get/Set to allow subclasses to access and manipulate the weights function.
|
inlinevirtual |
Definition at line 269 of file itkBSplineBaseTransform.h.
OutputPointType itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::TransformPoint | ( | const InputPointType & | point | ) | const |
Transform points by a BSpline deformable transformation.
|
pure virtual |
Transform points by a BSpline deformable transformation. On return, weights contains the interpolation weights used to compute the deformation and indices of the x (zeroth) dimension coefficient parameters in the support region used to compute the deformation. Parameter indices for the i-th dimension can be obtained by adding ( i * this->GetNumberOfParametersPerDimension() ) to the indices array.
Implemented in itk::BSplineDeformableTransform< TScalar, NDimensions, VSplineOrder >, and itk::BSplineTransform< TScalar, NDimensions, VSplineOrder >.
|
inlinevirtual |
Definition at line 253 of file itkBSplineBaseTransform.h.
|
inlinevirtual |
Method to transform a vnl_vector - not applicable for this type of transform
Definition at line 261 of file itkBSplineBaseTransform.h.
|
virtual |
Update the transform's parameters by the adding values in update
to current parameter values. We assume update
is of the same length as Parameters. Throw exception otherwise. factor
is a scalar multiplier for each value in update. SetParameters is called at the end of this method, to allow transforms to perform any required operations on the update parameters, typically a converion to member variables for use in TransformPoint. Derived classes should override to provide specialized behavior.
|
protected |
Wrap flat array into images of coefficients.
|
protected |
Array of images representing the B-spline coefficients in each dimension wrapped from the flat parameters in m_InternalParametersBuffer
Definition at line 363 of file itkBSplineBaseTransform.h.
Referenced by itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::GetCoefficientImages().
|
protected |
Internal parameters buffer.
Definition at line 366 of file itkBSplineBaseTransform.h.
|
protected |
Pointer to function used to compute Bspline interpolation weights.
Definition at line 369 of file itkBSplineBaseTransform.h.
Referenced by itk::BSplineBaseTransform< TScalar, NDimensions, VSplineOrder >::GetNumberOfWeights().
|
static |
Dimension of the domain space.
Definition at line 49 of file itkBSplineBaseTransform.h.
|
static |
The BSpline order.
Definition at line 52 of file itkBSplineBaseTransform.h.