Below I have included the code that I am using to convert the niml.dset data (in dt space) to the volumetric space and then convert it to ROIs using 3dROI maker. My plan is to do this for both hemispheres and then merge those hemispheres together using 3dcalc. However, since 3dROImaker inflates each hemisphere by 3 voxels up to the regions with FA>0.2, the ROIs inflate across the midline and overlap with one another. What is the best way to make a mask of each hemisphere? I was thinking about using 3dSurfMask -i_gii indt_std.141.pial.gii, but I'm not sure what grid_parent means. When I set grid_parent to my dt_FA.nii.gz, I get this error:
Error SUMA_3dSurfMask_ParseInput (SUMA_3dSurfMask.c:192):
Grid parent ../../DTparams/dt_FA.nii.gz does not exist (7).
Let me know what you think the best way to proceed will be in order to combine these hemispheres. And also if you have any feedback on my current @surf_to_vol_spackle + 3dROIMaker set-up, then let me know! Thanks.
for hemi in 'rh' 'lh'; do
bn="indt_std.141.${hemi}.Schaefer2018_400Parcels_17Networks"
@surf_to_vol_spackle \
-maskset indt_${hemi}.ribbon_Alnd_Exp.rs.nii.gz \
-spec indt_std.141.${hemi}.spec \
-surfA indt_std.141.${hemi}.smoothwm.gii \
-surfB indt_std.141.${hemi}.pial.gii \
-surfset "${bn}"_order.smooth3mm.cmaplbl.niml.dset \
-mode \
-prefix "${bn}"
gm_parc="${bn}.nii.gz"
3dROIMaker \
-inset $gm_parc \
-refset $gm_parc \
-prefix ${roi_dir}/$bn \
-inflate 3 \
-mask ${param_dir}/dwi_mask_e2.nii.gz \
-wm_skel ${param_dir}/dt_FA.nii.gz \
-skel_thr 0.2 \
-skel_stop_strict \
-nifti
done