Skip to content

Analyse skeleton wrapper

Richard Domander edited this page Aug 13, 2018 · 28 revisions

This page documents the BoneJ2 wrapper plug-in of the AnalyzeSkeleton plugin written by Ignacio Arganda-Carreras. We wanted to create wrapper instead of just using the plug-in directly for the following reasons:

  1. Place AnalyseSkeleton under the Plugins>BoneJ menu entry
  2. Additional validation of inputs
  3. More information shown to the user
  4. Modern API wrapping for a legacy plug-in
  5. Easier to call another implementation, if and when an Op based version of AnalyzeSkeleton_ is implemented.

The wrapper calls the AnalyzeSkeleton_ plug-in even though it still is very much in the ImageJ1 world. In the ideal case we would help @iarganda to convert the plug-in into an Op, but currently we do not have the resources.

AnalyzeSkeleton_ analyses binary skeleton images. It counts the skeletons' junctions, triple and quadruple points and branches. It also measures the average and maximum length of the branches. Furthermore it creates an array of graphs which describe the structure of each skeleton in the image. See the wiki page of AnalyzeSkeleton_ or Intertrabecular angles for more details.

AnalyseSkeletonWrapper

  • Menu path: Plugins>BoneJ>Analyse Skeleton
  • Duplicates the input image so that it doesn't get overwritten
  • Inputs
    • ImagePlus inputImage
    • String pruneCycleMethod
    • boolean pruneEnds
    • boolean excludeRoi
    • boolean calculateShortestPath
    • boolean verbose
    • boolean displaySkeletons
  • Outputs
    • Table<DefaultColumn<String>, String> resultsTable (SharedTable)
    • DefaultGenericTable verboseTable
    • ImagePlus labelledSkeleton
    • ImagePlus shortestPaths
  • Calls
Setup dialog
  • Options
    • String pruneCycleMethod
      • Label: Prune cycle method
      • Description: Which method is used to prune cycles in the skeleton graph
      • Widget: Drop-down list
        • Choices: None, Shortest branch, Lowest intensity voxel, Lowest intensity branch
      • Optional (required = false)
    • boolean pruneEnds
      • Label: Prune ends
      • Description: Prune very short edges with no slabs
      • Widget: Check-box
      • Optional (required = false)
    • boolean excludeRoi
      • Label: Exclude ROI from pruning
      • Description: Exclude the current selection from pruning
      • Widget: Check box
      • Optional (required = false)
    • boolean calculateShortestPath
      • Label: Calculate largest shortest paths
      • Description: Calculate and display the largest shortest skeleton paths
      • Widget: Check box
      • Optional (required = false)
    • boolean verbose
      • Label: Show detailed info
      • Description: Show detailed branch info in an additional table
      • Widget: Check box
      • Optional (required = false)
    • boolean displaySkeletons
      • Label: Display the labelled skeletons
      • Description: Show skeleton images labelled with their IDs
      • Widget: Check box
      • Optional (required = false)
  • Other
    • String loopSection
      • Value: "-- LOOPS --"
      • Visibility: MESSAGE (non-interactive)
    • String endPointSection
      • Value: "-- END-POINTS --"
      • Visibility: MESSAGE (non-interactive)
    • String resultSection
      • Value: "-- RESULTS AND OUTPUT --"
      • Visibility: MESSAGE (non-interactive)
Messages
  • If there is no image open
    • show an error dialog
    • abort the run
  • If the input image is not 8-bit binary colour
    • show an error dialog
    • abort the run
  • If the input image has channels
    • show an error dialog
    • abort the run
  • If the input image has a time dimension
    • show an error dialog
    • abort the run
  • If pruneCycleMethod is LOWEST_INTENSITY_BRANCH or LOWEST_INTENSITY_VOXEL
    • show file dialog for opening an intensity image
    • abort run if user cancels, image is invalid, or opening the image fails
  • If the input image was skeletonised
    • show the skeleton image
  • If the input image contained no skeletons (AnalyzeSkeleton_.getGraphs() == null)
    • show an error dialog
    • abort the run
Results
  • Skeleton analysis results (Shared table)
  • Detailed branch info in an additional table (if selected)
  • Labelled skeletons
  • Shortest path images
Differences from BoneJ1
  • AnalyzeSkeleton_ is included via Maven instead of packaging it in org.bonej.*
  • Settings persist
  • Modern AnalyzeSkeleton_ provides more options
  • Doesn't expect a skeletonised image any more. Any 8-bit binary will do
    • Shows an info dialog if input image was skeletonised
    • Shows an error if the image contained no skeletons