[Insight-developers] Centered Transforms

Miller, James V (Research) millerjv at crd.ge.com
Mon Mar 7 13:55:36 EST 2005


I don't think I am going to be of much help since I do not 
understand the difference between an "offset" and a "translation".

Skimming through the headers, it looks like transforms like the 
affine transform are defined by equations

y = Ax + b

where A is the "matrix" stored in the transform and "b" is the offset.

To me, it looks like the only things that need to be STORED are the
matrix and offset.  With the "center" and "translation" being computations
based on A and b.  Conversely, you could argue that one would want to
set the center and translation. In doing so, the matrix A and offset b
would have to be updated. However, I would favor not storing the center and
translation if there are truly secondary parameters completely defined by
A and b.





-----Original Message-----
From: insight-developers-bounces at itk.org
[mailto:insight-developers-bounces at itk.org]On Behalf Of Stephen R.
Aylward
Sent: Monday, March 07, 2005 1:15 PM
To: Insight-developers (E-mail)
Subject: [Insight-developers] Centered Transforms



When someone updates the center of rotation or matrix for a transform, 
either the translation or the offset must be implicitly updated for 
consistency.   This implicit update is necessary since translation and 
offset are related to one another via the transform matrix and the 
center of rotation.

My vote is that the offset should be implicitly updated when the center, 
matrix, or translation is set by the user; and that translation should 
only be implicitly updated when the offset is set by the user.

That is, we assume that most people will set the translation component 
and not the offset component - this assumption is consistent with the 
behaviour of our optimizers which use translation as a parameter during 
optimization, not offset.

As a result, the following code will be valid:

Using an Euler3DTransform called transform...

CenterType center;
center.Fill(10);

TranslationType translation;
translation.Fill(0);

transform.SetRotation( 1, 2, 3 );
transform.SetTranslation( translation );
transform.SetCenter( center );

OutputPointType transformedPoint = transform.TransformPoint( center );
if( transformedPoint[0] != center[0] )
   {
   itkWarningMacro(<< "Oops.  Transform of center is not the center");
   }

This is consistent with most of the current transforms.  Can we accept 
this as the general "rule" for itk?

The other options are to (2) update the offset implicitly when center or 
matrix are updated, or (3) require the user to explicitly call 
ComputeTranslation, ComputeMatrix, ComputeOffset, and 
ComputeMatrixParameters (which, for example, updates the versor in a 
versorTransform when the user sets the matrix directly).  Option 3 
requires significant changes throughout ITK.   Option 2 is okay, but 
will require a few changes - probably about the same number as 
implicitly updating transform - however, I see it as less consistent 
because of how optimizers update transforms....

Any opinions / comments?

Thanks,
Stephen

-- 
===========================================================
Dr. Stephen R. Aylward
Associate Professor of Radiology
Adjunct Associate Professor of Computer Science and Surgery
http://caddlab.rad.unc.edu
aylward at unc.edu
(919) 966-9695
_______________________________________________
Insight-developers mailing list
Insight-developers at itk.org
http://www.itk.org/mailman/listinfo/insight-developers


More information about the Insight-developers mailing list