class_docstr: This program registers one volume to another
  
  mri_coreg is a C reimplementation of spm_coreg in FreeSurfer
  
  Examples
  ========
  >>> from nipype.interfaces.freesurfer import MRICoreg
  >>> coreg = MRICoreg()
  >>> coreg.inputs.source_file = 'moving1.nii'
  >>> coreg.inputs.reference_file = 'fixed1.nii'
  >>> coreg.inputs.subjects_dir = '.'
  >>> coreg.cmdline # doctest: +ELLIPSIS
  'mri_coreg --lta .../registration.lta --ref fixed1.nii --mov moving1.nii --sd .'
  
  If passing a subject ID, the reference mask may be disabled:
  
  >>> coreg = MRICoreg()
  >>> coreg.inputs.source_file = 'moving1.nii'
  >>> coreg.inputs.subjects_dir = '.'
  >>> coreg.inputs.subject_id = 'fsaverage'
  >>> coreg.inputs.reference_mask = False
  >>> coreg.cmdline # doctest: +ELLIPSIS
  'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --mov moving1.nii --sd .'
  
  Spatial scales may be specified as a list of one or two separations:
  
  >>> coreg.inputs.sep = [4]
  >>> coreg.cmdline # doctest: +ELLIPSIS
  'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --sep 4 --mov moving1.nii --sd .'
  
  >>> coreg.inputs.sep = [4, 5]
  >>> coreg.cmdline # doctest: +ELLIPSIS
  'mri_coreg --s fsaverage --no-ref-mask --lta .../registration.lta --sep 4 --sep 5 --mov moving1.nii --sd .'
class_docstr_tok: ["This","program","registers","one","volume","to","another","mri_coreg","is","a","C","reimplementation","of","spm_coreg","in","FreeSurfer","Examples","========",">",">",">","from","nipype.interfaces.freesurfer","import","MRICoreg",">",">",">","coreg","=","MRICoreg","(",")",">",">",">","coreg.inputs.source_file","=","'moving1.nii'",">",">",">","coreg.inputs.reference_file","=","'fixed1.nii'",">",">",">","coreg.inputs.subjects_dir","=","'",".","'",">",">",">","coreg.cmdline","#","doctest",":","+ELLIPSIS","'mri_coreg","--","lta","...","\/registration.lta","--","ref","fixed1.nii","--","mov","moving1.nii","--","sd",".","'","If","passing","a","subject","ID",",","the","reference","mask","may","be","disabled",":",">",">",">","coreg","=","MRICoreg","(",")",">",">",">","coreg.inputs.source_file","=","'moving1.nii'",">",">",">","coreg.inputs.subjects_dir","=","'",".","'",">",">",">","coreg.inputs.subject_id","=","'fsaverage'",">",">",">","coreg.inputs.reference_mask","=","False",">",">",">","coreg.cmdline","#","doctest",":","+ELLIPSIS","'mri_coreg","--","s","fsaverage","--","no-ref-mask","--","lta","...","\/registration.lta","--","mov","moving1.nii","--","sd",".","'","Spatial","scales","may","be","specified","as","a","list","of","one","or","two","separations",":",">",">",">","coreg.inputs.sep","=","[","4","]",">",">",">","coreg.cmdline","#","doctest",":","+ELLIPSIS","'mri_coreg","--","s","fsaverage","--","no-ref-mask","--","lta","...","\/registration.lta","--","sep","4","--","mov","moving1.nii","--","sd",".","'",">",">",">","coreg.inputs.sep","=","[","4",",","5","]",">",">",">","coreg.cmdline","#","doctest",":","+ELLIPSIS","'mri_coreg","--","s","fsaverage","--","no-ref-mask","--","lta","...","\/registration.lta","--","sep","4","--","sep","5","--","mov","moving1.nii","--","sd",".","'"]
code: def _format_arg(self, opt, spec, val):
      if (
          opt in ("out_reg_file", "out_lta_file", "out_params_file")
          and val is True
      ):
          val = self._list_outputs()[opt]
      elif opt == "reference_mask" and val is False:
          return "--no-ref-mask"
      return super()._format_arg(opt, spec, val)
  
imports: import os
  import os.path
  from ...None import logging
  from ...utils.filemanip import split_filename, copyfile
  from .base import FSCommand, FSTraitedSpec, FSScriptCommand, FSScriptOutputSpec, FSCommandOpenMP, FSTraitedSpecOpenMP
  from ..base import isdefined, TraitedSpec, File, traits, Directory
label_desc: Use image node_id 1 for calling the MRICoreg obj's underlying member method code with example usage: obj._format_arg(opt, spec, val) and returns: super, str