Nilearn.surface.vol_to_surf providing depths in mm

Hi,
I’m currently trying to implement vol_to_surf using a surf_mesh (pial surface) and inner_mesh (white matter surface). I’m seeing in the docs that for the depth parameter, that “each element of depth is a fraction of the distance from mesh to inner_mesh: 0 is exactly on the outer surface, .5 is halfway, 1. is exactly on the inner surface. depth entries can be negative or greater than 1.” So it appears that I can only specify depths as a fraction of the distance between my 2 surfaces.

I’m seeing in the source code that evenly spaced steps are taken along the distance between outer_vertex and inner_vertex. However, I’m wondering if if anyone has implemented a way of specifying depths as mm instead.

Thanks.

Hi @Audrey_Luo and welcome to neurostars!

Not a direct answer to your question, but if you are okay pivoting from Nilearn, FreeSurfer’s mri_vol2surf has an argument --projdist $DIST which does precisely what you ask (as opposed to --projfrac $FRAC which is similar to the Nilearn implementation).

Best,
Steven