Fractal Dimension and Lacunarity

Author: Audrey Karperien (akarpe01@postoffice.csu.edu.au)
This plugin, an ongoing project, was initially developed as part of a master's at Charles Sturt University with input from Dr. H. Jelinek and code from Thomas R. Roy, University of Alberta, and continues to develop in response to the many suggestions from users.
Source:Contained in Frac_Lac.jar, which can be opened using a ZIP utility
Installation: Download Frac_Lac.jar to the plugins folder, or subfolder, restart ImageJ, then run the plugin using the Plugins/Fractal Analysis/FracLac command.
Description: Some patterns - such as contours of biological cells, other biological structures, fractals, and some textures - are difficult to describe using Euclidean measures like diameter or length, but can be quantitatively assessed using measures of complexity. FracLac quantitates such difficult to describe details of morphology represented in binary or grayscale digital images, using mass and box counting fractal dimensions (DBs), multifractal analysis data, lacunarity (λ) data, and some other morphometrics.
Support: A User's Guide is available online. Contact the author for assistance, suggestions, and bug reports.

A help archive that can be unzipped into the plugins folder where FracLac will access it, is available for download. The 38 page PDF manual for previous versions is still available for download.

Features:

FracLac scans images using a shifting grid algorithm that can do multiple scans from different locations on each image, and uses either a nonoverlapping or an overlapping sliding box method. The overlapping method can be exhaustive or not, depending on user choices. FracLac automatically generates different types of series of box sizes (e.g., power or linear). In addiiton, local dimension scans may be done on subareas of either images or rois to show local variation in the DB and λ. These subareas are determined according to the user's choice, using ImageJ's ParticleAnalyzer, a square grid sized according to the user's choice, randomly selected blocks, or individual pixels. Users can view or save the results, and can reapply LUT's to colour coded images or generated text images (explained below).

Use: Before images can be analyzed, FracLac has to be set up. This is usually simply a matter of clicking a button for the type of scan you want to do, then selecting the defaults in the relevant options panel that appears, or making modifications if required.

Once FracLac has been set up, the type of scan appears at the bottom of the FracLac panel, and buttons to perform scans are enabled, as shown on the screen shot below. Using FracLac, one can do fractal, multifractal, and lacunarity analyses on:

  1. entire open images,
  2. rois,
  3. stacks, and
  4. multiple files selected from directories.
Outputs: The information returned by the various types of scans is summarized below:
  1. Standard Box Count
    • DBs for binary images, based on multiple origins for each image or roi, including a minimum cover DB, slope-corrected DB, and average DB all based on the count of boxes containing pixels at different box sizes and grid locations
    • Mass dimensions for each image or roi for binary and grayscale images using the difference in either the density or intensity of pixels in boxes of different sizes placed over an image.
  2. Subareas Scan
    • Local fractal dimensions. These are based on
      1. subareas (e.g., systematically or randomly chosen blocks or else particles) or
      2. pixels and their surrounding environments, which can be set to be round or square
  3. Local Connected Fractal Dimensions.
    • These are based on the round or square environment surrounding each pixel but limited to the connected set around that pixel.
      [cs]
      The screen shot shown here illustrates the panel that comes up when the button for a "Local Connected Fractal Dimension" scan is clicked. The panel as shown is set up to use a circular sampling element by selecting the box marked "Use round scan areas". The panel also shows where the user can select to save generated files or view them on the screen (the option is presented when each type of scan is set up).
    • [panel]
  4. Multifractal spectra.
    • For multifractal scans, FracLac returns an array of DQ values over a range of arbitrary values for Q set by the user.
    • It also provides τ, α, and the multifractal function ƒ(α).
  5. Lacunarity data
    • FracLac returns measures of λ based on data gathered during
      • overlapping scans (sliding box lacunarity) or
      • nonoverlapping (regular box counting)
  6. Other morphometrics, including measures of density, span ratio, circularity, and the convex hull.

Data Files

The measures noted above are reported in data files accompanied by various statistics for the data, including the y-intercept, standard deviation, and coefficient of variation, for instance. Reports generated can be viewed and saved as Results Windows or automatically saved as .txt files (tab-delimited;UTF-8 encoded to be opened in a spreadsheet. These include:

  • summary reports
  • data files
  • raw pixel counts

    Graphics Files

    Some measures are represented in graphics that can be viewed and saved or automatically saved. These include:

  • colour coded images for local dimensions, as illustrated in the image below
    [coded]
  • text images for colour coded images
  • convex hull and bounding circle images
  • graphs (e.g., multifractal spectra, as shown below, and regression statistics)
    [mf]

  • Limitations:FracLac works on binary images (black pixels on a white background, or white pixels on a black background) and on grayscale images or grayscale images that have been converted to RGB. For a binary analysis (e.g., branching patterns or single pixel wide contours of cellular outlines), the signal is black or white pixels and the noise is the opposite, white or black pixels, thus images must be thresholded prior to analysis to ensure that only the pixels of interest are assessed. For grayscale scans, images and rois are padded with a value that is ignored by the counting method. Grayscale scans are suited to textures as opposed to contours, and assess every pixel as signal, so the region of interest must be selected carefully. To ensure non-significant parts of grayscale images are not assessed, the image can be converted to RGB and the non-significant areas selected with the wand function or filled with a non-gray value, as is illustrated in the image.

    [texture] You should assess your analysis against benchmark images and be aware of how the settings can affect the result. For instance, FracLac will determine the fractal dimension of a 400 x 400 pixel square as a perfect 1.000 (not fractal at all but the correct value) if the software is set to use a scaled series with a scaling factor of 2, a minimum box size of 25, and a maximum box size of 50%. But for most images, the point of the analysis is to determine a value for the fractal dimension without knowing the scaling ahead of time. See the online help for more about this.

    References:

    For details of the calculations, see the FracLac javadoc,which can be generated using the FracLac source code. For more information, the references below are the main ones used in defining the calculations:

    1. Smith, TG Jr., Lange GD and Marks, WB, "Fractal Methods and Results in Cellular Morphology", J. Neurosci. Methods, 69:1123-126, 1996.
    2. Fernandez et al., "Are neurons multifractals?", J. Neurosci. Methods, 89:151–157, 1999
    3. Plotnick, RE; Gardner, RH; and O'Neil, RV. "Lacunarity indices as measures of landscape texture", Landscape Ecology 8(3):201-211, 1993
    4. Innaconne, Geometry in Biological Systems.
    5. Costa and Cesar, Shape Analysis and Classification, CRC Press, 2001
    6. Chhabra, A and Jensen, RV "Direct Determination of the ƒ(α) singularity spectrum", Phys. Rev . Lett. 62: 1327, 1989.
    7. Posadas, AND; Gimenez, D; Bittelli, M; Vaz, CMP; and Flury, M "Multifractal Characterization of Soil Particle-Size Distributions", Soil Sci. Soc. Am. J. 65:1361–1367 2001
    8. Landini,G; Murray, PI; and Missonf, GP. "Local Connected Fractal Dimensions and Lacunarity Analyses of 60° Fluorescein Angiograms" Investigative Ophthalmology & Visual Science, December 1995, Vol. 36, No. 13
    History: 2002/08/26: First version
    2002/09/26: Calculates circularity
    2003/12/17: Major update
    2004/06/30: Updated
    2005/03/23: Updated to version 2.0aF
    2005/11/24: Updated to version 2.3
    2006/03/17: Updated to version 2.3j
    2006/05/22: Updated to version 2.4b
    2006/11/20: Updated to version 2.4e
    2007/03/13: Major update to version 2.5
    2007/03/27: Fixes bug that caused no printed and saved results for some scans (2.5a)
    2007/04/04: Fixes bug that sometimes prevented maximum epsilon from changing (2.5b)
    2007/07/17: Fixes bugs that prevented box masses from being printed for sliding box lacunarity scans and prevented batches from being processed (2.5c)
    2007/08/01: Fixes bug that prevented user from knowing if the number of grid orientations was changed or not; implements user suggestions for multifractal optimization and local connected fractal dimension; help file is now html (2.5d)
    2011/02/03: Fixed a couple of bugs with multifractal analysis
    2012/04/05: Fixed encoding of autosaved text files so Greek symbols are retained; fixed bug so autosaved files are saved in a date and time stamped folder (2.5g)
    2102/04/15: release 2.5i; Fixed saved results file problem so filtered data are saved in separate files; fixed display problem so images are not displayed while being processed;changed grid location algorithm to use a series of grid positions in response to user requests; fixed bug so images having inverted LUTs are filled with the right colour.
    2012/04/15: release 2.5i.2; fixed bug so subscans can be done using the particle analyzer again; fixed bug so subscans don't hang on stacks
    2012/04/18: 2.5i.3 fixed bug that caused grid position counter to reset with very small box sizes; fixed problem with getting irregular rois
    2012/04/30: 2.5k fixed bugs with particle analyzer on inverting LUTs; fixed random mass sampling bug that caused a hang on stacks
    2012/05/03: 2.5m fixed bugs with lcfd stacks
    2012/05/08: 2.5p fixed bug with regression lines not showing; added feature to let user choose less slices per stack so grid images don't crash
    2012/05/13: 2.5r added feature to work on grayscale images with "holes"

    |Plugins | Home |