Skip to content

Commit 3779ff9

Browse files
committed
ENH(dbic-bids): do store sourcedata DICOMs (no niftis) for scouts
Previously were completely skipped but they are useful to redo conversion from sourcedata. Closes #145
1 parent 5e3f34b commit 3779ff9

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

heuristics/dbic_bids.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -470,18 +470,19 @@ def infotodict(seqinfo):
470470
# if seq:
471471
# suffix += 'seq-%s' % ('+'.join(seq))
472472

473-
# some are ok to skip and not to whine
474-
473+
# For scouts -- we want only dicoms
474+
# https://github.com/nipy/heudiconv/issues/145
475475
if "_Scout" in s.series_description or \
476476
(seqtype == 'anat' and seqtype_label and seqtype_label.startswith('scout')):
477-
skipped.append(s.series_id)
478-
lgr.debug("Ignoring %s", s.series_id)
477+
outtype = ('dicom',)
479478
else:
480-
template = create_key(seqtype, suffix, prefix=prefix)
481-
# we wanted ordered dict for consistent demarcation of dups
482-
if template not in info:
483-
info[template] = []
484-
info[template].append(s.series_id)
479+
outtype = ('nii.gz', 'dicom')
480+
481+
template = create_key(seqtype, suffix, prefix=prefix, outtype=outtype)
482+
# we wanted ordered dict for consistent demarcation of dups
483+
if template not in info:
484+
info[template] = []
485+
info[template].append(s.series_id)
485486

486487
if skipped:
487488
lgr.info("Skipped %d sequences: %s" % (len(skipped), skipped))

0 commit comments

Comments
 (0)