-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCompilation.m
More file actions
32 lines (25 loc) · 813 Bytes
/
Compilation.m
File metadata and controls
32 lines (25 loc) · 813 Bytes
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
% Script for compiling the MATLAB code for the Shape & Appearance models.
%__________________________________________________________________________
% Copyright (C) 2017 Wellcome Trust Centre for Neuroimaging
% John Ashburner
% $Id$
compile_dir = fullfile(tempdir,'compiled');
if ~exist('spm','file')
error('SPM not on search path.');
end
if ~strcmp(spm('ver'),'SPM12')
error('Wrong SPM version installed (should be SPM12).');
end
spm_file = which('spm');
[pth,~,~] = fileparts(spm_file);
addpath(pth);
addpath(fullfile(pth,'toolbox','Shoot'));
[ok,message] = mkdir(compile_dir);
if ok
fprintf('Compiled results should be in "%s"\n', compile_dir)
mcc('-m','runPG', '-v','-d',compile_dir);
mcc('-m','runPGfit','-v','-d',compile_dir);
disp('Done.');
else
error(message);
end