Skip to content
Snippets Groups Projects
Commit 79964f01 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Shared update every 10ms to all GUI classes


Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@233 4c865b51-4357-4376-afb4-474e03ccb993
parent c2e61ccd
No related branches found
No related tags found
No related merge requests found
......@@ -4,8 +4,6 @@ classdef GtGuiThresholdGrain < GtVolView
min_threshold = 0;
max_threshold = 1;
range = 1;
timestamp = 0;
end
methods
......@@ -75,13 +73,6 @@ classdef GtGuiThresholdGrain < GtVolView
set(obj.conf.h_thr_edit, 'String', num2str(obj.threshold));
end
function updateDisplay(obj)
if ((now - obj.timestamp) > 1.157168298959732e-07)
updateDisplay@GtVolView(obj);
obj.timestamp = now;
end
end
function addUICallbacks(obj)
addUICallbacks@GtVolView(obj)
......
......@@ -4,6 +4,8 @@ classdef GtBaseGuiElem < handle
children_gui;
ui_callbacks;
timestamp = 0;
end
methods
......@@ -117,11 +119,18 @@ classdef GtBaseGuiElem < handle
set(cb{1}, cb{2}, '');
end
end
function updateDisplay(obj)
if ((now - obj.timestamp) > 1.157168298959732e-07)
obj.doUpdateDisplay();
obj.timestamp = now;
end
end
end
methods (Abstract)
resetUiComponents(obj)
updateDisplay(obj)
doUpdateDisplay(obj)
addUICallbacks(obj)
end
end
......@@ -387,7 +387,7 @@ classdef GtVolView < GtBaseGuiElem
set(image, 'cdata', slice);
end
function updateDisplay(obj)
function doUpdateDisplay(obj)
obj.conf.slicendx = round(get(obj.conf.h_slider, 'Value'));
set(obj.conf.h_slider, 'Value', obj.conf.slicendx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment