NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Matrix transformations, with switchable Degrees Of Freedom. More...
Public Types | |
typedef SwitchableAffineTransform < TScalarType, NInputDimensions, NInputDimensions > | Self |
typedef UCLBaseTransform < TScalarType, NInputDimensions, NOutputDimensions > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef Superclass::ParametersType | ParametersType |
typedef Superclass::JacobianType | JacobianType |
typedef Superclass::ScalarType | ScalarType |
typedef Vector< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> | InputVectorType |
typedef Vector< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> | OutputVectorType |
typedef CovariantVector < TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> | InputCovariantVectorType |
typedef CovariantVector < TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> | OutputCovariantVectorType |
typedef vnl_vector_fixed < TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> | InputVnlVectorType |
typedef vnl_vector_fixed < TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> | OutputVnlVectorType |
typedef Point< TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> | InputPointType |
typedef Point< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> | OutputPointType |
typedef Matrix< TScalarType, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> | MatrixType |
typedef Matrix< TScalarType, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(OutputSpaceDimension)> | InverseMatrixType |
typedef Matrix< TScalarType, NOutputDimensions+1, NInputDimensions+1 > | FullAffineMatrixType |
typedef AffineTransform < TScalarType, NInputDimensions > | FullAffineTransformType |
typedef FullAffineTransformType::Pointer | FullAffineTransformPointer |
typedef InputPointType | CenterType |
typedef Array< double > | TranslationType |
typedef Array< double > | RotationType |
typedef Array< double > | ScaleType |
typedef Array< double > | SkewType |
typedef Array< double > | RelativeParameterWeightingType |
Public Types inherited from itk::UCLBaseTransform< TScalarType, NInputDimensions, NOutputDimensions > | |
typedef UCLBaseTransform | Self |
typedef Transform< TScalarType, NInputDimensions, NOutputDimensions > | Superclass |
typedef SmartPointer< Self > | Pointer |
typedef SmartPointer< const Self > | ConstPointer |
typedef Superclass::InputPointType | InputPointType |
typedef Superclass::OutputPointType | OutputPointType |
typedef Superclass::JacobianType | JacobianType |
Protected Member Functions | |
SwitchableAffineTransform (unsigned int outputDims, unsigned int paramDims) | |
SwitchableAffineTransform () | |
virtual | ~SwitchableAffineTransform ()=0 |
void | PrintSelf (std::ostream &s, Indent indent) const |
virtual void | ComputeMatrixAndOffset (void) |
virtual void | ComputeParametersFromMatrixAndOffset (void) |
void | SetDefaultRelativeParameterWeightings (void) |
const InverseMatrixType & | GetInverseMatrix (void) const |
const InverseMatrixType & | GetVarInverseMatrix (void) const |
void | SetVarInverseMatrix (const InverseMatrixType &matrix) const |
bool | InverseMatrixIsOld (void) const |
Protected Member Functions inherited from itk::UCLBaseTransform< TScalarType, NInputDimensions, NOutputDimensions > | |
UCLBaseTransform () | |
UCLBaseTransform (unsigned int Dimension, itk::TransformBase::NumberOfParametersType NumberOfParameters) | |
virtual | ~UCLBaseTransform () |
Protected Attributes | |
MatrixType | m_Matrix |
OutputVectorType | m_Offset |
Matrix transformations, with switchable Degrees Of Freedom.
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.
typedef InputPointType itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::CenterType |
typedef SmartPointer<const Self> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::ConstPointer |
typedef Matrix<TScalarType, NOutputDimensions+1, NInputDimensions+1> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::FullAffineMatrixType |
Full affine matrix type, and transform, so we can output it using TransformWriters.
typedef FullAffineTransformType::Pointer itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::FullAffineTransformPointer |
typedef AffineTransform<TScalarType, NInputDimensions> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::FullAffineTransformType |
typedef CovariantVector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::InputCovariantVectorType |
Standard covariant vector type for this class
typedef Point<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::InputPointType |
Standard coordinate point type for this class
typedef Vector<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::InputVectorType |
Standard vector type for this class
typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(InputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::InputVnlVectorType |
Standard vnl_vector type for this class
typedef Matrix<TScalarType, itkGetStaticConstMacro(InputSpaceDimension), itkGetStaticConstMacro(OutputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::InverseMatrixType |
Standard inverse matrix type for this class
typedef Superclass::JacobianType itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::JacobianType |
Jacobian Type
typedef Matrix<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension), itkGetStaticConstMacro(InputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::MatrixType |
Standard matrix type for this class
typedef CovariantVector<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::OutputCovariantVectorType |
typedef Point<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::OutputPointType |
typedef Vector<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::OutputVectorType |
typedef vnl_vector_fixed<TScalarType, itkGetStaticConstMacro(OutputSpaceDimension)> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::OutputVnlVectorType |
typedef Superclass::ParametersType itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::ParametersType |
Parameters Type
typedef SmartPointer<Self> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::Pointer |
typedef Array<double> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::RelativeParameterWeightingType |
typedef Array<double> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::RotationType |
typedef Superclass::ScalarType itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::ScalarType |
Standard scalar type for this class
typedef Array<double> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::ScaleType |
typedef SwitchableAffineTransform<TScalarType, NInputDimensions, NInputDimensions> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::Self |
Standard typedefs
typedef Array<double> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::SkewType |
typedef UCLBaseTransform< TScalarType, NInputDimensions, NOutputDimensions > itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::Superclass |
typedef Array<double> itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::TranslationType |
|
protected |
|
protected |
|
protectedpure virtual |
Destroy an SwitchableAffineTransform object
|
inlineprotectedvirtual |
Compute the matrix and offset.
Reimplemented in itk::EulerAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
inlineprotectedvirtual |
Compute the parameters from the matrix.
Reimplemented in itk::EulerAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
inline |
Get center of rotation, in millimetre (world coordinates).
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::UCLBaseTransform< TScalarType, NInputDimensions, NOutputDimensions >.
Reimplemented in itk::EulerAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
inline |
Fixed parameters that are not used in the optimisation, but they are relevent for defining the transformation, e.g. dof, center. Mainly used for saving/loading.
|
inline |
Get the full affine matrix.
|
inline |
Get the full affine transform.
bool itk::SwitchableAffineTransform< 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.
|
protected |
|
pure virtual |
Compute the Jacobian of the transformation
This method computes the Jacobian matrix of the transformation. given point or vector, returning the transformed point or vector. The rank of the Jacobian will also indicate if the transform is invertible at this point.
Note that the size of this will depend on how many parameters being optimised.
Implemented in itk::EulerAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >.
|
inline |
Get rotation matrix.
unsigned int itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::GetNumberOfDOF | ( | ) | const |
Returns the number of DOF actually being optimised.
|
inlinevirtual |
The number of parameters is the number of Dof.
|
inline |
Get offset (the bit of the matrix that isn't the rotation matrix).
|
virtual |
|
virtual |
|
virtual |
|
virtual |
const ParametersType& itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::GetParameters | ( | void | ) | const |
Get the Transformation Parameters. This will return a vector whose length is equal to the number of degrees of freedom being optimised. In general the order will be: [0-2] translation [3-5] rotation [6-8] scale [9-11] skews.
But say you are optimising translation and scale, you will get 6 numbers, copied from 0-2 and 6-8 from the above.
Or, if you are doing just scale, you will get 3 numbers, copied from 6-8.
const RelativeParameterWeightingType& itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::GetRelativeParameterWeightingFactors | ( | ) |
Get the relative parameter weightings to be used by the optimiser according to the number of dof.
|
inline |
Get rotation component, units depend on subclass.
|
inline |
Get scale component, units depend on subclass.
|
inline |
Get Skew component.
|
inline |
Get translation component, in millimetre (world coordinates).
|
inlineprotected |
|
inline |
Set the transformation matrix to its square root.
|
inlineprotected |
itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::itkStaticConstMacro | ( | InputSpaceDimension | , |
unsigned | int, | ||
NInputDimensions | |||
) |
Dimension of the domain space.
itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::itkStaticConstMacro | ( | OutputSpaceDimension | , |
unsigned | int, | ||
NOutputDimensions | |||
) |
itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::itkStaticConstMacro | ( | ParametersDimension | , |
unsigned | int, | ||
(NInputDimensions+1 *NOutputDimensions+1)- | 1 | ||
) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
Print contents of an SwitchableAffineTransform
|
inline |
Set center of rotation, in millimetre (world coordinates).
|
protected |
Set up default values for the relative parameter weightings.
|
inline |
Fixed parameters that are not used in the optimisation, but they are relavent for defining the transformation, e.g. dof, center. Mainly used for saving/loading.
|
inline |
Sets the transform to optimise rot, trans, and skews.
|
inline |
Get the full affine matrix.
void itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::SetIdentity | ( | void | ) |
Set the transformation to an Identity
This sets the rotation matrix to identity and the Offset to null, and resizes stuff.
|
inline |
Sets the transform to optimise just rotation.
|
inline |
Sets the transform to optimise just scale.
|
inline |
Sets the transform to optimise just translation.
void itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::SetNumberOfDOF | ( | int | number | ) |
Sets the number of DOF actually being optimised.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::SetParameters | ( | const ParametersType & | parameters | ) |
Set the transformation from a container of parameters. Internally, this class will set the right parameters, depending on which degrees of freedom are being optimised. It will throw an exception if the wrong number if the vector is the wrong length.
|
inline |
Sets the transform to only optimise rotations and translations.
|
inline |
Sets the transform to optimise rotations, translations and scale.
|
inline |
Set Rotation, units depend on subclass.
|
inline |
Set rotation relative parameter weightings to be used by optimizer
|
inline |
Set rotation relative parameter weightings to be used by optimizer
|
inline |
Set Scale, units depend on subclass.
|
inline |
Set scale relative parameter weightings to be used by optimizer
|
inline |
Set scale relative parameter weightings to be used by optimizer
|
inline |
Set Skew.
|
inline |
Set skew relative parameter weightings to be used by optimizer
|
inline |
Set skew relative parameter weightings to be used by optimizer
|
inline |
Set translation, in millimetre (world coordinates).
|
inline |
Set translation relative parameter weightings to be used by optimizer
|
inline |
Set translation relative parameter weightings to be used by optimizer
|
inlineprotected |
OutputCovariantVectorType itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::TransformCovariantVector | ( | const InputCovariantVectorType & | vector | ) | const |
OutputPointType itk::SwitchableAffineTransform< 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.
|
virtual |
To transform a point, without creating an intermediate one.
OutputVectorType itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::TransformVector | ( | const InputVectorType & | vector | ) | const |
OutputVnlVectorType itk::SwitchableAffineTransform< TScalarType, NInputDimensions, NOutputDimensions >::TransformVector | ( | const InputVnlVectorType & | vector | ) | const |
|
protected |
|
protected |