History of AFNI updates  

|
ziad
January 08, 2008 01:47PM
Hi Drew,

The problem was that matrix catenation was done in the reverse order.
Say Xvr = Mvr X
then Xall = Mall Xvr = Mall Mvr X
then Xtal = Mtal Xall = Mtal Mall Mvr X

So Xcomb = Mtal Mall Mvr rather than
Xcomb = Mvr Mall Mtal

So I ran:
cat_matvec 'Anat.ssh.bl3_at+tlrc::WARPDRIVE_MATVEC_FOR_000000' \
shift.alinNMIshr.aff12.1D \
shift1.vr.aff12.1D \
> shift1.vr.alin.at.aff12.new.1D
3dAllineate \
-input shift1.ts+orig \
-master shift-temp0.unb.alinNMIshr_at+tlrc \
-1Dmatrix_apply shift1.vr.alin.at.aff12.new.1D \
-prefix shift1.ts.vr.alin.at1.new \
-interp quintic

and shift1.ts.vr.alin.at1.new is dead on shift-temp0.unb.alinNMIshr_at

I would of course be tempted to tell you that this is actually mentioned in cat_matvec -help, complete with two stars (**) and an exclamation point for emphasis (I suspect, someone suffered from this confusion before). But I am guilty of the same sin as yours: I did not read the help and spent time debugging the problem on my own!

Lesson learned, we hope.

cheers,
z

Excerpt from cat_matvec -help:

=== COMPUTATIONS ===
If [v] are the matrix/vector for the first mfile, and
[A] are the matrix/vector for the second mfile, then
the catenated transformation is
matrix = [A] vector = [A][v] +
That is, the second mfile transformation follows the first.
** Thus, the order of matrix multiplication is exactly the **
** opposite of the order of the inputs on the command line! **
Subject Author Posted

cat_matvec, etc

Drew December 11, 2007 12:49PM

Re: cat_matvec, etc

Drew December 14, 2007 10:16AM

Re: cat_matvec, etc

ziad December 17, 2007 09:39AM

Re: cat_matvec, etc

Drew December 18, 2007 10:58AM

Re: cat_matvec, etc

Drew December 18, 2007 11:12AM

Re: cat_matvec, etc

Ziad December 18, 2007 11:22PM

Re: cat_matvec, etc

Drew December 19, 2007 10:37AM

Re: cat_matvec, etc

Drew December 19, 2007 10:38AM

Re: cat_matvec, etc

Drew December 19, 2007 10:43AM

Re: cat_matvec, etc

ziad December 20, 2007 02:13PM

Re: cat_matvec, etc

ziad December 21, 2007 01:50PM

Re: cat_matvec, etc

Drew January 02, 2008 12:23PM

Re: cat_matvec, etc

ziad January 08, 2008 01:47PM