-
Notifications
You must be signed in to change notification settings - Fork 12
ThicknessWrapper
This page documents the wrapper class of the LocalThickness_
plugin in BoneJ. The plugin is used through a wrapper instead of called directly to:
- Place it under the Plugins>BoneJ menu entry
- Additional validation of inputs
- More information shown to the user
- Modern API wrapping for a legacy plug-in
- Easier to call another implementation, if and when an Op based version of
LocalThickness_
is implemented.
The wrapper will call the LocalThickness_
plugin even though it still is very much in the ImageJ1 world. In the ideal case we would have the time to convert the plugin into an Op (or rather each step into an individual Op).
The original developer has withdrawn from maintaining the plugin.
LocalThickness calculates the local thickness values of a binary 3D image. More specifically it determines "the diameter of the largest sphere that fits inside the object and contains the point” for each point i.e. foreground voxel in the image. The LocalThickness plugin consists of several processing steps. The wrapper calls them all in succession. In BoneJ it's assumed that the tool is used for analysing the thickness of trabecular bone samples. Thus foreground voxels correspond to bone and background to the space between the trabeculae.
- Menu path: Plugins>BoneJ>Thickness
- Input
ImagePlus inputImage
String mapChoice
boolean showMaps
boolean maskArtefacts
boolean cropToRois
- Output
Table<DefaultColumn<String>, String> resultsTable
ImagePlus trabecularMap
ImagePlus spacingMap
- Calls
-
LocalThicknessWrapper
insc.fiji.LocalThickness_
-
- Options
-
String mapChoice
- Label: Calculate:
- Description: Which thickness measures to calculate
- Widget: Vertical radio button group. Choices: "Trabecular thickness", "Trabecular spacing", "Both"
-
boolean showMaps
- Label: Show thickness maps
- Description: Show resulting map images after calculations
- Widget: Check-box
- Optional (
required = false
)
-
boolean maskArtefacts
- Label: Mask thickness maps
- Tooltip: Remove pixel artifacts from the thickness maps
- Widget: Check-box
- Optional (
required = false, persist = false
)
-
- If there is no input image
- 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 does not have three spatial dimensions
- Show an error dialog
- Abort the run
- If the input image is composite
- Show an error dialog
- Abort the run
- If the input image has a time dimension
- Show an error dialog
- Abort the run
- If the input image does not have isotropic calibration
- Show a warning dialog with the degree of anisotropy
- Continue if user clicks OK
- Shows Mean value (Mean), Standard deviation (Std Dev) and Maximum value (Max) for trabecular thickness and/or spacing in Shared table
- Add a prefix to each column header: Tb.Th for thickness and Tb.Sp for spacing
- Shows unit of calibration for the results, e.g. mm^3
- Displays the local thickness map and/or trabecular spacing map
- The pixel values in the output images are calibrated (thickness in real units)
- Zero pixels are marked
NaN
instead - The title of the output image is either "<title of input image>_Tb.Th" or "<title of input image>_Tb.Sp"
- Settings persist except for
maskArtefacts
- LocalThickness is included via Maven instead of packaging it in org.bonej.*