-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPetMRPpline.m
161 lines (155 loc) · 5.49 KB
/
PetMRPpline.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
function PetMRPpline
% organize the analysis of THK and Flutemetamol data
% pm 20171113
% -------------------------------------------------------------------------
global path2data
close all
path2data = 'D:\thk\thk_codes';
cd(path2data)
f = figure('Visible','off','Color',[.95 1 .95],'Position',[780 300 750 600]);
% TITLE
hMiscTXT = uicontrol('Style','text',...
'String','CRC MPM - PET Pipeline',...
'FontSize', 36, ...
'FontWeight','bold', ...
'BackgroundColor',[.9 1 .9], ...
'Position',[20 530 750 70]);
% MRI
hMRTXT = uicontrol('Style','text',...
'String','MRI',...
'FontSize', 24, ...
'FontWeight','bold', ...
'BackgroundColor',[.95 1 .95], ...
'Position',[20 460 250 70]);
hMRimport = uicontrol('Style','pushbutton',...
'String', 'hMRI:MPMImport-Autorient-Comp param img', ...
'FontSize', 12, ...
'Position',[20 380 250 70], ...
'Callback',{@pushbutton1_Callback}, ...
'TooltipString', ['Pipeline hMRI : ', char(10), ...
'Import from DICOM', char(10),...
'Auto-orient images', char(10),...
'Compute quantitative parameters : PD MT R1 R2*']);
hhMRI = uicontrol('Style','pushbutton',...
'String','hMRI: MPMSegment-DARTEL-C3',...
'FontSize', 12, ...
'Position',[20 290 250 70], ...
'Callback',{@pushbutton2_Callback}, ...
'TooltipString', ['Pipeline hMRI : ', char(10), ...
'Segment MPM', char(10),...
'DARTEL', char(10),...
'c1, c2 and c3 images']);
hMBVBQ = uicontrol('Style','pushbutton',...
'String','MB: MPMSegment-DARTEL-C6',...
'FontSize', 12, ...
'Position',[20 200 250 70], ...
'Callback',{@pushbutton3_Callback}, ...
'TooltipString', ['VBQ - Mohammed ', char(10), ...
'Segment MPM', char(10),...
'DARTEL', char(10),...
'c1 to c6 images']);
hMBMPR = uicontrol('Style','pushbutton', ...
'String','MB: MPR normalize',...
'FontSize', 12, ...
'Position',[20 110 250 70], ...
'Callback',{@pushbutton4_Callback}, ...
'TooltipString', ['VBQ - Mohammed ', char(10), ...
'Normalize MPRAGE']);
hSTATMR = uicontrol('Style','pushbutton', ...
'String','STATs MR',...
'FontSize', 12, ...
'Position',[20 20 250 70], ...
'Callback',{@pushbutton5_Callback});
% PET
hPETTXT = uicontrol('Style','text',...
'String','PET',...
'FontSize', 24, ...
'FontWeight','bold', ...
'BackgroundColor',[.95 1 .95], ...
'Position',[290 460 250 70]);
hTHKimport = uicontrol('Style','pushbutton',...
'String','THK import motcor sum',...
'FontSize', 12, ...
'Position',[290 380 250 70], ...
'Callback',{@pushbutton6_Callback}, ...
'TooltipString', ['Import from ECAT (''.v'' to ''nii'')', char(10),...
'Between frames motion correction', char(10),...
'Compute sum img 40-60']);
hTHKSpat = uicontrol('Style','pushbutton',...
'String','THK: coreg2MR normalize SUV',...
'FontSize', 12, ...
'Position',[290 200 250 70], ...
'Callback',{@pushbutton7_Callback}, ...
'TooltipString', ['Coregister PET to MR', char(10),...
'Normalize PET', char(10),...
'Compute SUV']);
% hMBVBQ = uicontrol('Style','pushbutton',...
% 'String','MB: MPMSegment-DARTEL-C6',...
% 'FontSize', 12, ...
% 'Position',[290 200 250 70]);
% hMBPMR = uicontrol('Style','pushbutton', ...
% 'String','MB: MPRnormalize',...
% 'FontSize', 12, ...
% 'Position',[290 110 250 70]);
hSTATPET = uicontrol('Style','pushbutton', ...
'String','STATs PET',...
'FontSize', 12, ...
'Position',[290 20 250 70], ...
'Callback',{@pushbutton8_Callback});
% Miscellanous
hMiscTXT = uicontrol('Style','text',...
'String','TOOLS',...
'FontSize', 24, ...
'FontWeight','bold', ...
'BackgroundColor',[.95 1 .95], ...
'Position',[560 460 150 70]);
hTHKimport = uicontrol('Style','pushbutton',...
'String','Load & check data',...
'FontSize', 12, ...
'Position',[560 380 150 70], ...
'Callback',{@pushbutton9_Callback}, ...
'TooltipString', ['The data structure must comprise:', char(10), ...
'weight height thkid Dose', char(10),...
'id dir MRI LongMRI T1w PDw MTw B1 B0magn B0phase']);
%Make the UI visible.
f.Visible = 'on';
end
% =========================================================================
function pushbutton1_Callback(hObject, eventdata, handles)
pm1_MPM_ImporComp;
end
function pushbutton2_Callback(hObject, eventdata, handles)
pm2_MPM_SegDartel;
end
function pushbutton3_Callback(hObject, eventdata, handles)
pm3_Spatial_processing_MPM;
end
function pushbutton4_Callback(hObject, eventdata, handles)
pm4_Spatial_processing_MPRAGE;
end
function pushbutton5_Callback(hObject, eventdata, handles)
pm5_STAT_MR;
end
function pushbutton6_Callback(hObject, eventdata, handles)
pharm = spm_input('str',6,'THK|Flutemetamol');
if strcmp(pharm,'THK') == 1
pm6_Spatial_processing_THK5351_flutemetamol(1);
elseif strcmp(pharm,'Flutemetamol') == 1
pm6_Spatial_processing_THK5351_flutemetamol(2);
end
end
function pushbutton7_Callback(hObject, eventdata, handles)
pharm = spm_input('str',4,'THK|Flutemetamol');
if strcmp(pharm,'THK') == 1
pm7_Spatial_processing_THK5351_MR(1);
elseif strcmp(pharm,'Flutemetamol') == 1
pm7_Spatial_processing_THK5351_MR(2);
end
end
function pushbutton8_Callback(hObject, eventdata, handles)
pm8_STAT_PET;
end
function data = pushbutton9_Callback(hObject, eventdata, handles)
global path2data
data = pm0_COF_data(path2data);
end