From: Robust MRI abnormality detection using background noise removal with polyfit surface evolution
Function InitialLevelSetFunction(H, W, ρ) |
---|
//Initialization |
for y←0 to H−1 do |
for x←0 to W−1 do |
\(\phi _{1}^{0}(x,y) = \rho \), \(\phi _{2}^{0}(x,y) = \rho \) |
repeat |
x←x+1 |
endfor |
repeat |
y←y+1 |
endfor |
//Evaluation 1 |
for y←y min to y max do |
for x←x min to x max do |
\(\phi _{1}^{0}(x,y) = - \rho \), \(\phi _{2}^{0}(x+1,y) = - \rho \) |
repeat |
x←x+2 |
endfor |
repeat |
y←y+2 |
endfor |
//Evaluation 2 |
for y←y min+1 to y max do |
for x←x min to x max do |
\(\phi _{1}^{0}(x,y) = - \rho \), \(\phi _{2}^{0}(x+1,y) = - \rho \) |
repeat |
x←x+2 |
endfor |
repeat |
y←y+2 |
endfor |
//ROI clipped |
ϕ 1=ϕ 1·R |
ϕ 2=ϕ 2·R |