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 Aditya,
I am a Med Phys Masters student looking to create a plugin for dicompyler to recalculate DVH's from dicom data using EQD2. I am new to python and have tried to play around with the source code to understand how to implement alpha/beta values for regional data found by dicompyler and feed it into a graph, exactly like the DVH baseplugin..just recalculated.
Do you know how I can approach doing this? I have tried to create a notebook tab type plugin but my lack of XRC doc knowledge is going against me as I want to basically create the plugin with your source code by tweaking it to add in the equation and cant seem to see where it would fit. I have also tried a menu item type plugin but am failing also. I think maybe using dicompyler-core might help but I don't know how to implement that into a plugin. Any help would be greatly appreciated!
Excuse my ignorance if you can I'm very new to coding, apologies!
Many thanks and kind regards,
Rhonda
Aditya Panchal
unread,
Jul 5, 2018, 10:31:43 PM7/5/18
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 Rhonda,
You should be able to edit dvh.py and change the code in the last 3 functions. Basically you need to modify self.dvh so it becomes an EQD2 DVH. This is the object that the UI will render on the graph and on the controls. Once you have made your changes you can overwrite the dvh.py located in baseplugins or place it in the userplugins folder.
Is your plugin expected to recalculate all DVHs in the data set or just the selected structure? If the former, you could apply the correction in batch using pydicom/dicompyler-core to the dose grid in the RT Dose DICOM file itself and dicompyler will pick up the changes. The latter situation was described above.
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 Aditya,
Thank you for your reply. I have been trying your suggestions since and unfortunately still having trouble.
To answer your question first, I need to recalculate all structures on the one DVH with user adjustable dose per frac per plan and also user adjustable alpha/beta per struct.
My main questions are:
1) I understand dicompyler-core is callable but where do I call it? do I need to write a script for a plugin using it or should I call it in the baseplugin dvh.py?
2) (this one might seem stupid-sorry!) when you say 'apply the correction in batch'...what do you mean?
3) is the best way to do this to create a menu tab type plugin with a popup gui for the inputs to then recalc? If so where is dicompyler-core used in said plugin?
Any help is hugely appreciated! Also, congratulations on your program, its very intuitive.
Many thanks and kind regards,
Rhonda
Aditya Panchal
unread,
Jul 12, 2018, 11:54:03 AM7/12/18
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 Rhonda,
I think for now don't worry about dicompyler-core or batch processing.
I would either modify the dvh.py plugin or create a new menu plugin. If you need UI to change the alpha/beta per structure and dose per frac, you should probably create a new plugin to display those elements. Then the plugin would modify the DICOM raw data and re-publish it using:
You don't need to know XRC as you can hand code the dialog if you want. The G4Dose plugin has a lot more code but does utilize this method without XRC: