Connectivity: how to know the values of the counts used to determine the Euler number?

Hello everyone!
I have used the bonej tool to determine the connectivity of porous media. The result of the connectivity analysis returns four values: the Euler number, its value corrected by the edge effect, the connectivity and the connectivity density.
My question is: Since the Euler number (X) is determined (in 3D) by X = N - C + H, where N is the number of islands, C is the number of holes and H is the number of bubbles , how to access the values of N, C and H used for the calculation of X? is there any way to get the values of N, C and H?
I appreciate any help!
Note: my programming language skill is beginner (or less).

Not directly from Connectivity I’m afraid. The special sauce to calculate the Euler characteristic is a look-up table of values specific to 2×2×2 binary pixel neighbourhoods, which I think doesn’t expand out well to counts of handles, voids and particles.

What you could do is use Particle Analyser, with no options selected which will tell you right away the number of foreground particles (islands, N). If you then invert the image and run Particle Analyser again you will get the number of background particles (voids, bubbles) (you may have to be careful about the one big ‘background’ particle in both cases). Then you can combine with the Euler number from Connectivity to get the total number of handles (loops, holes). You can also check by using Particle Analyser with the Connectivity option enabled, what the Euler values are for each particle.


Thanks for helping!
This method seems to work for that purpose. I built synthetic porous media with known values of N, C and H and applied the steps you recommended and the values converged.
Congratulations on developing the plugin!

1 Like