forked from JoramSoch/MACS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbatch_MS_SMM_BMS.m
68 lines (55 loc) · 2.32 KB
/
batch_MS_SMM_BMS.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
function module = batch_MS_SMM_BMS
% _
% Configure MATLAB Batch for "MS: generate SMM from BMS"
%
% Author: Joram Soch, BCCN Berlin
% E-Mail: joram.soch@bccn-berlin.de
%
% First edit: 17/03/2017, 13:25 (V0.99/V15)
% Last edit: 09/03/2018, 10:25 (V1.2/V18)
%=========================================================================%
% F I E L D S %
%=========================================================================%
% Select BMS.mat
%-------------------------------------------------------------------------%
BMS_mat = cfg_files;
BMS_mat.tag = 'BMS_mat';
BMS_mat.name = 'Select BMS.mat';
BMS_mat.help = {'Select the BMS.mat file of an estimated group-level BMS.'};
BMS_mat.filter = 'mat';
BMS_mat.ufilter = '^BMS\.mat$';
BMS_mat.num = [1 1];
% Extent threshold
%--------------------------------------------------------------------------
extent = cfg_entry;
extent.tag = 'extent';
extent.name = 'Extent threshold';
extent.help = {'Enter the voxel extent threshold, i.e. the minimum number of neighboring voxels in order for a model to be selected in that cluster.'};
extent.strtype = 'n';
extent.num = [1 1];
extent.val = {10};
%=========================================================================%
% M O D U L E %
%=========================================================================%
% MS: SMM BMS (opt)
%-------------------------------------------------------------------------%
module = cfg_exbranch;
module.tag = 'MS_SMM_BMS';
module.name = 'MS: generate SMM from BMS';
module.val = {BMS_mat extent};
module.help = {'Determine Selected-Model Maps after Bayesian Model Selection'
'Type "help MS_SMM_BMS" for help on this module.'};
module.prog = @run_module;
%=========================================================================%
% F U N C T I O N S %
%=========================================================================%
% Run batch
%-------------------------------------------------------------------------%
function out = run_module(job)
% get input variables
load(job.BMS_mat{1});
extent = job.extent;
% execute operation
MS_SMM_BMS(BMS,[],extent);
% set output files
out = [];