|
1 | 1 | %Copyright © 2018- Sampsa Pursiainen & ZI Development Team
|
2 | 2 | %See: https://github.com/sampsapursiainen/zeffiro_interface
|
3 |
| -function [c_table,c_points] = zef_parcellation_default(void) |
| 3 | +function [c_table,c_points] = zef_parcellation_default(zef) |
4 | 4 |
|
5 | 5 | c_table = cell(0);
|
6 | 6 | c_points = cell(0);
|
7 | 7 | c_ind = 0;
|
8 | 8 |
|
9 |
| -submesh_ind = evalin('base','zef.submesh_ind'); |
| 9 | +submesh_ind = eval('zef.submesh_ind'); |
10 | 10 | if isempty(submesh_ind)
|
11 |
| - submesh_ind = ones(size(evalin('base','zef.brain_ind'))); |
| 11 | + submesh_ind = ones(size(eval('zef.brain_ind'))); |
12 | 12 | end
|
13 | 13 |
|
14 |
| -if evalin('base','zef.parcellation_merge') |
15 |
| - c_table = evalin('base','zef.parcellation_colortable'); |
16 |
| - c_points = evalin('base','zef.parcellation_points'); |
| 14 | +if eval('zef.parcellation_merge') |
| 15 | + c_table = eval('zef.parcellation_colortable'); |
| 16 | + c_points = eval('zef.parcellation_points'); |
17 | 17 | else
|
18 |
| - evalin('base','zef.parcellation_selected = [];'); |
| 18 | + eval('zef.parcellation_selected = [];'); |
19 | 19 | end
|
20 | 20 |
|
21 |
| -s_interp_ind = evalin('base','zef.source_interpolation_ind{1}'); |
| 21 | +s_interp_ind = eval('zef.source_interpolation_ind{1}'); |
22 | 22 |
|
23 | 23 | t_ind = 1 + length(c_table);
|
24 | 24 |
|
25 | 25 | c_table{t_ind}{1} = 'SG';
|
26 |
| -c_points_aux = evalin('base','zef.source_positions'); |
| 26 | +c_points_aux = zef.source_positions'; |
27 | 27 | c_points_aux = [[0:size(c_points_aux,1)-1]' c_points_aux];
|
28 |
| -c_table{t_ind}{4} = zeros(size(c_points,1),1); |
| 28 | +c_table{t_ind}{4} = zeros(size(c_points_aux,1),1); |
29 | 29 |
|
30 | 30 | c_points{t_ind} = c_points_aux;
|
31 | 31 |
|
|
36 | 36 | visible_vec = [];
|
37 | 37 | color_cell = cell(0);
|
38 | 38 | aux_brain_ind = [];
|
39 |
| -compartment_tags = evalin('base','zef.compartment_tags'); |
| 39 | +compartment_tags = eval('zef.compartment_tags'); |
40 | 40 | for k = 1 : length(compartment_tags)
|
41 | 41 | var_0 = ['zef.' compartment_tags{k} '_on'];
|
42 | 42 | var_1 = ['zef.' compartment_tags{k} '_sigma'];
|
43 | 43 | var_2 = ['zef.' compartment_tags{k} '_priority'];
|
44 | 44 | var_3 = ['zef.' compartment_tags{k} '_visible'];
|
45 |
| - color_str = evalin('base',['zef.' compartment_tags{k} '_color']); |
46 |
| - on_val = evalin('base',var_0); |
| 45 | + color_str = eval(['zef.' compartment_tags{k} '_color']); |
| 46 | + on_val = eval(var_0); |
47 | 47 | if on_val
|
48 | 48 | i = i + 1;
|
49 | 49 |
|
50 | 50 | c_str = compartment_tags{k};
|
51 | 51 |
|
52 |
| - if ismember(evalin('base',['zef.' c_str '_sources']),[1 2]) |
53 |
| - I = find(evalin('base','zef.domain_labels(zef.brain_ind)')==i); |
| 52 | + if ismember(eval(['zef.' c_str '_sources']),[1 2]) |
| 53 | + I = find(eval('zef.domain_labels(zef.brain_ind)')==i); |
54 | 54 | submesh_ind_aux = unique(submesh_ind(I));
|
55 | 55 | if isempty(submesh_ind_aux)
|
56 | 56 | submesh_ind_aux = 1;
|
|
61 | 61 | I_aux = find(submesh_ind(I)==submesh_ind_aux(ell_ind));
|
62 | 62 | J = unique(s_interp_ind(I(I_aux),:));
|
63 | 63 | if length(submesh_ind_aux) > 1
|
64 |
| - c_table{t_ind}{2}{c_ind,1} = [evalin('base',['zef.' c_str '_name']) ' ' num2str(submesh_ind_aux(ell_ind))]; |
| 64 | + c_table{t_ind}{2}{c_ind,1} = [eval(['zef.' c_str '_name']) ' ' num2str(submesh_ind_aux(ell_ind))]; |
65 | 65 | else
|
66 |
| - c_table{t_ind}{2}{c_ind,1} = [evalin('base',['zef.' c_str '_name'])]; |
| 66 | + c_table{t_ind}{2}{c_ind,1} = [eval(['zef.' c_str '_name'])]; |
67 | 67 | end
|
68 |
| - c_table{t_ind}{3}(c_ind,1:3) = evalin('base',['zef.' c_str '_color']); |
| 68 | + c_table{t_ind}{3}(c_ind,1:3) = eval(['zef.' c_str '_color']); |
69 | 69 | c_table{t_ind}{3}(c_ind,5) = c_ind;
|
70 | 70 | c_table{t_ind}{5}(c_ind,:) = [i submesh_ind_aux(ell_ind)];
|
71 | 71 | c_table{t_ind}{4}(J) = c_ind;
|
|
0 commit comments