Connected component labeling on surfaces
This notebook demonstrates how to differentiate objects according to their connectivity.
We use a 3D image of nuclei…
|
| shape | (60, 256, 256) |
| dtype | uint16 |
| size | 7.5 MB |
| min | 0 | | max | 65535 |
|
… and segment the nuclei resulting in a 3D binary image.
|
| shape | (60, 256, 256) |
| dtype | uint8 |
| size | 3.8 MB |
| min | 0 | | max | 1 |
|
We convert this binary image into a surface dataset.
|
nppas.SurfaceTuple
| origin (z/y/x) | [0. 0. 0.] |
| center of mass(z/y/x) | 34.703,124.973,131.513 |
| scale(z/y/x) | 1.000,1.000,1.000 |
| bounds (z/y/x) | 16.500...59.000 0.000...255.000 0.000...255.000 |
| average size | 97.003 |
| number of vertices | 151354 |
| number of faces | 301006 |
|
By applying connected component labeling to the surface, we can identify vertices/faces that are connected and differentiate those which are not. The result is also a surface dataset where the vertex values correspond to the nth label these objects belong to. Thus, you can conclude from the maximum number of this surface that there are 38 nuclei in this image.
|
nppas.SurfaceTuple
| origin (z/y/x) | [0. 0. 0.] |
| center of mass(z/y/x) | 34.703,124.973,131.513 |
| scale(z/y/x) | 1.000,1.000,1.000 |
| bounds (z/y/x) | 16.500...59.000 0.000...255.000 0.000...255.000 |
| average size | 97.003 |
| number of vertices | 151354 |
| number of faces | 301006 |
| min | 0 | | max | 38 |
|