Hi, Soo Hyun-
Yeah, that is a bit tricky, I am afraid. Hopefully the following will work. I did this using the AFNI Bootcamp data as an example, and that is where some of the dset file names come from (in this directory of the downloadable Bootcamp data: "AFNI_data6/FT_analysis/FT/SUMA/").
1) Open the SUMA surface (I ran the "run.suma.00.both.141" in the above Bootcamp directory), and then draw one or more ROIs, giving each a different number and label. In my case, I made three ROIs, with the following index=label combinations: 1=abc, 2=def, 3=ghi.
2) In the GUI, save the dset, in my case I gave it the prefix "three_rois.lh", because I had that many ROIs drawn on the left hemisphere.
3) Convert ROI to surface dset. The "-input .." must be at end:
ROI2dataset \
-label_dset three_rois.lh.niml.dset \
-input three_rois.lh.niml.roi
Note: I had to use "-label_dset .." instead of "-prefix .." to preserve the ROI labels in the dataset header in a labeltable, which will be used later. You can see this information in the output as follows:
3dinfo -labeltable three_rois.lh.niml.dset
... which for me produced the following output:
<VALUE_LABEL_DTABLE
ni_type="2*String"
ni_dimen="3" >
"1" "abc"
"2" "def"
"3" "ghi"
</VALUE_LABEL_DTABLE>
4) Convert the surface dataset (*.niml.dset) to a volumetric one (BRIK/HEAD or NIFTI); the command I use here mostly just follows "run.roi2dset" script example in this Bootcamp directory:
3dSurf2Vol \
-spec std.141.FT_lh.spec \
-surf_A smoothwm \
-surf_B pial \
-sv FT_SurfVol.nii \
-grid_parent FT_SurfVol.nii \
-map_func mode \
-f_steps 12 \
-sdata three_rois.lh.niml.dset \
-prefix three_rois.lh.s2v.roi
Note: At this point, three_rois.lh.s2v.roi+orig does *not* have labels; this can be seen by running:
3dinfo -labeltable three_rois.lh.s2v.roi+orig
... which just produces the message:
NO_LABEL_TABLE
...so we need to attach the labeltable from the earlier-made file.
5) Attach the labeltable from earlier dset that has it:
3drefit -copytables three_rois.lh.niml.dset three_rois.lh.s2v.roi+orig.
... and you can verify either in the AFNI GUI or using "3dinfo -labeltable ..." again that the three_rois.lh.s2v.roi+orig.* dset has its labels now.
--pt
Edited 1 time(s). Last edit at 06/29/2020 10:58PM by ptaylor.