-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstallFlexSIM.m
33 lines (32 loc) · 1.17 KB
/
InstallFlexSIM.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
function InstallFlexSIM()
%--------------------------------------------------------------------------
% Function InstallFlexSIM()
%
% Ensures that all the necessray functions of FlexSIM and GlobalBioIm are
% in the MATLab path.
%
% Copyright (2022) A. Nogueron ([email protected]) , E. Soubies
%--------------------------------------------------------------------------
addpath(pwd);
addpath(genpath([pwd,'/src'])); % Add source files to path
global syst_type % Keep track of system type
if ispc
syst_type = 'W';
elseif ismac
syst_type = 'M';
else
syst_type = 'L';
end
if exist('GlobalBioIm', 'dir') % Check existance for GlobalBioIm in path
GBIPath = getfield(what('GlobalBioIm'),'path');
addpath(genpath(GBIPath))
else
disp('GlobalBioIm not found in computer. Dowloading in current directory...');
websave([pwd,'/GlobalBioIm'], 'https://github.com/Biomedical-Imaging-Group/GlobalBioIm/archive/refs/heads/master.zip');
unzip('GlobalBioIm.zip')
movefile('GlobalBioIm-master', 'GlobalBioIm')
delete('GlobalBioIm.zip')
run('GlobalBioIm/setGlobalBioImPath.m')
savepath
end