Skip to content

Commit 15b5480

Browse files
authored
Merge pull request #63 from mgxd/fix/seqinfo
fix: try/except catch ReferringPhysicianName field
2 parents 08b1d48 + a442f12 commit 15b5480

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bin/heudiconv

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,10 @@ def process_dicoms(fl, dcmsession=None, basedir=None, dcmfilter=None):
268268
TE = float(dcminfo.EchoTime)
269269
except AttributeError:
270270
TE = -1
271+
try:
272+
refphys = dcminfo.ReferringPhysicianName
273+
except AttributeError:
274+
refphys = '-'
271275

272276
info = SeqInfo(
273277
total,
@@ -283,7 +287,7 @@ def process_dicoms(fl, dcmsession=None, basedir=None, dcmfilter=None):
283287
'derived' in [x.lower() for x in dcminfo.get('ImageType', [])],
284288
dcminfo.PatientID,
285289
dcminfo.StudyDescription,
286-
dcminfo.ReferringPhysicianName,
290+
refphys,
287291
dcminfo.SeriesDescription,
288292
dcminfo.ImageType,
289293
)

0 commit comments

Comments
 (0)