Sorry if this is too untechnical, but I am new to ImageJ and BoneJ. I have ran both volume fraction and particle analyser on a binarized image stack. But the porosity (volume fraction of the pores) are different. Using the volume fraction function, I get about a higher porosity (about 0.744) than summing up all the volumes of each particle and dividing by the total volume (about 0.643). I checked that I’m not using the enclosed volume in particle analyser. Why don’t these results match up?

Great question. I’ve tried this on one of my test images and the most likely explanation is accumulated rounding errors.

Volume Fraction and Particle Analyser both measure volume the same way by default - just a pixel count times pixel spacing. So by summing all the particles’ volumes, you are just counting up all the pixels, essentially - so the results should be precisely the same.

Particle analyser generates a large number of measurements, some of which are tiny particles and all of which have some degree of rounding error. When you add up all the particles’ volumes you exacerbate rounding errors, if there is a bias in the measurement or rounding. So on my image I get a ‘BV’ (foreground volume) of 1.87E-5 mm^3 from volume fraction, and 1.81E-5 mm^3 from all the particles measured by Particle Analyser. But when I make sure that the measurements in the Results table are set to the highest precision of 9 decimal places (Results>Set Measurements) I get a sum of 1.87E-5 mm^3.

Please try fiddling with the precision of your Results table - you could also try 9 decimal places in combination with the scientific notation option, and see if this problem persists.

Hi Michael, changing the precision worked! Thank you!!

You’re welcome. Another way to test this is to decalibrate your image’s pixel spacing with Image>Properties, setting Unit of length to ‘pixel’, and pixel width, height and depth to 1.

Then you get BV and TV results with integer precision (no rounding error from floating point pixel spacing values), which represent the raw pixel counts.

```
1 small_osteocyte_lacunae_binary.tif 46316 1670400 0.027727490
```

Then doing the Particle Analysis on the same image, and summing all the Vol. (pixels^3) values across all the particles, I get 46316 pixels as the total number.