Saturday, December 22, 2012

AFNI Command of the Week: 3dinfo

Researchers are always trying to find out more about their data. They examine at it from different angles; place it in their hand and feel its texture and test its heft; and look closely for portents and signs and the apocalypse.

3dinfo, similar to FSL's fslinfo and SPM's spm_vol, returns critical information about an FMRI dataset, such as the number of voxels along the x-, y-, and z-directions, the size of those voxels, and other header essentials, such as the number of volumes and the length of the repetition time (TR). This information is critical when performing steps such as slice timing correction with 3dTshift, when the researcher may want to know more about the number of slices and the acquisition of those slices, or when doing a step like cluster correction, where the voxel dimensions are a critical piece of information.

A few lesser known options include the -VERB option (in all caps), which generates even more information than the typical -verb option, and -echo_edu, which formats the standard output into a clear and easy-to-read table. This and more can be found in the following video:


  1. Hi Andy, Thanks for the nice video. How can we know the slice acquisition pattern needed for the slice timing correction using 3dinfo?

    1. Hey there,

      You can use this command:

      3dinfo -VERB run01.nii | grep offsets

      This will give you a list of numbers for the timings for each slice. For example, a list of numbers like this:

      0 0.75 0.25 1.00 0.50

      Would suggest ascending interleaved timing. To put it another way:

      Slice # Timing
      0 0
      1 0.75
      2 0.25
      3 1.00
      4 0.50

      If it were sequential, you would see the numbers increasing in a linear sequence.