class_docstr: Extracts signals over tissue classes or brain regions
  
  >>> seinterface = SignalExtraction()
  >>> seinterface.inputs.in_file = 'functional.nii'
  >>> seinterface.inputs.label_files = 'segmentation0.nii.gz'
  >>> seinterface.inputs.out_file = 'means.tsv'
  >>> segments = ['CSF', 'GrayMatter', 'WhiteMatter']
  >>> seinterface.inputs.class_labels = segments
  >>> seinterface.inputs.detrend = True
  >>> seinterface.inputs.include_global = True
code: def _run_interface(self, runtime):
      maskers = self._process_inputs()
  
      signals = []
      for masker in maskers:
          signals.append(masker.fit_transform(self.inputs.in_file))
      region_signals = np.hstack(signals)
  
      output = np.vstack(
          (self.inputs.class_labels, region_signals.astype(str))
      )
  
      # save output
      self._results["out_file"] = os.path.join(
          runtime.cwd, self.inputs.out_file
      )
      np.savetxt(
          self._results["out_file"], output, fmt=b"%s", delimiter="\t"
      )
      return runtime
  
file_path: nipype/nipype/interfaces/nilearn.py
imports: import os
  import numpy
  import nibabel
  from ..interfaces.base import traits, TraitedSpec, LibraryBaseInterface, SimpleInterface, BaseInterfaceInputSpec, File, InputMultiPath
label_desc: Use image node_id 1 for calling the SignalExtraction obj's underlying member method code with example usage: obj._run_interface(runtime) and returns: runtime