[med-svn] [Git][med-team/dicompyler][master] Cleanup patches and add comment about some upstream solution which is not really helpful here.
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Nov 2 10:21:12 GMT 2021
Andreas Tille pushed to branch master at Debian Med / dicompyler
Commits:
1b7bbeb4 by Andreas Tille at 2021-11-02T11:20:36+01:00
Cleanup patches and add comment about some upstream solution which is not really helpful here.
- - - - -
8 changed files:
- − debian/patches/092017B_fiximportasterixs.patch
- − debian/patches/092017C_fixwx30.patch
- − debian/patches/092017F_pillowtostringtobytes.patch
- − debian/patches/092017G_fixdicomparser.patch
- + debian/patches/a5a90ed10e6ca924c4e051dc165c1001dfbd59dc.patch
- − debian/patches/fix-xrc-errors.patch
- − debian/patches/fix_DicomImporterDialog.patch
- debian/patches/series
Changes:
=====================================
debian/patches/092017B_fiximportasterixs.patch deleted
=====================================
@@ -1,56 +0,0 @@
-Author: Vojtěch Kulvait <kulvait at gmail.com>
-Last-Update: Mon Sep 18 15:00:00 CEST 2017
-Description: Adds to code redability and warnings when importing only used object from library
-
-Index: dicompyler/dicompyler/dicomgui.py
-===================================================================
---- dicompyler.orig/dicompyler/dicomgui.py
-+++ dicompyler/dicompyler/dicomgui.py
-@@ -14,7 +14,7 @@ import logging
- logger = logging.getLogger('dicompyler.dicomgui')
- import hashlib, os, threading
- import wx
--from wx.xrc import *
-+from wx.xrc import XmlResource, XRCCTRL, XRCID
- from wx.lib.pubsub import setuparg1 #see https://wxpython.org/Phoenix/docs/html/wx.lib.pubsub.setuparg1.html
- from wx.lib.pubsub import pub
- import numpy as np
-Index: dicompyler/dicompyler/main.py
-===================================================================
---- dicompyler.orig/dicompyler/main.py
-+++ dicompyler/dicompyler/main.py
-@@ -16,7 +16,7 @@ logger.setLevel(logging.DEBUG)
- import os, threading
- import sys, traceback
- import wx
--from wx.xrc import *
-+from wx.xrc import XRCCTRL, XRCID, XmlResource
- import wx.lib.dialogs, webbrowser
- # Uncomment line to setup pubsub for frozen targets on wxPython 2.8.11 and above
- # from wx.lib.pubsub import setupv1
-Index: dicompyler/dicompyler/plugin.py
-===================================================================
---- dicompyler.orig/dicompyler/plugin.py
-+++ dicompyler/dicompyler/plugin.py
-@@ -11,7 +11,7 @@ import logging
- logger = logging.getLogger('dicompyler.plugin')
- import imp, os
- import wx
--from wx.xrc import *
-+from wx.xrc import XRCCTRL, XRCID, XmlResource
- from wx.lib.pubsub import setuparg1 #see https://wxpython.org/Phoenix/docs/html/wx.lib.pubsub.setuparg1.html
- from wx.lib.pubsub import pub
- from dicompyler import guiutil, util
-Index: dicompyler/dicompyler/preferences.py
-===================================================================
---- dicompyler.orig/dicompyler/preferences.py
-+++ dicompyler/dicompyler/preferences.py
-@@ -9,7 +9,7 @@
-
- import os
- import wx
--from wx.xrc import *
-+from wx.xrc import XRCCTRL, XRCID, XmlResource
- from wx.lib.pubsub import setuparg1 #see https://wxpython.org/Phoenix/docs/html/wx.lib.pubsub.setuparg1.html
- from wx.lib.pubsub import pub
- from dicompyler import guiutil, util
=====================================
debian/patches/092017C_fixwx30.patch deleted
=====================================
@@ -1,34 +0,0 @@
-Author: Vojtěch Kulvait <kulvait at gmail.com>
-Last-Update: Mon Sep 18 23:00:00 CEST 2017
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854837
-Description: PrevControlId is no longer method of wx.Window, SetSpacer become AssignSpacer, wxDIALOG_MODAL is no longer valid identifier
-
-diff --git a/dicompyler/preferences.py b/dicompyler/preferences.py
-index 82ce7a3..7086af2 100755
---- a/dicompyler/preferences.py
-+++ b/dicompyler/preferences.py
-@@ -229,10 +229,10 @@ class PreferencesDialog(wx.Dialog):
- c.SetValue(value)
- sizer.Add(c, 0, wx.ALIGN_CENTER)
- # Remove the label preceding the checkbox
-- t = self.FindWindowById(c.PrevControlId(c.GetId()))
-+ t = c.GetPrevSibling()
- t.SetLabel('')
- # Adjust the sizer preceding the label
-- fgsizer.GetItem(0).SetSpacer((20,0))
-+ fgsizer.GetItem(0).AssignSpacer((20,0))
- # Add control to the callback dict
- self.callbackdict[c] = setting['callback']
- self.Bind(wx.EVT_CHECKBOX, self.OnUpdateCheckbox, c)
---- a/dicompyler/resources/guiutil.xrc
-+++ b/dicompyler/resources/guiutil.xrc
-@@ -70,6 +70,6 @@
- </object>
- <title>Loading...</title>
- <centered>1</centered>
-- <style>wxCAPTION|wxSTAY_ON_TOP|wxDIALOG_MODAL</style>
-+ <style>wxCAPTION|wxSTAY_ON_TOP</style>
- </object>
- </resource>
-\ No newline at end of file
-
=====================================
debian/patches/092017F_pillowtostringtobytes.patch deleted
=====================================
@@ -1,25 +0,0 @@
-Author: Vojtěch Kulvait <kulvait at gmail.com>
-Last-Update: Mon Sep 19 00:30:00 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/guiutil.py
-===================================================================
---- dicompyler.orig/dicompyler/guiutil.py
-+++ dicompyler/dicompyler/guiutil.py
-@@ -79,12 +79,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())#Fixes commit github.com/python-pillow/Pillow/commit/71c95c8e5f3bba1845444a246d04646825e6bab3
-+ 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
-
=====================================
debian/patches/092017G_fixdicomparser.patch deleted
=====================================
@@ -1,47 +0,0 @@
-Author: Vojtěch Kulvait <kulvait at gmail.com>
-Last-Update: Tue Sep 19 14:51:01 CEST 2017
-Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854837
-Description: dicomparser.py:GetStudyInfo was replaced by the new version from dicompyler-core commit 13e5265
-
-Index: dicompyler/dicompyler/dicomparser.py
-===================================================================
---- dicompyler.orig/dicompyler/dicomparser.py
-+++ dicompyler/dicompyler/dicomparser.py
-@@ -64,19 +64,25 @@ class DicomParser:
- return self.ds.SOPInstanceUID
-
- def GetStudyInfo(self):
-- """Return the study information of the current file."""
-+ """Return the study information of the current file. Function from dicompyler-core commit 13e5265"""
-
- study = {}
- if 'StudyDescription' in self.ds:
-- desc=self.ds.StudyDescription
-+ desc = self.ds.StudyDescription
- else:
-- desc='No description'
-+ desc = 'No description'
- study['description'] = desc
-+ if 'StudyDate' in self.ds:
-+ date = self.ds.StudyDate
-+ else:
-+ date = None
-+ study['date'] = date
- # Don't assume that every dataset includes a study UID
-- study['id'] = self.ds.SeriesInstanceUID
- if 'StudyInstanceUID' in self.ds:
- study['id'] = self.ds.StudyInstanceUID
--
-+ else:
-+ study['id'] = str(random.randint(0, 65535))
-+
- return study
-
- def GetSeriesInfo(self):
-@@ -690,4 +696,4 @@ class DicomParser:
- if "BeamDose" in b:
- beams[b.ReferencedBeamNumber]['dose'] = \
- b.BeamDose * nfx * 100
-- return beams
-\ No newline at end of file
-+ return beams
=====================================
debian/patches/a5a90ed10e6ca924c4e051dc165c1001dfbd59dc.patch
=====================================
@@ -0,0 +1,32 @@
+From a5a90ed10e6ca924c4e051dc165c1001dfbd59dc Mon Sep 17 00:00:00 2001
+From: Jonathan Martens <jonathan.martens at maastro.nl>
+Date: Tue, 2 Nov 2021 07:41:40 +0100
+Subject: [PATCH] Better fix for #122 to allow for more recent matplotlib
+Comment: legacycontour is not packaged so this patch does not really help
+
+---
+ dicompyler/baseplugins/2dview.py | 2 +-
+ requirements.txt | 5 ++++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/dicompyler/baseplugins/2dview.py
++++ b/dicompyler/baseplugins/2dview.py
+@@ -11,7 +11,7 @@
+ import wx
+ from wx.xrc import XmlResource, XRCCTRL, XRCID
+ from wx.lib.pubsub import pub
+-from matplotlib import _cntr as cntr
++from legacycontour import _cntr as cntr
+ from matplotlib import __version__ as mplversion
+ import numpy as np
+ from dicompyler import guiutil, util
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -3,3 +3,7 @@ wxPython>=4.0.0b2
+ matplotlib
+ numpy>=1.13.1
+ https://github.com/darcymason/pydicom/archive/master.zip
++
++# Better fix for #122 allowing more recent matplotlib versions
++# git+https://github.com/matplotlib/legacycontour.git
++
=====================================
debian/patches/fix-xrc-errors.patch deleted
=====================================
@@ -1,25 +0,0 @@
-Description: Fix XRC errors reported by wxPython 3.0
-Author: Olly Betts <olly at survex.com>
-Bug-Debian: https://bugs.debian.org/759056
-Forwarded: no
-Last-Update: 2014-09-11
-
---- dicompyler-0.4.2.orig/dicompyler/resources/main.xrc
-+++ dicompyler-0.4.2/dicompyler/resources/main.xrc
-@@ -154,7 +154,6 @@
- </object>
- </object>
- <cols>3</cols>
-- <rows>1</rows>
- <vgap>5</vgap>
- <hgap>5</hgap>
- <growablecols>1</growablecols>
-@@ -222,7 +221,7 @@
- <option>1</option>
- <flag>wxALL|wxEXPAND|wxALIGN_CENTRE</flag>
- </object>
-- <cols>4</cols>
-+ <cols>8</cols>
- <rows>2</rows>
- <vgap>5</vgap>
- <hgap>5</hgap>
=====================================
debian/patches/fix_DicomImporterDialog.patch deleted
=====================================
@@ -1,16 +0,0 @@
-Author: Vojtech Kulvait <kulvait at gmail.com>
-Last-Update: Tue, 14 Feb 2017 14:18:44 +0100
-Bug-Debian: https://bugs.debian.org/854837
-Description: Fix Open Patient dialog
-
---- a/dicompyler/dicomgui.py
-+++ b/dicompyler/dicomgui.py
-@@ -50,6 +50,8 @@ class DicomImporterDialog(wx.Dialog):
- pre = wx.PreDialog()
- # the Create step is done by XRC.
- self.PostCreate(pre)
-+ self.path = "/tmp"
-+ self.import_location_setting = "Remember Last Used"
-
- def Init(self, res):
- """Method called after the panel has been initialized."""
=====================================
debian/patches/series
=====================================
@@ -1,13 +1,7 @@
do_not_download_distribute.patch
wxpy30.patch
wxpy30-more.patch
-# enable_later_versions_of_matplotlib.patch
-# fix-xrc-errors.patch
-# fix_DicomImporterDialog.patch
enable_later_versions_of_matplotlib.patch
092017A_fixpubsub.patch
-# 092017B_fiximportasterixs.patch
-# 092017C_fixwx30.patch
092017E_newwxmpl.patch
-# 092017F_pillowtostringtobytes.patch
-# 092017G_fixdicomparser.patch
+# a5a90ed10e6ca924c4e051dc165c1001dfbd59dc.patch
View it on GitLab: https://salsa.debian.org/med-team/dicompyler/-/commit/1b7bbeb48d9102fc2837efbc96f04592c77e8345
--
View it on GitLab: https://salsa.debian.org/med-team/dicompyler/-/commit/1b7bbeb48d9102fc2837efbc96f04592c77e8345
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20211102/8f260ad9/attachment-0001.htm>
More information about the debian-med-commit
mailing list