class_docstr: Merge image files.
  
  See Also
  --------
  `Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`__ --
  `Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`__
  
  Examples
  --------
  >>> from nipype.interfaces import niftyseg
  >>> node = niftyseg.Merge()
  >>> node.inputs.in_file = 'im1.nii'
  >>> files = ['im2.nii', 'im3.nii']
  >>> node.inputs.merge_files = files
  >>> node.inputs.dimension = 2
  >>> node.inputs.output_datatype = 'float'
  >>> node.cmdline
  'seg_maths im1.nii -merge 2 2 im2.nii im3.nii -odt float im1_merged.nii'
class_docstr_tok: ["Merge","image","files",".","See","Also","--","--","--","--","`","Source","code","<","http",":","\/\/cmictig.cs.ucl.ac.uk\/wiki\/index.php\/NiftySeg",">","`","__","--","`","Documentation","<","http",":","\/\/cmictig.cs.ucl.ac.uk\/wiki\/index.php\/NiftySeg_documentation",">","`","__","Examples","--","--","--","--",">",">",">","from","nipype.interfaces","import","niftyseg",">",">",">","node","=","niftyseg.Merge","(",")",">",">",">","node.inputs.in_file","=","'im1.nii'",">",">",">","files","=","[","'im2.nii","'",",","'im3.nii","'","]",">",">",">","node.inputs.merge_files","=","files",">",">",">","node.inputs.dimension","=","2",">",">",">","node.inputs.output_datatype","=","'float'",">",">",">","node.cmdline","'seg_maths","im1.nii","-merge","2","2","im2.nii","im3.nii","-odt","float","im1_merged.nii","'"]
docstr: Convert input to appropriate format for seg_maths.
docstr_tok: ["Convert","input","to","appropriate","format","for","seg_maths","."]
code: def _format_arg(self, opt, spec, val):
      """Convert input to appropriate format for seg_maths."""
      if opt == "merge_files":
          return "-merge %d %d %s" % (
              len(val),
              self.inputs.dimension,
              " ".join(val),
          )
  
      return super()._format_arg(opt, spec, val)
  
imports: import os
  from ..base import TraitedSpec, File, traits, isdefined, CommandLineInputSpec, NipypeInterfaceError
  from .base import NiftySegCommand
  from ..niftyreg.base import get_custom_path
  from ...utils.filemanip import split_filename
label_desc: Use image node_id 1 for calling the Merge obj's underlying member method code with example usage: obj._format_arg(opt, spec, val) and returns: super, unknown