dicompyler/dicompyler-core

Inputting cGy units into dvhcalc.get_dvh

DVHmonkey opened this issue · 2 comments

First off, thanks for all the work on dicompyler-core.

I am trying to analyze DVHs calculated from RT Dose and RT Structure DICOM files, and am currently using the dvhcalc.get_dvh to obtain the doses at particular dose thresholds, e.g. as below.

dvhcalc.get_dvh.V50Gy

I can only ever input integers into the V(...)Gy field, and dvhcalc.get_dvh.V**cGy is not recognized. Is there any way I can input non-integer dose values into this function?

For context, I am attempting to analyze DVHs at certain dose thresholds/constraints that may not necessarily be integers when converted to Gy units. Another thing my current project entails is subtracting one contour from another (specifically, subtracting the contour of bladder contents from the whole bladder contour to obtain a bladder wall approximate), and I am attempting to recreate the dose bins/DVH for the bladder wall proxy for every cGy dose bin.

Thanks and regards.

Thank you for the kind words.

The class that is returned by dvhcalc.get_dvh is actually the DVH class and is documented here: https://dicompyler-core.readthedocs.io/en/latest/dicompylercore.html#dicompylercore.dvh.DVH.volume_constraint

There is an instance method called volume_constraint that will take the dose you're looking for in integer or float and return the desired volume.

The shorthand dose statistic method that you are using (i.e. dvh.V50Gy) uses this internally.

Hope that helps!

Closing due to inactivity. Assuming problem was solved.