class_docstr: Calculates distance between two volumes.
code: def _run_interface(self, runtime):
      # there is a bug in some scipy ndimage methods that gets tripped by memory mapped objects
      nii1 = nb.load(self.inputs.volume1, mmap=False)
      nii2 = nb.load(self.inputs.volume2, mmap=False)
  
      if self.inputs.method == "eucl_min":
          self._distance, self._point1, self._point2 = self._eucl_min(
              nii1, nii2
          )
  
      elif self.inputs.method == "eucl_cog":
          self._distance = self._eucl_cog(nii1, nii2)
  
      elif self.inputs.method == "eucl_mean":
          self._distance = self._eucl_mean(nii1, nii2)
  
      elif self.inputs.method == "eucl_wmean":
          self._distance = self._eucl_mean(nii1, nii2, weighted=True)
      elif self.inputs.method == "eucl_max":
          self._distance = self._eucl_max(nii1, nii2)
  
      return runtime
  
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 7 for calling the Distance obj's underlying member method code with example usage: obj._run_interface(runtime) and returns: runtime