Skip to content

Connectivity specification

Richard Domander edited this page May 19, 2016 · 24 revisions

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

The Euler characteristic (χ) and delta euler (Δχ) steps will be split into two independent Ops. It's reasonable to assume that someone could write a different algorithm for calculating the Euler characteristic. 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)
  • Implements the lookup table algorithm from BoneJ1
  • Fails Op matching if input ImgPlus doesn't have at least three spatial dimensions (conforms() from Contingent returns false)

####Delta Euler (Δχ) Op

  • A binary function Op (ImgPlus<BitType>, Integer -> Integer)
  • The second input is the output from the Euler characteristic Op
  • Calculates the bone sample's contribution to the Euler characteristic of the bone it was connected to
  • Fails Op matching if input ImgPlus doesn't have at least three spatial dimensions (conforms() from Contingent returns false)

####Connectivity wrapper

  • Menu path: Plugins>BoneJ>Connectivity
  • Runs Euler characteristic and Delta Euler 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)

*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. (χ), Contribution (Δχ), 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?
  • Show a warning if there is more than one object in the image (Purify has not been run). Count objects with 3D object counter?
  • What to do about non-spatial dimensions?
  • What to do about images with more than 3 spatial dimensions?
Clone this wiki locally