Skip to content
Snippets Groups Projects
Commit 1e26739a authored by preischig's avatar preischig
Browse files

gtCheckDiffractionBlobs: added pixel info


Signed-off-by: default avatarpreischig <preischig@gmail.com>
parent 5e4ac5df
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,12 @@ end
% Initialization
app = sfInitialise(startndx);
app.pix = [];
% Image Processing Toolbox license test before callling impixelinfo
% This is to avoid crashing when no license is available.
showpix = license('checkout','Image_Toolbox');
disp('KEYS:');
disp(' Arrows - 1 index shift (10 indexes by pressing Shift)');
......@@ -65,7 +71,8 @@ sfUpdateFigure();
conf.quit = false;
%conf.block = 'off';
conf.image = [];
% Let's create the figure
conf.window = figure( ...
'Name', 'Segmented diffraction blobs', ...
......@@ -129,10 +136,17 @@ sfUpdateFigure();
function sfUpdateFigure()
img = sum(gtDBBrowseDiffractionVolume(app.scanName, app.index), 3);
imagesc(img, 'Parent', app.axes1);
delete(app.image);
app.image = imagesc(img, 'Parent', app.axes1);
axis(app.axes1, 'image');
title_str = sprintf('Blob %d / %d', app.index, app.indexMax);
title(app.axes1, title_str);
% Image pixel values (needs to be called each time image changes)
if showpix
% add pixel info (it deletes automatically when image is deleted)
app.pix = impixelinfoval(app.window, app.image);
end
end
function closeFigure(~, ~)
......
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