Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

updated functions of matplotlib and little more #95

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Metadata-Version: 1.1
Name: dicompyler
Version: 0.4.2
Summary: Extensible radiation therapy research platform and viewer for DICOM and DICOM RT.
Home-page: http://code.google.com/p/dicompyler/
Author: Aditya Panchal
Author-email: [email protected]
License: BSD License
Description:
dicompyler
==========

dicompyler is an extensible open source radiation therapy research
platform based on the DICOM standard. It also functions as a
cross-platform DICOM RT viewer.

dicompyler runs on Windows, Mac and Linux systems and is available in
source and binary versions. Since dicompyler is based on modular
architecture, it is easy to extend it with 3rd party plugins.

Visit the dicompyler _`home page`:
http://code.google.com/p/dicompyler/ for how-to information and guides.

Getting Help
============

To get help with dicompyler, visit the _`mailing list`:
http://groups.google.com/group/dicompyler/ or follow us on _`twitter`:
http://twitter.com/dicompyler

Requirements
============

dicompyler requires the following packages to run from source:

- Python 2.5 or higher (not tested on Python 3)
- wxPython 2.8.8.1 to 2.8.10.1
- matplotlib 0.99 to 1.10
- numpy 1.2.1 or higher
- PIL 1.1.7 or any version of Pillow
- pydicom 0.9.5 or 0.9.6
- simplejson (only for Python 2.5, Python 2.6+ includes JSON support)
Keywords: radiation therapy research python dicom dicom-rt
Platform: UNKNOWN
Classifier: License :: OSI Approved :: BSD License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Visualization
92 changes: 92 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
dicompyler Readme
=================

dicompyler is an extensible radiation therapy research platform and viewer for
DICOM and DICOM RT.

dicompyler is released under a BSD license. See the included license.txt file,
or available online at: http://code.google.com/p/dicompyler/

Full documentation and source code for dicompyler is available online at:
http://code.google.com/p/dicompyler/

Release notes for this version can be found online at:
http://code.google.com/p/dicompyler/wiki/ReleaseNotes

Features
========

- Import CT/PET/MRI Images, DICOM RT structure set, RT dose and RT plan files
- Extensible plugin system with included plugins:
- 2D image viewer with dose and structure overlay
- Dose volume histogram viewer with the ability to analyze DVH parameters
- DICOM data tree viewer
- Patient anonymizer

Quick Start
===========

If you have downloaded dicompyler as an application for Windows or Mac, please
follow the normal process for running any other application on your system.

If you are running from a Python package, a script called "dicompyler" is now
present on your path, which you can run from your command line or terminal.

If you are running from a source checkout, there is a script in the main folder
called "dicompyler_app.py" which can be executed via your Python interpreter.

Getting Started
===============

dicompyler will read properly formatted DICOM and DICOM-RT files. To get
started, run dicompyler and click "Open Patient" to bring up a dialog box that
will show the DICOM files in the last selected directory. You may click
"Browse..." to navigate to other folders that contain DICOM data.

In the current version of dicompyler, you can import any DICOM CT, PET,
or MRI image series, DICOM RT structure set, RT dose and RT plan files.
dicompyler will automatically highlight the deepest item for the patient.
All related items (up the tree) will be automatically imported as well.

Alternatively, you can selectively import data. For example, If you only want
to import CT images and an RT structure set just highlight the RT structure set.
If you are importing an RT dose file and the corresponding plan does not
contain a prescription dose, enter one in the box first. To import the data,
click "Select" and dicompyler will process the information.

Once the DICOM data has been loaded, the main window will show the patient and
plan information. Additionally it will show a list of structures and isodoses
that are associated with the plan.

Example DICOM-RT data is provided in the downloads tab on the project homepage:
http://code.google.com/p/dicompyler/downloads/list

Included Plugins
================

You can use the 2D View tab to navigate CT, PET or MRI data with corresponding
structures and isodoses. The DVH tab can be used to inspect and analyze DVH
curves. The DICOM tree view tab can be used to delve into the raw DICOM data of
the imported files. You can anonymize the loaded DICOM files via the anonymizer
found in the File --> Export menu.

Custom Plugins
==============

Since dicompyler is based on a plugin architecture, users can write their own
plugins with ease. For more information see the Plugin Development Guide on the
dicompyler wiki: http://code.google.com/p/dicompyler/wiki/PluginDevelopmentGuide

3rd-party plugins can be found at http://code.google.com/p/dicompyler-plugins/

Bugs and Feedback
=================

Please report any bugs or feedback on the dicompyler discussion group found at:
http://groups.google.com/group/dicompyler/

Credits
=======

A number of individuals have contributed to dicompyler and can be found in the
included credits.txt.
57 changes: 57 additions & 0 deletions dicompyler.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Metadata-Version: 1.1
Name: dicompyler
Version: 0.4.2
Summary: Extensible radiation therapy research platform and viewer for DICOM and DICOM RT.
Home-page: http://code.google.com/p/dicompyler/
Author: Aditya Panchal
Author-email: [email protected]
License: BSD License
Description:
dicompyler
==========

dicompyler is an extensible open source radiation therapy research
platform based on the DICOM standard. It also functions as a
cross-platform DICOM RT viewer.

dicompyler runs on Windows, Mac and Linux systems and is available in
source and binary versions. Since dicompyler is based on modular
architecture, it is easy to extend it with 3rd party plugins.

Visit the dicompyler _`home page`:
http://code.google.com/p/dicompyler/ for how-to information and guides.

Getting Help
============

To get help with dicompyler, visit the _`mailing list`:
http://groups.google.com/group/dicompyler/ or follow us on _`twitter`:
http://twitter.com/dicompyler

Requirements
============

dicompyler requires the following packages to run from source:

- Python 2.5 or higher (not tested on Python 3)
- wxPython 2.8.8.1 to 2.8.10.1
- matplotlib 0.99 to 1.10
- numpy 1.2.1 or higher
- PIL 1.1.7 or any version of Pillow
- pydicom 0.9.5 or 0.9.6
- simplejson (only for Python 2.5, Python 2.6+ includes JSON support)
Keywords: radiation therapy research python dicom dicom-rt
Platform: UNKNOWN
Classifier: License :: OSI Approved :: BSD License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Science/Research
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.5
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Scientific/Engineering :: Visualization
67 changes: 67 additions & 0 deletions dicompyler.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
MANIFEST.in
README.txt
dicompyler_app.py
distribute_setup.py
setup.py
dicompyler/__init__.py
dicompyler/credits.txt
dicompyler/dicomgui.py
dicompyler/dicomparser.py
dicompyler/dvhcalc.py
dicompyler/dvhdata.py
dicompyler/dvhdoses.py
dicompyler/guidvh.py
dicompyler/guiutil.py
dicompyler/license.txt
dicompyler/main.py
dicompyler/plugin.py
dicompyler/preferences.py
dicompyler/util.py
dicompyler/wxmpl.py
dicompyler.egg-info/PKG-INFO
dicompyler.egg-info/SOURCES.txt
dicompyler.egg-info/dependency_links.txt
dicompyler.egg-info/entry_points.txt
dicompyler.egg-info/not-zip-safe
dicompyler.egg-info/requires.txt
dicompyler.egg-info/top_level.txt
dicompyler/baseplugins/2dview.py
dicompyler/baseplugins/2dview.xrc
dicompyler/baseplugins/__init__.py
dicompyler/baseplugins/anonymize.py
dicompyler/baseplugins/anonymize.xrc
dicompyler/baseplugins/dvh.py
dicompyler/baseplugins/dvh.xrc
dicompyler/baseplugins/quickopen.py
dicompyler/baseplugins/treeview.py
dicompyler/baseplugins/treeview.xrc
dicompyler/resources/accept.png
dicompyler/resources/book.png
dicompyler/resources/bricks.png
dicompyler/resources/chart_bar.png
dicompyler/resources/chart_bar_error.png
dicompyler/resources/chart_curve.png
dicompyler/resources/chart_curve_error.png
dicompyler/resources/cog.png
dicompyler/resources/contrast_high.png
dicompyler/resources/dicomgui.xrc
dicompyler/resources/dicompyler.icns
dicompyler/resources/dicompyler.ico
dicompyler/resources/dicompyler_icon11_16.png
dicompyler/resources/dicompyler_logo.png
dicompyler/resources/error.png
dicompyler/resources/folder_image.png
dicompyler/resources/folder_user.png
dicompyler/resources/group.png
dicompyler/resources/guiutil.xrc
dicompyler/resources/magnifier_zoom_in.png
dicompyler/resources/magnifier_zoom_out.png
dicompyler/resources/main.xrc
dicompyler/resources/pencil.png
dicompyler/resources/pencil_error.png
dicompyler/resources/plugin.png
dicompyler/resources/plugin.xrc
dicompyler/resources/plugin_disabled.png
dicompyler/resources/preferences.xrc
dicompyler/resources/table_multiple.png
dicompyler/resources/user.png
1 change: 1 addition & 0 deletions dicompyler.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://pydicom.googlecode.com/files/pydicom-0.9.6.zip
3 changes: 3 additions & 0 deletions dicompyler.egg-info/entry_points.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[console_scripts]
dicompyler = dicompyler.main:start

1 change: 1 addition & 0 deletions dicompyler.egg-info/not-zip-safe
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

4 changes: 4 additions & 0 deletions dicompyler.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
matplotlib>=0.99, <=1.1.0
numpy>=1.2.1
pil>=1.1.7
pydicom>=0.9.5, <0.9.7
1 change: 1 addition & 0 deletions dicompyler.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dicompyler
Binary file added dicompyler/__init__.pyc
Binary file not shown.
Binary file added dicompyler/baseplugins/2dview.pyc
Binary file not shown.
Binary file added dicompyler/baseplugins/anonymize.pyc
Binary file not shown.
Binary file added dicompyler/baseplugins/dvh.pyc
Binary file not shown.
Binary file added dicompyler/baseplugins/quickopen.pyc
Binary file not shown.
Binary file added dicompyler/baseplugins/treeview.pyc
Binary file not shown.
Binary file added dicompyler/dicomgui.pyc
Binary file not shown.
Binary file added dicompyler/dicomparser.pyc
Binary file not shown.
10 changes: 5 additions & 5 deletions dicompyler/dvhcalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
logger = logging.getLogger('dicompyler.dvhcalc')
import numpy as np
import numpy.ma as ma
import matplotlib.nxutils as nx
from matplotlib.path import Path

def get_dvh(structure, dose, limit=None, callback=None):
"""Get a calculated cumulative DVH along with the associated parameters."""
Expand Down Expand Up @@ -99,9 +99,9 @@ def calculate_dvh(structure, dose, limit=None, callback=None):
# depending if the contour is within the largest contour or not
else:
contour['inside'] = False
path = Path(np.array(contours[largestIndex]['data']))
for point in contour['data']:
if nx.pnpoly(point[0], point[1],
np.array(contours[largestIndex]['data'])):
if path.contains_point([(point[0], point[1])]):
contour['inside'] = True
# Assume if one point is inside, all will be inside
break
Expand Down Expand Up @@ -160,8 +160,8 @@ def calculate_contour_areas(plane):

def get_contour_mask(doselut, dosegridpoints, contour):
"""Get the mask for the contour with respect to the dose plane."""

grid = nx.points_inside_poly(dosegridpoints, contour)
path = Path(np.array(contour))
grid = path.contains_points(dosegridpoints)
grid = grid.reshape((len(doselut[1]), len(doselut[0])))

return grid
Expand Down
Binary file added dicompyler/dvhcalc.pyc
Binary file not shown.
Binary file added dicompyler/dvhdata.pyc
Binary file not shown.
Binary file added dicompyler/dvhdoses.pyc
Binary file not shown.
Binary file added dicompyler/guidvh.pyc
Binary file not shown.
8 changes: 4 additions & 4 deletions dicompyler/guiutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ def convert_pil_to_wx(pil, alpha=True):
Code taken from Dave Witten's imViewer-Simple.py in pydicom contrib."""
if alpha:
image = apply(wx.EmptyImage, pil.size)
image.SetData(pil.convert("RGB").tostring())
image.SetAlphaData(pil.convert("RGBA").tostring()[3::4])
image.SetData(pil.convert("RGB").tobytes())
image.SetAlphaData(pil.convert("RGBA").tobytes()[3::4])
else:
image = wx.EmptyImage(pil.size[0], pil.size[1])
new_image = pil.convert('RGB')
data = new_image.tostring()
data = new_image.tobytes()
image.SetData(data)
return image

Expand Down Expand Up @@ -114,7 +114,7 @@ def __init__(self):
pre = wx.PreDialog()
# the Create step is done by XRC.
self.PostCreate(pre)

def Init(self, res, title=None):
"""Method called after the dialog has been initialized."""

Expand Down
Binary file added dicompyler/guiutil.pyc
Binary file not shown.
Binary file added dicompyler/main.pyc
Binary file not shown.
Binary file added dicompyler/plugin.pyc
Binary file not shown.
Binary file added dicompyler/preferences.pyc
Binary file not shown.
Binary file added dicompyler/util.pyc
Binary file not shown.
3 changes: 1 addition & 2 deletions dicompyler/wxmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import matplotlib
matplotlib.use('WXAgg')
import numpy as np
from matplotlib.axes import _process_plot_var_args
from matplotlib.axes._base import _process_plot_var_args
from matplotlib.backends.backend_agg import RendererAgg
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
from matplotlib.figure import Figure
Expand Down Expand Up @@ -2024,4 +2024,3 @@ def getY(self):
there is no data available.
"""
return None

Binary file added dicompyler/wxmpl.pyc
Binary file not shown.
Loading