template<typename TScalar = double, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 3>
class itk::MatrixOffsetTransformBase< TScalar, NInputDimensions, NOutputDimensions >
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
-
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 76 of file itkMatrixOffsetTransformBase.h.
|
typedef InputPointType | CenterType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef
Superclass::InputDiffusionTensor3DType | InputDiffusionTensor3DType |
|
typedef
Superclass::InputSymmetricSecondRankTensorType | InputSymmetricSecondRankTensorType |
|
typedef CovariantVector
< TScalar,
InputDiffusionTensor3DType::Dimension > | InputTensorEigenVectorType |
|
typedef
Superclass::InputVectorPixelType | InputVectorPixelType |
|
typedef Matrix< TScalar,
itkGetStaticConstMacro(InputSpaceDimension),
itkGetStaticConstMacro(OutputSpaceDimension)> | InverseMatrixType |
|
typedef
InverseTransformBaseType::Pointer | InverseTransformBasePointer |
|
typedef
Superclass::InverseTransformBaseType | InverseTransformBaseType |
|
typedef Superclass::JacobianType | JacobianType |
|
typedef OutputVectorType | OffsetType |
|
typedef OffsetType::ValueType | OffsetValueType |
|
typedef
Superclass::OutputDiffusionTensor3DType | OutputDiffusionTensor3DType |
|
typedef
Superclass::OutputSymmetricSecondRankTensorType | OutputSymmetricSecondRankTensorType |
|
typedef
Superclass::OutputVectorPixelType | OutputVectorPixelType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef
Superclass::ParametersValueType | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Superclass::ScalarType | ScalarType |
|
typedef MatrixOffsetTransformBase | Self |
|
typedef Transform< TScalar,
NInputDimensions,
NOutputDimensions > | Superclass |
|
typedef
Superclass::TransformCategoryType | TransformCategoryType |
|
typedef OutputVectorType | TranslationType |
|
typedef TranslationType::ValueType | TranslationValueType |
|
|
typedef Vector< TScalar,
itkGetStaticConstMacro(InputSpaceDimension)> | InputVectorType |
|
typedef Vector< TScalar,
itkGetStaticConstMacro(OutputSpaceDimension)> | OutputVectorType |
|
typedef OutputVectorType::ValueType | OutputVectorValueType |
|
|
typedef CovariantVector
< TScalar,
itkGetStaticConstMacro(InputSpaceDimension)> | InputCovariantVectorType |
|
typedef CovariantVector
< TScalar,
itkGetStaticConstMacro(OutputSpaceDimension)> | OutputCovariantVectorType |
|
|
typedef vnl_vector_fixed
< TScalar,
itkGetStaticConstMacro(InputSpaceDimension)> | InputVnlVectorType |
|
typedef vnl_vector_fixed
< TScalar,
itkGetStaticConstMacro(OutputSpaceDimension)> | OutputVnlVectorType |
|
|
typedef Point< TScalar,
itkGetStaticConstMacro(InputSpaceDimension)> | InputPointType |
|
typedef InputPointType::ValueType | InputPointValueType |
|
typedef Point< TScalar,
itkGetStaticConstMacro(OutputSpaceDimension)> | OutputPointType |
|
typedef OutputPointType::ValueType | OutputPointValueType |
|
|
typedef Matrix< TScalar,
itkGetStaticConstMacro(OutputSpaceDimension),
itkGetStaticConstMacro(InputSpaceDimension)> | MatrixType |
|
typedef MatrixType::ValueType | MatrixValueType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef Array
< ParametersValueType > | DerivativeType |
|
typedef Matrix< double,
itkGetStaticConstMacro(OutputSpaceDimension),
itkGetStaticConstMacro(InputSpaceDimension)> | DirectionChangeMatrix |
|
typedef CovariantVector
< TScalar, NInputDimensions > | InputCovariantVectorType |
|
typedef DiffusionTensor3D
< TScalar > | InputDiffusionTensor3DType |
|
typedef Matrix< double,
itkGetStaticConstMacro(InputSpaceDimension),
itkGetStaticConstMacro(InputSpaceDimension)> | InputDirectionMatrix |
|
typedef Point< TScalar,
NInputDimensions > | InputPointType |
|
typedef
SymmetricSecondRankTensor
< TScalar, NInputDimensions > | InputSymmetricSecondRankTensorType |
|
typedef VariableLengthVector
< TScalar > | InputVectorPixelType |
|
typedef Vector< TScalar,
NInputDimensions > | InputVectorType |
|
typedef vnl_vector_fixed
< TScalar, NInputDimensions > | InputVnlVectorType |
|
typedef
InverseTransformBaseType::Pointer | InverseTransformBasePointer |
|
typedef Transform< TScalar,
NOutputDimensions,
NInputDimensions > | InverseTransformBaseType |
|
typedef Array2D
< ParametersValueType > | JacobianType |
|
typedef Matrix< TScalar,
itkGetStaticConstMacro(OutputSpaceDimension),
itkGetStaticConstMacro(InputSpaceDimension)> | MatrixType |
|
typedef
Superclass::NumberOfParametersType | NumberOfParametersType |
|
typedef CovariantVector
< TScalar, NOutputDimensions > | OutputCovariantVectorType |
|
typedef DiffusionTensor3D
< TScalar > | OutputDiffusionTensor3DType |
|
typedef Matrix< double,
itkGetStaticConstMacro(OutputSpaceDimension),
itkGetStaticConstMacro(OutputSpaceDimension)> | OutputDirectionMatrix |
|
typedef Point< TScalar,
NOutputDimensions > | OutputPointType |
|
typedef
SymmetricSecondRankTensor
< TScalar, NOutputDimensions > | OutputSymmetricSecondRankTensorType |
|
typedef VariableLengthVector
< TScalar > | OutputVectorPixelType |
|
typedef Vector< TScalar,
NOutputDimensions > | OutputVectorType |
|
typedef vnl_vector_fixed
< TScalar, NOutputDimensions > | OutputVnlVectorType |
|
typedef Superclass::ParametersType | ParametersType |
|
typedef
Superclass::ParametersValueType | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef TScalar | ScalarType |
|
typedef Transform | Self |
|
typedef TransformBaseTemplate
< TScalar > | Superclass |
|
typedef
Superclass::TransformCategoryType | TransformCategoryType |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef IdentifierType | NumberOfParametersType |
|
typedef OptimizerParameters
< ParametersValueType > | ParametersType |
|
typedef TScalar | ParametersValueType |
|
typedef SmartPointer< Self > | Pointer |
|
typedef TransformBaseTemplate | Self |
|
typedef Object | Superclass |
|
enum | TransformCategoryType {
UnknownTransformCategory =0,
Linear =1,
BSpline =2,
Spline =3,
DisplacementField =4,
VelocityField =5
} |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef SmartPointer< Self > | Pointer |
|
typedef Object | Self |
|
typedef LightObject | Superclass |
|
typedef SmartPointer< const Self > | ConstPointer |
|
typedef SmartPointer< Self > | Pointer |
|
typedef LightObject | Self |
|
|
void | Compose (const Self *other, bool pre=0) |
|
virtual void | ComputeInverseJacobianWithRespectToPosition (const InputPointType &x, JacobianType &jac) const |
|
virtual void | ComputeJacobianWithRespectToParameters (const InputPointType &x, JacobianType &j) const |
|
virtual void | ComputeJacobianWithRespectToPosition (const InputPointType &x, JacobianType &jac) const |
|
virtual ::itk::LightObject::Pointer | CreateAnother (void) const |
|
const InputPointType & | GetCenter () const |
|
virtual const ParametersType & | GetFixedParameters (void) const |
|
virtual InverseTransformBasePointer | GetInverseTransform () const |
|
virtual const MatrixType & | GetMatrix () const |
|
virtual const char * | GetNameOfClass () const |
|
const OutputVectorType & | GetOffset (void) const |
|
const ParametersType & | GetParameters (void) const |
|
virtual TransformCategoryType | GetTransformCategory () const |
|
const OutputVectorType & | GetTranslation (void) const |
|
virtual bool | IsLinear () const |
|
virtual void | SetFixedParameters (const ParametersType &) |
|
virtual void | SetIdentity (void) |
|
void | SetParameters (const ParametersType ¶meters) |
|
OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &vector) const |
|
OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &vector) const |
|
OutputDiffusionTensor3DType | TransformDiffusionTensor3D (const InputDiffusionTensor3DType &tensor) const |
|
OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &tensor) const |
|
OutputPointType | TransformPoint (const InputPointType &point) const |
|
OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &tensor) const |
|
OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &tensor) const |
|
OutputVectorType | TransformVector (const InputVectorType &vector) const |
|
OutputVnlVectorType | TransformVector (const InputVnlVectorType &vector) const |
|
OutputVectorPixelType | TransformVector (const InputVectorPixelType &vector) const |
|
|
virtual void | SetMatrix (const MatrixType &matrix) |
|
|
void | SetOffset (const OutputVectorType &offset) |
|
|
void | SetCenter (const InputPointType ¢er) |
|
|
void | SetTranslation (const OutputVectorType &translation) |
|
|
bool | GetInverse (Self *inverse) const |
|
virtual void | ComputeInverseJacobianWithRespectToPosition (const InputPointType &x, JacobianType &jacobian) const |
|
virtual void | ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const =0 |
|
virtual void | ComputeJacobianWithRespectToParametersCachedTemporaries (const InputPointType &p, JacobianType &jacobian, JacobianType &) const |
|
virtual void | ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianType &) const |
|
unsigned int | GetInputSpaceDimension (void) const |
|
bool | GetInverse (Self *) const |
|
virtual NumberOfParametersType | GetNumberOfLocalParameters (void) const |
|
virtual NumberOfParametersType | GetNumberOfParameters (void) const |
|
unsigned int | GetOutputSpaceDimension (void) const |
|
virtual std::string | GetTransformTypeAsString () const |
|
| itkCloneMacro (Self) |
|
virtual void | SetFixedParameters (const ParametersType &)=0 |
|
virtual void | SetParameters (const ParametersType &)=0 |
|
virtual void | SetParametersByValue (const ParametersType &p) |
|
virtual OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &) const |
|
virtual OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &vector, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &) const |
|
virtual OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &vector, const InputPointType &point) const |
|
virtual OutputDiffusionTensor3DType | TransformDiffusionTensor3D (const InputDiffusionTensor3DType &) const |
|
virtual OutputDiffusionTensor3DType | TransformDiffusionTensor3D (const InputDiffusionTensor3DType &tensor, const InputPointType &point) const |
|
virtual OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &) const |
|
virtual OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &tensor, const InputPointType &point) const |
|
virtual OutputPointType | TransformPoint (const InputPointType &) const =0 |
|
virtual
OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &tensor, const InputPointType &point) const |
|
virtual
OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &) const |
|
virtual OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &) const |
|
virtual OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &tensor, 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 OutputVectorPixelType | TransformVector (const InputVectorPixelType &) const |
|
virtual OutputVectorPixelType | TransformVector (const InputVectorPixelType &vector, const InputPointType &point) const |
|
virtual void | UpdateTransformParameters (const DerivativeType &update, TScalar factor=1.0) |
|
virtual void | SetParametersByValue (const ParametersType &p)=0 |
|
unsigned long | AddObserver (const EventObject &event, Command *) |
|
unsigned long | AddObserver (const EventObject &event, Command *) const |
|
virtual void | DebugOff () const |
|
virtual void | DebugOn () const |
|
Command * | GetCommand (unsigned long tag) |
|
bool | GetDebug () const |
|
MetaDataDictionary & | GetMetaDataDictionary (void) |
|
const MetaDataDictionary & | GetMetaDataDictionary (void) const |
|
virtual ModifiedTimeType | GetMTime () const |
|
virtual const TimeStamp & | GetTimeStamp () const |
|
bool | HasObserver (const EventObject &event) const |
|
void | InvokeEvent (const EventObject &) |
|
void | InvokeEvent (const EventObject &) const |
|
virtual void | Modified () const |
|
virtual void | Register () const ITK_OVERRIDE |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) |
|
void | SetDebug (bool debugFlag) const |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
virtual void | SetReferenceCount (int) ITK_OVERRIDE |
|
virtual void | UnRegister () const ITK_OVERRIDE |
|
virtual void | SetObjectName (std::string _arg) |
|
virtual const std::string & | GetObjectName () const |
|
virtual void | Delete () |
|
virtual int | GetReferenceCount () const |
|
| itkCloneMacro (Self) |
|
void | Print (std::ostream &os, Indent indent=0) const |
|
template<typename TScalar = double, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 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 TScalar = double, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 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 inverese transform is centered at
the origin. If you need to compute the inverse centered at a point, p,
* transform2->SetCenter( p );
* transform1->GetInverse( transform2 );
*
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 TScalar = double, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 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 287 of file itkMatrixOffsetTransformBase.h.