Algorithm 1:
P-Count
| Input: A 3D soft lesion probability map, and a threshold θ |
| Output: Number of lesions |
| Definition: G = (V, E) denote a graph; f(v) is the intensity value of node v; ; is the connected component id of node v. |
| 1: ; Build the proximity graph (6-connectivity) for 3D image; |
| 2: sorted according to f(v); T a sub-graph, which includes all the nodes and edges whose value < t. |
| 3: for v in U do |
| 4: , |
| 5: for (u, v) in do |
| 5: Assert |
| 6: if then |
| 6: Continue |
| 7: else |
| 7: |
| 7: |
| 7: |
| 8: if then |
| 9: for w in do |
| 9: |
| 10: end for |
| 11: end if |
| 11: |
| 12: end if |
| 13: end for |
| 14: end for |
| 15: return # of lesions = len(cc). |