Basic dicompyler question

38 views
Skip to first unread message

Mike Grams

unread,
Jun 28, 2020, 10:43:11 PM6/28/20
to dicompyler
I apologize for what is going to be a very basic question, but I cannot find a solution.  How do I get just the numeric dose value when calculating DVH statistics using commands such as:

gtv = rtdose.GetDVHs()[30]

gtv.D95 returns:

Out[80]: dvh.DVHValue(2.06, 'Gy')

I want only the value 2.06 so I can use it in subsequent calculations within additional code.

Thank you for any assistance.  I would imagine this question has been asked before.

Mike

Aditya Panchal

unread,
Jun 28, 2020, 11:20:16 PM6/28/20
to dicom...@googlegroups.com
Hi Mike,

All you have to do is look up the value member of DVHValue.

Hence in your example you can perform the following:

gtv.D95.value

You can see the internals here if you are curious:


Hope that helps.

Adit

--
-- 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/00a15165-def1-4ff6-bab7-70c5be478c0do%40googlegroups.com.

Mike Grams

unread,
Jun 29, 2020, 12:38:58 PM6/29/20
to dicompyler
Thank you very much Adit. I was looking at the pdf documentation and could not find the correct syntax. Looking at the source code is very helpful.

Best Regards,

Mike

Reply all
Reply to author
Forward
0 new messages