Skip to content

Fractal dimension

Richard Domander edited this page Mar 14, 2017 · 13 revisions

This plugin estimates the fractal dimension of a binary image by applying the interval-counting algorithm. Intervals of diminishing size are scanned over the image and the number of intervals of each size containing foreground is counted. As the interval size decreases, the proportion of foreground increases in a fractal structure.

Fractal dimension

  • Menu path: Plugins>BoneJ>Fractal dimension
  • Input paremeters
    • ImgPlus inputImage
  • Output parameters
    • none
  • Calls
    • FractalDimensionsOp
Setup dialog
  • Input parameters
    • boolean autoParameters
      • Label: Automatic parameters
      • Tool tip: Let the computer decide box sizes and scaling
      • Callback to show parameter values in autovalues
    • String autovalues
      • visibility = ItemVisibility.MESSAGE
    • double startBoxSize*
      • Label: Starting box size
      • Tool tip: The relative size of the sampling box in the first iteration
      • Widget: Slider, min: 0.0, max: 1.0, step: 1.0
      • Callback to check that smallestBoxSize <= startBoxSize
    • double smallestBoxSize*
      • Label: Smallest box size
      • Tool tip: Sampling box size where algorithm stops if no foreground is found
      • Widget: Slider, min: 0.0, max: 1.0, step: 1.0
      • Callback to check that smallestBoxSize <= startBoxSize
    • double scaleFactor
      • Label: Box scale factor
      • Tool tip: The factor used to multiply box on each iteration
      • Widget: Slider, min: 0.0, max: 1.0, step: 0.01
    • int translations
      • Label: Box translations
      • Tool tip: How many times sampling box is moved and applied before scaling down
      • Widget: Slider, min: 0.0, step: 1

* Using relative values, because it's easier than setting slider max values to image dimensions. Also, this way values can be saved

  • Other
    • Help
      • Tooltip: Open help web page
      • Widget: Button
Messages
  • If there's no image open
    • Show an error dialog
    • Abort the run
  • If the input image is not binary
    • Show an error dialog
    • Abort the run
Results
  • Prints the output of FractalDimensionsOp in the ResultTable
    • Each channel / frame of a hyperstack is reported separately
Differences from BoneJ1
  • Supports hyper-stacks (channels and frames processed as 3D sub-spaces)

ForegroundBoxCountingOp

  • A unary function op
  • Scans boxes of diminishing size are over the interval and the number of boxes of each size containing foreground is counted. As the box size decreases, the proportion of boxes containing foreground increases in a fractal structure. Can be used to estimate fractal dimension.
  • Inputs
    • RandomAccessibleInterval<B extends BooleanType<B>> inputImage
  • Outputs List<ValuePair<DoubleType, DoubleType>>
    • A list of (log(n), -log(m)) value pairs, where n = number of boxes sampled before foreground was found, and m = minimum size of the boxes reached
  • Returns a DoubleType Pair instead of Double since the former is mutable, and can thus be chained with other ops

Future

  • User documentation
  • Usage reporting
  • Since there's no setup dialog, where to put the Help-button? How to provide the help?
  • Library for finding linear regression line of log(n) / log(m), i.e. fractal dimension. Use ij.measure.CurveFitter still, or maybe new Op?
  • Plotting graphs from results
Clone this wiki locally