-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_illustration.m
50 lines (44 loc) · 1.57 KB
/
main_illustration.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
% Draw illustrations for different parcellation approaches and different
% cluster numbers.
% 2015-9-4 11:31:16
% SLIC: a whole brain parcellation toolbox
% Copyright (C) 2016 Jing Wang
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
clear,clc;
nii=load_untouch_nii('T1_4mm.nii');
img_bg=nii.img;
iK=200;
iPart=1;
iRep=1;
temp=[];
for method={'MSC_mean','MSC_twolevel','MKSC','SLIC_mean','SLIC_twolevel'}
method=method{1,1};
tmp=[];
for cK=[50,200,1000]
load(sprintf('%s_parc/K%d_part%d_rep%d.mat',method,cK,iPart,iRep));
img_parc=int16(img_parc);
img_orth=parc_orthview(img_bg,img_parc,1);
img_orth=double(img_orth/255);
tmp=[tmp,img_orth];
end
temp=[temp;tmp];
end
figure;
imshow(temp);
% imwrite(temp,'main_illustration.tif', 'resolution',1200);
% scale
pos=get(gcf,'Position');
scale=1.6;
set(gcf,'Position',[pos(1),pos(2),pos(3)*scale,pos(4)*scale]);