|
31 | 31 |
|
32 | 32 | opt.model.file = fullfile(this_dir, 'models', 'model-MoAE_smdl.json'); |
33 | 33 |
|
34 | | -% Specify the result to compute |
35 | | -opt.results(1).nodeName = 'run_level'; |
36 | | - |
37 | | -opt.results(1).name = 'listening'; |
38 | | -% MONTAGE FIGURE OPTIONS |
39 | | -opt.results(1).montage.do = true(); |
40 | | -opt.results(1).montage.slices = -4:2:16; % in mm |
41 | | -% axial is default 'sagittal', 'coronal' |
42 | | -opt.results(1).montage.orientation = 'axial'; |
43 | | -% will use the MNI T1 template by default but the underlay image can be changed. |
44 | | -opt.results(1).montage.background = ... |
45 | | - fullfile(spm('dir'), 'canonical', 'avg152T1.nii'); |
| 34 | +% read the model |
| 35 | +opt = checkOptions(opt); |
| 36 | + |
| 37 | +opt.results = opt.model.bm.Nodes{1}.Model.Software.bidspm.Results{1}; |
46 | 38 |
|
47 | 39 | opt = checkOptions(opt); |
48 | 40 |
|
|
55 | 47 |
|
56 | 48 | rightRoiFile = bids.query(BIDS_ROI, 'data', filter); |
57 | 49 |
|
58 | | -filter.hemi = 'L'; |
59 | | - |
60 | | -leftRoiFile = bids.query(BIDS_ROI, 'data', filter); |
61 | | - |
62 | 50 | % we get the con image to extract data |
63 | 51 | ffxDir = getFFXdir(subLabel, opt); |
64 | 52 | maskImage = spm_select('FPList', ffxDir, '^.*_mask.nii$'); |
65 | 53 | bf = bids.File(spm_file(maskImage, 'filename')); |
66 | 54 | conImage = spm_select('FPList', ffxDir, ['^con_' bf.entities.label '.nii$']); |
67 | 55 |
|
68 | 56 | %% Layers to put on the figure |
69 | | -layers = sd_config_layers('init', {'truecolor', 'dual', 'contour', 'contour'}); |
| 57 | +layers = sd_config_layers('init', {'truecolor', 'dual', 'contour'}); |
70 | 58 |
|
71 | 59 | % Layer 1: Anatomical map |
72 | 60 | [anat_normalized_file, anatRange] = return_normalized_anat_file(opt, subLabel); |
|
100 | 88 |
|
101 | 89 | %% Layer 3 and 4: Contour of ROI |
102 | 90 |
|
| 91 | +roi = spm_select('FPList', ffxDir, ['^sub_.*' bf.entities.label '.*_mask.nii$']); |
| 92 | + |
103 | 93 | layers(3).color.file = rightRoiFile{1}; |
104 | 94 | layers(3).color.map = [0 0 0]; |
105 | 95 | layers(3).color.line_width = 2; |
106 | 96 |
|
107 | | -layers(4).color.file = leftRoiFile{1}; |
108 | | -layers(4).color.map = [1 1 1]; |
109 | | -layers(4).color.line_width = 2; |
110 | | - |
111 | 97 | %% Settings |
112 | 98 | settings = sd_config_settings('init'); |
113 | 99 |
|
114 | 100 | % we reuse the details for the SPM montage |
| 101 | +settings.slice.disp_slices = opt.results(1).montage.slices; |
115 | 102 | settings.slice.orientation = opt.results(1).montage.orientation; |
116 | | -settings.slice.disp_slices = -15:3:18; |
117 | 103 | settings.fig_specs.n.slice_column = 4; |
118 | 104 | settings.fig_specs.title = opt.results(1).name; |
119 | 105 |
|
|
0 commit comments