Is it possible to analyze 2D images in time series


I just started to learn AFNI, and I’m trying to use it on 2D optical images on brain for an extended period of time imported in nii format. I assume that there would be some way to set AFNI to analyze in only two dimensions and make regression over time, but I don’t quite see a way to do it. Is there any advice on this subject? Thanks!



Since your data are in NIfTI format, almost all AFNI programs can directly work on your data (2D or 3D).

As Gang said, most AFNI programs don’t “care” about a 3D position at all. In fact, we sometimes recommend reducing a 3D dataset down to a single slice at a time to conserve memory with 3dZcutup. Many programs even take 1D data, just a column of numbers. Spatially oriented programs like programs to do alignment or spatial smoothing (3dAllineate, 3dQwarp and others) will care, of course, so you would have to accommodate for that if you do want to use this data in a 3D way. For display, you will want to set the voxel dimensions in x,y,z with 3drefit or similar. So to set a slice thickness if there isn’t one,

3drefit -zdel 1.0 myslice.nii.gz

You may want to triplicate a slice image with 3dZcat for easier viewing in AFNI, as for viewing the dataset overlaid on top of an anatomical dataset.

3dZcat -prefix myslicex3.nii.gz myslice.nii.gz myslice.nii.gz myslice.nii.gz