New Plug in

131 views
Skip to first unread message

Andrew Miller

unread,
Nov 8, 2017, 9:23:11 PM11/8/17
to dicom...@googlegroups.com
G​reetings​
​, DICOMpylers!


We wish to use DICOMpyler to assist with Radiomics research in which we have an interest.
 This work is based on defining new ROIs, generating appropriate DVHs for the new ROIs, and then exporting the DVH results to a CSV.
 Later we will look at including Radiomics analysis of CT image portions defined by the ROIs.

To aid the research, we initially tried using the Anonymiser on a set of DICOM-RTs. It frankly does not work properly. Since we also have DICOMan available also, we are using that to anonymise successfully. Someone should fix it.

We wish to create a dicompyler plug-in
​which we will call "ModifyROI" for convenience sake. ModifyROI will allow the user to manipulate the regions of interest (ROI) on the patient’s CT image.
 Original ROIs will all be maintained unchanged.

The functionality will be:

  1. copy 'original ROI' & rename 'new ROI'
    This will assist in Standardised Naming (e.g., LUNG_R V R_LUNG)
  2. copy 'original ROI' & rename 'new ROI' & alter ROI
    This will allow the drawing of ROIs defined by a research project. The redraw will occur one of two ways:
    1. ​alter by re-draw
      a nudge tool of adjustable size will allow the perimeter of the ROI to be repositioned manually
    2. alter by CT number
      a brush of adjustable size will be set to draw & select pixels that match a specified CT number range (e.g., 0-800 for lung tissue)​
      ​; the name of the ROI will automatically include the minimum and maximum CT numbers specified (e.g., LUNG_R_CT0000CT0800, GTVp_CT0800CT4000)​

We would like at some point to write this metadata out in a structured report rather than the name. We would also like the SR to included the patient's clinical data.

​We have looked at the dicompyler plug-in repository and cannot find any plug-in that provides similar or even remotely similar functionalities.

Some questions:

  • Have any python developers created or working on a similar plug-in for dicompyler; are there developers who would be interested to help?
  • A technical question:
    Is there any limitations on using
    ​the ​
    PythonXY environment, Numpy, Matplotlib, Scipy, OpenCV, Scikits modules in dicompyler for image processing
    ​?
    .
    ​We are
     novice
    ​s​
    in Python,
    ​s​
    ​o ​
    any useful advice that you would like to give for creating an image processing application for dicompyler
    ​ would be appreciated​.

​Andrew
Rashmi

Wollongong NSW Australia​

Aditya Panchal

unread,
Nov 12, 2017, 1:31:36 AM11/12/17
to dicom...@googlegroups.com
Hi Andrew,

Hope you are doing well. Haven't heard from you in a while.

Interesting project you have here.

What is specifically wrong with the DICOM anonymizer? Can you please be more specific and maybe open an issue on the GitHub site?

As far as I know nobody has written a plugin to rename ROIs that is open source.
Likewise, at least open source, there is not a plugin to detect CT HU range to delineate structures.

However, I have done some projects that had similar features for work. It's not too difficult.

I personally have not done any work with DICOM SR. I assume it would not be too hard as long as the standard is followed.

You can use any modules you wish with dicompyler. Most likely a plugin of this scale should be used with the source version of dicompyler because:
A. GitHub master branch has been updated to the latest dependencies (wxPython 4.0 and supports Python 3)
B. The last exe build does not have those libraries included

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.

Andrew Miller

unread,
Nov 12, 2017, 4:09:07 AM11/12/17
to dicom...@googlegroups.com
Hello Aditya

Anonymise problems 

1. It did not anonymise all of the DICOM-RT components. We had to select each one individually. 
2. It would not anonymise all beams in the RTPLAN. It anonymised the selected beam and returned a 'rtplan' file which was the single field.

A

Rashmi Nigam

unread,
Dec 10, 2017, 11:38:50 PM12/10/17
to dicompyler
Hi Aditya,

I am trying to install dicompyler from source but I am not getting it right. I am new to Python, could you please run me through how to do it. I read the instructions given in GitHub but I am unable to follow it through.
What I am doing is that from the command prompt first I change directory to C: where dicomplyer-0.4.2 is saved. then I use command python dicompyler_app.py.  This gives error - ModuleNotFoundError: No module named 'main'. Module - main.py is in subfolder 'dicompyler' 
I think I am doing something wrong. Your help would be greatly appreciated.

Thanks,
Rashmi

Aditya Panchal

unread,
Dec 11, 2017, 1:08:58 PM12/11/17
to dicom...@googlegroups.com
Hi Rashmi,

Are you specifically targeting version 0.4.2? If so, you'll need to make sure you're using Python 2.7 as that is the only version of Python supported for that dicompyler version.

If you want to use the latest source version, you can download it via this zip: https://github.com/bastula/dicompyler/archive/master.zip (link can be found on the Github page via the green button). This will work with Python 2 and 3.

Hope that helps,

Aditya

Rashmi Nigam

unread,
Dec 13, 2017, 11:42:00 AM12/13/17
to dicom...@googlegroups.com
Hi Aditya,

Thanks for your reply. I have Python 3.6 installed on my windows PC, and I was trying to install dicompyler version 0.4.2. As you said 0.4.2 supports Python 2.7, so that must be the source of error. 
I have downloaded the latest version form he link that you have provided. Now it gave the error ModuleNotFoundError: No module named 'pydicom'

In main.py I replaced import pydicom with import dicom which rectified the error. Are there other locations in the package where I need to make the change?

I got another error:

C:\Users\rashm\OneDrive\Desktop\dicompyler-master>python dicompyler_app.py
Traceback (most recent call last):
  File "dicompyler_app.py", line 10, in <module>
    import dicompyler.main
  File "C:\Users\rashm\OneDrive\Desktop\dicompyler-master\dicompyler\__init__.py", line 16, in <module>
    from dicompyler.main import start
  File "C:\Users\rashm\OneDrive\Desktop\dicompyler-master\dicompyler\main.py", line 24, in <module>
    from dicompylercore import dvhcalc
ModuleNotFoundError: No module named 'dicompylercore'

I tried installing using pip install dicomplyercore but it gives error :

C:\Users\rashm\OneDrive\Desktop\dicompyler-master>pip install dicompylercore
Collecting dicompylercore
  Could not find a version that satisfies the requirement dicompylercore (from versions: )
No matching distribution found for dicompylercore

I have downloaded dicomplyer-core-0.5.3. Can you tell me how to install it, since pip install dicompyler does not work.

Thanks,
Rashmi

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/Doo4ecSWXB0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dicompyler+unsubscribe@googlegroups.com.

Aditya Panchal

unread,
Dec 14, 2017, 12:43:26 PM12/14/17
to dicom...@googlegroups.com
You probably can just do pip install -r requirements.txt in the main dicompyler source directory to get all of the dependencies installed.

However, pydicom is approaching a 1.0 release so for my development I am using 1.0.0a via the github master branch. You can get that by separately installing pydicom via:

actually I would do the same for dicompyler-core once pydicom installed:


This would ensure that you are using the latest version of all dependencies.

That should get you further. Sorry about the confusion, we are in a transition for the code base so it's best for your development to happen with the latest versions.
Reply all
Reply to author
Forward
0 new messages