Standard deviation of differential DVH

28 views
Skip to first unread message

mg13...@gmail.com

unread,
Aug 9, 2020, 1:47:57 PM8/9/20
to dicompyler
Hi,

Is there a way to use dicompyler to calculate the standard deviation of a differential DVH?  Varian's Eclipse TPS does this, but I'd like to analyze several DVHs at once with a Python program.

Thank you,

Mike Grams

Dan Cutright

unread,
Aug 9, 2020, 2:23:48 PM8/9/20
to dicompyler
DVH Analytics does something along those lines.  It's not quite what you're looking for, but the code would be similar. This is really more of a numpy question rather than a dicompyler question.



The dvhs variable in the linked code is a 2D array of dvhs.  You'd just create an array of differential DVHs instead (could use np.diff).

Mike Grams

unread,
Aug 9, 2020, 3:10:48 PM8/9/20
to dicom...@googlegroups.com
Thanks Dan. I agree that it is more of a numpy question but I’m so bad with dicompyler that I can’t even get access to the raw data that it is using to create the differential DVH. I had hoped to access it in some sort of tabular format but I couldn’t figure that out. I can just export the DVH data from Eclipse in tabular format and work with that but I had hoped to do everything from the rtdose file using dicompyler. 

Mike

--
-- You received this message because you are subscribed to the Google Groups dicompyler group. To post to this group, send email to dicom...@googlegroups.com. To unsubscribe from this group, send email to dicompyler+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/dicompyler?hl=en
---
You received this message because you are subscribed to a topic in the Google Groups "dicompyler" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dicompyler/qoHAyx52YSk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dicompyler+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dicompyler/2abbf788-4b59-449e-b525-f1b386fd548bo%40googlegroups.com.

Dan Cutright

unread,
Aug 9, 2020, 3:27:07 PM8/9/20
to dicompyler
I think something like this is what you're looking for?  You'd just need to loop through your structures (and presumably files too?).  Then put your diff_dvh in a numpy array and feed it to np.std.

import numpy as np
from dicompylercore import dvhcalc

rtss = "structure.dcm"
rtdose = "dose.dcm"
structure_index = 0
dvh = dvhcalc.get_dvh(rtss, rtdose, structure_index)
diff_dvh = np.diff(dvh.counts)

On Sunday, August 9, 2020 at 2:10:48 PM UTC-5, Mike Grams wrote:
Thanks Dan. I agree that it is more of a numpy question but I’m so bad with dicompyler that I can’t even get access to the raw data that it is using to create the differential DVH. I had hoped to access it in some sort of tabular format but I couldn’t figure that out. I can just export the DVH data from Eclipse in tabular format and work with that but I had hoped to do everything from the rtdose file using dicompyler. 

Mike
On Sun, Aug 9, 2020 at 1:23 PM Dan Cutright <dan.c...@gmail.com> wrote:
DVH Analytics does something along those lines.  It's not quite what you're looking for, but the code would be similar. This is really more of a numpy question rather than a dicompyler question.



The dvhs variable in the linked code is a 2D array of dvhs.  You'd just create an array of differential DVHs instead (could use np.diff).



On Sunday, August 9, 2020 at 12:47:57 PM UTC-5, mg13...@gmail.com wrote:
Hi,

Is there a way to use dicompyler to calculate the standard deviation of a differential DVH?  Varian's Eclipse TPS does this, but I'd like to analyze several DVHs at once with a Python program.

Thank you,

Mike Grams

--
-- You received this message because you are subscribed to the Google Groups dicompyler group. To post to this group, send email to dicom...@googlegroups.com. To unsubscribe from this group, send email to dicom...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/dicompyler?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "dicompyler" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dicompyler/qoHAyx52YSk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dicom...@googlegroups.com.

Adit Panchal

unread,
Aug 9, 2020, 4:12:41 PM8/9/20
to dicom...@googlegroups.com
Dan is correct. If you're comfortable using python vs the dicompyler app, you should be able to follow a loop and use dicompyler-core per his example below to get what you're looking for.

Sent from my iPhone

On Aug 9, 2020, at 14:27, Dan Cutright <dan.cu...@gmail.com> wrote:


-- You received this message because you are subscribed to the Google Groups dicompyler group. To post to this group, send email to dicom...@googlegroups.com. To unsubscribe from this group, send email to dicompyler+...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/dicompyler?hl=en
---
You received this message because you are subscribed to the Google Groups "dicompyler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dicompyler+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dicompyler/22ea96e4-3406-452d-a4cc-281806386452o%40googlegroups.com.

Mike Grams

unread,
Aug 9, 2020, 6:20:30 PM8/9/20
to dicom...@googlegroups.com
This is great, thank you both for the help!

Mike 

Reply all
Reply to author
Forward
0 new messages