Crashing ct_philips extractor on empty AquisitionDateTime
Issue #478
duplicate
The Philips CT extractor seems to crash if dicom tag (0008,002a) AquisitionDateTime is not present. In this particular case the separate fields AcquisitionDate and AcquisitionTime were present.
File "/usr/local/lib/python2.7/dist-packages/openrem/remapp/extractors/ct_philips.py", line 165, in _ctradiationdose
latestlength = int(events.latest('date_time_started').exposure_time * 1000) # in microseconds
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'
Would it be an idea to build AquisitionDateTime from AcquisitionDate and AcquisitionTime for those cases?
Note: In another (working) example where all three fields are present, I noticed that AquisitionDateTime does contain a timezone offset, which we would miss if we would concatenate by default.
(0008,0022) DA [20160601] # 8, 1 AcquisitionDate
(0008,002a) DT [20160601134852+0200] # 20, 1 AcquisitionDateTime
(0008,0032) TM [134852] # 6, 1 AcquisitionTime
Comments (4)
-
-
reporter - changed component to Import: CT
-
- changed status to duplicate
Duplicate of
#500. -
@dplatten's issue
#500came later than your's @tcdewit , but was fixed! So I've marked this one as a duplicate of that one. - Log in to comment
Thanks for the report @tcdewit We need to do a few things here.
_ctradiationdose
doesn't cause an error.