@@ -958,24 +958,20 @@ class MRIsCombineInputSpec(FSTraitedSpec):
958958 """ 
959959 Uses Freesurfer's mris_convert to combine two surface files into one. 
960960 """ 
961-  in_file1  =  File (exists = True , mandatory = True , position = 1 ,
962-  argstr = '--combinesurfs %s' ,
963-  desc = 'File to be combined with in_file2' )
964-  in_file2  =  File (exists = True , mandatory = True , position = 2 ,
965-  argstr = '%s' ,
966-  desc = 'File to be combined with in_file1' )
961+  in_files  =  traits .List (File (Exists = True ), maxlen = 2 , minlen = 2 ,
962+  mandatory = True , position = 1 , argstr = '--combinesurfs %s' ,
963+  desc = 'Two surfaces to be combined.' )
967964 out_file  =  File (argstr = '%s' , position = - 1 , genfile = True ,
968965 mandatory = True ,
969-  desc = 'Output filename. Combined surfaces from in_file1 and ' 
970-  'in_file2.' )
966+  desc = 'Output filename. Combined surfaces from in_files.' )
971967
972968
973969class  MRIsCombineOutputSpec (TraitedSpec ):
974970 """ 
975971 Uses Freesurfer's mris_convert to combine two surface files into one. 
976972 """ 
977973 out_file  =  File (exists = True , desc = 'Output filename. Combined surfaces from ' 
978-  'in_file1 and in_file2 .' )
974+  'in_files .' )
979975
980976
981977class  MRIsCombine (FSCommand ):
@@ -990,18 +986,23 @@ class MRIsCombine(FSCommand):
990986
991987 >>> import nipype.interfaces.freesurfer as fs 
992988 >>> mris = fs.MRIsCombine() 
993-  >>> mris.inputs.in_file1 = 'lh.pial' 
994-  >>> mris.inputs.in_file2 = 'rh.pial' 
995-  >>> mris.inputs.out_file = 'out.stl' 
989+  >>> mris.inputs.in_files = ['lh.pial', 'rh.pial'] 
990+  >>> mris.inputs.out_file = 'bh.pial' 
996991 >>> mris.cmdline # doctest: +ALLOW_UNICODE 
997-  'mris_convert --combinesurfs lh.pial rh.pial out.stl ' 
992+  'mris_convert --combinesurfs lh.pial rh.pial bh.pial ' 
998993 >>> mris.run() # doctest: +SKIP 
999994 """ 
1000995 _cmd  =  'mris_convert' 
1001996 input_spec  =  MRIsCombineInputSpec 
1002997 output_spec  =  MRIsCombineOutputSpec 
1003998
1004999 def  _list_outputs (self ):
1000+  """ 
1001+  If the output file is not specified starting with 'lh.' or 'rh.', 
1002+  FreeSurfer prepends 'lh.' to the filename. It never adds 'rh.', even if 
1003+  both input files are from the right hemisphere. Output out_file must be 
1004+  adjusted to accommodate this. 
1005+  """ 
10051006 outputs  =  self .output_spec ().get ()
10061007 if  any (self .inputs .out_file .startswith (pre ) for  pre  in  ['lh.' , 'rh.' ]):
10071008 outputs ['out_file' ] =  self .inputs .out_file 
0 commit comments