class_docstr: Interface for executable reg_average from NiftyReg platform.
  
  Compute average matrix or image from a list of matrices or image.
  The tool can be use to resample images given input transformation
  parametrisation as well as to demean transformations in Euclidean or
  log-Euclidean space.
  
  This interface is different than the others in the way that the options
  will be written in a command file that is given as a parameter.
  
  `Source code <https://cmiclab.cs.ucl.ac.uk/mmodat/niftyreg>`_
  
  Examples
  --------
  
  >>> from nipype.interfaces import niftyreg
  >>> node = niftyreg.RegAverage()
  >>> one_file = 'im1.nii'
  >>> two_file = 'im2.nii'
  >>> three_file = 'im3.nii'
  >>> node.inputs.avg_files = [one_file, two_file, three_file]
  >>> node.cmdline  # doctest: +ELLIPSIS
  'reg_average --cmd_file .../reg_average_cmd'
class_docstr_tok: ["Interface","for","executable","reg_average","from","NiftyReg","platform",".","Compute","average","matrix","or","image","from","a","list","of","matrices","or","image",".","The","tool","can","be","use","to","resample","images","given","input","transformation","parametrisation","as","well","as","to","demean","transformations","in","Euclidean","or","log-Euclidean","space",".","This","interface","is","different","than","the","others","in","the","way","that","the","options","will","be","written","in","a","command","file","that","is","given","as","a","parameter",".","`","Source","code","<","https",":","\/\/cmiclab.cs.ucl.ac.uk\/mmodat\/niftyreg",">","`","_","Examples","--","--","--","--",">",">",">","from","nipype.interfaces","import","niftyreg",">",">",">","node","=","niftyreg.RegAverage","(",")",">",">",">","one_file","=","'im1.nii'",">",">",">","two_file","=","'im2.nii'",">",">",">","three_file","=","'im3.nii'",">",">",">","node.inputs.avg_files","=","[","one_file",",","two_file",",","three_file","]",">",">",">","node.cmdline","#","doctest",":","+ELLIPSIS","'reg_average","--","cmd_file","...","\/reg_average_cmd","'"]
docstr: Rewrite the cmdline to write options in text_file.
docstr_tok: ["Rewrite","the","cmdline","to","write","options","in","text_file","."]
code: def cmdline(self):
      """Rewrite the cmdline to write options in text_file."""
      argv = super().cmdline
      reg_average_cmd = os.path.join(os.getcwd(), "reg_average_cmd")
      with open(reg_average_cmd, "w") as f:
          f.write(argv)
      return f"{self.cmd} --cmd_file {reg_average_cmd}"
  
imports: import os
  from ..base import TraitedSpec, File, traits, isdefined
  from .base import get_custom_path, NiftyRegCommand, NiftyRegCommandInputSpec
  from ...utils.filemanip import split_filename
label_desc: Use image node_id 3 for calling the RegAverage obj's underlying member method code with example usage: obj.cmdline() and returns: self, str, reg_average_cmd