ct_philips.py extractor fails for Philips Brilliance 16P CT scanner
Issue #500 resolved
For the only example I have from this type of scanner the extractor fails because the
Acquisition DateTime is blank for each acquisition in the dose summary object.
I have fixed this on my local system by altering
dcmdatetime.pyfile. This routine currently fails if the contents of the tag are blank. A tweak is also required in
get_date_timeto the following fixes the first problem:
_ctradiationdoseneeds to have a
tryput around the microsecond calculation code:
Is it a good idea to configure
get_date_timeto return nothing if it encounters a
ValueError? Would it be better to try and catch the error in the calling routine? Any thoughts @edmcdonagh?
I think returning nothing probably is the best way to do it. It is consistent with the other
We'd need to make the same change for the other
Modifed datetime routines to make them return
Noneif there is a
ValueErrorencountered. References issue
→ <<cset 963b0a36c5cf>>
Added a catch for
TypeErrorto prevent a missing datetime value from preventing import. References issue
→ <<cset 43f4fbdd2378>>
The two commits solve this problem - the Philips Brilliance 16P study with empty Acquisition DateTime imports without a problem. I can also confirm that studies from the Philips Brilliance 64 continue to import correctly.
Added anonymised Philips Brilliance 16P CT scanner enhanced structured report file. References issue
→ <<cset c88e8ea48bd7>>
Adding a very basic test to ensure sample Philips SC imports - fails with current develop. Refs
→ <<cset b31b72c3ce9e>>
→ <<cset 7d1e5e9f136f>>
#478was marked as a duplicate of this issue.