| Algorithm 1: Compute FDT |
| Input:
Output: an image () representing FDT of O. 1. For all , set = 0; 2. For all , set ; 3. For all such that is not empty, Push into ; 4. While is not empty do 5. Remove a point from ; 6. Find 7. If then 8. Set 9. Push all points into 10. Output the FDT image . |