bastula / dicompyler

Extensible radiation therapy research platform and viewer for DICOM and DICOM RT
http://www.dicompyler.com
263 stars 99 forks source link

Registration of structures/dose incorrect version 0.4.2 #121

Open ghost opened 5 years ago

ghost commented 5 years ago

I have opened an a patient and displayed some ROIs and Dose, You can see that the location and scaling appear to be incorrect. The first image shows how it should look, and the second shows it in dicompyler.

2019-05-21_17h09_53 2019-05-21_17h12_07

bastula commented 5 years ago

Thanks for reporting. Are you able to send a link or upload the data set so it can be reproduced?

ghost commented 5 years ago

Here is the link: https://we.tl/t-9UGaYqTLwg

Let me know if you have issues.

bastula commented 5 years ago

Thank you. I was able to reproduce the issue. I'm pretty sure it has to do with the pixel spacing being reversed for rows and columns. Let me work on a fix.

goodsave commented 5 years ago

I also have a special discovery about this issue.

when opening the patient, the RxDose cannot be read automatically from Plan due to the problem of the new version, so the RxDose needs to be input by hand below the "Open Patient Window".

solution: replace lines 794 to 798 of “dicomparser.py” file with the following code:

if (("FractionGroupSequence" in self.ds) and (self.plan['rxdose'] == 0)): fg = self.ds.FractionGroupSequence[0] if ("ReferencedBeamSequence" in fg) and ("NumberOfFractionsPlanned" in fg): beams = fg.ReferencedBeamSequence fx = fg.NumberOfFractionsPlanned