Euclidean Spheres

Requires ImageJ 1.53k or higher, DistanceMapLib.jar, ImageJAddins.jar.


See the Home page for CT_Tools download and installation instructions.

Home

This draws filled Euclidean Spheres centered at a pixel location.

Voxels within a Euclidean sphere of radius R are defined on a Cartesian grid as √(x2+y2+z2) < R where R is the distance to the center of the neighboring voxel.  Euclidean spheres can be used to restore a 3D shape from its medial surface (thinning the medial surface to a medial axis is a lossy process and is not reversible by sphere drawing). Euclidean spheres are also useful in constructing random porous media.

The Euclidean Spheres plugin operates on 3D images with symmetric or asymmetric voxels. The sphere radius is in image units. The drawn sphere surface is not drawn with sub-voxel resolution, i.e. if a voxel's distance from the origin pixel is greater than R it is not filled. A sphere that has an origin outside of the volume will be clipped, showing only the portion within the volume.

Single Sphere Drawing Dialog
The voxels in the image below are 1cm in the horizontal X direction and are 0.5cm in the vertical Y direction. The image below is 100x50cm and the sphere is 20cm in diameter but appears elongated in the Y direction1. ImageJ shows the XY plane with square pixels.
Sphere in pixel coordinates

Similarly, the Overlapping Spheres plugin operates on 3D images with symmetric or asymmetric voxels and the sphere radius is in image units. It draws overlapping spheres with random radii at random locations to a required volume fraction. Random locations are seeded with the last 5 digits of the system millisecond clock so they are unlikely to repeat very often. High volume fractions may fail with an error message if the plugin cannot find an unfilled location to draw the next sphere.

Overlapping Sphere Drawing Dialog
The voxels in the image are 1cm in the horizontal X direction and are 1.2cm in the vertical Y direction. The projection below is 100x120cm and the spheres appear elongated in the X direction.
Spheres in pixel coordinates
1. During testing it was observed that the ImageJ Version 1.53k "Orthogonal Views" plugin has a bug that causes small spheres to be drawn incorrectly in orthogonal slices.

Home