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

Small changes (mainly to guiGtMontage)

parent eca7d443
No related branches found
No related tags found
No related merge requests found
function [blob_vol, blob_bb] = gtReadBlobFromHDF5(blob_dir, blob_id)
% [blob_vol, blob_bb] = gtReadBlobFromHDF5(blob_dir, blob_id)
sub_dir = fullfile(blob_dir, sprintf('%06d', blob_id - mod(blob_id, 1e4)));
fnameout = fullfile(sub_dir, sprintf('difblob_%06d.hdf5', blob_id) );
if (isempty(dir(fnameout)))
......
......@@ -57,7 +57,7 @@ classdef GtThreshold < handle
obj.param.rec.percentile2 = percentile;
parameters = obj.param;
save('parameters.mat', 'parameters');
save('parameters.mat', 'parameters', '-v7.3');
end
if ischar(phaseID)
......
......@@ -2,21 +2,6 @@ function selected = guiGtMontage(imgStack, selectedImages, spotsIds, omegas, tit
% GUIGTMONTAGE
% selected = guiGtMontage(imgStack, selectedImages, spotsIds, omegas, title)
% --------------------------------------------------------------------------
%
% H = GUIGTMONTAGE returns the handle to a new GUIGTMONTAGE or the handle to
% the existing singleton*.
%
% GUIGTMONTAGE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in GUIGTMONTAGE.M with the given input arguments.
%
% GUIGTMONTAGE('Property','Value',...) creates a new GUIGTMONTAGE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before guiGtMontage_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to guiGtMontage_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
if (~exist('selectedImages', 'var'))
......@@ -33,13 +18,9 @@ function selected = guiGtMontage(imgStack, selectedImages, spotsIds, omegas, tit
end
if (size(imgStack,2) ~= length(selectedImages))
Mexc = MException( 'GUI:wrong_input_args', ...
'Wrong size for selected Images vector');
throw(Mexc);
error('GUI:wrong_input_args', 'Wrong size for selected Images vector');
elseif (size(imgStack,2) ~= length(omegas))
Mexc = MException( 'GUI:wrong_input_args', ...
'Wrong size of Omegas vector');
throw(Mexc);
error('GUI:wrong_input_args', 'Wrong size of Omegas vector');
end
if (~exist('title', 'var'))
......@@ -49,7 +30,7 @@ function selected = guiGtMontage(imgStack, selectedImages, spotsIds, omegas, tit
% Init the GUI
guiData = guiGtMontage_init(imgStack, selectedImages, spotsIds, omegas, title);
while 1
while (1)
% Wait for the application to close
if (guiData.close), break; end
pause(0.001);
......@@ -137,13 +118,14 @@ function selected = guiGtMontage(imgStack, selectedImages, spotsIds, omegas, tit
% Creates the panels containing the images
% Sorting by Omegas
[~, order] = sort(omegas);
for ii = 1:length(selectedImages)
index = order(ii);
img = squeeze(imgStack(:,index,:));
img = squeeze(imgStack(:, index, :))';
% hack to make it display the images: may be a matlab bug
% related to flushing
if ii == 1
if (ii == 1)
imagesc(img, 'parent', ax);
end
......@@ -200,9 +182,10 @@ function selected = guiGtMontage(imgStack, selectedImages, spotsIds, omegas, tit
function guiData = createDiffSpotPanel(gui, img, active, ii, num, omega)
% It creates the panel that contains the difspot.
text = sprintf('Spot %d', num);
if (exist('omega', 'var'))
text = sprintf('%s (o: %2.1f)', text, omega);
text = sprintf('w: %2.1f, Id: %d', omega, num);
else
text = sprintf('Id: %d', num);
end
panel = uiextras.BoxPanel('Parent', gui.imgs_grid, 'Title', text);
......
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