[MINC-development] reversedef and other things.

Andrew Janke minc-development@bic.mni.mcgill.ca
Thu, 17 Apr 2003 15:25:51 +1000


First and foremost I have added another directory to /s/s/minc_dev whilst in the
process of getting an old proggie (reversedef) that was part of mni-autoreg up
to date.

The directory is /s/s/minc_dev/xfmtools and contains the following goodies.

   xfmavg:  Averages (lin or non-linear) a series of .xfms to a single
               transform (done via fork to matlab! unless someone can
               can tell me how to do matrix logs and exponents in perl.

            This is usefull for determining if you have a bias in a series
               (time) of xfms.  Ie: you can then divide out the commonality
               in all your transforms.  Most usefull when building models.

   xfmflip: Flips a transform in a specified plane.  (used when creating
               symmetric averages).

   reversedef: This is actually done as part of mincresample using the -invert
               C/L option but louis write this long ago should you have a large
               number of these to do and want to compute a numerical inverse
               for the purposes of speed.


I haven't finished updating reversedef yet but most of the way.  The reason
being I'm starting to wonder if it's logic should be jsut added to xfminvert in
/s/s/m/cvs/m/progs/xfm/ as an option?

ie: xfminvert -numerical ?

thoughts?

This should work for both linear and non-linear transforms even though louis
originally intended it to work for def grid transforms only.  This may require
some extra code to be added to volume_io (I think this is where the
invert_general_transform_point stuff is...) but I don't think so.

While on this note, I guess the guts of xfmflip could be re-written into xfmtool
or as a separate thingo in C such that it can go "into" minc proper.  But that
would require me to re-write my lovely hacky perl code... :)

And then if I did that I'd probably code up a mexp and mlog function whilst at
it and C'erise xfmavg...   Hrm.



--
Andrew Janke   ( rotor@cmr.uq.edu.au || www.cmr.uq.edu.au/~rotor )
Australia->University of Queensland->Centre for Magnetic Resonance
Work: +61 7 3365 4100 || Home: +61 7 3800 4042