Detailed Description

This transform applies a homogenous scale and rigid transform in 2D space. The transform is specified as a scale and rotation around a arbitrary center and is followed by a translation. given one angle for rotation, a homogeneous scale and a 2D offset for translation.

The main difference between this class and its superclass Similarity2DTransform is that the center of transformation is exposed for optimization.

The serialization of the optimizable parameters is an array of 6 elements ordered as follows: p[0] = scale p[1] = angle p[2] = x coordinate of the center p[3] = y coordinate of the center p[4] = x component of the translation p[5] = y component of the translation

Member Function Documentation

Allow people to add/remove/invoke observers (callbacks) to any ITK object. This is an implementation of the subject/observer design pattern. An observer is added by specifying an event to respond to and an itk::Command to execute. It returns an unsigned long tag which can be used later to remove the event or retrieve the command. The memory for the Command becomes the responsibility of this object, so don't pass the same instance of a command to two different objects

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.

Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.

This method returns the point used as the fixed center of rotation for the MatrixOffsetTransformBase. To define an affine transform, you must set the matrix, center, and translation OR the matrix and offset

Get the command associated with the given tag. NOTE: This returns a pointer to a Command, but it is safe to asign this to a Command::Pointer. Since Command inherits from LightObject, at this point in the code, only a pointer or a reference to the Command can be used.

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.

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.

Get the parameters that uniquely define the transform This is typically used by optimizers. There are 6 parameters. The first one represents the scale, the second represents the angle of rotation, the next two represent the center of the rotation and the last two represent the translation.

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

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

Set the transformation from a container of parameters This is typically used by optimizers. There are 6 parameters. The first one represents the scale, the second represents the angle of rotation, the next two represent the center of the rotation and the last two represent the translation.

Set the transformation by copying parameters and update internal transformation. This method forces the transform to copy the parameters. The default implementation is to call SetParameters. This call must be overridden if the transform normally implements SetParameters by keeping a reference to the parameters.

Set the transformation parameters and update internal transformation. This method forces the transform to copy the parameters. The default implementation is to call SetParameters. This call must be overridden if the transform normally implements SetParameters by keeping a reference to the parameters.

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

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.