-
Notifications
You must be signed in to change notification settings - Fork 12
Element fraction
This is the technical specification for the BoneJ2 version of the voxel based volume fraction plugin. In BoneJ2 the Volume Fraction tool was split in two tools: voxel and surface mesh based. The split was made because the voxel based version could be generalised to work with any dimensionality whereas the surface based version only works with 3D images. Furthermore most of the settings in the setup dialog are only applicable to the latter. The voxel and surface based methods are now conceptually quite different, and it would be confusing to have them under the same menu entry.
The voxel based volume algorithm was generalised into an Op called ElementFraction
. Instead of voxels in a three dimensional image it can operate on any collection of elements, as long as they impelement Comparable
with each other.
The ElementFraction
Op counts the number of elements between the thresholds and the total number of elements. Then it calculates the fraction (foregroundElements / totalElements).
- A binary function
Op
(IterableInterval<T>
,Settings<S>
->Results
) -
S
andT
are generic types whereT extends Comparable<S>
-
Settings
andResults
are inner helper classes of theElementFraction
-
Settings
contains:S minThreshold
andS maxThreshold
-
Results
contains:long thresholdElements
,long elements
anddouble ratio
- Menu path: Plugins>BoneJ>Fraction>Area/Volume fraction
- If no image is open
- show an error message
- abort the run
- If image is not binary
- show an error message
- abort the run
- If the calibration of the image cannot be determined*
- Show a warning dialog
*Calibration is unknown if spatial axes have incompatible units, have incompatible units, or are not linear
- The results of the Op shall be displayed as "Bone volume", "Total volume" (
elements
) and "Volume ratio" (ratio
). These will be "area" if the image is 2D. - The results must be calibrated, i.e. the outputs of the Op must be multiplied by the size of an element in the input image
- The column headers in the results table must show units
- The superscript of the units must be the same as the spatial dimensionality of the input image, i.e. mm^2 if processing a 2D image
- If the image is uncalibrated, must not show any unit (e.g. no "pixel" unit)
- Can also handle 2D images
- Accepts only binary images
- Add possibility to limit calculations with the ROI Manager (normal ROIs and irregular ROIs with masks)
- Solve issues with determining thresholds from the input image
- Thresholds
- Do fancy GUI, or limit wrapper to binary images, and prerequire thresholding?
- Setup dialog for threshold values (values depend on image type)
- Enable support for all greyscale images? How to check if an image is greyscale?
- Change widgets based on image type, i.e. decimal numbers if we have a floating point image
-
Help-button that opens the help page at bonej.org (write the page for the modern version)
- If no dialog, where to put Help-button?
- Op can handle any dimensionality, but how to explain the results to the user with weird dimensions?
- Usage reporter
- BoneJ2 user documentation