FracLac v 1.2 for ImageJ
How to Use FracLac:

FracLac is for analyzing complexity or detail of digital images.

Overview

Download

Options

Installation

Fractal Dimension

Multifractality

Lacunarity

subareas

circularity

montage of biological cells created with ImageJ and analyzed with FracLac using a local dimension scan with the subarea size set to correspond to the sizeof images making up the montage. Colours show different fractal dimensions of each cell contour.

Use it to measure difficult to describe geometrical forms where the details of design are as important as gross morphology.

FracLac delivers the box counting fractal dimension, which measures the ratio of increasing detail with increasing scale. This ratio quantifies the increase in detail with increasing magnification or resolution seen in microscopy, for instance. FracLac calculates an unadjusted fractal dimension, an average fractal dimension over multiple scans, a slope-corrected dimension, and a most efficient covering dimension (see Results file for more information). It also delivers a mass dimension using overlapping grid samples.
Analysis using subareas and the automatic outline function.
*Data gathering and calculations:FracLac lays a series of grids of decreasing box size over an image,and, for each grid, records the number of boxes that fall on the image and the number of pixels per box for each box size. 
From this data FracLac derives the fractal dimension, which is the slope of the least squares fit linear regression line from the log-log plot of &epsilon (box size/maximum image dimension) on the x-axis and count on the y-axis.
FracLac calculates fractal dimensions and delivers them in the results window.
   
   
The "Lac" in FracLac stands for Lacunarity:

Typical patterns of

sliding box lacunarity (left)

and

multifractal spectra (Right) from data returned by FracLac

Monofractal

(Koch Curve)

increasing lacunarity curve and converging multifractal spectrum

Non fractal

(Circle)

low consistent lacunarity and converging multifractal spectrum

Multifractal

(Henon Map)

peaked then decreasing lacunarity curve and diverging, humped multifractal spectrum

FracLac also delivers lacunarity statistics. Lacunarity is "gappiness". It is a “visual texture”, a measure of heterogeneity or translational or rotational invariance in an image. This measure supplements fractal dimensions in describing the rate of change in detail in a pattern.

*Data gathering and calculation: FracLac calculates different types of lacunarity. One is found as a measure of variation in pixel density. This type of lacunarity is generally defned by the ratio of the first and second moments of the probability distribution--it is the coefficient of variation squared for the number of pixels per box, averaged over all scales. In addition to this more typical box counting lacunarity, FracLac delivers lacunarity from the overlapping mass scan.

Low lacunarity conventionally implies homogeneity and high implies heterogeneity. The higher the lacunarity, the greater the variation in the way pixels are distributed within an image. A coefficient of variation of 0.5 (or a squared value of 0.25) means the number of pixels per box varies an average of 50% from the mean. A lacunarity greater than 1 means the standard deviation exceeds the mean. In other words, a high lacunarity value means there are very large and very small clusters of pixels or considerable heterogeneity in the clustering of pixels in the image.

FracLac delivers lacunarity using a sliding box algorithm, as well.  Typical log-log graphs of lacunarity varies with e are shown to the left (multifractal spectra are included, as well).   Choose “Sliding Box Lacunarity” from the FracLac panel to set options to calculate this value.  The sliding box algorithm finds the mean and standard deviation of the number of pixels per box, moving a box over the entire image according to the increment specified when the Sliding Box Lacunarity panel is clicked. Thus, whereas the grids are fixed for the standard box counting routine,  the boxes overlap by this method.   FracLac returns an array of &epsilon (box size/maximum image dimension), means, standard deviations, and lacunarity (1+[s/µ] 2) from this method, as well as a graph showing how lacunarity varies with box size.

FracLac delivers regression statistics: The fractal dimensions derived can be assessed using the data returned by FracLac.

FracLac delivers the coefficient of determination and standard error for the various regression lines used to calculate the fractal dimensions. Different graphs can be viewed in ImageJ as the analyses are being done (e.g., regression for fractal dimension, generalized dimension spectrum for multifractal analysis, and, as a visual clue to lacunarity, the variation in the coefficient of variation with box size).

The coefficient of determination (the coefficient of correlation squared or r2) describes the extent of the relationship between scale and detail; an r2 of 0.95, for example, indicates that 95% of the variation in detail can be accounted for by variation in scale according to the proposed power law.

FracLac also generates graphs.

FracLac delivers the generalized dimension and multifractal spectrum:

Detailed explanation and calculations

  • Multifractality and the generalized dimension spectrum
    • FracLac generates a mass distribution using multiple samples over an image. From this, a spectrum of values for the GENERALIZED DIMENSION (DQ) is calculated according to a range of Q values the user specifies.
    • The DQ addresses how mass varies with ε (resolution or box size) in an image and is used along with a range of multifractal measures known generally as f(α) over a range of diverging exponents, α.  In essence, these measures help characterize the variety within an image (e.g., simple fractals will show less variation).
    • FracLac generates a graph of multifractal measures (f(α) for α), as well as graphs showing how the DQ, f(α), and α vary with Q.
To analyze one or several images, install FracLac then select it from the plug-ins menus in ImageJ.

A popup menu like the one in the picture here appears. Click on a box in the image for its explanation or read the explanations below.

site map  
 
Options for running FracLac
Autothreshold FracLac works best on outlined binary contours.
  • FracLac counts either white or black pixels, so the user must ensure that the pixels of interest are black on a white background or white on a black background.
  • Alternatively, selecting the autothreshold option converts images to binary prior to processing.
  • Images are typically outlined by the user before being processed, to ensure that the desired part of the image is assessed.
  • Use binary images, usually contours, of the pattern being assessed

FracLacPanel

When run in ImageJ, FracLac puts up a panel with three buttons. Use these buttons to repeat a scan on an active image that has been changed or on a batch of files.
  • Use the "Current Image" button to do an analysis on the currently active image or selected area of that image. To analyze different areas of an image individually (e.g., different cells in an image), select an area and click the "Current Image" button.
  • Use the purple "Change Parameters" button to change settings between analyses.
  • Use the "New Files" button to select new images to assess using the current settings.

To see the results of a scan over many subareas colour coded over the original image, select the Sub areas option, then select the colour coding option and set the subarea size greater than the dimension of the selected area.

Number of scans FracLac scans the image multiple times to minimize bias associated with the location of the scanning grid. The algorithm finds an average fractal dimension over all scans, as well as a "most efficient" covering fractal dimension using these scans.

The data depend on the position of the grid over the image. To minimize grid-associated bias, FracLac can calculate several fractal dimensions over different grid positions. The algorithm selects the position of the top left corner of the grid from within a range of the top left corner of the smallest rectangle enclosing the pixelated area. Other than this first origin (the top left corner), the other origins are selected randomly, so that different information is read each time the image is scanned.

Random Sampling An alternative plugin (FracLacCirc) uses a predictable set of origins rather than a random set. With this alternative method, the scan's locations are predictable,so the same data are generated each time an image is assessed, yielding a consistent fractal dimension. That value is not definitive, however, and is only incidentally consistent. In contrast, if the scan's locations are random, different data are generated with each scan. The benefit of using random scans is a more accurate indication of the variability attributable to grid position and consequently a more accurate estimate of the fractal dimension.

  • FracLac delivers an average over all scans.
  • FracLac also approximates a “more efficient” fractal dimension by taking the lowest number of boxes containing pixels per box size over all locations.
  • The coefficient of variation in the dimensions is also provided in the results file, to describe the dependence on grid position. An averaged lacunarity is also returned in the results.
  • Use 1 origin for a single scan or as many as you like (try 12) for multiple samples, but note that more will increase processing time.
 
Maximum percent of the pixelated part of the image for maximum box size: The grid's calibre affects the results. The maximum useful box size is 50% of the size of the smallest square enclosing the pixelated area of an image. This can be set to any percentage, though.

The optimal box size is around 30 to 47% of the pixelated part of the image being assessed. This is because there will be no change in detail with scale once the entire image is enclosed. The slope is horizontal for the interval of all boxes larger than a box containing all the pixels. Moreover, at box sizes approaching this practical upper limit, many shorter periods with slopes of 0 appear in the data.

FracLac does not use box sizes smaller than the limit of resolution for digital images (one pixel); therefore, a practical lower limit of the data is set by the maximum possible box count, at the intersection of the y-axis and the log of the number of pixels of interest. Note however, that this is not necessarily the limit of resolution in an image.

  • Use something less than half and more than 25% (optimally 47%) for the maximum box size
  • Note that very small images (i.e., less than 20 pixels in diameter) are not generally suitable for analysis.
 
     
Number of sizes per series The results depend on the range of box sizes used. Each scan uses a series of grids of different calibres.

FracLac calculates an optimized series of box sizes that depends on each image but can also be manipulated by the user.  The user can set the total number of box sizes to use anywhere between 3 and 500 (using less than 15 box sizes is not recommended). But if the user types in 0, FracLac chooses a number of boxes that takes into consideration the size of the image. It finds the outermost margins of the pixelated part of the image and assesses the rectangle enclosing that area using box sizes based on this area.

FracLac uses a linear series of sizes. This is the optimum solution to a number of problems. One is that when box size changes slowly (in small increments) at large sizes, horizontal intervals can affect the data. Another is that if box size changes too rapidly, scaling can be missed.  An exponential series of box sizes which is sometimes used in box counting can cause problems, then, but a more linear set of box sizes generally produces a dimension closer to expected values. Note that this holds only as long as the maximum box size is small enough. As box size approaches 50% of the square enclosing the pixelated area, even fractal dimensions using linear sequences move away form theoretical. FracLac sets the upper limit, accordingly.

  • Choose 0 to optimize the sequence of grid calibres or type a number for the exact amount of different calibres to use. 
  • The series is linear, and subject to the upper limit set by the user.
  • FracLac also calculates a fractal dimension after horizontal slopes are removed from the data. These are reported in the results file
 
     
Summarize: FracLac delivers raw data or a summary.
  • Select the "summary" option to summarize one entry for each category in the results file.
  • Or leave this box unchecked to add raw data, including the mean pixel counts at each box size in each series for each scan of an image.
 
     
   
Number of Subareas: In addition to delivering fractal dimensions from multiple scans over the entire image, FracLac delivers local fractal dimensions over several areas and colour codes the image to show the variation over these areas.
  • If the option for random samples is selected, type a number of random samples to scan over the image.
  • Set the size of these scan areas using the subarea size option.
 
     
   
Subarea Size: FracLac calculates local fractal dimensions over subareas of a size specified by the user.  
   
Do Sub Areas: Find local dimensions over different parts of an image. Select this option to find local dimensions over the entire figure or over a selected portion of the image only. Use this option to analyze a montage of images that are the same size and arranged in a rectangular array (see image on top of page):

FracLac calculates multiple local fractal dimensions and colours over the image on the screen to illustrate the distribution of local fractal dimensions if this option is chosen.

  • To scan the entire image in individual parts, ensure no area is selected as an roi.
  • To scan a selected area in one scan, set the subarea size the same size or larger than the selected area.
  • To scan a selected area as several smaller scans, set the subarea size smaller than the selected area. For images assessed without being opened, the entire image is always scanned.
  • To automatically scan using the particle analyzer in ImageJ, select "Automatic Outlines"

Several other options apply to this option, including subarea size, random areas, number of subareas, fill, and show colours.

  • Note that this option will disable the option to select multiple files and prevent circularity from being calculated.
 
     
Show colour coded graphic FracLac v 1.2 displays a colour-coded graphic of the variation in local fractal dimensions. The colours are written over a copy of the image and an additional image is created showing the colour scale, where the value of the local fractal dimension is noted beside its colour.
  • Turn the colouring feature on or off when doing sub areas. If selected, a copy of the image is colour coded by the fractal dimension for each area assessed.
  • In the box for colour scheme, choose a digit between 0 and 20 to vary the colour scheme (4 is all gray; 20 is separate colours for each value; between are gradients).
  • Set the transparency for the colour coding to a value between 0 (transparent) and 255 (opaque)
  • Set the composite style (default is 5)
  • Choose to colour pixels only if you want to see the local dimension colour coded only on foreground pixels that were not background (i.e., the black pixels in a black on white image); unselect this option to fill blocks including the entire local area scanned with the local dimension's colour

The image to the left is a diffusion limited aggregate, colour coded according to the fractal dimension using FracLac.

The images below and right show one image of cell cultures analyzed to detect differences in morphology in different areas using 4 subarea scan sizes.

 
View Regression Lines: FracLac graphs the regression lines.
  • Select this box to see graphed regression lines for different calculations of the fractal dimension (corrected=with horizontal slopes removed and most efficient) that are provided in the results window.
 
Fill: Fill the subareas with colour.
  • Select this option to fill the squares of the colour coded graphic with a colour corresponding to the local fractal dimension in that area.
  • If not selected, the squares are outlined but not filled.
  • Select a colour scheme.
 
Circularity and Other Morphometrics:

FracLac delivers other morphometrics.
  • Measures of the total pixels and the foreground pixels sampled are provided
  • General measures of the overall morphological context are calculated from the convex hull enclosing the pixelated area of the image (e.g., the general shape of the span of a cell). Perimeter, area, and diameters are provided, as well as comparisons to circles: roundness is perimeter2/area, and circularity is 4*PI*(area/perimeter2)(Young et al., 1974; Costa & Cesar, 2001).
  • The width and height of the rectangle enclosing the part of the image that is foreground pixels are provided.
  • Vertical and horizontal axes are also provided (the vectors in the image show the radii of the axes FracLac returns). These axes are calculated as the greatest distance from the centre of mass (determined by the enclosing rectangle) to the outermost pixel (then these radii are multiplied by 2). Centred on the image's centre of mass, these sweep out inner and outer circles, the ratios of which can be used to help define the form.
    • Select this option to calculate the perimeter, area, and circularity of the convex hull enclosing the image.
 
Random samples of subareas: FracLac can scan the image in small sections that are nonoverlapping and exhaustive or overlapping and random.
  • Choose the option to do subareas then:
    • Select "random" to find the fractal dimensions and lacunarity measures of a random sample of areas over the image, or
    • Leave this box unchecked to scan the entire image as nonoverlapping subareas.
  • Set the size of each subarea using the size option.

Use this option for very small boxes on very large images or where you want a random sample over the entire image.

 

copyright (c) 2003 Audrey Karperien

Contact the author to download the most recent beta version of a java standalone application that calculates the multifractal spectrum based on the probability distribution; the data are extensive and clutter the results file in ImageJ.

 
                             
1