Accessing DVH data from RTDose file

61 views
Skip to first unread message

T. G.

unread,
Jul 28, 2020, 9:16:04 AM7/28/20
to dicompyler
Hello,

I'm just getting started with Dicompyler , and want to retrieve DVH data from my files.
I followed the getting-started tutorial and it looks like this:

#Modules
import os
import numpy as np
import matplotlib.pyplot as plt
import urllib.request
import os.path
import dicompylercore
from dicompylercore import dicomparser, dvh, dvhcalc
dp = dicomparser.DicomParser(r"C:\Users\...\rtss.dcm")
dp1 = dicomparser.DicomParser(r"C:\Users\...\rtdose.dcm")


#Get a dictionary of structure information
structures = dp.GetStructures()
print (structures)
#DVH = dp1.GetDVHs()
#print(DVH)


# Access DVH data
rtdose = dicomparser.DicomParser(r"C:\Users\....\rtdose.dcm")
test = dvh.DVH.from_dicom_dvh(r"C:\Users\...\rtdose.dcm", 2)
test.describe()

Unfortunately, I keep getting the error:

AttributeError: 'str' object has no attribute 'DVHSequence'

I'm not 100% this is a dicompyler related question, but I would still be grateful if somebody could help me with this issue.

Greetings and thank you

Aditya Panchal

unread,
Jul 29, 2020, 8:21:48 PM7/29/20
to dicom...@googlegroups.com
Hi Tanja,

Are you sure that the DICOM RT Dose file has a DVH Sequence in it? You can check via:
print("DVHSequence" in self.ds)

If not, then you will have to use the dvhcalc module in dicompyler-core to calculate the DVH yourself.

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/fe647911-e40e-4a16-a1d3-994707b2b640n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages