How can I calculate the fractal dimension (box-counting dimension) of each ROI in imageJ?

I have many ROIs and I want to determine their 2D shape using fractal analysis. How can I get the results in my Result table along with all other measurements (feret, area, etc.)?
I don’t have any knowledge of fractal analysis.


Li (12.6 KB)

I copied your screenshot image into ImageJ.

Here I have a macro which does the following.

  1. It measures all particles in the image (converted to a binary) with the particle analysis.
  2. Crops all particles (from ROI’s collected in the ROI Manager)
  3. For each new image measures the ImageJ default “Fractal Box Count” (and then closes them, too).

The first 8 entries are the measurements of the particle analysis, the next 8 are from the “Fractal Box Count”

run("Make Binary");
run("Set Measurements...", "area mean centroid perimeter bounding shape feret's display redirect=None decimal=3");
run("Analyze Particles...", "display clear add");

/*Show all selections in the image with (mouse) selectable labels!*/
roiManager("Show All with labels");
for (u = 0; u < roiManager("count"); ++u) {
    run("Duplicate...", "title=crop");
    roiManager("Select", u);
    run("Fractal Box Count...", "box=2,3,4,6,8,12,16,32,64");
    //Next round!

Please note that there are also other plugin exists using a different algorithm for the fractal measurements, see, e.g.:

See also: