@@ -247,29 +247,24 @@ def mindboggle(subjectid, fsdir, antsdir, antsseg, out, prov, args,
247
247
248
248
"""
249
249
import os
250
-
251
250
from nipype .interfaces .base import CommandLine
252
251
253
252
DATA = os .path .join (fsdir , subjectid )
254
253
ants = os .path .join (antsdir , subjectid , antsseg )
255
254
256
255
all_args = ' ' .join ([DATA , '--out' , out , '--ants' , ants ,
257
256
'--working' , os .getcwd ()] +
258
- ['--prov' ] if prov else [] +
259
- [args ])
257
+ [args ] + ['--prov' ] if prov else [])
260
258
261
259
if num_threads > 1 :
262
260
all_args += ' --plugin MultiProc --plugin_args "dict(n_procs={0})"' .\
263
261
format (num_threads )
264
- command = "{0} {1}" .format ('mindboggle' , all_args )
265
- print (command )
266
262
267
- from nipype import config
268
263
cli = CommandLine (command = 'mindboggle' )
269
264
cli .inputs .args = all_args
270
- cli .cmdline
265
+ command = cli .cmdline
266
+ print (command )
271
267
cli .run ()
272
-
273
268
return command
274
269
275
270
# ----------------------------------------------------------------------------
@@ -280,14 +275,6 @@ def mindboggle(subjectid, fsdir, antsdir, antsseg, out, prov, args,
280
275
# ----------------------------------------------------------------------------
281
276
Mindboggle = Node (name = 'mindboggle' ,
282
277
interface = Fn (function = mindboggle ,
283
- input_names = ['subjectid' ,
284
- 'fsdir' ,
285
- 'antsdir' ,
286
- 'antsseg' ,
287
- 'out' ,
288
- 'prov' ,
289
- 'args' ,
290
- 'num_threads' ],
291
278
output_names = ['command' ]))
292
279
Mindboggle .inputs .subjectid = ID
293
280
if args .skip_freesurfer :
0 commit comments