Previous topic

medpy.features.intensity.intensities

Next topic

medpy.features.intensity.centerdistance_xdminus1

This Page

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:

image : array_like or list/tuple of array_like

A single image or a list/tuple of images (for multi-spectral case).

voxelspacing : sequence of floats

The side-length of each voxel.

mask : array_like

A binary mask for the image.

Returns:

centerdistance : ndarray

The distance of each voxel to the images center.