Hi all. I'd like to convert my GLM outputs from afni_proc.py into NIFTI files and transform them to template space in another program. When I use 3dAFNItoNIFTI to do the conversion, I get a NIFTI file that AFNI reads perfectly well, but when I do the transformation (in ANTs, if you care), I only get one volume. Let's name the three datasets as follows, just for speed:
afni_proc.py output: GLM+orig
NIFTI conversion: GLM.nii
ANTs normalization: GLMnorm.nii
The reason would appear to be (after a look at the NIFTI specification, [
nifti.nimh.nih.gov]) that 3dAFNItoNIFTI converts GLM outputs into vector-valued datasets, rather than 4D datasets. So if I run fslinfo on GLM.nii -- the direct, unaltered output of 3dAFNItoNIFTI -- it tells me that the dataset has one volume. And if I run
nifti_tool -disp_hdr -field dim -infiles GLM.nii
I get:
header file 'GLM.nii', num_fields = 1
name offset nvals values
------------------- ------ ----- ------
dim 40 8 5 64 64 36 1 19 1 1
... or, five-dimensional data, 64x64x36, one volume, with each spatial point having a 19-dimensional vector of values.
Anyway, this sounds like an ANTs problem -- i.e., it doesn't treat vector-valued data correctly -- and maybe it is. :) Nonetheless, I have two questions:
(a) Might it be possible to alter 3dAFNItoNIFTI so there's the option to output time series data rather than vector-valued data for GLM outputs?
(b) Since I don't want to wait for a feature update to get this done, is the preferred solution just to call 3dAFNItoNIFTI on each sub-BRIK of GLM+orig, then stitch the outputs together and go from there? Or is there a more evolved solution? (Presumably I'll have to keep track of the identities of the sub-BRIKs myself, but that can be my problem.)
Many thanks, and sorry for the tome,
Matt