Theoretical Background
The algorithm behind Estimate Grain Diameters works as follows: At the start, each voxel gets assigned a Grain Diameter of 0. Then, spheres are successively fitted into the geometry, starting at the largest possible sphere. If a sphere fits and a voxel has no diameter assigned to it yet, the diameter of the fitting sphere is assigned to all voxels contained in the sphere.
If a voxel is contained in multiple spheres, there are two options:
This algorithm ensures that non-spherical grains get assigned the diameter of the largest inscribed sphere.
In the figure below, the process of estimating the grain size is illustrated on the example structure. On the left, the original structure (the material which is selected to be analyzed) is shown. In the next step (middle), the EDT is calculated to find the maximal fitting sphere at every point. On the right, the result of Estimate Grain Diameters is displayed.