medpy.features.intensity.mask_distance#
- medpy.features.intensity.mask_distance(image, voxelspacing=None, mask=slice(None, None, None))[source]#
Computes the distance of each point under the mask to the mask border taking the voxel-spacing into account.
Note that this feature is independent of the actual image content, but depends solely the mask image. Therefore always a one-dimensional feature is returned, even if a multi-spectral image has been supplied.
If no mask has been supplied, the distances to the image borders are returned.
- Parameters:
- imagearray_like or list/tuple of array_like
A single image or a list/tuple of images (for multi-spectral case).
- voxelspacingsequence of floats
The side-length of each voxel.
- maskarray_like
A binary mask for the image.
- Returns:
- mask_distancendarray
Each voxels distance to the mask borders.