Skip to main content
. 2017 Oct 13;44(10):e376–e390. doi: 10.1002/mp.12523
Algorithm 2 Spatially encoded nonlocal penalty
1: Bind a 3D image to the texture memory.
2: Assign a specific voxel coordinate for each thread.
3: for Δ(x,y,z)Ω do
4: Calculate the difference image I d  = (II(x,y,z))2.
5: Calculate the accumulative summation image.
6: Calculate the weight using 8‐point execution.
7: Multiply the spatially encoded factor.
8: Calculate the weighted average value.
9: end for
10: Update the image