but the cumulative DVH plot should be (based on plotting from the raw data):
So I was wondering if I am passing in the data incorrectly or misunderstanding the use of the from_data function. WHat format should the data that I pass tot he function be in?
Also, is there a way to specify the prescription dose?
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dicompyler
Hi Matt,
It looks like it's plotting a differential DVH instead of a cumulative one.
As far as I can tell, the from_data function expects raw dose distribution data, i.e. each entry in the array is the dose of a single voxel in a dose distribution. It then uses that raw dose distribution to calculate a differential DVH. If you gave it cDVH data, it would probably generate a differential histogram, whose plot would be similar to the one you generated via dvh.plot().
I suspect Adit will chime in with better answers :)
Roy
Aditya Panchal
unread,
Jan 11, 2017, 4:01:37 PM1/11/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dicom...@googlegroups.com
Hi Matt,
Roy is correct. `from_data` expects a raw dose array and will calculate a histogram and the number of bins (and bin size) for you based on this data passed in.
In your case, it would be better to instantiate the DVH class directly and pass
- the cumulative dose histogram counts as the counts argument
- the actual bins as the bins argument
- the rx dose as the rx_dose argument
i.e. dvh.DVH(counts=dvh_list, bins=np.arange(0, len(dvh_list) + 1)
See the DVH class initialization method for more information as all the parameters are documented:
I originally created the from_dvh class method when I first designed the DVH class, but quickly found that I didn't really use it after making the initializer more versatile. I figured someone might use this functionality when needing to calculate a DVH from raw dose data and did not remove it from the final class.