Skip to content

Commit 441554c

Browse files
committed
Merge pull request #959 from mick-d/dcm2nii
Added directory support to Dcm2nii
2 parents 7de9363 + 6a92496 commit 441554c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

nipype/interfaces/dcm2nii.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
class Dcm2niiInputSpec(CommandLineInputSpec):
2020
source_names = InputMultiPath(File(exists=True), argstr="%s", position=-1,
21-
copyfile=False, mandatory=True)
21+
copyfile=False, mandatory=True, xor=['source_dir'])
22+
source_dir = Directory(exists=True, argstr="%s", position=-1, mandatory=True,
23+
xor=['source_names'])
2224
anonymize = traits.Bool(True, argstr='-a', usedefault=True)
2325
config_file = File(exists=True, argstr="-b %s", genfile=True)
2426
collapse_folders = traits.Bool(True, argstr='-c', usedefault=True)

nipype/interfaces/tests/test_auto_Dcm2nii.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,19 @@ def test_Dcm2nii_inputs():
4949
reorient_and_crop=dict(argstr='-x',
5050
usedefault=True,
5151
),
52+
source_dir=dict(argstr='%s',
53+
mandatory=True,
54+
position=-1,
55+
xor=['source_names'],
56+
),
5257
source_in_filename=dict(argstr='-f',
5358
usedefault=True,
5459
),
5560
source_names=dict(argstr='%s',
5661
copyfile=False,
5762
mandatory=True,
5863
position=-1,
64+
xor=['source_dir'],
5965
),
6066
spm_analyze=dict(argstr='-s',
6167
xor=['nii_output'],

0 commit comments

Comments
 (0)