Skip to content

Connectivity specification

Richard Domander edited this page Jun 22, 2016 · 24 revisions

This is the technical specification for the Connectivity plugin, and its wrapper plugin in BoneJ2.

The Euler characteristic (χ) and the edge correction for it will be calculated in to independent Ops. It's reasonable to assume that someone could write a different algorithms for them. Separating the calculations in Connectivity makes it possible the change the algorithms for the individual parts. The connectivity and connectivity density steps are simple enough that they do not warrant their own 'Ops'. The wrapper plugin will calculate them after calling the two Ops.

####Euler characteristic (χ) Op

  • A unary function Op (ImgPlus<BitType> -> Integer)
  • Calculates χ of the binary image. χ describes a topological space's shape or structure.
  • Implements the same triangulation algorithm by Toriwaki & Yonekura as in BoneJ1
  • Fails Op matching if input ImgPlus doesn't have at least three spatial dimensions because the algorithm is only defined for 3D.

####Euler correction Op

  • A unary function Op (ImgPlus<BitType> -> Double)
  • Calculates the correction c for Δχ = χ + c. Δχ gives the sample's contribution to the Euler characteristic of the whole object it was connected to.
  • Based on Odgaard & Gundersen's publication
  • Fails Op matching if input ImgPlus doesn't have at least three spatial dimensions because the algorithm is only defined for 3D.

####Connectivity wrapper

  • Menu path: Plugins>BoneJ>Connectivity
  • Runs Euler characteristic and correction Ops, calculates connectivity and connectivity density, and displays the results in the default results table.
  • No setup dialog

######Messages

  • If there's no image open
    • Show an error dialog
    • Abort the run
  • If the input image has less than three spatial dimensions
    • Show an error dialog
    • Abort the run
  • If the input image is not binary colour
    • Show an error dialog
    • Abort the run
  • If the calibration of the image cannot be determined*
    • Show a warning dialog (before Results table)
  • If connectivity is negative
    • Show an info dialog (you shouldn't get negative numbers with bone samples unless there's more than 1 particle)

*Calibration is unknown if spatial axes have different units or are not linear. No calibration is a valid calibration (none of the axes have units).

######Results table

  • Column headers: Euler char. (χ), Corrected Euler (Δχ), Connectivity, Conn. density
  • Must show the unit of the connectivity density (mm^3) in the results table. If the image is uncalibrated, must not show any unit (e.g. no "pixel" unit).

####Future

  • Since there's no setup dialog, where to put the Help-button? How to provide the help?
  • How to handle hyperstacks? Show results for each channel / frame separately?
  • Block images with non-linear axes
  • Create a namespace for the Euler Ops?
  • Calculate Δχ by implementing χ for 2D faces, 1D edges and 0D vertices as here?
Clone this wiki locally