Skip to content

Commit cc07d95

Browse files
committed
tmp
1 parent 010cfa0 commit cc07d95

File tree

1 file changed

+8
-22
lines changed

1 file changed

+8
-22
lines changed

demos/MoAE/moae_03_slice_display.m

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,10 @@
3131

3232
opt.model.file = fullfile(this_dir, 'models', 'model-MoAE_smdl.json');
3333

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};
4638

4739
opt = checkOptions(opt);
4840

@@ -55,18 +47,14 @@
5547

5648
rightRoiFile = bids.query(BIDS_ROI, 'data', filter);
5749

58-
filter.hemi = 'L';
59-
60-
leftRoiFile = bids.query(BIDS_ROI, 'data', filter);
61-
6250
% we get the con image to extract data
6351
ffxDir = getFFXdir(subLabel, opt);
6452
maskImage = spm_select('FPList', ffxDir, '^.*_mask.nii$');
6553
bf = bids.File(spm_file(maskImage, 'filename'));
6654
conImage = spm_select('FPList', ffxDir, ['^con_' bf.entities.label '.nii$']);
6755

6856
%% 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'});
7058

7159
% Layer 1: Anatomical map
7260
[anat_normalized_file, anatRange] = return_normalized_anat_file(opt, subLabel);
@@ -100,20 +88,18 @@
10088

10189
%% Layer 3 and 4: Contour of ROI
10290

91+
roi = spm_select('FPList', ffxDir, ['^sub_.*' bf.entities.label '.*_mask.nii$']);
92+
10393
layers(3).color.file = rightRoiFile{1};
10494
layers(3).color.map = [0 0 0];
10595
layers(3).color.line_width = 2;
10696

107-
layers(4).color.file = leftRoiFile{1};
108-
layers(4).color.map = [1 1 1];
109-
layers(4).color.line_width = 2;
110-
11197
%% Settings
11298
settings = sd_config_settings('init');
11399

114100
% we reuse the details for the SPM montage
101+
settings.slice.disp_slices = opt.results(1).montage.slices;
115102
settings.slice.orientation = opt.results(1).montage.orientation;
116-
settings.slice.disp_slices = -15:3:18;
117103
settings.fig_specs.n.slice_column = 4;
118104
settings.fig_specs.title = opt.results(1).name;
119105

0 commit comments

Comments
 (0)