Posted by
Michael Doube on
Aug 21, 2008; 3:19pm
URL: http://imagej.273.s1.nabble.com/Transform-stack-using-eigenvectors-tp3695184p3695185.html
To answer my own question:
The aligned position is the 3 dot products of the original coordinate
(x,y,z) and the 3 eigenvectors (the principal axes). Each eigenvector
is a normal to the plane that contains the other 2 eigenvectors because
they are orthogonal. A plane is defined by the vector of its normal and
the position of the plane on that normal. The dot product of a plane
and a point is the distance between plane and point, assuming that
(0,0,0) is a solution for the plane. So if you subtract the centroid
from the point and work out the 3 dot products corresponding to the 3
eigenplanes, you have the distance along each of the eigenvectors which
defines the point in the principal axis coordinate frame, and hence
gives you 'aligned' coordinates. Then the aligned coordinates can be
drawn in ordinary image coordinates and the object is aligned according
to its principal axes.
If that makes no sense or is blatantly wrong, please email me, otherwise
it's going in a plugin tonight...
Mike
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
> Michael Doube
> Sent: Friday, August 15, 2008 5:57 PM
> To:
[hidden email]
> Subject: Transform stack using eigenvectors
>
> Hi all
>
> I have written a plugin that calculates the 3D moments of inertia of a
> bone imaged in CT, using the Jama package and eigen decomposition.
>
> Now that I have a set of eigenvalues and eigenvectors I want to align my
> object such that its principal axes are parallel with the x,y,z axes of
> a new stack.
>
> Can anyone shed some light as to how to best achieve this?
>
> Mike
>
>