running fake nifti's through 3dDeconvolve and 3dREMLfit

Hi AFNI experts,

My goal is to be able to run GLM’s on my generated surfaces the same way I am running them on my volumes.
Currently I am running my volumes through 3dDeconvolve then through 3dREMLfit.

I have been able to use wb_command’s convert-cifti function to create a fake nifti from my .dtseries.nii. The resulting Nifti’s dimensions are:
‘4 32767 3 1 650 1 1 1’
I am then able to run that fake nifti through both 3dDeconvolve and 3dREMLfit and get the variance parameter output and using wb_command. I am able to reconvert that to a cifti and things seem sensible.

However, a problem arises when I try and repeat this process with a ptseries.
After converting the ptseries to a nifti the resulting dimensions are:
‘4 360 1 1 650 1 1 1’
I am able to run this result through both 3dDeconvolve and 3dREMLfit, but both the variance output seems like it wasn’t written correctly. Here are the results of when using nifti_tool’s check_hdr:

** bad nhdr fields: dim0, sizeof_hdr = 12895, 1094459427
** bad ANALYZE datatype in hdr, 29791

Do you have any insight as to what could cause the issue with the ptseries as apposed to the dtseries?

Thanks,
Mitch

Hi Mitch,

It is hard to say without seeing the applied commands or
the actual contents of the NIFTI datasets.

But the basic problem might be that the dimensions seem to
be appropriate for 1D format, and that might override NIFTI.
Try setting the environment variable AFNI_WRITE_1D_AS_PREFIX
to YES, and see if that helps.

But really, why use NIFTI at all here, especially NIFTI-1?
Is there an option to use GIFTI, which is actually meant
for surfaces? Event NIFTI-2 would be a better idea, so you
would not need to break a dataset into multiple pieces.

See if GIFTI is an option, even if AFNI_WRITE_1D_AS_PREFIX
fixes the problem.

  • rick