Skip to content

Fractal dimension

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

This plugin estimates the fractal dimension of the surface or outline a binary image by applying an interval-counting algorithm. The outline of the image is created by removing all the elements whose each neighbour is foreground (a neighbourhood in 2D is 8-connected and 3D 26-connected). In the 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)

OutlineOp

  • Reduces the image to it's outline, i.e. it removes the elements which have only foreground neighbours
  • A UnaryHybridCFI op
  • Inputs
    • RandomAccessibleInterval<B extends BooleanType<B>> interval
  • Outputs
    • RandomAccessibleInterval<BitType> outline

ForegroundIntervalCountingOp

  • Scans intervals of diminishing size over the given space. Counts the number of intervals of each size containing foreground. As the size decreases, the proportion of intervals containing foreground increases in a fractal structure. Can be used to estimate fractal dimension.
  • Inputs
    • RandomAccessibleInterval<B extends BooleanType<B>> space
    • Integer minIntervalSize
    • Integer maxIntervalSize
    • Double scalingFactor
  • Outputs List<ValuePair<DoubleType, DoubleType>>
    • A list of (log(n), -log(m)) value pairs, where n = number of intervals sampled before foreground was found, and m = minimum size of the intervals 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