summaryrefslogtreecommitdiff
path: root/silx/opencl/medfilt.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/opencl/medfilt.py')
-rw-r--r--silx/opencl/medfilt.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/silx/opencl/medfilt.py b/silx/opencl/medfilt.py
index 90cd49a..d4e425b 100644
--- a/silx/opencl/medfilt.py
+++ b/silx/opencl/medfilt.py
@@ -36,7 +36,7 @@ from __future__ import absolute_import, print_function, with_statement, division
__author__ = "Jerome Kieffer"
__license__ = "MIT"
-__date__ = "15/03/2017"
+__date__ = "12/09/2017"
__copyright__ = "2012-2017, ESRF, Grenoble"
__contact__ = "jerome.kieffer@esrf.fr"
@@ -51,7 +51,7 @@ if pyopencl:
mf = pyopencl.mem_flags
else:
raise ImportError("pyopencl is not installed")
-logger = logging.getLogger("silx.opencl.medfilt")
+logger = logging.getLogger(__name__)
class MedianFilter2D(OpenclProcessing):
@@ -202,7 +202,7 @@ class MedianFilter2D(OpenclProcessing):
kwargs["width"] = numpy.int32(image.shape[1])
# for k, v in kwargs.items():
# print("%s: %s (%s)" % (k, v, type(v)))
- mf2d = self.program.medfilt2d(self.queue,
+ mf2d = self.kernels.medfilt2d(self.queue,
(wg, image.shape[1]),
(wg, 1), *list(kwargs.values()))
events.append(EventDescription("median filter 2d", mf2d))
@@ -264,6 +264,6 @@ class _MedFilt2d(object):
new_shape = numpy.maximum(numpy.array(cls.median_filter.shape), shape)
ctx = cls.median_filter.ctx
cls.median_filter = MedianFilter2D(new_shape, kernel_size, ctx=ctx)
- return cls.median_filter.medfilt2d(image)
+ return cls.median_filter.medfilt2d(image, kernel_size=kernel_size)
medfilt2d = _MedFilt2d.medfilt2d