to3d functional data with only one slice

Hi afni experts,

When I’m trying to convert a functional dataset with only one slice from DICOM files with something like:
to3d -prefix test.nii -time:zt 1 120 3000 alt+z2 *.IMA
The program complains about:
*+ WARNING: Bad DICOM header - assuming oblique scaling direction!
++ Command line TR=3000ms ; Images TR=3s
++ Making widgets…
Then enters into interactive mode. I have to manually click “Save Dataset” for each run in order to proceed.

Is it possible to somehow suppress the interactive prompt?
And better, it is possible to tell afni to treat the single slice as an “3D” volume, rather than a 2D image?

Thank you very much!

My guess is that you need an orientation like “-orient RAI”, for instance. The last letter of the orientation, the ‘kth’ direction, can’t be determined with only a single slice. If you expect these to be similar, use an orientation you know these to be acquired in or the first two letters of the orientation from the interactive session. Be careful about left-right directions.


I encountered the same problem. Have you figured out how to tell afni that this is a 3d data?



Can you please clarify some points to your question:

  1. What to3d command are you specifically using?

  2. And what error/output message or behavior are you receiving?

  3. You mention having 3D data; the previous case was specifically for 4D data, where one of the 3D spatial dimensions was “1”. Is your case reconstructing a single volume (purely spatial dataset), or does it have a time axis? Basically, what is your specific input data?

  4. I think Daniel’s suggestion of including “-orient …” information in the previous question in this thread is the thing to include to not get the pop-up/interactive session. Are you including that? (This response will be clarified by your answer to Q1.)


For raw binary data, you may need to set the FOV or SLAB options in x, y and z directions to get voxel sizes. Setting these is another way to set the orientation. For most DICOM data, that shouldn’t be necessary. When the GUI for to3d appears, you can usually figure out what is missing and supply it on the command line.