[vtkusers] Re: Averaging vtkTransforms

Andrew Maclean a.maclean at cas.edu.au
Thu Jul 21 02:53:22 EDT 2005


You may want to look at vtkQuaternionInterpolator if they are rotations.


-----Original Message-----
From: L.J. van Ruijven [mailto:L.J.vanRuijven at amc.uva.nl] 
Sent: Thursday, 21 July 2005 16:25
To: vtkusers at vtk.org
Cc: kwilson at imaging.robarts.ca
Subject: [vtkusers] Re: Averaging vtkTransforms

Hi Kevin,

The problem is that you have to transform the transformation to a 
number of linear parameters. To illustrate this, if you have two 
rotations, one over 180 degrees and the other over -180 degrees, then 
the arithmatic mean is 0 degrees. This is obviously not the result you 
want to have. 

You could try to average the individual coefficients of the 
transformation. This is simple and works well as long as the standard 
deviations are relatively small. When the standard deviations are large 
I don't think there is a general solution, but you might try to 
calculate the rotation angles of the transform, and average those 
angles.

Leo

> Date: Wed, 20 Jul 2005 13:05:09 -0400
> From: "Kevin Wilson" <kwilson at imaging.robarts.ca>
> Subject: [vtkusers] Averaging vtkTransforms
> To: <vtkusers at vtk.org>
> Message-ID: <PDELIKEGAHECAHLPECJDIEFHCBAA.kwilson at imaging.robarts.ca>
> Content-Type: text/plain;	charset="iso-8859-1"
> 
> Hi all,
> 
> I have about 10 polydata Transforms that I want to average into one
> Transform.  My question is - is there any easier way to do this that
> extracting each rotation and translation and averaging them 
> manually??  I
> tried to look at vtkTransformCollection but I didn't see any 
> GetAverage() in
> the documentation.
> 
> Any Suggestions??
> 
> Kevin
> 
> 
> 






More information about the vtkusers mailing list