class_docstr: Split one Nifti file into many along the specified dimension. Each
  result has an updated meta data extension as well.
class_docstr_tok: ["Split","one","Nifti","file","into","many","along","the","specified","dimension",".","Each","result","has","an","updated","meta","data","extension","as","well","."]
code: def _run_interface(self, runtime):
      self.out_list = []
      nii = nb.load(self.inputs.in_file)
      nw = NiftiWrapper(nii, make_empty=True)
      split_dim = None
      if self.inputs.split_dim == traits.Undefined:
          split_dim = None
      else:
          split_dim = self.inputs.split_dim
      for split_idx, split_nw in enumerate(nw.split(split_dim)):
          const_meta = split_nw.meta_ext.get_class_dict(
              ("global", "const")
          )
          out_path = self._get_out_path(const_meta, idx=split_idx)
          nb.save(split_nw.nii_img, out_path)
          self.out_list.append(out_path)
  
      return runtime
  
imports: import os
  from os import path
  import string
  import errno
  from glob import glob
  import nibabel
  import imghdr
  from .base import TraitedSpec, DynamicTraitedSpec, InputMultiPath, File, Directory, traits, BaseInterface, isdefined, Undefined
label_desc: Use image node_id 1 for calling the SplitNifti obj's underlying member method code with example usage: obj._run_interface(runtime) and returns: runtime