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! **