Skip to content

Commit eff394e

Browse files
committed
check if input comes with full path or not
1 parent ed09fe3 commit eff394e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nipype/interfaces/ants/segmentation.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,10 @@ def _format_arg(self, opt, spec, val):
487487
return retval
488488
if opt == 'segmentation_priors':
489489
priors_directory, _, ext = split_filename(self.inputs.segmentation_priors[0])
490-
retval = "-p %s/BrainSegmentationPrior%%02d" %(priors_directory)
490+
if priors_directory is not '':
491+
retval = "-p %s/BrainSegmentationPrior%%02d" %(priors_directory)
492+
else:
493+
retval = "-p BrainSegmentationPrior%02d"
491494
retval += ext
492495
return retval
493496
return super(ANTSCommand, self)._format_arg(opt, spec, val)

0 commit comments

Comments
 (0)