diff --git a/imagepy/tools/Measure/profile_tol.py b/imagepy/tools/Measure/profile_tol.py index 3bd0ed48..035e1acf 100644 --- a/imagepy/tools/Measure/profile_tol.py +++ b/imagepy/tools/Measure/profile_tol.py @@ -131,8 +131,8 @@ def profile(self, body, img): (x1, y1), (x2, y2) = body[0] dx, dy = x2-x1, y2-y1 n = max(abs(dx), abs(dy)) + 1 - xs = np.linspace(x1, x2, n).round().astype(np.int16) - ys = np.linspace(y1, y2, n).round().astype(np.int16) + xs = np.linspace(x1, x2, int(n)).round().astype(np.int16) + ys = np.linspace(y1, y2, int(n)).round().astype(np.int16) msk = (xs>=0) * (xs=0) * (ysimg.shape[1]: continue if y<0 or y>img.shape[0]: continue diff --git a/imagepy/widgets/histogram/channels_wgt.py b/imagepy/widgets/histogram/channels_wgt.py index 9ea50f45..93e16f17 100644 --- a/imagepy/widgets/histogram/channels_wgt.py +++ b/imagepy/widgets/histogram/channels_wgt.py @@ -172,6 +172,7 @@ def on_setback(self, event): name = self.com_back.GetValue() if name is None: return ImageManager.get().back = ImageManager.get(name) + curwin = WindowsManager.get() curwin.ips.update() def on_mode(self, event):