medpy.features.intensity.centerdistance#
- medpy.features.intensity.centerdistance(image, voxelspacing=None, mask=slice(None, None, None))[source]#
Takes a simple or multi-spectral image and returns its voxel-wise center distance in mm. A multi-spectral image must be supplied as a list or tuple of its spectra.
Optionally a binary mask can be supplied to select the voxels for which the feature should be extracted.
The center distance is the exact euclidean distance in mm of each voxels center to the central point of the overal image volume.
Note that this feature is independent of the actual image content, but depends solely on its shape. Therefore always a one-dimensional feature is returned, even if a multi-spectral image has been supplied.
- 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:
- centerdistancendarray
The distance of each voxel to the images center.
See also