Summary of what happened:
Hi, I’m using vol_2_surf in Nilearn for mapping bold to a cortex mesh but return nan value.
However, when I calculated the distance between the cortex vertices and brain mask, I found all distance less than RADIUS (5mm). This prove for each node on cortex mesh, at least one neighbor within the ball region must not be excluded by the brain mask.
Command used (and if a helper script was used, a link to the helper script or the command generated):
bold_brain = vol_to_surf(
img=bold_native,
surf_mesh=(v_brain_on_bold_native, f_brain),
radius=5,
kind='ball',
mask_img=brain_mask_on_native_bold_img
)
Version:
python==3.11
nilearn==0.13.0
Relevant log outputs (up to 20 lines):
PASTE LOG OUTPUT HERE
