template<typename TParametersValueType = double, unsigned int NInputDimensions = 3, unsigned int NOutputDimensions = 3>
class itk::MatrixOffsetTransformBase< TParametersValueType, 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
-
TParametersValueType | 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<TParametersValueType> 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.
- Examples:
- WikiExamples/IO/RegisterTransform.cxx.
Definition at line 99 of file itkMatrixOffsetTransformBase.h.
|
using | CenterType = InputPointType |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | FixedParametersType = typename Superclass::FixedParametersType |
|
using | FixedParametersValueType = typename Superclass::FixedParametersValueType |
|
using | InputCovariantVectorType = CovariantVector< TParametersValueType, Self::InputSpaceDimension > |
|
using | InputDiffusionTensor3DType = typename Superclass::InputDiffusionTensor3DType |
|
using | InputPointType = Point< TParametersValueType, Self::InputSpaceDimension > |
|
using | InputPointValueType = typename InputPointType::ValueType |
|
using | InputSymmetricSecondRankTensorType = typename Superclass::InputSymmetricSecondRankTensorType |
|
using | InputTensorEigenVectorType = CovariantVector< TParametersValueType, InputDiffusionTensor3DType::Dimension > |
|
using | InputVectorPixelType = typename Superclass::InputVectorPixelType |
|
using | InputVectorType = Vector< TParametersValueType, Self::InputSpaceDimension > |
|
using | InputVnlVectorType = vnl_vector_fixed< TParametersValueType, Self::InputSpaceDimension > |
|
using | InverseJacobianPositionType = typename Superclass::InverseJacobianPositionType |
|
using | InverseMatrixType = Matrix< TParametersValueType, Self::InputSpaceDimension, Self::OutputSpaceDimension > |
|
using | InverseTransformBasePointer = typename InverseTransformBaseType::Pointer |
|
using | InverseTransformBaseType = typename Superclass::InverseTransformBaseType |
|
using | JacobianPositionType = typename Superclass::JacobianPositionType |
|
using | JacobianType = typename Superclass::JacobianType |
|
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 = typename Superclass::OutputDiffusionTensor3DType |
|
using | OutputPointType = Point< TParametersValueType, Self::OutputSpaceDimension > |
|
using | OutputPointValueType = typename OutputPointType::ValueType |
|
using | OutputSymmetricSecondRankTensorType = typename Superclass::OutputSymmetricSecondRankTensorType |
|
using | OutputVectorPixelType = typename Superclass::OutputVectorPixelType |
|
using | OutputVectorType = Vector< TParametersValueType, Self::OutputSpaceDimension > |
|
using | OutputVectorValueType = typename OutputVectorType::ValueType |
|
using | OutputVnlVectorType = vnl_vector_fixed< TParametersValueType, Self::OutputSpaceDimension > |
|
using | ParametersType = typename Superclass::ParametersType |
|
using | ParametersValueType = typename Superclass::ParametersValueType |
|
using | Pointer = SmartPointer< Self > |
|
using | ScalarType = typename Superclass::ScalarType |
|
using | Self = MatrixOffsetTransformBase |
|
using | Superclass = Transform< TParametersValueType, NInputDimensions, NOutputDimensions > |
|
using | TransformCategoryType = typename Superclass::TransformCategoryType |
|
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 | FixedParametersType = typename Superclass::FixedParametersType |
|
using | FixedParametersValueType = typename Superclass::FixedParametersValueType |
|
using | InputCovariantVectorType = CovariantVector< TParametersValueType, NInputDimensions > |
|
using | InputDiffusionTensor3DType = DiffusionTensor3D< TParametersValueType > |
|
using | InputDirectionMatrix = Matrix< double, Self::InputSpaceDimension, Self::InputSpaceDimension > |
|
using | InputPointType = Point< TParametersValueType, NInputDimensions > |
|
using | InputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< TParametersValueType, NInputDimensions > |
|
using | InputVectorPixelType = VariableLengthVector< TParametersValueType > |
|
using | InputVectorType = Vector< TParametersValueType, NInputDimensions > |
|
using | InputVnlVectorType = vnl_vector_fixed< TParametersValueType, NInputDimensions > |
|
using | InverseJacobianPositionType = vnl_matrix_fixed< ParametersValueType, NInputDimensions, NOutputDimensions > |
|
using | InverseTransformBasePointer = typename InverseTransformBaseType::Pointer |
|
using | InverseTransformBaseType = Transform< TParametersValueType, NOutputDimensions, NInputDimensions > |
|
using | JacobianPositionType = vnl_matrix_fixed< ParametersValueType, NOutputDimensions, NInputDimensions > |
|
using | JacobianType = Array2D< ParametersValueType > |
|
using | MatrixType = Matrix< TParametersValueType, Self::OutputSpaceDimension, Self::InputSpaceDimension > |
|
using | NumberOfParametersType = typename Superclass::NumberOfParametersType |
|
using | OutputCovariantVectorType = CovariantVector< TParametersValueType, NOutputDimensions > |
|
using | OutputDiffusionTensor3DType = DiffusionTensor3D< TParametersValueType > |
|
using | OutputDirectionMatrix = Matrix< double, Self::OutputSpaceDimension, Self::OutputSpaceDimension > |
|
using | OutputPointType = Point< TParametersValueType, NOutputDimensions > |
|
using | OutputSymmetricSecondRankTensorType = SymmetricSecondRankTensor< TParametersValueType, NOutputDimensions > |
|
using | OutputVectorPixelType = VariableLengthVector< TParametersValueType > |
|
using | OutputVectorType = Vector< TParametersValueType, NOutputDimensions > |
|
using | OutputVnlVectorType = vnl_vector_fixed< TParametersValueType, NOutputDimensions > |
|
using | ParametersType = typename Superclass::ParametersType |
|
using | ParametersValueType = typename Superclass::ParametersValueType |
|
using | Pointer = SmartPointer< Self > |
|
using | ScalarType = ParametersValueType |
|
using | Self = Transform |
|
using | Superclass = TransformBaseTemplate< TParametersValueType > |
|
using | TransformCategoryType = typename Superclass::TransformCategoryType |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | FixedParametersType = OptimizerParameters< FixedParametersValueType > |
|
using | FixedParametersValueType = double |
|
using | NumberOfParametersType = IdentifierType |
|
using | ParametersType = OptimizerParameters< ParametersValueType > |
|
using | ParametersValueType = TParametersValueType |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = TransformBaseTemplate |
|
using | Superclass = Object |
|
enum | TransformCategoryType {
UnknownTransformCategory =0,
Linear =1,
BSpline =2,
Spline =3,
DisplacementField =4,
VelocityField =5
} |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = Object |
|
using | Superclass = LightObject |
|
using | ConstPointer = SmartPointer< const Self > |
|
using | Pointer = SmartPointer< Self > |
|
using | Self = LightObject |
|
|
void | Compose (const Self *other, bool pre=false) |
|
void | ComputeInverseJacobianWithRespectToPosition (const InputPointType &x, InverseJacobianPositionType &jac) const override |
|
void | ComputeJacobianWithRespectToParameters (const InputPointType &x, JacobianType &j) const override |
|
void | ComputeJacobianWithRespectToPosition (const InputPointType &x, JacobianPositionType &jac) const override |
|
virtual ::itk::LightObject::Pointer | CreateAnother () const |
|
const InputPointType & | GetCenter () const |
|
const FixedParametersType & | GetFixedParameters () const override |
|
InverseTransformBasePointer | GetInverseTransform () const override |
|
virtual const MatrixType & | GetMatrix () const |
|
virtual const char * | GetNameOfClass () const |
|
const OutputVectorType & | GetOffset () const |
|
const ParametersType & | GetParameters () const override |
|
TransformCategoryType | 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 |
|
OutputCovariantVectorType | TransformCovariantVector (const InputCovariantVectorType &vector) const override |
|
OutputVectorPixelType | TransformCovariantVector (const InputVectorPixelType &vector) const override |
|
OutputDiffusionTensor3DType | TransformDiffusionTensor3D (const InputDiffusionTensor3DType &tensor) const override |
|
OutputVectorPixelType | TransformDiffusionTensor3D (const InputVectorPixelType &tensor) const override |
|
OutputPointType | TransformPoint (const InputPointType &point) const override |
|
OutputSymmetricSecondRankTensorType | TransformSymmetricSecondRankTensor (const InputSymmetricSecondRankTensorType &tensor) const override |
|
OutputVectorPixelType | TransformSymmetricSecondRankTensor (const InputVectorPixelType &tensor) const override |
|
OutputVectorType | TransformVector (const InputVectorType &vector) const override |
|
OutputVnlVectorType | TransformVector (const InputVnlVectorType &vector) const override |
|
OutputVectorPixelType | TransformVector (const InputVectorPixelType &vector) const override |
|
|
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 | ComputeJacobianWithRespectToParameters (const InputPointType &, JacobianType &) const =0 |
|
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 |
|
virtual NumberOfParametersType | GetNumberOfFixedParameters () const |
|
virtual NumberOfParametersType | GetNumberOfLocalParameters () const |
|
NumberOfParametersType | GetNumberOfParameters () const override |
|
unsigned int | GetOutputSpaceDimension () const override |
|
const ParametersType & | GetParameters () const override |
|
TransformCategoryType | 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 &) 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, ParametersValueType factor=1.0) |
|
virtual void | ComputeJacobianWithRespectToPosition (const InputPointType &, JacobianPositionType &) const |
|
| itkLegacyMacro (virtual void ComputeJacobianWithRespectToPosition(const InputPointType &x, JacobianType &jacobian) const) |
|
virtual void | ComputeInverseJacobianWithRespectToPosition (const InputPointType &x, InverseJacobianPositionType &jacobian) const |
|
| itkLegacyMacro (virtual void ComputeInverseJacobianWithRespectToPosition(const InputPointType &x, JacobianType &jacobian) const) |
|
virtual void | CopyInFixedParameters (const FixedParametersValueType *const begin, const FixedParametersValueType *const end)=0 |
|
virtual void | CopyInParameters (const ParametersValueType *const begin, const ParametersValueType *const end)=0 |
|
virtual void | SetFixedParameters (const FixedParametersType &)=0 |
|
virtual void | SetParameters (const ParametersType &)=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 () |
|
const MetaDataDictionary & | GetMetaDataDictionary () 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 |
|
void | Register () const override |
|
void | RemoveAllObservers () |
|
void | RemoveObserver (unsigned long tag) |
|
void | SetDebug (bool debugFlag) const |
|
void | SetReferenceCount (int) override |
|
void | UnRegister () const noexceptoverride |
|
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
|
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
|
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 TParametersValueType = 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 295 of file itkMatrixOffsetTransformBase.h.