code: def centerdistance(image, voxelspacing = None, mask = slice(None)):
      r
      if type(image) == tuple or type(image) == list:
          image = image[0]
          
      return _extract_feature(_extract_centerdistance, image, mask, voxelspacing = voxelspacing)
docs: r"""
      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.
          
      See Also
      --------
      centerdistance_xdminus1