[Python-modules-commits] [gamera] 01/20: Import gamera_3.4.2+git20160808.1725654.orig.tar.bz2

Daniel Stender stender at moszumanska.debian.org
Mon Aug 8 08:55:27 UTC 2016


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

stender pushed a commit to branch master
in repository gamera.

commit 32c140a3e0078d08c0bd1b55db6f484a306d5d7d
Author: Daniel Stender <stender at debian.org>
Date:   Mon Aug 8 10:08:09 2016 +0200

    Import gamera_3.4.2+git20160808.1725654.orig.tar.bz2
---
 ACKNOWLEDGEMENTS                 |  1 +
 CHANGES                          |  3 +--
 README                           |  6 +++---
 doc/src/html4css1.css            |  4 ++--
 doc/src/training_tutorial.txt    |  2 +-
 doc/src/writing_toolkits.txt     |  4 ++--
 gamera/backport/textwrap.py      |  2 +-
 gamera/gendoc.py                 | 15 ++++++++-------
 gamera/gui/gui.py                |  8 ++++----
 gamera/gui/gui_util.py           |  9 ++++-----
 gamera/knn_editing.py            |  2 +-
 gamera/plugins/corelation.py     |  2 +-
 gamera/plugins/deformation.py    |  2 +-
 include/gameramodule.hpp         | 12 ++++++------
 include/plugins/binarization.hpp |  2 +-
 include/plugins/misc_filters.hpp |  4 +---
 include/plugins/threshold.hpp    |  2 +-
 include/rle_data.hpp             |  2 ++
 src/graph/graph_structure.cpp    |  2 +-
 src/imageobject.cpp              |  2 +-
 src/kdtreemodule.cpp             |  2 +-
 src/knngamodule.cpp              |  6 +++---
 src/libtiff/t4.h                 |  2 +-
 src/libtiff/tif_fax3.h           |  2 +-
 24 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/ACKNOWLEDGEMENTS b/ACKNOWLEDGEMENTS
index 209cbd8..aec56c3 100644
--- a/ACKNOWLEDGEMENTS
+++ b/ACKNOWLEDGEMENTS
@@ -38,6 +38,7 @@ Marcel Schroers
 Daniel Stender
 Brian Stern
 Daveed Vandevoorde
+Jens Wilberg
 Jakub Wilk
 Hasan Yildiz
 Jochen Zimmerman
diff --git a/CHANGES b/CHANGES
index 18e07cd..6a2b75e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,8 +5,7 @@ Changes made between Gamera File Releases
 
  - handled errors in arguments of type PointVector more gracefully
 
- - fixed crash of progress bar an newer processors by updating it
-   less frequently
+ - workaround for crash of progress bar on OSX with wxPython 3.0
 
  - workaround for GetChildren in wxPython 3.0 returning deleted items
 
diff --git a/README b/README
index fe28eea..4d4fe4e 100755
--- a/README
+++ b/README
@@ -17,11 +17,11 @@ Installation and Usage
 See the INSTALL file for installation instructions,
 or online under
 
-http://gamera.sourceforge.net/doc/html/install.html
+http://gamera.informatik.hsnr.de/docs/gamera-docs/install.html
 
 The complete Gamera documentation is available online at:
 
-http://gamera.sourceforge.net/doc/html/
+http://gamera.informatik.hsnr.de/docs/gamera-docs/
 
 
 Authors and License
@@ -29,7 +29,7 @@ Authors and License
 
 (c)2001-2003 Michael Droettboom, Karl Mac Millan, Ichiro Fujinaga
 (c)2004-2007 Michael Droettboom
-(c)2008-2011 Michael Droettboom and Christoph Dalitz
+(c)2008-2016 Michael Droettboom and Christoph Dalitz
 
 See the file ACKNOWLEDGEMENTS for additional contributors.
 
diff --git a/doc/src/html4css1.css b/doc/src/html4css1.css
index 09ed2bf..7260cf0 100644
--- a/doc/src/html4css1.css
+++ b/doc/src/html4css1.css
@@ -1,8 +1,8 @@
 /*
 :Author: David Goodger
 :Contact: goodger at users.sourceforge.net
-:Date: $Date: 2009-09-23 09:15:33 +0200 (Mi, 23. Sep 2009) $
-:Revision: $Revision: 1163 $
+:Date: $Date$
+:Revision: $Revision$
 :Copyright: This stylesheet has been placed in the public domain.
 
 Default cascading style sheet for the HTML output of Docutils.
diff --git a/doc/src/training_tutorial.txt b/doc/src/training_tutorial.txt
index 0ecca17..5d003fd 100644
--- a/doc/src/training_tutorial.txt
+++ b/doc/src/training_tutorial.txt
@@ -9,7 +9,7 @@ while introducing most of the key features and concepts.
 
 For this example, we will be training on pages from the
 `Statistical Accounts of Scotland`__.  The demo pages used in this
-tutorial we be made available through the Gamera website soon.
+tutorial will be made available through the Gamera website soon.
 
 .. __: http://edina.ac.uk/statacc/
 
diff --git a/doc/src/writing_toolkits.txt b/doc/src/writing_toolkits.txt
index a90bd91..8b1728d 100644
--- a/doc/src/writing_toolkits.txt
+++ b/doc/src/writing_toolkits.txt
@@ -82,9 +82,9 @@ The skeleton toolkit
 ````````````````````
 
 For convenience, a minimal skeleton of a toolkit is provided and
-available from the files section of the `Gamera SourceForge site`__.
+available from the files section of the `Gamera github site`__.
 
-.. __: https://sourceforge.net/project/showfiles.php?group_id=99328&package_id=118473
+.. __: https://github.com/hsnr-gamera
 
 This skeleton provides the very minimum needed to create a toolkit.
 You will need to change all the references to the toolkit name
diff --git a/gamera/backport/textwrap.py b/gamera/backport/textwrap.py
index 03e1875..f371fbb 100644
--- a/gamera/backport/textwrap.py
+++ b/gamera/backport/textwrap.py
@@ -5,7 +5,7 @@
 # Copyright (C) 2002, 2003 Python Software Foundation.
 # Written by Greg Ward <gward at python.net>
 
-__revision__ = "$Id: textwrap.py 363 2004-03-25 15:57:55Z mdboom $"
+__revision__ = "$Id$"
 
 import string, re
 
diff --git a/gamera/gendoc.py b/gamera/gendoc.py
index 93b77f1..4c17b01 100644
--- a/gamera/gendoc.py
+++ b/gamera/gendoc.py
@@ -2,8 +2,8 @@
 # -*- mode: python; indent-tabs-mode: nil; tab-width: 3 -*-
 # vim: set tabstop=3 shiftwidth=3 expandtab:
 #
-# Copyright (C) 2001-2005 Ichiro Fujinaga, Michael Droettboom,
-#                         and Karl MacMillan
+# Copyright (C) 2001-2005 Ichiro Fujinaga, Michael Droettboom, Karl MacMillan
+#               2016      Christoph Dalitz
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -138,12 +138,13 @@ def underline(level, s, extra=0):
    return _underline_levels[level] * (len(s) + extra)
 
 class DocumentationGenerator:
-   def __init__(self, root_path=".", test_mode=False, classes=[], plugins=None, sourceforge_logo=True):
+   def __init__(self, root_path=".", test_mode=False, classes=[], plugins=None, sourceforge_logo=False, contact_url="http://gamera.informatik.hsnr.de/contact.html"):
       self.set_paths(root_path)
       self.test_mode = test_mode
       self.classes = classes
       self.plugins = plugins
       self.sourceforge_logo = sourceforge_logo
+      self.contact_url = contact_url
 
    def set_paths(self, root):
       def check_path(path):
@@ -228,9 +229,9 @@ class DocumentationGenerator:
             print "  Generating " + rootname
             lines = fd.readlines()
             if self.sourceforge_logo:
-               footer = '.. footer:: :raw-html:`<a href="http://sourceforge.net/projects/gamera"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=99328&type=13" width="120" height="30" border="0" alt="Get Gamera at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>`\n\n'
+               footer = '.. footer:: :raw-html:`<a href="http://sourceforge.net/projects/gamera" style="float:left;"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=99328&type=13" width="120" height="30" border="0" alt="Get Gamera at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> <div style="text-align:right;">For contact information, see <a href="' + self.contact_url + '">' + self.contact_url + '</a></div>`\n\n'
             else:
-               footer = "\n"
+               footer = '.. footer:: :raw-html:`<div style="text-align:right;">For contact information, see <a href="' + self.contact_url + '">' + self.contact_url + '</a></div>`\n\n'
             lines = (lines[:3] + 
                      ["\n", u"**Last modified**: %s\n\n" % mtime, 
                       ".. contents::\n\n", 
@@ -633,7 +634,7 @@ def print_usage():
     print "   will be used.)"
     print 
    
-def gendoc(classes=[], plugins=None, sourceforge_logo=True):
+def gendoc(classes=[], plugins=None, sourceforge_logo=False, contact_url="http://gamera.informatik.hsnr.de/contact.html"):
    print_usage()
    opts, args = getopt.getopt(sys.argv[1:], "d:t")
    root = '.'
@@ -644,7 +645,7 @@ def gendoc(classes=[], plugins=None, sourceforge_logo=True):
       elif flag == "-t":
          test_mode = True
    try:
-      docgen = DocumentationGenerator(root, test_mode, classes=classes, plugins=plugins, sourceforge_logo=sourceforge_logo)
+      docgen = DocumentationGenerator(root, test_mode, classes=classes, plugins=plugins, sourceforge_logo=sourceforge_logo, contact_url=contact_url)
    except Exception, e:
       print "Documentation generation failed with the following exception:"
       print e
diff --git a/gamera/gui/gui.py b/gamera/gui/gui.py
index 5111eb5..2e9a16c 100644
--- a/gamera/gui/gui.py
+++ b/gamera/gui/gui.py
@@ -567,8 +567,8 @@ def run(startup=_show_shell):
    from gamera.gui import args_gui
 
    class MyApp(wx.App):
-      def __init__(self, startup, parent):
-         self._startup = startup
+      def __init__(self, parent):
+         #self._startup = startup
          wx.App.__init__(self, 0)
          self.SetExitOnFrameDelete(1)
 
@@ -580,7 +580,6 @@ def run(startup=_show_shell):
          self.splash.Show()
          wx.Yield()
          init_gamera()
-         self._startup()
          self.splash.Show(0)
          del self.splash
          return True
@@ -588,7 +587,8 @@ def run(startup=_show_shell):
       def OnExit(self):
          pass
 
-   app = MyApp(startup, 0)
+   app = MyApp(0)
+   startup() # must be called here and not in MyApp.OnInit to avoid errors on MacOS X
    app.MainLoop()
 
 if __name__ == "__main__":
diff --git a/gamera/gui/gui_util.py b/gamera/gui/gui_util.py
index 7345e23..1b7df01 100644
--- a/gamera/gui/gui_util.py
+++ b/gamera/gui/gui_util.py
@@ -180,11 +180,6 @@ class ProgressBox:
       self.update(self._num, self._den)
 
    def update(self, num, den):
-      # make sure that the progress bar is not updated too often
-      # (otherwise it will crash)
-      td = datetime.datetime.now() - self._lasttime
-      if (td.days*86400 + td.seconds + td.microseconds/100000.0) <= 0.3:
-          return
       if not self.done:
          if num >= den or num == self._lastupdate:
             self.done = True
@@ -193,6 +188,10 @@ class ProgressBox:
             wx.CallAfter(self.progress_box.Destroy)
          elif 0 == self._numsteps or \
                 (den/(num-self._lastupdate) <= self._numsteps):
+            # make sure that the progress bar is not updated too often
+            #td = datetime.datetime.now() - self._lasttime
+            #if (td.days*86400 + td.seconds + td.microseconds/100000.0) <= 0.3:
+            #    return
             self.progress_box.Update(min(100, int((float(num) / float(den)) * 100.0)))
             self._lastupdate = num
             self._lasttime = datetime.datetime.now()
diff --git a/gamera/knn_editing.py b/gamera/knn_editing.py
index 168f16c..8ed7e7a 100644
--- a/gamera/knn_editing.py
+++ b/gamera/knn_editing.py
@@ -223,7 +223,7 @@ boundaries are removed.
         same value as the given classifier (recommended)    
     *randomize*
         Because the processing order of the glyphs in the classifier impacts the
-        result of this algorithm, the order will be randomized. If reproducable
+        result of this algorithm, the order will be randomized. If reproducible
         results are required, turn this option off.
 
 Reference: P.E. Hart: 'The Condensed Nearest Neighbor rule'. *IEEE Transactions on Information Theory*, 14(3):515-516, 1968
diff --git a/gamera/plugins/corelation.py b/gamera/plugins/corelation.py
index c3e6a24..28577ae 100644
--- a/gamera/plugins/corelation.py
+++ b/gamera/plugins/corelation.py
@@ -36,7 +36,7 @@ class corelation_weighted(PluginFunction):
 
     *bb*, *bw*, *wb*, *ww*
       The rewards and penalties for different combinations of pixels.
-      The first letter in the arugment name indicates the color of the
+      The first letter in the argument name indicates the color of the
       template; the second letter indicates the color of the source
       image.  For instance, the value of *bw* will be applied to the
       result when the template pixel is black and the source image
diff --git a/gamera/plugins/deformation.py b/gamera/plugins/deformation.py
index 6584cca..408713b 100755
--- a/gamera/plugins/deformation.py
+++ b/gamera/plugins/deformation.py
@@ -124,7 +124,7 @@ the following meaning:
     case you should do your own smoothing afterwards.
 
 The random generator is initialized with *random_seed* for allowing
-reproducable results.
+reproducible results.
 
 References:
 
diff --git a/include/gameramodule.hpp b/include/gameramodule.hpp
index ebcfc6b..37487c9 100644
--- a/include/gameramodule.hpp
+++ b/include/gameramodule.hpp
@@ -337,11 +337,11 @@ inline Point coerce_Point(PyObject* obj) {
   if (PySequence_Check(obj)) {
     if (PySequence_Length(obj) == 2) {
       py_x0 = PySequence_GetItem(obj, 0);
-      if (!PyInt_Check(py_x0)) {
+      if (!PyNumber_Check(py_x0)) {
         Py_DECREF(py_x0);
         PyErr_Clear();
-        PyErr_SetString(PyExc_TypeError, "First list entry in Point is not an int");
-        throw std::invalid_argument("First list entry in Point is not an int");
+        PyErr_SetString(PyExc_TypeError, "First list entry in Point is not a number");
+        throw std::invalid_argument("First list entry in Point is not a number");
       }
       py_x1 = PyNumber_Int(py_x0);
       Py_DECREF(py_x0);
@@ -349,11 +349,11 @@ inline Point coerce_Point(PyObject* obj) {
         long x = PyInt_AsLong(py_x1);
         Py_DECREF(py_x1);
         py_y0 = PySequence_GetItem(obj, 1);
-        if (!PyInt_Check(py_y0)) {
+        if (!PyNumber_Check(py_y0)) {
           Py_DECREF(py_y0);
           PyErr_Clear();
-          PyErr_SetString(PyExc_TypeError, "Second list entry in Point is not an int");
-          throw std::invalid_argument("Second list entry in Point is not an int");
+          PyErr_SetString(PyExc_TypeError, "Second list entry in Point is not a number");
+          throw std::invalid_argument("Second list entry in Point is not a number");
         }
         py_y1 = PyNumber_Int(py_y0);
         Py_DECREF(py_y0);
diff --git a/include/plugins/binarization.hpp b/include/plugins/binarization.hpp
index c903c37..7046194 100644
--- a/include/plugins/binarization.hpp
+++ b/include/plugins/binarization.hpp
@@ -950,7 +950,7 @@ Image* brink_threshold(const T& image)
   unsigned long vecSum = 0;     // sum of histogram
   double invHistSum;            // inverse of histogram sum
   int Topt = 0;                 // threshold value
-  double locMin = numeric_limits<double>::max(); // local minimum
+  double locMin = std::numeric_limits<double>::max(); // local minimum
   int isMinInit = 0;            // flat for minimum initialization
 
   FloatVector *histoFV;
diff --git a/include/plugins/misc_filters.hpp b/include/plugins/misc_filters.hpp
index 4d562d7..a5c8f92 100644
--- a/include/plugins/misc_filters.hpp
+++ b/include/plugins/misc_filters.hpp
@@ -29,8 +29,6 @@
 #include "convolution.hpp"
 #include <math.h>
 
-using namespace std;
-
 namespace Gamera {
 
   //---------------------------
@@ -408,7 +406,7 @@ namespace Gamera {
     FloatImageView *res= new FloatImageView(*res_data);
 
 	GetPixel4Border<FloatImageView> gp(src, border_treatment, k);
-    vector<FloatPixel> window(k*k);
+    std::vector<FloatPixel> window(k*k);
     
     int radius = (k-1)/2;
     for(y = 0 ; (size_t)y < src.nrows() ; y++) {
diff --git a/include/plugins/threshold.hpp b/include/plugins/threshold.hpp
index 5023a1b..a637c91 100644
--- a/include/plugins/threshold.hpp
+++ b/include/plugins/threshold.hpp
@@ -255,7 +255,7 @@ Image* tsai_moment_preserving_threshold(const T &m, int storage_format) {
 ________________________________________________________________
 
         bin_ab.c
-        $Id: threshold.hpp 1410 2014-03-25 16:16:06Z cdalitz $
+        $Id$
         Copyright 1990, Blab, UiO
         Image processing lab, Department of Informatics
         University of Oslo
diff --git a/include/rle_data.hpp b/include/rle_data.hpp
index 0da0263..9ce8bce 100644
--- a/include/rle_data.hpp
+++ b/include/rle_data.hpp
@@ -147,6 +147,7 @@ namespace Gamera {
     */
     typedef unsigned char runsize_t;
 
+#if __cplusplus < 201103
     /*
       These are convenience functions to make dealing
       with the list iterators a little easier.
@@ -160,6 +161,7 @@ namespace Gamera {
     T prev(T i) {
       return --i;
     }
+#endif
   
     /*
       This class holds the actual run as a value, beginning position, and
diff --git a/src/graph/graph_structure.cpp b/src/graph/graph_structure.cpp
index c17cf7b..c41c5df 100644
--- a/src/graph/graph_structure.cpp
+++ b/src/graph/graph_structure.cpp
@@ -287,7 +287,7 @@ void Graph::remove_node(Node* node) {
       delete node;
    }
    else {
-      throw std::runtime_error("some error occured: Null pointer to node");
+      throw std::runtime_error("some error occurred: Null pointer to node");
    }
 }
 
diff --git a/src/imageobject.cpp b/src/imageobject.cpp
index 569355d..ce01b96 100644
--- a/src/imageobject.cpp
+++ b/src/imageobject.cpp
@@ -1287,7 +1287,7 @@ static PyMethodDef mlcc_methods[] = {
     },
     {(char*)"has_label", (PyCFunction)mlcc_has_label, METH_O,
      (char*)"**has_label** (int *label*)\n\n"
-     "Returns wether a label belongs to the MlCc or not."
+     "Returns whether a label belongs to the MlCc or not."
     },
     {(char*)"get_neighbors", (PyCFunction)mlcc_get_neighbors, METH_NOARGS,
      (char*)"**get_neighbors** ()\n\n"
diff --git a/src/kdtreemodule.cpp b/src/kdtreemodule.cpp
index 2c62098..d334690 100644
--- a/src/kdtreemodule.cpp
+++ b/src/kdtreemodule.cpp
@@ -145,7 +145,7 @@ void init_KdNodeType(PyObject* d) {
   KdNodeType.tp_doc = CHAR_PTR_CAST
     "**KdNode** (*point*, *data* = ``None``)\n\n"        \
     "The ``KdNode`` constructor creates a new node for use in a kd-tree.\n\n" \
-    "*point* must not be of the Gamera data type ``Point``, but a sequence of numerical values. The optional parameter *data* can be used to store arbitrary additonal information connected to the location *point*.";
+    "*point* must not be of the Gamera data type ``Point``, but a sequence of numerical values. The optional parameter *data* can be used to store arbitrary additional information connected to the location *point*.";
   PyType_Ready(&KdNodeType);
   PyDict_SetItemString(d, "KdNode", (PyObject*)&KdNodeType);
 }
diff --git a/src/knngamodule.cpp b/src/knngamodule.cpp
index 26b6200..2fb5b87 100644
--- a/src/knngamodule.cpp
+++ b/src/knngamodule.cpp
@@ -1033,7 +1033,7 @@ PyMethodDef GAReplacement_methods[] = {
                "Sets an steady state deterministic tournament as replacement "
                "method in the GA-progress. This means that the loosers of this "
                "tournament will be replaced in the following population.\n\n"
-               "int *tSize* (optinal)\n"
+               "int *tSize* (optional)\n"
                "    the number of individuals in the tournament"
     },
     { NULL }
@@ -1188,7 +1188,7 @@ PyMethodDef GAStopCriteria_methods[] = {
                "Enables the termination by attainment of the specified "
                "amount of fitness evaulations within the optimization "
                "process\n\n"
-               "int *n* (optinal)\n"
+               "int *n* (optional)\n"
                "    the number of fitness evaluations"
     },
     { (char *) "setSteadyStateStop", setSteadyStateStop, METH_VARARGS,
@@ -1505,7 +1505,7 @@ void init_GAParallelizationType(PyObject *d) {
     GAParallelizationType.tp_getset = GAParallelization_getset;
     GAParallelizationType.tp_doc = CHAR_PTR_CAST "**GAParallelization** (*mode* = ``True``, *threads* = 2)\n\n"
         "The ``GAParallelization`` constructor creates a new settings object "
-        "which controls the parallization within the GA-progress. It is used "
+        "which controls the parallelization within the GA-progress. It is used "
         "later within an ``GAOptimization``-object.\n\n"
         "*mode* (optional)\n"
         "   enable (``True``) or disable (``Flase``) the parallelization of "
diff --git a/src/libtiff/t4.h b/src/libtiff/t4.h
index f3470e2..fa4f5f7 100644
--- a/src/libtiff/t4.h
+++ b/src/libtiff/t4.h
@@ -1,4 +1,4 @@
-/* $Id: t4.h 158 2002-11-24 01:49:40Z karlmac $ */
+/* $Id$ */
 
 /*
  * Copyright (c) 1988-1997 Sam Leffler
diff --git a/src/libtiff/tif_fax3.h b/src/libtiff/tif_fax3.h
index 8cfd787..e64b145 100644
--- a/src/libtiff/tif_fax3.h
+++ b/src/libtiff/tif_fax3.h
@@ -1,4 +1,4 @@
-/* $Id: tif_fax3.h 158 2002-11-24 01:49:40Z karlmac $ */
+/* $Id$ */
 
 /*
  * Copyright (c) 1990-1997 Sam Leffler

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/gamera.git



More information about the Python-modules-commits mailing list