template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
class itk::MatrixOffsetTransformBase< TParametersValueType, VInputDimension, VOutputDimension >
Matrix and Offset transformation of a vector space (e.g. space coordinates)
This class serves as a base class for transforms that can be expressed as a linear transformation plus a constant offset (e.g., affine, similarity and rigid transforms). This base class also provides the concept of using a center of rotation and a translation instead of an offset.
As derived instances of this class are specializations of an affine transform, any two of these transformations may be composed and the result is an affine transformation. However, the order is important. Given two affine transformations T1 and T2, we will say that "precomposing T1 with T2" yields the transformation which applies T1 to the source, and then applies T2 to that result to obtain the target. Conversely, we will say that "postcomposing T1 with T2" yields the transformation which applies T2 to the source, and then applies T1 to that result to obtain the target. (Whether T1 or T2 comes first lexicographically depends on whether you choose to write mappings from right-to-left or vice versa; we avoid the whole problem by referring to the order of application rather than the textual order.)
- Template Parameters
-
TParametersValueType | The type to be used for scalar numeric values. Either float or double. |
VInputDimension | The number of dimensions of the input vector space. |
VOutputDimension | The number of dimensions of the output vector space. |
This class provides several methods for setting the matrix and offset defining the transform. To support the registration framework, the transform parameters can also be set as an Array<TParametersValueType> of size (VInputDimension + 1) * VOutputDimension using method SetParameters(). The first (VOutputDimension x VInputDimension) parameters defines the matrix in row-major order (where the column index varies the fastest). The last VOutputDimension parameters defines the translation in each dimensions.
- Examples
- SphinxExamples/src/IO/TransformFactory/RegisterTransformWithTransformFactory/Code.cxx.
Definition at line 106 of file itkMatrixOffsetTransformBase.h.
|
using | CenterType = InputPointType |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | InputCovariantVectorType = CovariantVector< TParametersValueType, Self::InputSpaceDimension > |
|
using | InputDiffusionTensor3DType = DiffusionTensor3D< TParametersValueType > |
|
using | InputPointType = Point< TParametersValueType, Self::InputSpaceDimension > |
|
using | InputPointValueType = typename InputPointType::ValueType |
|
using | InputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< TParametersValueType, VInputDimension > |
|
using | InputTensorEigenVectorType = CovariantVector< TParametersValueType, InputDiffusionTensor3DType::Dimension > |
|
using | InputVectorPixelType = VariableLengthVector< TParametersValueType > |
|
using | InputVectorType = Vector< TParametersValueType, Self::InputSpaceDimension > |
|
using | InputVnlVectorType = vnl_vector_fixed< TParametersValueType, Self::InputSpaceDimension > |
|
using | InverseJacobianPositionType = vnl_matrix_fixed< ParametersValueType, VInputDimension, VOutputDimension > |
|
using | InverseMatrixType = Matrix< TParametersValueType, Self::InputSpaceDimension, Self::OutputSpaceDimension > |
|
using | InverseTransformBasePointer = typename InverseTransformBaseType::Pointer |
|
using | InverseTransformBaseType = typename Superclass::InverseTransformBaseType |
|
using | InverseTransformType = MatrixOffsetTransformBase< TParametersValueType, VOutputDimension, VInputDimension > |
|
using | JacobianPositionType = vnl_matrix_fixed< ParametersValueType, VOutputDimension, VInputDimension > |
|
using | JacobianType = Array2D< ParametersValueType > |
|
using | MatrixType = Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension > |
|
using | MatrixValueType = typename MatrixType::ValueType |
|
using | OffsetType = OutputVectorType |
|
using | OffsetValueType = typename OffsetType::ValueType |
|
using | OutputCovariantVectorType = CovariantVector< TParametersValueType, Self::OutputSpaceDimension > |
|
using | OutputDiffusionTensor3DType = DiffusionTensor3D< TParametersValueType > |
|
using | OutputPointType = Point< TParametersValueType, Self::OutputSpaceDimension > |
|
using | OutputPointValueType = typename OutputPointType::ValueType |
|
using | OutputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< TParametersValueType, VOutputDimension > |
|
using | OutputVectorPixelType = VariableLengthVector< TParametersValueType > |
|
using | OutputVectorType = Vector< TParametersValueType, Self::OutputSpaceDimension > |
|
using | OutputVectorValueType = typename OutputVectorType::ValueType |
|
using | OutputVnlVectorType = vnl_vector_fixed< TParametersValueType, Self::OutputSpaceDimension > |
|
using | Pointer = SmartPointer< Self > |
|
using | ScalarType = ParametersValueType |
|
using | Self = MatrixOffsetTransformBase |
|
using | Superclass = Transform< TParametersValueType, VInputDimension, VOutputDimension > |
|
using | TranslationType = OutputVectorType |
|
using | TranslationValueType = typename TranslationType::ValueType |
|
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 | Compose (const Self *other, bool pre=false) |
|
void | ComputeInverseJacobianWithRespectToPosition (const InputPointType &x, InverseJacobianPositionType &jac) const override |
|
void | ComputeJacobianWithRespectToParameters (const InputPointType &p, JacobianType &jacobian) const override |
|
virtual void | ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianPositionType &) const |
|
void | ComputeJacobianWithRespectToPosition (const InputPointType &x, JacobianPositionType &jac) const override |
|
const InputPointType & | GetCenter () const |
|
const FixedParametersType & | GetFixedParameters () const override |
|
InverseTransformBasePointer | GetInverseTransform () const override |
|
virtual const MatrixType & | GetMatrix () const |
|
const char * | GetNameOfClass () const override |
|
const OutputVectorType & | GetOffset () const |
|
const ParametersType & | GetParameters () const override |
|
TransformCategoryEnum | GetTransformCategory () const override |
|
const OutputVectorType & | GetTranslation () const |
|
bool | IsLinear () const override |
|
void | SetFixedParameters (const FixedParametersType &) override |
|
virtual void | SetIdentity () |
|
void | SetParameters (const ParametersType ¶meters) override |
|
virtual OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &) const |
|
OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &vec) const override |
|
virtual OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &vector, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &) const |
|
OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &vect) const override |
|
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 |
|
OutputDiffusionTensor3DType | TransformDiffusionTensor3D (const InputDiffusionTensor3DType &tensor) const override |
|
virtual OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &) const |
|
virtual OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &point) const |
|
OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &tensor) const override |
|
OutputPointType | TransformPoint (const InputPointType &point) const override |
|
virtual OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &) const |
|
OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor) const override |
|
virtual OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &) const |
|
OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor) const override |
|
virtual OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &inputTensor, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformVector (const InputVectorPixelType &) const |
|
OutputVectorPixelType | TransformVector (const InputVectorPixelType &vect) const override |
|
virtual OutputVectorPixelType | TransformVector (const InputVectorPixelType &vector, const InputPointType &point) const |
|
virtual OutputVectorType | TransformVector (const InputVectorType &) const |
|
OutputVectorType | TransformVector (const InputVectorType &vect) const override |
|
virtual OutputVectorType | TransformVector (const InputVectorType &vector, const InputPointType &point) const |
|
virtual OutputVnlVectorType | TransformVector (const InputVnlVectorType &) const |
|
OutputVnlVectorType | TransformVector (const InputVnlVectorType &vect) const override |
|
virtual OutputVnlVectorType | TransformVector (const InputVnlVectorType &vector, const InputPointType &point) const |
|
|
virtual void | SetMatrix (const MatrixType &matrix) |
|
|
void | SetOffset (const OutputVectorType &offset) |
|
|
void | SetCenter (const InputPointType ¢er) |
|
|
void | SetTranslation (const OutputVectorType &translation) |
|
|
bool | GetInverse (InverseTransformType *inverse) 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 |
|
virtual NumberOfParametersType | GetNumberOfLocalParameters () const |
|
NumberOfParametersType | GetNumberOfParameters () const override |
|
unsigned int | GetOutputSpaceDimension () const override |
|
const ParametersType & | GetParameters () const override |
|
TransformCategoryEnum | GetTransformCategory () const override |
|
std::string | GetTransformTypeAsString () const override |
|
| itkCloneMacro (Self) |
|
void | SetParametersByValue (const ParametersType &p) override |
|
virtual OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &) const |
|
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 &inputTensor, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &inputTensor, const InputPointType &point) const |
|
virtual OutputPointType | TransformPoint (const InputPointType &) const =0 |
|
virtual OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &inputTensor, const InputPointType &point) 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 &) const |
|
virtual OutputVectorType | TransformVector (const InputVectorType &vector, const InputPointType &point) const |
|
virtual OutputVnlVectorType | TransformVector (const InputVnlVectorType &) const |
|
virtual OutputVnlVectorType | TransformVector (const InputVnlVectorType &vector, const InputPointType &point) const |
|
virtual void | UpdateTransformParameters (const DerivativeType &update, ParametersValueType factor=1.0) |
|
virtual void | ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const =0 |
|
virtual void | ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianPositionType &) const |
|
template<typename TImage > |
template< typename TImage > std std::enable_if_t< TImage::ImageDimension==VInputDimension &&TImage::ImageDimension==VOutputDimension, void > | ApplyToImageMetadata (SmartPointer< TImage > image) const |
|
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
Compose with another MatrixOffsetTransformBase
This method composes self with another MatrixOffsetTransformBase of the same dimension, modifying self to be the composition of self and other. If the argument pre is true, then other is precomposed with self; that is, the resulting transformation consists of first applying other to the source, followed by self. If pre is false or omitted, then other is post-composed with self; that is the resulting transformation consists of first applying self to the source, followed by other. This updates the Translation based on current center.
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
virtual void itk::Transform< TParametersValueType, VInputDimension, VOutputDimension >::ComputeJacobianWithRespectToPosition |
|
inline |
This provides the ability to get a local jacobian value in a dense/local transform, e.g. DisplacementFieldTransform. For such transforms it would be unclear what parameters would refer to. Generally, global transforms should return an identity jacobian since there is no change with respect to position.
Definition at line 528 of file itkTransform.h.
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
Create inverse of an affine transformation
This populates the parameters an affine transform such that
the transform is the inverse of self. If self is not invertible,
an exception is thrown.
Note that by default the inverse transform is centered at
the origin. If you need to compute the inverse centered at a point, p,
\code
transform2->SetCenter( p );
transform1->GetInverse( transform2 );
\endcode
transform2 will now contain the inverse of transform1 and will
with its center set to p. Flipping the two statements will produce an
incorrect transform.
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
Get translation component of the MatrixOffsetTransformBase
This method returns the translation used after rotation about the center point. To define an affine transform, you must set the matrix, center, and translation OR the matrix and offset
Definition at line 352 of file itkMatrixOffsetTransformBase.h.
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
Set center of rotation of an MatrixOffsetTransformBase
This method sets the center of rotation of an MatrixOffsetTransformBase
to a fixed point - for most transforms derived from this class,
this point is not a "parameter" of the transform - the exception is that
"centered" transforms have center as a parameter during optimization.
This method updates offset wrt to current translation and matrix.
That is, changing the center changes the transform!
WARNING: When using the Center, we strongly recommend only changing the
matrix and translation to define a transform. Changing a transform's
center, changes the mapping between spaces - specifically, translation is
not changed with respect to that new center, and so the offset is updated
to * maintain the consistency with translation. If a center is not used,
or is set before the matrix and the offset, then it is safe to change the
offset directly.
As a rule of thumb, if you wish to set the center explicitly, set
before Offset computations are done.
To define an affine transform, you must set the matrix,
center, and translation OR the matrix and offset
Definition at line 308 of file itkMatrixOffsetTransformBase.h.
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
Set offset (origin) of an MatrixOffset TransformBase.
This method sets the offset of an MatrixOffsetTransformBase to a
value specified by the user.
This updates Translation wrt current center. See the warning regarding
offset-versus-translation in the documentation for SetCenter.
To define an affine transform, you must set the matrix,
center, and translation OR the matrix and offset
Definition at line 265 of file itkMatrixOffsetTransformBase.h.
template<typename TParametersValueType = double, unsigned int VInputDimension = 3, unsigned int VOutputDimension = 3>
Set translation of an MatrixOffsetTransformBase
This method sets the translation of an MatrixOffsetTransformBase.
This updates Offset to reflect current translation.
To define an affine transform, you must set the matrix,
center, and translation OR the matrix and offset
Definition at line 336 of file itkMatrixOffsetTransformBase.h.