-
Notifications
You must be signed in to change notification settings - Fork 34
/
setup_paths.m
75 lines (63 loc) · 1.66 KB
/
setup_paths.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
function setup_paths(do_restore_path)
% function setup_paths(do_restore_path)
%
% Restores the default paths and adds all relevant subdirs to the
% path. Run this when you start MATLAB to use the code.
%
% do_restore_path - optional, defaults to true
if (nargin < 1), do_restore_path = 1; end
clc;
disp('Welcome!');
% Test Matlab version number
switch(version('-release'))
case {'2018a', '2018b', '2019a', '2020b'}
1;
otherwise
disp('This MATLAB version is not supported by the framework');
disp('It may or may not work as intended');
end
if (do_restore_path)
disp('Restoring default path');
restoredefaultpath;
end
packages_dir = {...
'mdm', ...
'mio', ...
'mio/elastix', ...
'mio/fsl', ...
'msf', ...
'methods/dti_nls',...
'methods/dti_lls',...
'methods/dki_lls',...
'methods/dki_pa',...
'methods/quick_dti',...
'methods/dtd',...
'methods/ivim',...
'methods/dtd_covariance',...
'methods/dti_euler',...
'methods/dtd_pa',...
'methods/dtd_codivide',...
'methods/dtd_ndi',...
'methods/dtd_pake',...
'methods/dtd_gamma',...
'methods/dtd_saupe',...
'methods/fexi11',...
'methods/vasco16',...
'methods/dtd_smr',...
'methods/ning18', ...
'tools/dist', ...
'tools/gwf', ...
'tools/tensor_maths', ...
'tools/uvec', ...
'tools/cfa', ...
'tools/mplot', ...
'tools/mgui', ...
'tools/man', ...
'tools/ut', ...
};
t = fileparts(mfilename('fullpath'));
for c_package = 1:numel(packages_dir)
addpath(fullfile(t, packages_dir{c_package}), '-end');
end
disp (char(10))
disp 'Done configuring paths for framework!'