On a related note, is there a general way to extract the warps (linear and non-) that were used to make a dataset from its header? I just noticed the (as yet undocumented) ALLINEATE_MATVEC_* attributes while I was writing a script that could make good use of this information if there were an easy way to access it.
Some use cases for this:
- compute total path length traveled by a voxel during registration [this is currently possible if the warp was affine instead of nonlinear, using VOLREG_MATVEC_* or ALLINEATE_MATVEC_*]
- compute the extent to which data at a given voxel corresponds to a single voxel in the raw data, or is interpolated from several such [this use would require that interpolation was done with a linear filter, and would require knowledge of that filter]
- transform retroicor regressors from orig space to be used in the subject-level analysis (so that they can be applied in the GLM step rather than before... and so that DoF can be properly accounted for) [this would require the same linearity as above, and also the ability to represent the action of 3dTshift in the same way, and probably require some checking of assumptions]
ijs