Skip to content

Commit 02ae680

Browse files
committed
bugs fixed
1 parent d25d43c commit 02ae680

File tree

9 files changed

+76
-55
lines changed

9 files changed

+76
-55
lines changed

configs.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
VARIABLE,VALUE,COMMENT
2+
FontName,Arial,figures and export
3+
FontSize,12,figures and export
4+
LineWidth,0.5,figures and export
5+
Export,.jpg,export
6+
ExportStyle,Low Quality,export

configs/configs.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VARIABLE,VALUE,COMMENT
22
FontName,Arial,figures and export
3-
FontSize,13,figures and export
3+
FontSize,12,figures and export
44
LineWidth,0.5,figures and export
5-
Export,.svg,export
6-
ExportStyle,High Quality,export
5+
Export,.jpg,export
6+
ExportStyle,Low Quality,export

configs/configs_default.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VARIABLE,VALUE,COMMENT
22
FontName,Arial,figures and export
33
FontSize,12,figures and export
4-
LineWidth,1,figures and export
4+
LineWidth,0.5,figures and export
55
Export,.jpg,export
66
ExportStyle,Low Quality,export

configs/figure_configs.m

Lines changed: 52 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function figure_configs_OpeningFcn(hObject, eventdata, handles, varargin)
7070
'JPEG image (.jpg)',...
7171
'Portable Network Graphics (.png)',...
7272
'Encapsulated PostScript (.eps)',...
73-
'Scalable Vector Graphics) (.svg)',...
73+
'Scalable Vector Graphics (.svg)',...
7474
'Portable Document Format (.pdf)',...
7575
'Windows bitmap (.bmp)',...
7676
'TIFF image, compressed (.tif)'};
@@ -160,13 +160,15 @@ function export_style_CreateFcn(hObject, eventdata, handles)
160160
function ok_Callback(hObject, eventdata, handles)
161161
% Read the configs.txt
162162
fmt = repmat('%s ',[1,3]);
163-
if ~isdeployed
164-
fileID = fopen('configs.txt');
165-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
166-
else
167-
fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
168-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
169-
end
163+
% if ~isdeployed
164+
% fileID = fopen('configs.txt');
165+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
166+
% else
167+
% fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
168+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
169+
% end
170+
fileID = fopen('configs.txt');
171+
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
170172
contents = contents{1,1};
171173
fclose(fileID);
172174
% Get the gui data
@@ -196,26 +198,29 @@ function ok_Callback(hObject, eventdata, handles)
196198
end
197199
end
198200
new = cell2table(contents);
199-
if ~isdeployed
200-
path = fullfile(pwd,'configs','configs.txt');
201-
writetable(new,path,'WriteVariableNames',0);
202-
else
203-
path = fullfile(ctfroot,'configs','configs.txt');
204-
writetable(new,path,'WriteVariableNames',0);
205-
end
201+
% if ~isdeployed
202+
% path = fullfile(pwd,'configs','configs.txt');
203+
% writetable(new,path,'WriteVariableNames',0);
204+
% else
205+
% path = fullfile(ctfroot,'configs','configs.txt');
206+
% writetable(new,path,'WriteVariableNames',0);
207+
% end
208+
writetable(new,'configs.txt','WriteVariableNames',0);
206209
close(gcf);
207210

208211

209212
function cancel_Callback(hObject, eventdata, handles)
210213
% Read the configs.txt
211214
fmt = repmat('%s ',[1,3]);
212-
if ~isdeployed
213-
fileID = fopen('configs.txt');
214-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
215-
else
216-
fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
217-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
218-
end
215+
% if ~isdeployed
216+
% fileID = fopen('configs.txt');
217+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
218+
% else
219+
% fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
220+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
221+
% end
222+
fileID = fopen('configs.txt');
223+
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
219224
contents = contents{1,1};
220225
fclose(fileID);
221226
% Get the backup
@@ -235,13 +240,14 @@ function cancel_Callback(hObject, eventdata, handles)
235240
end
236241
end
237242
new = cell2table(contents);
238-
if ~isdeployed
239-
path = fullfile(pwd,'configs','configs.txt');
240-
writetable(new,path,'WriteVariableNames',0);
241-
else
242-
path = fullfile(ctfroot,'configs','configs.txt');
243-
writetable(new,path,'WriteVariableNames',0);
244-
end
243+
% if ~isdeployed
244+
% path = fullfile(pwd,'configs','configs.txt');
245+
% writetable(new,path,'WriteVariableNames',0);
246+
% else
247+
% path = fullfile(ctfroot,'configs','configs.txt');
248+
% writetable(new,path,'WriteVariableNames',0);
249+
% end
250+
writetable(new,'configs.txt','WriteVariableNames',0);
245251
close(gcf);
246252

247253
function axes1_CreateFcn(hObject, eventdata, handles)
@@ -251,24 +257,27 @@ function axes1_CreateFcn(hObject, eventdata, handles)
251257
function default_Callback(hObject, eventdata, handles)
252258
% Read the configs_default.txt
253259
fmt = repmat('%s ',[1,3]);
254-
if ~isdeployed
255-
fileID = fopen('configs_default.txt');
256-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
257-
else
258-
fileID = fopen(fullfile(ctfroot,'configs','configs_default.txt'));
259-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
260-
end
260+
% if ~isdeployed
261+
% fileID = fopen('configs_default.txt');
262+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
263+
% else
264+
% fileID = fopen(fullfile(ctfroot,'configs','configs_default.txt'));
265+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
266+
% end
267+
fileID = fopen('configs_default.txt');
268+
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
261269
contents = contents{1,1};
262270
fclose(fileID);
263271
% Write to the configs.txt
264272
new = cell2table(contents);
265-
if ~isdeployed
266-
path = fullfile(pwd,'configs','configs.txt');
267-
writetable(new,path,'WriteVariableNames',0);
268-
else
269-
path = fullfile(ctfroot,'configs','configs.txt');
270-
writetable(new,path,'WriteVariableNames',0);
271-
end
273+
% if ~isdeployed
274+
% path = fullfile(pwd,'configs','configs.txt');
275+
% writetable(new,path,'WriteVariableNames',0);
276+
% else
277+
% path = fullfile(ctfroot,'configs','configs.txt');
278+
% writetable(new,path,'WriteVariableNames',0);
279+
% end
280+
writetable(new,'configs.txt','WriteVariableNames',0);
272281
% Update the gui
273282
[FontName, FontSize, LineWidth, Export, ExportStyle] = parse_configs;
274283
fonts = get(handles.fname,'String');

configs/parse_configs.m

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
%color/grayscale/black&white
55

66
fmt = repmat('%s ',[1,3]);
7-
if ~isdeployed
8-
fileID = fopen('configs.txt');
9-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
10-
else
11-
fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
12-
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
13-
end
7+
% if ~isdeployed
8+
% fileID = fopen('configs.txt');
9+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
10+
% else
11+
% fileID = fopen(fullfile(ctfroot,'configs','configs.txt'));
12+
% contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
13+
% end
14+
fileID = fopen('configs.txt');
15+
contents = textscan(fileID,fmt,'CollectOutput',1,'Delimiter',',');
1416
contents = contents{1,1};
1517
fclose(fileID);
1618

gui.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,10 @@ function confusion_matrix_Callback(hObject, eventdata, handles)
785785
classification_configs = res{1};
786786
set(handles.class_path,'String',res{2});
787787
end
788+
h = waitbar(0,'Loading...','Name','Computing');
788789
results_confusion_matrix(segmentation_configs,classification_configs,10);
790+
delete(h);
791+
waitfor(h);
789792
set(temp(idx),'Visible','on');
790793

791794
% Display Arena
37 KB
Loading

utility/export_figure.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
function export_figure(get_current_figure, get_path, get_name, get_export_format, get_export_properties)
1717

1818
% if .fig format is requested just save and terminate
19-
if isequal(get_export_properties,'.fig')
19+
if isequal(get_export_format,'.fig')
2020
saveas(get_current_figure, strcat(get_path,get_name,get_export_format));
2121
return;
2222
end

utility/number_of_clusters.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ function graphs_callback(varargin)
320320
return
321321
catch
322322
errordlg('Graphs cannot be generated.','Error');
323+
set(temp(idx),'Visible','on');
323324
return
324325
end
325326
end

0 commit comments

Comments
 (0)