Skip to content

Commit 8d26eec

Browse files
committed
Merge pull request #1266 from hanke/dcm2nii_philips_dwi
Adjust expected bvecs/bvals filenames for the Philips DWI case
2 parents 923fa05 + e17b4e6 commit 8d26eec

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nipype/interfaces/dcm2nii.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ def _parse_stdout(self, stdout):
124124
base, filename, ext = split_filename(last_added_file)
125125
bvecs.append(os.path.join(base, filename + ".bvec"))
126126
bvals.append(os.path.join(base, filename + ".bval"))
127+
elif line.startswith("Removed DWI from DTI scan"):
128+
# such line can only follow the 'diffusion' case handled
129+
# just above
130+
for l in (bvecs, bvals):
131+
l[-1] = os.path.join(
132+
os.path.dirname(l[-1]),
133+
'x%s' % (os.path.basename(l[-1]),))
127134
elif re.search('.*->(.*)', line):
128135
val = re.search('.*->(.*)', line)
129136
val = val.groups()[0]

0 commit comments

Comments
 (0)