-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathinitCppRoi.m
44 lines (33 loc) · 1.17 KB
/
initCppRoi.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
% (C) Copyright 2021 CPP ROI developers
function initCppRoi()
global CPP_ROI_INITIALIZED
global CPP_ROI_PATHS
if isempty(CPP_ROI_INITIALIZED) || ~CPP_ROI_INITIALIZED
% directory with this script becomes the current directory
thisDirectory = fileparts(mfilename('fullpath'));
pathSep = ':';
if ~isunix
pathSep = ';';
end
% we add all the subfunctions that are in the sub directories
CPP_ROI_PATHS = genpath(fullfile(thisDirectory, 'src'));
CPP_ROI_PATHS = cat(2, CPP_ROI_PATHS, pathSep, ...
fullfile(thisDirectory, 'lib', 'marsbar', 'marsbar'));
CPP_ROI_PATHS = cat(2, CPP_ROI_PATHS, pathSep, ...
fullfile(thisDirectory, 'atlas'));
addpath(CPP_ROI_PATHS, '-begin');
marsbar('on');
try
marsbar('splash');
catch
end
copyAtlasToSpmDir('HCPex', 'verbose', true);
copyAtlasToSpmDir('AAL', 'verbose', true);
copyAtlasToSpmDir('Glasser', 'verbose', true);
copyAtlasToSpmDir('Wang', 'verbose', true);
copyAtlasToSpmDir('visfAtlas', 'verbose', true);
CPP_ROI_INITIALIZED = true();
else
fprintf('\n\nCPP_ROI already initialized\n\n');
end
end