Skip to content

Commit 5a3ea9a

Browse files
committed
bugs fix
1 parent 8507f34 commit 5a3ea9a

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

check/check_user_feedback.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function user_feedback( sanity_table, switcher )
9494
elseif ~sanity_table(2)
9595
errordlg('File path for segmentation configurations not found.','Input Error');
9696
elseif ~sanity_table(3)
97-
errordlg('Number of clusters. Field needs to contain a numerical value','Input Error');
97+
errordlg('Number of clusters. Field needs to contain an integer equal or bigger than 10','Input Error');
9898
end
9999

100100
end

check/check_user_input.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,10 @@
256256
try
257257
c = str2num(user_input{1,2}{1});
258258
if ~isempty(c)
259-
if c ~= 0 && isinteger(c)
260-
sanity_table(3) = 1;
259+
if mod(c,1)==0 %check if it is integer
260+
if c >=10
261+
sanity_table(3) = 1;
262+
end
261263
end
262264
end
263265
catch

gui.m

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,32 @@ function load_traj_buttom_Callback(hObject, eventdata, handles)
314314
end
315315

316316
function classify_button_Callback(hObject, eventdata, handles)
317+
% see if we have the path for the segmentation_config file
318+
rpath = get(handles.seg_path,'String');
319+
[error, segmentation_configs] = select_files_default(1,rpath);
320+
if error
321+
% if not, ask for segmentation_config file
322+
segmentation_configs = select_files(1);
323+
if isempty(segmentation_configs)
324+
return
325+
end
326+
end
327+
% see if we have the path for the labels file
328+
labels_path = get(handles.path_labels,'String');
329+
[error, ~] = select_files_default(2,labels_path);
330+
if error
331+
% if not, ask for labels file
332+
labels_path = select_files(2);
333+
if isempty(labels_path)
334+
return
335+
end
336+
end
317337
paths = {get(handles.path_labels,'String'),...
318338
get(handles.seg_path,'String')};
319339
values = {get(handles.num_clusters,'String')};
320340
user_input = {};
321341
user_input{1,1} = paths;
322-
user_input{1,2} = values;
342+
user_input{1,2} = values;
323343
% Check if the information given by the user are correct
324344
test_result = check_user_input(user_input,3);
325345
if test_result == 0 % if error

0 commit comments

Comments
 (0)