From ae4bb724d44c141abc37a9860092da953ede9fce Mon Sep 17 00:00:00 2001 From: Nicola Vigano <nicola.vigano@esrf.fr> Date: Mon, 26 Feb 2018 00:44:12 +0100 Subject: [PATCH] small fix Signed-off-by: Nicola Vigano <nicola.vigano@esrf.fr> --- zUtil_GUI/gtGuiCollectPointsFromImage.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zUtil_GUI/gtGuiCollectPointsFromImage.m b/zUtil_GUI/gtGuiCollectPointsFromImage.m index 880f747d..90b787e7 100755 --- a/zUtil_GUI/gtGuiCollectPointsFromImage.m +++ b/zUtil_GUI/gtGuiCollectPointsFromImage.m @@ -1,8 +1,12 @@ -function points = gtGuiCollectPointsFromImage(map) +function points = gtGuiCollectPointsFromImage(map, do_rescale) f = figure(); ax = axes('parent', f); - map = (map - min(map(:))) ./ (max(map(:)) - min(map(:))); - im = imagesc(map, 'parent', ax); + if (exist('do_rescale', 'var') && ~isempty(do_rescale) && do_rescale) + map = (map - min(map(:))) ./ (max(map(:)) - min(map(:))); + im = imagesc(map, 'parent', ax); + else + im = imshow(map, 'parent', ax); + end cm = uicontextmenu('Parent', f, 'Callback', @(src, evt)save_clicked_point()); set(im, 'UIContextMenu', cm); -- GitLab