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 do | |
4: Calculate the difference image I d = (I−I(Δ(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 |