From 09690caf5e71f087a4657b0040132d2c7a1b67c2 Mon Sep 17 00:00:00 2001 From: Nicola Vigano <nicola.vigano@esrf.fr> Date: Thu, 11 Apr 2013 12:16:39 +0200 Subject: [PATCH] Fixed border pixel error in GtVolView Signed-off-by: Nicola Vigano <nicola.vigano@esrf.fr> --- zUtil_TomoUtils/GtVolView.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zUtil_TomoUtils/GtVolView.m b/zUtil_TomoUtils/GtVolView.m index fc7afe9c..af25c413 100644 --- a/zUtil_TomoUtils/GtVolView.m +++ b/zUtil_TomoUtils/GtVolView.m @@ -244,6 +244,8 @@ classdef GtVolView < GtBaseGuiElem % GTVOLVIEW/GET3DPIXELINFO Returns the value and the point where the % pointer is now over in respect to the volume stored in the object point = round(obj.get3DPixelInfo()); + % At the border, rounding gives a wrong pixel position + point = min(point, size(obj.conf.vol)); value = obj.getVolValue(point); end end -- GitLab