How to transform the *scale+tlrc to corresponding *nii data?

Hello. I have completed the preprocessing, subject-level analysis and group-level analysis using the AFNI. And I want to do DCM in SPM12, so I try to tranform the AFNI data to NIFIT format. When I used the "3dcalc -a *.scale+tlrc - expr a -prefix *.scale.nii", it ran successfully, and outputted the corresponding number of data files. But the .nii data that SPM Specify 1st-level analysis needs is a set of scans.
Please help me, are there any error in the script or what is the appropriate script available? If I want to use the preprocessing AFNI data directly on SPM for later DCM analysis, couly you give me some suggestions ?
Thank you very much !

Hi-

I don't quite understand. If you have two BRIK/HEAD files, called FILEA+tlrc and and FILEB+tlrc, then you need to convert each one separately to NIFTI---you can't use a wildcard in the prefix filename. There are multiple ways to do it, but 3dcalc is certainly fine:

3dcalc -a FILEA+tlrc -expr a -prefix FILEA.nii

3dcalc -a FILEB+tlrc -expr a -prefix FILEB.nii

What is meant by a "set of scans"? Do you mean that each input dataset is four dimension (a set of 3D volumes, at a number of time points), and you like a set of separate, 3D volumetric files? If that is what you want, then you can use a program @pmolfese wrote called 3dTsplit4D:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/alpha/3dTsplit4D_sphx.html#ahelp-3dtsplit4d

It can output NIFTI directly, like with:

3dTsplit4D -prefix OUTPUT.nii INPUT+tlrc

--pt

Thank you very much! This script is exactly what I want. I want to output a set of separate, 3D volumetric files.
The "*" in the old scipt described above is just a general descriptor for different runs, and I do convert each one separately to NIFTI.
Thanks again !

As a side note, also consider 3dcopy as a simple way to convert between various formats, e.g.

3dcopy FILEA+tlrc FILEA.nii
  • rick