-
Notifications
You must be signed in to change notification settings - Fork 5
/
FaBiAN_demo.m
227 lines (214 loc) · 9.53 KB
/
FaBiAN_demo.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This demonstration script of FaBiAN use and functionalities generates %
% T2-weighted MR images of the fetal brain based on highly flexible %
% simulations of fast spin echo (FSE) sequences from various MR vendors %
% and at different magnetic field strengths throughout gestation. %
% This demonstration script simulates: %
% (i) HASTE acquisitions as implemented by Siemens Healthineers on a %
% 1.5-T MAGNETOM Sola system (Siemens Healthineers, Erlangen, Germany) %
% at Lausanne University Hospital (CHUV); %
% (ii) SS-FSE sequences as implemented by GE Healthcare on a 3-T whole- %
% -body scanner (Signa Discovery MR750) at University Children’s %
% Hospital Zurich. %
% %
% Images are simulated for a fetus of gestational age (GA): %
% (i) 26 weeks in the axial orientation without any shift of the slice %
% slab, and with random little motion; %
% (ii) 33 weeks in the sagittal orientation with a shift of -1.6 mm of %
% the slice slab, and with strong motion. %
% %
% %
% Hélène Lajous, 2021-07-19 %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (i) HASTE acquisition (Siemens Healthineers) %
% B0=1.5T; %
% GA=26weeks; %
% orientation=axial; no shift %
% little motion of the fetus %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc
clear all
close all
addpath('Utilities')
% Fetal brain model: In this demonstration, we base our simulations on
% segmented high-resolution anatomical MR images of the fetal brain that
% can be downloaded from:
% http://crl.med.harvard.edu/research/fetal_brain_atlas/
% Gholipour, A. et al. A normative spatiotemporal MRI atlas of the fetal
% brain for automatic segmentation and analysis of early brain growth.
% Scientific Reports 7, 476 (2017).
% https://doi.org/10.1038/s41598-017-00525-w
Fetal_Brain_model_path = '/data/Simu_FSE/Atlas/CRL_Fetal_Brain_Atlas_2017v3/';
% Gestational age (in weeks)
GA = 26;
% Resolution of the Fetal_Brain images (isotropic, in mm)
SimRes = 0.8;
% Introduce a shift variable to slightly shift the slice series between two
% simulations in the same orientation
shift_mm = 0; %mm
% Choose the orientation plane of the acquisitions
% (1: sagittal, 2: coronal, 3: axial)
orientation = 3;
% Non-linear slowly-varying intensity non-uniformity (INU) fields (b1+) can
% be downloaded from BrainWeb database:
% https://brainweb.bic.mni.mcgill.ca/brainweb/about_sbd.html
inu = '/data/Simu_FSE/rf20_B.rawb';
% Define a sampling factor to subdivide the volume in the slice thickness
% orientation
sampling_factor = SimRes / 0.1;
% Main magnetic field strength
B0 = 1.5;
% Acquisition parameters
ESP = 4.08; %ms
ETL = 224;
% Geometry
PhaseOversampling = 0.803571000000000;
SliceThickness = 3; %mm
SliceGap = 0.3; %mm
% Resolution
FOVRead = 360; %mm
FOVPhase = 360; %mm
BaseResolution = 327; %voxels
PhaseResolution = 0.7;
% Contrast
TR = 4.08; %ms
TEeff = 90; %ms
% Acceleration technique
ACF = 2;
RefLines = 42;
% Motion
motion_level = 1; %little motion
% Scanner zero-interpolation filling (ZIP)
% (0: no ZIP; 1: Fermi filtering in k-space and ZIP)
zip = 0;
reconMatrix = BaseResolution;
% SNR
std_noise = 0.15;
output_folder = output_name( GA, ...
motion_level, ...
orientation, ...
shift_mm);
HASTE_Images = FaBiAN_main(Fetal_Brain_model_path, ...
GA, ...
SimRes, ...
shift_mm, ...
orientation, ...
inu, ...
sampling_factor, ...
B0, ...
ESP, ...
ETL, ...
PhaseOversampling, ...
SliceThickness, ...
SliceGap, ...
FOVRead, ...
FOVPhase, ...
BaseResolution, ...
PhaseResolution, ...
TR, ...
TEeff, ...
ACF, ...
RefLines, ...
motion_level, ...
zip, ...
reconMatrix, ...
std_noise, ...
output_folder);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (ii) SS-FSE sequence (GE Healthcare) %
% B0=3T; %
% GA=33weeks; %
% orientation=sagittal; shift=-1.6mm %
% strong motion of the fetus %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clc
clear all
close all
addpath('Utilities')
% Fetal brain model: In this demonstration, we base our simulations on
% segmented high-resolution anatomical MR images of the fetal brain that
% can be downloaded from:
% http://crl.med.harvard.edu/research/fetal_brain_atlas/
% Gholipour, A. et al. A normative spatiotemporal MRI atlas of the fetal
% brain for automatic segmentation and analysis of early brain growth.
% Scientific Reports 7, 476 (2017).
% https://doi.org/10.1038/s41598-017-00525-w
Fetal_Brain_model_path = '/data/Simu_FSE/Atlas/CRL_Fetal_Brain_Atlas_2017v3/';
% Gestational age (in weeks)
GA = 33;
% Resolution of the Fetal_Brain images (isotropic, in mm)
SimRes = 0.8;
% Introduce a shift variable to slightly shift the FOV between 2
% simulations
shift_mm = -1.6; %mm
% Choose the orientation plane of the acquisitions
% (1: sagittal, 2: coronal, 3: axial)
orientation = 1;
% Non-linear slowly-varying intensity non-uniformity (INU) fields (b1+) can
% be downloaded from BrainWeb database:
% https://brainweb.bic.mni.mcgill.ca/brainweb/about_sbd.html
inu = '/data/Simu_FSE/rf20_B.rawb';
% Define a sampling factor to subdivide the volume in the slice thickness
% orientation
sampling_factor = SimRes / 0.1;
% Main magnetic field strength
B0 = 3;
% Acquisition parameters
ESP = 10; %ms
ETL = 224;
% Geometry
PhaseOversampling = 0;
SliceThickness = 3; %mm
SliceGap = 0; %mm
% Resolution
FOVRead = 240.0256; %mm
FOVPhase = 240.0256; %mm
BaseResolution = 256; %voxels
PhaseResolution = 1;
% Contrast
TR = 10; %ms
TEeff = 118.08; %ms
% Acceleration technique
ACF = 1;
RefLines = 0;
% Motion
motion_level = 3;
% Scanner zero-interpolation filling (ZIP)
% (0: no ZIP; 1: Fermi filtering in k-space and ZIP)
zip = 1;
reconMatrix = BaseResolution*2;
% SNR
std_noise = 0.01;
output_folder = output_name( GA, ...
motion_level, ...
orientation, ...
shift_mm);
SSFSE_Images = FaBiAN_main(Fetal_Brain_model_path, ...
GA, ...
SimRes, ...
shift_mm, ...
orientation, ...
inu, ...
sampling_factor, ...
B0, ...
ESP, ...
ETL, ...
PhaseOversampling, ...
SliceThickness, ...
SliceGap, ...
FOVRead, ...
FOVPhase, ...
BaseResolution, ...
PhaseResolution, ...
TR, ...
TEeff, ...
ACF, ...
RefLines, ...
motion_level, ...
zip, ...
reconMatrix, ...
std_noise, ...
output_folder);