[med-svn] [dicompyler] 03/03: Solving bug #854837

Vojtech Kulvait kulvait-guest at moszumanska.debian.org
Mon Sep 18 12:56:04 UTC 2017


This is an automated email from the git hooks/post-receive script.

kulvait-guest pushed a commit to branch master
in repository dicompyler.

commit 5894bb2e11eb156d5cfd329b43770bb99bdb035e
Author: Vojtěch Kulvait <kulvait at gmail.com>
Date:   Mon Sep 18 14:52:53 2017 +0200

    Solving bug #854837
    
    Adding 01.patch, which added support for pillow >=3.0.0 addressing changes due to commit
    https://github.com/python-pillow/Pillow/commit/71c95c8e5f3bba1845444a246d04646825e6bab3,
    small indentation fix. This commit enables one to explore RT data, tested in stretch.
---
 debian/control          |  2 +-
 debian/patches/01.patch | 38 ++++++++++++++++++++++++++++++++++++++
 debian/patches/series   |  1 +
 3 files changed, 40 insertions(+), 1 deletion(-)

diff --git a/debian/control b/debian/control
index eedc073..8f783ac 100644
--- a/debian/control
+++ b/debian/control
@@ -18,7 +18,7 @@ Architecture: all
 Depends: ${misc:Depends},
          ${python:Depends},
          python-wxgtk3.0,
-         python-pil,
+         python-pil (>=3.0.0),
          python-numpy,
          python-matplotlib,
          python-dicom,
diff --git a/debian/patches/01.patch b/debian/patches/01.patch
new file mode 100644
index 0000000..6244747
--- /dev/null
+++ b/debian/patches/01.patch
@@ -0,0 +1,38 @@
+Author: Vojtěch Kulvait <kulvait at gmail.com>
+Last-Update: Mon Sep 18 14:44:01 CEST 2017
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854837
+Description: Added support for pillow >=3.0.0 addressing changes due to commit https://github.com/python-pillow/Pillow/commit/71c95c8e5f3bba1845444a246d04646825e6bab3, small indentation fix.
+
+Index: dicompyler/dicompyler/dvhcalc.py
+===================================================================
+--- dicompyler.orig/dicompyler/dvhcalc.py
++++ dicompyler/dicompyler/dvhcalc.py
+@@ -160,7 +160,7 @@ 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)
++    grid = nx.points_inside_poly(dosegridpoints, contour)
+     grid = grid.reshape((len(doselut[1]), len(doselut[0])))
+ 
+     return grid
+Index: dicompyler/dicompyler/guiutil.py
+===================================================================
+--- dicompyler.orig/dicompyler/guiutil.py
++++ dicompyler/dicompyler/guiutil.py
+@@ -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())#Pillow >= 3.0.0
++        image.SetAlphaData(pil.convert("RGBA").tobytes()[3::4])#Pillow >= 3.0.0
+     else:
+         image = wx.EmptyImage(pil.size[0], pil.size[1])
+         new_image = pil.convert('RGB')
+-        data = new_image.tostring()
++        data = new_image.tobytes()#Fixes this commit https://github.com/python-pillow/Pillow/commit/71c95c8e5f3bba1845444a246d04646825e6bab3
+         image.SetData(data)
+     return image
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 3d2c56f..5b1d765 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ enable_later_versions_of_matplotlib.patch
 fix-xrc-errors.patch
 fix_DicomImporterDialog.patch
 more_wx30_patches.patch
+01.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/dicompyler.git



More information about the debian-med-commit mailing list