| S ← Read Image |
| for every x ∈ domain(S) do |
| Γ ← [x − w, x + w] × [y − w, y + w] × [z − w, z + w] |
| Compute η(x) |
| Compute optimum λb, for the given η |
| Lmax ← −1 |
| for i = 1 to N do |
| Compute optimum λ0, λ1 for the given η |
| if then |
| Continue |
| else |
| Compute the α-ranked likelihood ratio L |
| if Lmax ← L then |
| posmax ← i |
| Lmax ← L |
| λC = λ1 − λ0 |
| end if |
| end if |
| end for |
| if Lmax > 0 then |
| if then |
| Mark(x) ← true |
| end if |
| Normal(x) ← posmax |
| Likelihood(x) ← Lmax |
| contrast(x) ← λC |
| end if |
| end for |