[MINC-development] param2xfm && xfm2param (fwd)

Andrew Janke minc-development@bic.mni.mcgill.ca
Thu, 3 Apr 2003 11:54:13 +1000


On Thu, 3 Apr 2003, Andrew Janke wrote:

> On Wed, 2 Apr 2003, Robert VINCENT wrote:
>
> > I found a comment on line 594 of "make_rots.c" which specifies that all three
> > scale factors must be positive.  I guess that even though conceptually a
> > negative scale factor makes sense, the actual math disallows it.  It seems to
> > use the transform to calculate the *magnitude* of the unit vector in each
> > direction, and uses this as the scale factor.  So negative numbers lose their
> > signs in the transformation.
>
> Correct, this is true for mni_autoreg.  mincresample on the other hand should
> (and can IIRC) handle pretty much any affine matrix you throw at it.  This
> becomes important when you consider importing volumes and using direction
> cosines that don't "make sense".

Oh and while we are at it, for an alternative way of decomposing an affine
matrix (with rotations of more than pi/2) and negative scales see:

  /s/s/minc/cvsroot/conversion/ana2mnc/ana2mnc_xfm_reduce.pl

In perl mind you... ;)



a