Skip to content

Commit d412a80

Browse files
committed
removed priors directory, all files will be in current directory
1 parent 4c8ea79 commit d412a80

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

nipype/interfaces/ants/segmentation.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,21 +487,18 @@ def _format_arg(self, opt, spec, val):
487487
return retval
488488
if opt == 'segmentation_priors':
489489
_, _, ext = split_filename(self.inputs.segmentation_priors[0])
490-
retval = "-p priors/BrainSegmentationPrior%02d"
490+
retval = "-p BrainSegmentationPrior%02d"
491491
retval += ext
492492
return retval
493493
return super(ANTSCommand, self)._format_arg(opt, spec, val)
494494

495495
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)
499496
_, _, ext = split_filename(self.inputs.segmentation_priors[0])
500497
for i, f in enumerate(self.inputs.segmentation_priors):
501-
target = os.path.join(priors_directory,
498+
target = os.path.join(os.getcwd(),
502499
'BrainSegmentationPrior%02d' % (i + 1) + ext)
503500
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(),
505502
'BrainSegmentationPrior%02d' % (i + 1) + ext))
506503
runtime = super(antsCorticalThickness, self)._run_interface(runtime)
507504
return runtime

0 commit comments

Comments
 (0)