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

DVH calculated from a TPS instead of calculating it using PPS? #10

Open Rayhan-011 opened 4 years ago

Rayhan-011 commented 4 years ago

I want to use DVH calculated from a TPS instead of calculating it using PPS?

I used the method

GetDVHs()

Example at the end of the module:

https://github.com/victorgabr/pps/blob/master/pyplanscoring/core/dicom_reader.py

filename = 'RD.dcm' rd_dcm = PyDicomParser(filename=filename) dvhs = rd_dcm.GetDVHs()

But Issue is GetDVHs() not returning complete DVH Object Info.

victorgabr commented 4 years ago

If it returns an empty dictionary as a result, It means there is no TPS-computed DVH exported to the RD-DICOM file. Not all Therapy Planning Systems exports this information. It is an optional feature.

https://dicom.innolitics.com/ciods/rt-dose/rt-dvh

If there is not DVH data provided, you should compute the DVH using PPS.

Rayhan-011 commented 4 years ago

Can you please confirm the difference b/w DVH Text file and the RD File? and which one is more accurate to read TPS

victorgabr commented 4 years ago

RD files follow the unique DICOM standard for storing the DVH in a file, it was created to solve the mess of DVHs stored in TXT formats. Before the DICOM standard, each TPS implemented its own format and exports this information according to their own rules. I would not say one is more accurate than the other because it is the same data, and it is a matter of serializing the data and saving it in a readable format.
The source code on this repository provides only a parser to DICOM RD files which contain an exported DVH, which is more convenient and vendor agnostic. For TXT formats, one should write a parser for every txt format from every TPS model and make.

Rayhan-011 commented 4 years ago

Getting Following Error : Dose plane not found for -288.00. Using -200.547 to calculate contour volume.

while parsing RD Dose file

RK_PILOT_STUDY-RTD2_0.zip

victorgabr commented 4 years ago

Can you provide more details? This error seems to happen when trying to compute a DVH/contour also using the DICOM RTSTRUCT file. You must have been using this file too.

victorgabr commented 4 years ago

{'description': 'TomoTherapy Planned Dose', 'id': '1.3.6.1.4.1.14519.5.2.1.5168.2407.293618759947374716834366333125', 'study': '1.3.6.1.4.1.14519.5.2.1.5168.2407.299369082563324649427396384874'}

It is a TomoTherapy Planned Dose.

It looks like you are using the Dicompyler DVH computation method instead of the algorithm implemented on PPS.
I implemented a new DVH computation algorithm that handles all cases. This issue in handling tomotherapy files was fixed a while ago.

Please, check the doc: on how to use PPS to parse and compute DVHs.

3.1.3 - Getting started

https://github.com/victorgabr/pps/blob/master/docs/_build/rinoh/pyplanscoring.pdf