Skip to content

Commit ea29352

Browse files
committed
Merge branch 'enh/private' of github.com:mgxd/heudiconv into enh/private
2 parents 4efc525 + cceb76d commit ea29352

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

heudiconv/dicoms.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ def group_dicoms_into_seqinfos(files, file_filter, dcmfilter, grouping):
7777
try:
7878
mw.dcm_data.ProtocolName
7979
except AttributeError:
80-
mw.dcm_data.ProtocolName = parse_private_csa_header(mw.dcm_data, 'ProtocolName', 'tProtocolName') if mw.is_csa else ''
80+
if not getattr(mw.dcm_data, 'ProtocolName', '').strip():
81+
mw.dcm_data.ProtocolName = parse_private_csa_header(mw.dcm_data, 'ProtocolName', 'tProtocolName') \
82+
if mw.is_csa else ''
8183

8284
try:
8385
series_id = (int(mw.dcm_data.SeriesNumber),
@@ -214,7 +216,7 @@ def group_dicoms_into_seqinfos(files, file_filter, dcmfilter, grouping):
214216
dcminfo.get('PatientID'),
215217
dcminfo.get('StudyDescription'),
216218
refphys,
217-
series_desc, #We try to set this further up.
219+
series_desc, # We try to set this further up.
218220
sequence_name,
219221
image_type,
220222
accession_number,

0 commit comments

Comments
 (0)