template<typename TParametersValueType, unsigned int VDimension>
class itk::DisplacementFieldTransform< TParametersValueType, VDimension >
Provides local/dense/high-dimensionality transformation via a a displacement field.
The displacement field stores vectors of displacements, with dimension VDimension
. Transformation is performed at a given point by adding the displacement at that point to the input point.
T(x, p), x is the position, p is the local parameter at position x. For a 2D example:
x = (x0, x1), p = (p0, p1)
then T(x, p) is defined as:
T(x, p) = (T0, T1) = (x0+p0, x1+p1)
During transformation, out-of-bounds input points are returned with zero displacement.
The displacement field is defined using an itkImage, and must be set before use by the user, using SetDisplacementField
. The image has the same dimensionality as the input and output spaces, defined by template parameter VDimension
, and is an image of vectors of type OutputVectorType
, with dimensionality VDimension as well.
An interpolator of type VectorInterpolateImageFunction
is used with the displacement field image. By default, VectorLinearInterpolateImageFunction is used, and the user can override using SetInterpolator.
The displacement field data is stored using the common OptimizerParameters
type in conjunction with the ImageVectorOptimizerParametersHelper
class. This allows access of the displacement field image as if it were an itkArray, allowing transparent use with other classes.
- Warning
- The
SetParameters
method will copy the passed parameters, which can be costly since displacement fields are dense and thus potentially very large.
The UpdateTransformParameters
method simply adds the provided update array, applying the usual optional scaling factor. Derived classes may provide different behavior.
Because this is a local transform, methods that have a version that takes a point must be used, such as TransformVector
, TransformCovariantVector
, and TransformDiffusionTensor
. Also, ComputeJacobianWithRespectToParameters
simply returns an identity matrix (see method documentation), and ComputeJacobianWithRespectToPosition
should be used.
- Examples
- Examples/RegistrationITKv4/DeformableRegistration10.cxx, Examples/RegistrationITKv4/DeformableRegistration16.cxx, Examples/RegistrationITKv4/DeformableRegistration17.cxx, Examples/RegistrationITKv4/DeformableRegistration2.cxx, Examples/RegistrationITKv4/DeformableRegistration3.cxx, Examples/RegistrationITKv4/DeformableRegistration5.cxx, Examples/RegistrationITKv4/DeformableRegistration9.cxx, and Examples/RegistrationITKv4/LandmarkWarping2.cxx.
Definition at line 87 of file itkDisplacementFieldTransform.h.
|
using | ConstPointer = SmartPointer< const Self > |
|
using | DirectionType = typename DisplacementFieldType::DirectionType |
|
using | DisplacementFieldConstPointer = typename DisplacementFieldType::ConstPointer |
|
using | DisplacementFieldPointer = typename DisplacementFieldType::Pointer |
|
using | DisplacementFieldType = Image< OutputVectorType, Dimension > |
|
using | IndexType = typename DisplacementFieldType::IndexType |
|
using | InputTensorEigenVectorType = CovariantVector< ScalarType, InputDiffusionTensor3DType::Dimension > |
|
using | InterpolatorType = VectorInterpolateImageFunction< DisplacementFieldType, ScalarType > |
|
using | OptimizerParametersHelperType = ImageVectorOptimizerParametersHelper< ScalarType, OutputVectorType::Dimension, Dimension > |
|
using | OutputTensorEigenVectorType = CovariantVector< ScalarType, OutputDiffusionTensor3DType::Dimension > |
|
using | PixelType = typename DisplacementFieldType::PixelType |
|
using | Pointer = SmartPointer< Self > |
|
using | PointType = typename DisplacementFieldType::PointType |
|
using | RegionType = typename DisplacementFieldType::RegionType |
|
using | Self = DisplacementFieldTransform |
|
using | SizeType = typename DisplacementFieldType::SizeType |
|
using | SpacingType = typename DisplacementFieldType::SpacingType |
|
using | Superclass = Transform< TParametersValueType, VDimension, VDimension > |
|
using | VectorImageDisplacementFieldType = VectorImage< TParametersValueType, Dimension > |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | DerivativeType = Array< ParametersValueType > |
|
using | DirectionChangeMatrix = Matrix< double, Self::OutputSpaceDimension, Self::InputSpaceDimension > |
|
using | InputCovariantVectorType = CovariantVector< TParametersValueType, VInputDimension > |
|
using | InputDiffusionTensor3DType = DiffusionTensor3D< TParametersValueType > |
|
using | InputDirectionMatrix = Matrix< double, Self::InputSpaceDimension, Self::InputSpaceDimension > |
|
using | InputPointType = Point< TParametersValueType, VInputDimension > |
|
using | InputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< TParametersValueType, VInputDimension > |
|
using | InputVectorPixelType = VariableLengthVector< TParametersValueType > |
|
using | InputVectorType = Vector< TParametersValueType, VInputDimension > |
|
using | InputVnlVectorType = vnl_vector_fixed< TParametersValueType, VInputDimension > |
|
using | InverseJacobianPositionType = vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension > |
|
using | InverseTransformBasePointer = typename InverseTransformBaseType::Pointer |
|
using | InverseTransformBaseType = Transform< TParametersValueType, VOutputDimension, VInputDimension > |
|
using | JacobianPositionType = vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > |
|
using | JacobianType = Array2D< ParametersValueType > |
|
using | MatrixType = Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension > |
|
using | OutputCovariantVectorType = CovariantVector< TParametersValueType, VOutputDimension > |
|
using | OutputDiffusionTensor3DType = DiffusionTensor3D< TParametersValueType > |
|
using | OutputDirectionMatrix = Matrix< double, Self::OutputSpaceDimension, Self::OutputSpaceDimension > |
|
using | OutputPointType = Point< TParametersValueType, VOutputDimension > |
|
using | OutputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< TParametersValueType, VOutputDimension > |
|
using | OutputVectorPixelType = VariableLengthVector< TParametersValueType > |
|
using | OutputVectorType = Vector< TParametersValueType, VOutputDimension > |
|
using | OutputVnlVectorType = vnl_vector_fixed< TParametersValueType, VOutputDimension > |
|
using | Pointer = SmartPointer< Self > |
|
using | ScalarType = ParametersValueType |
|
using | Self = Transform |
|
using | Superclass = TransformBaseTemplate< TParametersValueType > |
|
|
void | ComputeInverseJacobianWithRespectToPosition (const InputPointType &point, InverseJacobianPositionType &jacobian) const override |
|
virtual void | ComputeJacobianWithRespectToParameters (const IndexType &, JacobianType &j) const |
|
virtual void | ComputeJacobianWithRespectToPosition (const IndexType &index, JacobianPositionType &jacobian) const |
|
void | ComputeJacobianWithRespectToPosition (const InputPointType &point, JacobianPositionType &jacobian) const override |
|
virtual const ModifiedTimeType & | GetDisplacementFieldSetTime () const |
|
bool | GetInverse (Self *inverse) const |
|
virtual void | GetInverseJacobianOfForwardFieldWithRespectToPosition (const IndexType &index, JacobianPositionType &jacobian, bool useSVD=false) const |
|
virtual void | GetInverseJacobianOfForwardFieldWithRespectToPosition (const InputPointType &point, JacobianPositionType &jacobian, bool useSVD=false) const |
|
InverseTransformBasePointer | GetInverseTransform () const override |
|
const char * | GetNameOfClass () const override |
|
NumberOfParametersType | GetNumberOfLocalParameters () const override |
|
TransformCategoryEnum | GetTransformCategory () const override |
|
void | SetFixedParameters (const FixedParametersType &) override |
|
virtual void | SetIdentity () |
|
OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &) const override |
|
OutputVectorPixelType | TransformDiffusionTensor (const InputVectorPixelType &) const |
|
OutputPointType | TransformPoint (const InputPointType &inputPoint) const override |
|
OutputVectorPixelType | TransformVector (const InputVectorPixelType &) const override |
|
OutputVnlVectorType | TransformVector (const InputVnlVectorType &) const override |
|
void | UpdateTransformParameters (const DerivativeType &update, ScalarType factor=1.0) override |
|
|
virtual void | SetDisplacementField (DisplacementFieldType *field) |
|
virtual void | SetDisplacementField (VectorImageDisplacementFieldType *field) |
|
void | SetDisplacementField (std::nullptr_t)=delete |
|
virtual DisplacementFieldType * | GetModifiableDisplacementField () |
|
|
virtual void | SetInverseDisplacementField (DisplacementFieldType *inverseField) |
|
virtual DisplacementFieldType * | GetModifiableInverseDisplacementField () |
|
|
virtual void | SetInterpolator (InterpolatorType *interpolator) |
|
virtual InterpolatorType * | GetModifiableInterpolator () |
|
|
virtual void | SetInverseInterpolator (InterpolatorType *interpolator) |
|
virtual InterpolatorType * | GetModifiableInverseInterpolator () |
|
|
OutputVectorType | TransformVector (const InputVectorType &) const override |
|
|
OutputDiffusionTensor3DType | TransformDiffusionTensor (const InputDiffusionTensor3DType &) const |
|
|
OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &) const override |
|
|
void | SetParameters (const ParametersType ¶ms) override |
|
|
void | ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &j) const override |
|
|
virtual void | SetCoordinateTolerance (double _arg) |
|
virtual double | GetCoordinateTolerance () const |
|
|
virtual void | SetDirectionTolerance (double _arg) |
|
virtual double | GetDirectionTolerance () const |
|
virtual void | ComputeJacobianWithRespectToParametersCachedTemporaries (const InputPointType &p, JacobianType &jacobian, JacobianType &) const |
|
void | CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end) override |
|
void | CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end) override |
|
const FixedParametersType & | GetFixedParameters () const override |
|
unsigned int | GetInputSpaceDimension () const override |
|
bool | GetInverse (Self *) const |
|
const char * | GetNameOfClass () const override |
|
virtual NumberOfParametersType | GetNumberOfFixedParameters () const |
|
NumberOfParametersType | GetNumberOfParameters () const override |
|
unsigned int | GetOutputSpaceDimension () const override |
|
const ParametersType & | GetParameters () const override |
|
TransformCategoryEnum | GetTransformCategory () const override |
|
std::string | GetTransformTypeAsString () const override |
|
virtual bool | IsLinear () const |
|
| itkCloneMacro (Self) |
|
void | SetParametersByValue (const ParametersType &p) override |
|
virtual OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &vector, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &vector, const InputPointType &point) const |
|
virtual OutputDiffusionTensor3DType | TransformDiffusionTensor3D (const InputDiffusionTensor3DType &) const |
|
virtual OutputDiffusionTensor3DType | TransformDiffusionTensor3D (const InputDiffusionTensor3DType &inputTensor, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &) const |
|
virtual OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &point) const |
|
virtual OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &) const |
|
virtual OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &) const |
|
virtual OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformVector (const InputVectorPixelType &vector, const InputPointType &point) const |
|
virtual OutputVectorType | TransformVector (const InputVectorType &vector, const InputPointType &point) const |
|
virtual OutputVnlVectorType | TransformVector (const InputVnlVectorType &vector, const InputPointType &point) const |
|
template< typename TImage > std std::enable_if_t< TImage::ImageDimension==VInputDimension &&TImage::ImageDimension==VOutputDimension, void > | ApplyToImageMetadata (SmartPointer< TImage > image) const |
|
template<typename TParametersValueType , unsigned int VDimension>
Compute the jacobian with respect to the parameters at a point. Simply returns identity matrix, sized [VDimension, VDimension].
T(x, p), x is the position, p is the local parameter at position x. Take a 2D example, x = (x0, x1), p = (p0, p1) and T(x, p) is defined as:
T(x, p) = (T0, T1) = (x0+p0, x1+p1)
Each local deformation is defined as a translation transform. So the Jacobian w.r.t parameters are
dT/dp = [ dT0/dp0, dT0/dp1; dT1/dp0, dT1/dp1 ];
= [1, 0; 0, 1];
TODO: format the above for doxygen formula.
Implements itk::Transform< TParametersValueType, VDimension, VDimension >.
Definition at line 333 of file itkDisplacementFieldTransform.h.