Skip to content

Connectivity specification

Richard Domander edited this page Nov 16, 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.

###Connectivity wrapper

  • Menu path: Plugins>BoneJ>Connectivity
  • Inputs
    • ImgPlus inputImage
  • Outputs
    • None
  • Calls
    • EulerCharacteristic26NFloating in net.imagej.ops.topology
    • EulerCorrection in net.imagej.ops.topology

######Setup dialog

  • 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
  • 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 no units, have incompatible units, or are not linear

######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).
  • Shows results for each channel / frame in the hyperstack image on its own row. For example, a hyperstack with 3 channels and 5 frames produces 3 * 5 = 15 results.

######Differences from BoneJ1

  • Supports hyper stacks, i.e. 3D images with channels and/or time frames

###Euler characteristic (χ) Op

  • A unary hybrid computer/function Op (ImgPlus<BitType> -> DoubleType)
  • Returns DoubleType instead of Double since the latter is mutable, and can thus be chained with other ops
  • Calculates χ of the binary image. χ describes a topological space's shape or structure.
  • The BoneJ2 version of the op calculates χ as if the image was floating in space, i.e. voxels touching the edges of the stack do not affect the result
  • Implements the same triangulation algorithm by Toriwaki & Yonekura as in BoneJ1
  • Fails Op matching if input ImgPlus doesn't have three dimensions because the algorithm is only defined for 3D binary images.
  • Op created in the BoneJ2 project, now in imagej-ops

###Euler correction Op

  • A unary hybrid computer/function Op (ImgPlus<BitType> -> DoubleType)
  • Returns DoubleType instead of Double since the latter is mutable, and can thus be chained with other ops
  • 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 three dimensions because the algorithm is only defined for 3D binary images.
  • Op created in the BoneJ2 project, now in imagej-ops

####Future

  • User documentation
  • Usage reporting
  • Since there's no setup dialog, where to put the Help-button? How to provide the help?
  • Calculate Δχ by implementing χ for 2D faces, 1D edges and 0D vertices as here?
Clone this wiki locally