@@ -487,21 +487,18 @@ def _format_arg(self, opt, spec, val):
487
487
return retval
488
488
if opt == 'segmentation_priors' :
489
489
_ , _ , ext = split_filename (self .inputs .segmentation_priors [0 ])
490
- retval = "-p priors/ BrainSegmentationPrior%02d"
490
+ retval = "-p BrainSegmentationPrior%02d"
491
491
retval += ext
492
492
return retval
493
493
return super (ANTSCommand , self )._format_arg (opt , spec , val )
494
494
495
495
def _run_interface (self , runtime ):
496
- priors_directory = os .path .join (os .getcwd (), "priors" )
497
- if not os .path .exists (priors_directory ):
498
- os .makedirs (priors_directory )
499
496
_ , _ , ext = split_filename (self .inputs .segmentation_priors [0 ])
500
497
for i , f in enumerate (self .inputs .segmentation_priors ):
501
- target = os .path .join (priors_directory ,
498
+ target = os .path .join (os . getcwd () ,
502
499
'BrainSegmentationPrior%02d' % (i + 1 ) + ext )
503
500
if not (os .path .exists (target ) and os .path .realpath (target ) == os .path .abspath (f )):
504
- copyfile (os .path .abspath (f ), os .path .join (priors_directory ,
501
+ copyfile (os .path .abspath (f ), os .path .join (os . getcwd () ,
505
502
'BrainSegmentationPrior%02d' % (i + 1 ) + ext ))
506
503
runtime = super (antsCorticalThickness , self )._run_interface (runtime )
507
504
return runtime
0 commit comments