Problem with average particles

Hello BoneJ community,

We are a group of ophthalmology researchers, and we are investigating an ocular structure called “lamina cribrosa.”. It is a bone-like structure, and we are using OCT to image it. We were using BoneJ to obtain thickness measurements of collagen beams in this structure (it looks like tubercular bone), and we had some issues with the average values the code provides. When running the code on a file with only 2 white circles, we found that the average calculated is much closer to the large diameter circle (for example, 20 and 100 voxels, the average provided was 95.7). We thought that BoneJ assigns the large diameter value to every voxel in the large circle, and the small diameter to all the voxels in the small one then calculates the mean over all pore voxels.

Sample image attached in next post

We are trying to understand why this happens and if this is a bug or intentional. Additionally, we are hoping to find a way that the code will generate a true average of all the particles in the image rather than a weighted one.

Looking forward to hearing from you,
Yoav Glidai, MD

TwoBeams-20and100 (1).tif (1.5 MB)

Yes that’s exactly correct. The effect is that the mean is weighted very strongly towards larger structures, because volume scales as radius³ (and area as radius²), so that the weighted average of radius is disproportionately affected by wider radii (there are just many more pixels in large spheres than small ones). In your example with two circles of radius 10 and 50, we should expect a mean of:

((pi × 10²) × 20 + (pi × 50²) × 100) / (pi × 10² + pi × 50²)

≃ (315 pixels × 20 thickness + 7854 pixels × 100 thickness )/ (315 + 7854)

= 791700 / 8169

= 96.9 pixels mean thickness (including a bit of fudge for discretisation artefact).

If the particles are not connected, yes you can get an average thickness across particles by running Particle Analyser with the Thickness option selected, then calculating a mean across particles in e.g. Excel. Note though that the thickness values, t, within each particle will be weighted by numbers of pixels in each sphere (or circle) of diameter t.

In short, it is working as expected, but the results can be a little counter-intuitive.