Closed CsatiZoltan closed 4 years ago
view = [(int, 'window_size', (0, 30), 1, 'window size', 'pixel')] please use: view = [(int, 'window_size', (0, 30), 0, 'window size', 'pixel')]
for loat, it is the accuracy. I want to keep a same format with the float, so put 0 there.
My bad, now it works. Thanks.
When I tick the
preview
checkbox, thepara-changed
method is invoked. This implicitly converts an int to a float. In the screenshot below you can see that the value for the'window_size'
key in thepara
dictionary is 5 as an int. However, after executing line 101, the result is a float, as shown in the right window. The error arises in this file: https://github.com/Image-Py/imagepy/blob/c0804fa690d7f0a52acc948b9f17067f7b2c0397/imagepy/ui/panelconfig.py#L101Code to reproduce:
This is almost the same as your
Gaussian
class, with the exception that I defined an integer. When themedian_filter
function of scipy.ndimage receives a float, it terminates with a segmentation fault.