class_docstr: uses  spm_reslice to resample in_file into space of space_defining
class_docstr_tok: ["uses","spm_reslice","to","resample","in_file","into","space","of","space_defining"]
docstr: generates script
docstr_tok: ["generates","script"]
code: def _make_matlab_command(self, _):
      """generates script"""
      if not isdefined(self.inputs.out_file):
          self.inputs.out_file = fname_presuffix(
              self.inputs.in_file, prefix="r"
          )
      script = """
          flags.mean = 0;
          flags.which = 1;
          flags.mask = 0;
          flags.interp = %d;
          infiles = strvcat(\'%s\', \'%s\');
          invols = spm_vol(infiles);
          spm_reslice(invols, flags);
          """ % (
          self.inputs.interp,
          self.inputs.space_defining,
          self.inputs.in_file,
      )
      return script
  
imports: import os
  import numpy
  from ...utils.filemanip import split_filename, fname_presuffix, ensure_list, simplify_list
  from ..base import TraitedSpec, isdefined, File, traits, OutputMultiPath, InputMultiPath
  from .base import SPMCommandInputSpec, SPMCommand, scans_for_fnames, scans_for_fname
label_desc: Use image node_id 1 for calling the Reslice obj's underlying member method code with example usage: obj._make_matlab_command(_) and returns: script