-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathinitalSettings.m
executable file
·40 lines (35 loc) · 1.81 KB
/
initalSettings.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
% Use jobMangerName as global variable, will be set in installer
global jobManagerName;
% A GUI to set releveant directories, Matlab jobmanager and chose a dataset
iHandle = installer;
waitfor(iHandle);
clear iHandle;
% NO MODIFICATIONS NECESSARY UNDER THIS LINE USUALLY
% Compile functions needed later using Matlab mex compiler
display('If you get warning or errors here, please try to run mex -setup and choose a compiler supported by Matlab');
% Compile mex watershed and nml parser
if strcmp(computer('arch'), 'glnxa64')
% Linux mex
mex CFLAGS="\$CFLAGS -U FORTIFY_SOURCE -std=c99" -largeArrayDims -outdir retina/segmentation/watershedBasedSeg retina/segmentation/watershedBasedSeg/watershed_threeTimes3D.c;
mex -outdir auxiliaryMethods auxiliaryMethods/parseNml.c;
mex -outdir auxiliaryMethods auxiliaryMethods/parseNml_noInVP.c;
elseif strcmp(computer('arch'), 'PCWIN64') || strcmp(computer('arch'), 'win64') % Matlab docu inconsitent
% Windows mex (was not able to get watershed compile using Windows SDK
% 7.1 C-compiler (does not support C99 standard?). Works using c++
% compiler, weird behaviour
mex -largeArrayDims -outdir retina\segmentation\watershedBasedSeg retina\segmentation\watershedBasedSeg\watershed_threeTimes3D.cpp;
mex -outdir auxiliaryMethods auxiliaryMethods\parseNml.c;
mex -outdir auxiliaryMethods auxiliaryMethods\parseNml_noInVP.c;
else
display('Please set up mex to run with your architecture!')
end
% This requires that matlab is started from the baseDirectory of the github
% repo, better alternative?
codeDirectory = pwd;
% Open relevant scripts for dataset/code version
if strcmp(chosenCodebase, 'Legacy version (for retina dataset e_k0563)')
run(['retina' filesep 'startup.m']);
end
if strcmp(chosenCodebase, 'SegEM')
run(['cortex' filesep 'startup.m']);
end