-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathgetD.m
38 lines (36 loc) · 1.32 KB
/
getD.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
function [ D, datatype, brainmask, badcoords, threshval, threshop] = getD(FUSEFLAG, inp, n)
if isfield(inp,'stacking') && inp.stacking
datatype = 0;
brainmask = [];
badcoords = false(1,inp.nD);
threshval = [];
threshop = [];
D = inp.nD;
else
switch FUSEFLAG
case {0,1,3}
switch FUSEFLAG
case {0, 3}
D = inp.X(1).dimvecx(end);
datatype = inp.X.datatype;
brainmask = inp.X.brainmask{1};
badcoords = inp.X.badcoords{1};
threshval = inp.X.threshval;
threshop = inp.X.threshop;
case 1
D = inp.X(1).dimsizes(n);
datatype = inp.X.datatype(n);
brainmask = inp.X.brainmask{n};
badcoords = inp.X.badcoords{n};
threshval = inp.X.threshval{n};
threshop = inp.X.threshop{n};
end
case 2
D = inp.X(n).dimvecx(end);
datatype = inp.X(n).datatype;
brainmask = inp.X(n).brainmask{1};
badcoords = inp.X(n).badcoords{1};
threshval = inp.X(n).threshval;
threshop = inp.X(n).threshop;
end
end