class_docstr: Calculates distance between two volumes.
code: def _get_coordinates(self, data, affine):
      if len(data.shape) == 4:
          data = data[:, :, :, 0]
      indices = np.vstack(np.nonzero(data))
      indices = np.vstack((indices, np.ones(indices.shape[1])))
      coordinates = np.dot(affine, indices)
      return coordinates[:3, :]
  
imports: import os
  import os.path
  import nibabel
  import numpy
  from ..None import config, logging
  from ..interfaces.base import SimpleInterface, BaseInterface, traits, TraitedSpec, File, InputMultiPath, BaseInterfaceInputSpec, isdefined
  from ..interfaces.nipy.base import NipyBaseInterface
label_desc: Use image node_id 2 for calling the Distance obj's underlying member method code with example usage: obj._get_coordinates(data, affine) and returns: coordinates