victorgabr / pps

PyPlanScoring codebase that was used on 2017 and 2018 - RT Plan Competition
https://radiationknowledge.org/
BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

I want to contact you regarding DICOMPyler TPS readings #9

Open Rayhan-011 opened 4 years ago

Rayhan-011 commented 4 years ago

I am getting following Error : (AttributeError: 'Dataset' object has no attribute 'TransferSyntaxUID') while uploading certain type of DICOM files. Can you please guide if any solution exists in this regards.

Thanks

victorgabr commented 4 years ago

You should use the dicom_reader.py module to parse the uploaded files.

There is already a solution implemented in the DicomParserBase class.

https://github.com/victorgabr/pps/blob/5e2b03c361e8d9fbbd266995af44de416334d2b9/pyplanscoring/core/dicom_reader.py#L32

It sets a default TransferSyntaxUID in case of DICOM file without it.

Use the class PyDicomParser for loading it. https://github.com/victorgabr/pps/blob/5e2b03c361e8d9fbbd266995af44de416334d2b9/pyplanscoring/core/dicom_reader.py#L733

If it does not work, maybe the file is corrupted.