cortex.utils.get_vox_dist¶
- cortex.utils.get_vox_dist(subject, xfmname, surface='fiducial', max_dist=inf)[source]¶
Get the distance (in mm) from each functional voxel to the closest point on the surface.
- Parameters:
- subjectstr
Name of the subject
- xfmnamestr
Name of the transform
- max_distnonnegative float, optional
Limit computation to only voxels within max_dist mm of the surface. Makes computation orders of magnitude faster for high-resolution volumes.
- Returns:
- distndarray (z, y, x)
Array with the same shape as the reference image of xfmname containing the distance (in mm) of each voxel to the closest point on the surface.
- argdistndarray (z, y, x)
Array with the same shape as the reference image of xfmname containing for each voxel the index of the closest point on the surface.