class_docstr: Calculates similarity between two 3D or 4D volumes. Both volumes have to be in
  the same coordinate system, same space within that coordinate system and
  with the same voxel dimensions.
  
  .. note:: This interface is an extension of
            :py:class:`nipype.interfaces.nipy.utils.Similarity` to support 4D files.
            Requires :py:mod:`nipy`
  
  Example
  -------
  >>> from nipype.algorithms.metrics import Similarity
  >>> similarity = Similarity()
  >>> similarity.inputs.volume1 = 'rc1s1.nii'
  >>> similarity.inputs.volume2 = 'rc1s2.nii'
  >>> similarity.inputs.mask1 = 'mask.nii'
  >>> similarity.inputs.mask2 = 'mask.nii'
  >>> similarity.inputs.metric = 'cr'
  >>> res = similarity.run() # doctest: +SKIP
code: def _list_outputs(self):
      outputs = self._outputs().get()
      outputs["similarity"] = self._similarity
      return outputs
  
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 Similarity obj's underlying member method code with example usage: obj._list_outputs() and returns: outputs