How does dicompyler overlay the RTDOSE and Image data in the correct position?

591 views
Skip to first unread message

Z Cart.

unread,
Sep 6, 2017, 12:03:15 PM9/6/17
to dicompyler
Hello,

I'm currently an MS student in Medical Physics and I have a great need to be able to overlay an isodose distribution from an RTDOSE file onto a CT image from a .dcm file set.

I've managed to extract the image and the dose pixel arrays myself using pydicom and dicom_numpy, but the two arrays are not the same size! So, if I overlay the two together, the dose will not be in the correct position based on what the Elekta Gamma Plan software exported it as.

I've played around with dicompyler and it obviously is able to do this even though the arrays are not the same size. However, I think I cannot export the numerical data when using dicompyler...I can only scroll through and view it as an image. What section of the code has the algorithm for overlaying the RTDOSE to an image?

Thank you

Aditya Panchal

unread,
Sep 7, 2017, 12:15:13 PM9/7/17
to dicom...@googlegroups.com
Hi Zachary,

dicompyler just looks for the same slice position as the CT image and renders the dose grid at that same position. Remember this has to be done in the patient coordinate space. You are probably working in the array coordinate space, so the image grid and dose grid won't have the same index.


for more information.

Could you project be written using dicompyler-core as a library? It includes the dicomparser module which includes the functionality you need.

An other option is to write a plugin for dicompyler and add any additional info as an overlay.

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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Z Cart.

unread,
Sep 14, 2017, 4:19:20 PM9/14/17
to dicompyler
Hi Aditya,

Yes, I can use dicompyler-core as a library. I only really need to extract a single dose plane with its corresponding image and I need to ensure that the dose is in the correct position.

I have imported dicompyler-core, but when I use dir(dicompylercore.DicomParser()) I just get the following:

>>> dir(dicompylercore.DicomParser())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'dicompylercore' has no attribute 'DicomParser'

Does Dicomparser have the ability to export a dose plane and image? What does "self" mean in the arguments for the GetDoseGrid function?

Thank you

On Thursday, September 7, 2017 at 12:15:13 PM UTC-4, Aditya Panchal wrote:
Hi Zachary,

dicompyler just looks for the same slice position as the CT image and renders the dose grid at that same position. Remember this has to be done in the patient coordinate space. You are probably working in the array coordinate space, so the image grid and dose grid won't have the same index.


for more information.

Could you project be written using dicompyler-core as a library? It includes the dicomparser module which includes the functionality you need.

An other option is to write a plugin for dicompyler and add any additional info as an overlay.

Hope that helps,

Adit
On Wed, Sep 6, 2017 at 9:43 AM, Z Cart. <zcart...@gmail.com> wrote:
Hello,

I'm currently an MS student in Medical Physics and I have a great need to be able to overlay an isodose distribution from an RTDOSE file onto a CT image from a .dcm file set.

I've managed to extract the image and the dose pixel arrays myself using pydicom and dicom_numpy, but the two arrays are not the same size! So, if I overlay the two together, the dose will not be in the correct position based on what the Elekta Gamma Plan software exported it as.

I've played around with dicompyler and it obviously is able to do this even though the arrays are not the same size. However, I think I cannot export the numerical data when using dicompyler...I can only scroll through and view it as an image. What section of the code has the algorithm for overlaying the RTDOSE to an image?

Thank you

--
-- 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.

Aditya Panchal

unread,
Sep 19, 2017, 11:49:12 AM9/19/17
to dicom...@googlegroups.com
You need to instantiate the class in the following manner and it should work:

from dicompylercore import dicomparser
dp = dicomparser.DicomParser("rtss.dcm")
dir(dp)


In your case, you would instantiate a dicomparser instance of the dose grid as well as the image slice you are interested in. Then on the dose grid, you can run the GetDoseGrid() method on the same slice (z coordinate) as the image slice.


Self is the first argument in a class function of a python class function. No argument needs to be passed for that variable. If any of this doesn't make sense, please refer to a guide like: https://www.tutorialspoint.com/python/python_classes_objects.htm

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+unsubscribe@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+unsubscribe@googlegroups.com.

sogand sadeghi

unread,
Nov 1, 2019, 1:25:17 AM11/1/19
to dicompyler
Hi Zachary .

I am  PHD student of Medical Physics and I am dealing with the same problem as you did .I was wondering that you could help me to draw dose distributions along CT images .I   would be appreciated if you give me your email address.

Cheers

sogand sadeghi

unread,
Nov 1, 2019, 1:25:17 AM11/1/19
to dicompyler
Hi Panchal.

I am dealing with the same problem as Zachary did ,I read your instructions in details but unfortunately couldn't  draw dose distribution alongside  with CT images.I hope you give me more help. 
Reply all
Reply to author
Forward
0 new messages