-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUFA_stats_DTI.m
48 lines (29 loc) · 2.19 KB
/
UFA_stats_DTI.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
function UFA_stats_DTI(Input_Folder,view_direction)
% AUTHOR : Gaoxing Zheng
% Institution: Zhongshan Hospital, Fudan University
% EMAIL CONTACT: zheng_gao_xing@163.com
% DATE: 2022-04-14
SWM_Path = [Input_Folder,'/WMA_clustering_SWM'];
DWI_Path = [Input_Folder,'/DWI/Tracking'];
if exist([SWM_Path,'/Stats_DTI'],'dir') == 0
mkdir([SWM_Path,'/Stats_DTI'])
end
unix(['tcksample ',[SWM_Path,'/AnatomicalTracts/',view_direction,'.tck'],' ',[DWI_Path,'/dt_fa.mif'],' ',[SWM_Path,'/Stats_DTI/FA_',view_direction,'.txt'],' -stat_tck mean -force']);
unix(['tcksample ',[SWM_Path,'/AnatomicalTracts/',view_direction,'.tck'],' ',[DWI_Path,'/dt_md.mif'],' ',[SWM_Path,'/Stats_DTI/MD_',view_direction,'.txt'],' -stat_tck mean -force']);
unix(['tcksample ',[SWM_Path,'/AnatomicalTracts/',view_direction,'.tck'],' ',[DWI_Path,'/dt_ad.mif'],' ',[SWM_Path,'/Stats_DTI/AD_',view_direction,'.txt'],' -stat_tck mean -force']);
unix(['tcksample ',[SWM_Path,'/AnatomicalTracts/',view_direction,'.tck'],' ',[DWI_Path,'/dt_rd.mif'],' ',[SWM_Path,'/Stats_DTI/RD_',view_direction,'.txt'],' -stat_tck mean -force']);
% unix(['tcksample ',[SWM_Path,'/',view_direction,'.tck'],' ',[DWI_Path,'/dt_fa.mif'],' ',[SWM_Path,'/Stats_DTI/FA_',view_direction,'.txt'],' -stat_tck mean -force']);
%
% unix(['tcksample ',[SWM_Path,'/',view_direction,'.tck'],' ',[DWI_Path,'/dt_md.mif'],' ',[SWM_Path,'/Stats_DTI/MD_',view_direction,'.txt'],' -stat_tck mean -force']);
%
% unix(['tcksample ',[SWM_Path,'/',view_direction,'.tck'],' ',[DWI_Path,'/dt_ad.mif'],' ',[SWM_Path,'/Stats_DTI/AD_',view_direction,'.txt'],' -stat_tck mean -force']);
%
% unix(['tcksample ',[SWM_Path,'/',view_direction,'.tck'],' ',[DWI_Path,'/dt_rd.mif'],' ',[SWM_Path,'/Stats_DTI/RD_',view_direction,'.txt'],' -stat_tck mean -force']);
FA = importdata([SWM_Path,'/Stats_DTI/FA_',view_direction,'.txt']);
MD = importdata([SWM_Path,'/Stats_DTI/MD_',view_direction,'.txt']);
AD = importdata([SWM_Path,'/Stats_DTI/AD_',view_direction,'.txt']);
RD = importdata([SWM_Path,'/Stats_DTI/RD_',view_direction,'.txt']);
figure,subplot(221),plot(FA.data),ylabel('FA')
subplot(222),plot(MD.data),ylabel('MD')
subplot(223),plot(AD.data),ylabel('AD')
subplot(224),plot(RD.data),ylabel('RD')