/
classiSave.m
34 lines (25 loc) · 1.06 KB
/
classiSave.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
function classiSave(classiObj)
[path,file]=classiObj.getPath;
reverseStr='';
cc=1;
fprintf('\n');
reverseStr='';
%cc=1;
for j=1:numel(classiObj.roi)
if numel(classiObj.roi(j).id)
classiObj.roi(j).save;
classiObj.roi(j).clear;
disp(['Processed ROI ' classiObj.roi(j).id])
end
end
% msg = sprintf('Writing ROIs for classification %d / %d for FOV %s', cc,numel(shallowObj.processing.classification)); %Don't forget this semicolon
% fprintf([reverseStr, msg]);
% reverseStr = repmat(sprintf('\b'), 1, length(msg));
% cc=cc+1;
classiObj.log('Classi is saved','Creation')
if isfolder(path)
save(fullfile(path,[file '_classification.mat']),'classiObj');
disp(['Classification ' fullfile(path,[file '_classification.mat']) ' is saved !']);
else
disp('Could not find/access the requested folder ; Check your connection! Quitting!');
end