-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathView_Connectome.m
49 lines (37 loc) · 989 Bytes
/
View_Connectome.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
% https://community.mrtrix.org/t/visualising-processing-tck2connectome-output/1941/6
% Code for viewing Connectomes
clear
%% Load per subject from the root subjects folder
ID = '143';
mainpath = '/root_folder/here/';
inputdir = strcat(mainpath, ID, '_pre/Diffusion/Connectome/', ID, '_pre');
inputdir2 = strcat(mainpath, ID, '_post/Diffusion/spared_post/', ID, '_post');
pre_con = load(strcat(inputdir, '_sum_streamline_connectome.csv'))';
post_con = load(strcat(inputdir2, '_sum_streamline_spared_connectome.csv'))';
%% Compare raw
figure()
suptitle(ID)
subplot(1,3,1)
surface(pre_con)
title('Pre')
subplot(1,3,2)
surface(post_con)
title('Post')
subplot(1,3,3)
surface(pre_con-post_con)
title('Pre-Post')
% set(gfc, 'color','w');
%% Compare normalized W
figure()
suptitle(ID)
subplot(1,3,1)
surface(pre_con)
title('Pre')
subplot(1,3,2)
surface(post_con)
title('Post')
subplot(1,3,3)
surface(pre_con-post_con)
title('Pre-Post')
change=(pre_con-post_con)/pre_con;
%% BCT graphs