Converting 4d (3d+t) BOLD image to 3d (2d+t) flat map?

Hello, does anyone know how to convert a 4d (3d+time) BOLD image into a 3d (2d+time) flat map of BOLD activity? i have surfaces obtained through freesurfer, and i’m experimenting with SUMA in AFNI, but it seems to be mainly for visualizing single 3d maps (correlation maps, for example) as surfaces.

is there a way to get my raw BOLD 4d image into a 2d+Time flat map (Basically, a time series of flat maps)?

why do i want 2d+t flat maps? because i’m trying to experiment with some CNN for image decoding using FMRI…most approaches i’ve seen have simply stacked the voxels (ignoring spatial relationships between the voxels, and hence not able to use convolutional layers).

thanks!

Do you mean splitting a (X, Y, Z, T) matrix into Z (X, Y, T) matrices? Or resampling to the cortical surface and projecting that onto a rectangular grid?

If the former, it’s quite easy (fslsplit -z). If the latter, I’ve found some papers but no software:

If something else, do you have a reference?

ideally, resampling to cortical surface and projecting that to a rectangular grid.

i’ll take a look at fslsplit, it might be a quick solution to what i need.

thanks for the resources :slight_smile:

edit - no, fsl split isn’t what i need, at all, from what i understand it just extracts 3d time points from the 4d image.

the surface representation is what i need, or i could just use 3d conv layers instead of 2d, probably won’t make much difference.

I don’t know of any published software that does this. https://www.math.fsu.edu/~mhurdal/research/flatmap.html seems to be quite research-y, and I don’t know what its outputs look like.

Hi-

You can use afni_proc.py to include projection onto your FreeSurfer-generated surface as part of your EPI+anatomical processing. This is done by including the “surf” block in afni_proc.py. Your final output stats from your GLM model are then surface dsets; these would give you your “2D+t” maps of EPIs on the surface (fitts* and errts* files), as well as your stats dset output on the surface.

Examples of this are included in the AFNI Bootcamp demos and lectures; you can see AFNI_data6/FT_analysis/s03.ap.surface, which is also Example 8 in the afni_proc.py help:
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/programs/afni_proc.py_sphx.html#example-8-surface-based-analysis

There is also a video lecture of teaching this in a Bootcamp here:
https://cbmm.mit.edu/afni
… with lectures 24-28 talking about SUMA usage in general, and lectures 26 (starting at about 29:00) through 28 talking about doing the surface projection with afni_proc.py explicitly.

In the AFNI Academy YouTube channel:


… a set of SUMA-related lectures will also be up soon.

–pt

thanks Paul, i’ll give this a try and let you know,

Russell

MANAGED BY INCF