![]() |
Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <itkAdvancedMatrixOffsetTransformBase.h>
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static Pointer | New () |
Private Member Functions | |
AdvancedMatrixOffsetTransformBase (const Self &other) | |
const Self & | operator= (const Self &) |
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.)
There are three template parameters for this class:
ScalarT The type to be used for scalar numeric values. Either float or double.
NInputDimensions The number of dimensions of the input vector space.
NOutputDimensions 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<double> of size (NInputDimension + 1) * NOutputDimension using method SetParameters(). The first (NOutputDimension x NInputDimension) parameters defines the matrix in row-major order (where the column index varies the fastest). The last NOutputDimension parameters defines the translation in each dimensions.
Definition at line 94 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef InputPointType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::CenterType |
Typedefs.
Definition at line 153 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef SmartPointer<const Self> itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::ConstPointer |
Definition at line 103 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass ::InputCovariantVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::InputCovariantVectorType |
Definition at line 124 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::InputPointType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::InputPointType |
Definition at line 129 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::InputVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::InputVectorType |
Definition at line 121 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::InputVnlVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::InputVnlVectorType |
Definition at line 127 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::InternalMatrixType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::InternalMatrixType |
Definition at line 140 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Matrix< TScalarType, itkGetStaticConstMacro( InputSpaceDimension ), itkGetStaticConstMacro( OutputSpaceDimension )> itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::InverseMatrixType |
Standard inverse matrix type for this class.
Definition at line 150 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass ::JacobianOfSpatialHessianType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::JacobianOfSpatialHessianType |
Definition at line 139 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass ::JacobianOfSpatialJacobianType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::JacobianOfSpatialJacobianType |
Definition at line 136 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::JacobianType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::JacobianType |
Definition at line 120 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Matrix< TScalarType, itkGetStaticConstMacro( OutputSpaceDimension ), itkGetStaticConstMacro( InputSpaceDimension )> itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::MatrixType |
Standard matrix type for this class.
Definition at line 145 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass ::NonZeroJacobianIndicesType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::NonZeroJacobianIndicesType |
Definition at line 133 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef OutputVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::OffsetType |
Definition at line 154 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass ::OutputCovariantVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::OutputCovariantVectorType |
Definition at line 126 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::OutputPointType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::OutputPointType |
Definition at line 130 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::OutputVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::OutputVectorType |
Definition at line 122 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::OutputVnlVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::OutputVnlVectorType |
Definition at line 128 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::ParametersType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::ParametersType |
Definition at line 119 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef SmartPointer<Self> itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::Pointer |
Definition at line 102 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::ScalarType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::ScalarType |
Typedefs from the Superclass.
Definition at line 118 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef AdvancedMatrixOffsetTransformBase itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::Self |
Standard typedefs
Definition at line 99 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::SpatialHessianType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::SpatialHessianType |
Definition at line 137 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef Superclass::SpatialJacobianType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::SpatialJacobianType |
Definition at line 134 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions > itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::Superclass |
Definition at line 101 of file itkAdvancedMatrixOffsetTransformBase.h.
typedef OutputVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::TranslationType |
Definition at line 155 of file itkAdvancedMatrixOffsetTransformBase.h.
|
protected |
Construct an AdvancedMatrixOffsetTransformBase object
This method constructs a new AdvancedMatrixOffsetTransformBase object and initializes the matrix and offset parts of the transformation to values specified by the caller. If the arguments are omitted, then the AdvancedMatrixOffsetTransformBase is initialized to an identity transformation in the appropriate number of dimensions.
|
protected |
|
protected |
|
inlineprotectedvirtual |
Destroy an AdvancedMatrixOffsetTransformBase object.
Definition at line 433 of file itkAdvancedMatrixOffsetTransformBase.h.
|
private |
void itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::Compose | ( | const Self * | other, |
bool | pre = 0 |
||
) |
Compose with another AdvancedMatrixOffsetTransformBase
This method composes self with another AdvancedMatrixOffsetTransformBase 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.
|
protectedvirtual |
Reimplemented in itk::AdvancedRigid2DTransform< TScalarType >, itk::AdvancedSimilarity2DTransform< TScalarType >, itk::AdvancedVersorTransform< TScalarType >, itk::AffineDTI3DTransform< TScalarType >, itk::AdvancedSimilarity3DTransform< TScalarType >, and itk::AdvancedEuler3DTransform< TScalarType >.
|
protectedvirtual |
Reimplemented in itk::AdvancedRigid2DTransform< TScalarType >, itk::AdvancedSimilarity2DTransform< TScalarType >, itk::AdvancedVersorTransform< TScalarType >, itk::AffineDTI3DTransform< TScalarType >, itk::AdvancedSimilarity3DTransform< TScalarType >, and itk::AdvancedEuler3DTransform< TScalarType >.
|
protectedvirtual |
|
protectedvirtual |
|
inline |
Get center of rotation of the AdvancedMatrixOffsetTransformBase
This method returns the point used as the fixed center of rotation for the AdvancedMatrixOffsetTransformBase. To define an affine transform, you must set the matrix, center, and translation OR the matrix and offset.
Definition at line 259 of file itkAdvancedMatrixOffsetTransformBase.h.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
Reimplemented in itk::AffineDTI3DTransform< TScalarType >, itk::AdvancedSimilarity2DTransform< TScalarType >, itk::AdvancedRigid2DTransform< TScalarType >, itk::AdvancedVersorRigid3DTransform< TScalarType >, itk::AdvancedVersorTransform< TScalarType >, itk::AdvancedEuler3DTransform< TScalarType >, itk::AdvancedSimilarity3DTransform< TScalarType >, and itk::AdvancedRigid3DTransform< TScalarType >.
|
virtual |
Get the Fixed Parameters.
bool itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::GetInverse | ( | Self * | inverse | ) | const |
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 inverese transform is centered at the origin. If you need to compute the inverse centered at a point, p,
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.
const InverseMatrixType& itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::GetInverseMatrix | ( | void | ) | const |
Method will eventually be made a protected member function.
|
virtual |
Compute the Jacobian of the transformation
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
virtual |
Compute the Jacobian of the transformation.
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
Reimplemented in itk::AffineDTI3DTransform< TScalarType >.
|
virtual |
Compute the Jacobian of the spatial Hessian of the transformation.
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
virtual |
Compute both the spatial Hessian and the Jacobian of the spatial Hessian of the transformation.
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
virtual |
Compute the Jacobian of the spatial Jacobian of the transformation.
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
virtual |
Compute the Jacobian of the spatial Jacobian of the transformation.
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
inline |
Get matrix of an AdvancedMatrixOffsetTransformBase
This method returns the value of the matrix of the AdvancedMatrixOffsetTransformBase. To define an affine transform, you must set the matrix, center, and translation OR the matrix and offset.
Definition at line 190 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inline |
Get offset of an AdvancedMatrixOffsetTransformBase
This method returns the offset value of the AdvancedMatrixOffsetTransformBase. To define an affine transform, you must set the matrix, center, and translation OR the matrix and offset.
Definition at line 217 of file itkAdvancedMatrixOffsetTransformBase.h.
const ParametersType& itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::GetParameters | ( | void | ) | const |
Get the Transformation Parameters.
|
virtual |
Compute the spatial Hessian of the transformation.
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
virtual |
Compute the spatial Jacobian of the transformation.
Reimplemented from itk::AdvancedTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
inline |
Get translation component of the AdvancedMatrixOffsetTransformBase
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 285 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlineprotected |
Definition at line 438 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlineprotected |
Definition at line 449 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlinevirtual |
Indicates that this transform is linear. That is, given two points P and Q, and scalar coefficients a and b, then
T( a*P + b*Q ) = a * T(P) + b * T(Q)
Definition at line 363 of file itkAdvancedMatrixOffsetTransformBase.h.
itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::itkStaticConstMacro | ( | InputSpaceDimension | , |
unsigned | int, | ||
NInputDimensions | |||
) |
Dimension of the domain space.
itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::itkStaticConstMacro | ( | OutputSpaceDimension | , |
unsigned | int, | ||
NOutputDimensions | |||
) |
itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::itkStaticConstMacro | ( | ParametersDimension | , |
unsigned | int, | ||
NOutputDimensions * | NInputDimensions+1 | ||
) |
|
static |
New macro for creation of through a Smart Pointer.
|
private |
|
protectedvirtual |
Called by constructors:
|
protected |
Print contents of an AdvancedMatrixOffsetTransformBase.
|
inline |
Set center of rotation of an AdvancedMatrixOffsetTransformBase
This method sets the center of rotation of an AdvancedMatrixOffsetTransformBase 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 245 of file itkAdvancedMatrixOffsetTransformBase.h.
|
virtual |
Set the fixed parameters and update internal transformation.
|
virtual |
Set the transformation to an Identity This sets the matrix to identity and the Offset to null.
Reimplemented in itk::AdvancedRigid2DTransform< TScalarType >, itk::AdvancedSimilarity2DTransform< TScalarType >, itk::AffineDTI3DTransform< TScalarType >, itk::AdvancedVersorTransform< TScalarType >, and itk::AdvancedEuler3DTransform< TScalarType >.
|
inlinevirtual |
Set matrix of an AdvancedMatrixOffsetTransformBase
This method sets the matrix of an AdvancedMatrixOffsetTransformBase to a value specified by the user.
This updates the Offset wrt to current translation and 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.
Reimplemented in itk::AdvancedSimilarity2DTransform< TScalarType >, itk::AdvancedRigid2DTransform< TScalarType >, itk::AdvancedRigid3DTransform< TScalarType >, and itk::AdvancedSimilarity3DTransform< TScalarType >.
Definition at line 174 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inline |
Set offset (origin) of an MatrixOffset TransformBase.
This method sets the offset of an AdvancedMatrixOffsetTransformBase 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 204 of file itkAdvancedMatrixOffsetTransformBase.h.
void itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::SetParameters | ( | const ParametersType & | parameters | ) |
Set the transformation from a container of parameters. The first (NOutputDimension x NInputDimension) parameters define the matrix and the last NOutputDimension parameters the translation. Offset is updated based on current center.
|
inline |
Set translation of an AdvancedMatrixOffsetTransformBase
This method sets the translation of an AdvancedMatrixOffsetTransformBase. 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 271 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlineprotected |
Definition at line 485 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlineprotected |
Definition at line 443 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlineprotected |
Definition at line 465 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlineprotected |
Definition at line 480 of file itkAdvancedMatrixOffsetTransformBase.h.
|
inlineprotected |
Definition at line 473 of file itkAdvancedMatrixOffsetTransformBase.h.
OutputCovariantVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::TransformCovariantVector | ( | const InputCovariantVectorType & | vector | ) | const |
OutputPointType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::TransformPoint | ( | const InputPointType & | point | ) | const |
Transform by an affine transformation
This method applies the affine transform given by self to a given point or vector, returning the transformed point or vector. The TransformPoint method transforms its argument as an affine point, whereas the TransformVector method transforms its argument as a vector.
OutputVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::TransformVector | ( | const InputVectorType & | vector | ) | const |
OutputVnlVectorType itk::AdvancedMatrixOffsetTransformBase< TScalarType, NInputDimensions, NOutputDimensions >::TransformVector | ( | const InputVnlVectorType & | vector | ) | const |
|
private |
Definition at line 509 of file itkAdvancedMatrixOffsetTransformBase.h.
|
mutableprivate |
Definition at line 506 of file itkAdvancedMatrixOffsetTransformBase.h.
|
mutableprivate |
Definition at line 514 of file itkAdvancedMatrixOffsetTransformBase.h.
|
protected |
Definition at line 496 of file itkAdvancedMatrixOffsetTransformBase.h.
|
protected |
Definition at line 495 of file itkAdvancedMatrixOffsetTransformBase.h.
|
private |
Member variables.
Definition at line 504 of file itkAdvancedMatrixOffsetTransformBase.h.
|
private |
To avoid recomputation of the inverse if not needed.
Definition at line 513 of file itkAdvancedMatrixOffsetTransformBase.h.
|
protected |
(spatial) Jacobians and Hessians can mostly be precomputed by this transform. Store them in these member variables. SpatialJacobian is simply m_Matrix
Definition at line 488 of file itkAdvancedMatrixOffsetTransformBase.h.
|
mutableprivate |
Used by the GetJacobian() function which returns the jacobian as an output variable.
Definition at line 518 of file itkAdvancedMatrixOffsetTransformBase.h.
|
private |
Definition at line 505 of file itkAdvancedMatrixOffsetTransformBase.h.
|
mutableprivate |
Definition at line 507 of file itkAdvancedMatrixOffsetTransformBase.h.
|
protected |
Definition at line 494 of file itkAdvancedMatrixOffsetTransformBase.h.
|
private |
Definition at line 510 of file itkAdvancedMatrixOffsetTransformBase.h.
Generated on 06-12-2013 for elastix by ![]() |
![]() |