AFNI version info (afni -ver
):
Mar 1 2023 (Version AFNI_23.0.07 'Commodus')
My problem is a s simple as the title. I already create a SUMA spec folder. I usually use matlab so this is my approach to it.
the 4th dimension is the runs.
- load the 4D dataset in matlab using "surfing_read".
- loop over the scans and create a text file with 1D extension with the data values for each run.
- create a 3D Nifti file for each *.1D data. (It doesn't work).
can someone please tell me what am I doing wrong? or is there an easier way to do it? thank you
Below is an example for the first run data in the dataset.
sumafolder='....../Data/freesurfer/fsaverage6/SUMA/';
specfile=[sumafolder 'fsaverage6_rh.spec'];
surfvol=[sumafolder 'fsaverage6_SurfVol.nii'];
firstrun_1D=[sumafolder 'cur1d.1D'];
rtpial=[sumafolder 'rh.pial.gii'];
4Ddata=surfing_read(4Dnimldset);
firstrun_data=4Ddata.surface_data(:,1);
dlmwrite([sumafolder 'cur1d.1D'],firstrun_data','\t')
unix(['3dSurf2Vol -spec ' specfile ' -surf_A ' rtpial ' -sdata_1D ' firstrun_1D ' -sv ' surfvol ' -prefix ' prefix ' -map_func ave -grid_parent ' surfvol]);