Skip to main content
. Author manuscript; available in PMC: 2019 Aug 1.
Published in final edited form as: Neuroimage. 2018 May 4;176:431–445. doi: 10.1016/j.neuroimage.2018.04.073

Algorithm 1.

Algorithm for Brain Extraction

Input: Image I, Brain-Extracted Atlas A, Atlas Mask AM
Output: Brain-Extracted Image IB and mask IM
1 I1, Φ11=pre-processing(I);
2 for k ← 1 to 6 do
3  if k ≥ 2 then
4 if k ≤ 3 then
5  find Φk1, s.t., Rk1Φk1=A and Φk1is affine;
6 else if k == 4 then
7  find Φk1, s.t., Rk1Φk1=A and Φk1is B-spline;
8 else
9  find Φk1, s.t., (Lk1Φk1)Φk1=A and Φk1is B-spline;
10 end
11 Ik=Ik1Φk1;
12  Decompose Ik, s.t., Ik = Lk + Sk + Tk;
13 if k ≤ 3 then
14 Rk = Lk + Sk;
15 end
16 end
17 IB, IM=post-processing(AM,{Φk1})