AFNI program: cat_matvec
Output of -help
Usage: cat_matvec matvec_spec matvec_spec ...
Catenates 3D rotation+shift matrix+vector transformations.
Each matvec_spec is of the form
mfile [-opkey]
'mfile' can take 2 forms:
=== FORM 1 ===
mfile is the name of an ASCII file with 12 numbers arranged
in 3 lines:
u11 u12 u13 v1
u21 u22 u23 v2
u31 u32 u33 u3
where each 'uij' and 'vi' is a number. The 3x3 matrix [uij]
is the matrix of the transform, and the 3-vector [vi] is the
shift. The transform is [xnew] = [uij]*[xold] + [vi].
=== FORM 2 ===
mfile is of the form 'dataset::attribute', where 'dataset'
is the name of an AFNI dataset, and 'attribute' is the name
of an attribute in the dataset's header that contains a
matrix+vector (e.g., 'fred+orig::VOLREG_MATVEC_000000').
=== COMPUTATIONS ===
If [U] [v] are the matrix/vector for the first mfile, and
[A] [b] are the matrix/vector for the second mfile, then
the catenated transformation is
matrix = [A][U] vector = [A][v] + [b]
That is, the second mfile transformation follows the first.
The optional 'opkey' (operation key) following each mfile
starts with a '-', and then is a set of letters telling how
to treat the input. The only opkey currently defined is
-I = invert the transformation:
-1 -1
[xold] = [uij] [xnew] - [uij] [vi]
The transformation resulting by catenating the transformations
is written to stdout in the sam ASCII file format. This can be
used as input to 3drotate -matvec_dicom (provided [uij] is a
proper orthogonal matrix).
N.B.: If exactly 9 numbers can be read from an mfile, then those
values form the matrix, and the vector is set to zero.
This page generated on
Tue Aug 3 16:42:46 EDT 2004