Local adaptive thresholding computes a threshold for each voxel using the intensity range of neighboring voxels. This contrast with fixed global thresholding — adopted in the Gaussian and LaplaceHamming filter — which uses a single threshold value for the entire image.
Function¶
To use local adaptive thresholding with the default input settings, use the following commands:
from ormir_xct.core.segmentation.adaptive_local_threshold import adaptive_local_thresholding
adaptive-local-threshold(
structuring_element_shape,
structuring_element_size,
lower_threshold,
upper_threshold,
local_threshold_method,
sigma,
minimum_structure_size,)Input settings¶
image_sitk : Image to threshold, accepts string pathsstructuring_element_shape: Shape of the structuring element, accepts ball or cube. Default = ballstructuring_element_size: Size of structuring element. Default = 6
lower_threshold: The lower threshold. Default = 190upper_threshold: The upper threshold. Default = 450local_threshold_method: The method to use for identifying local thresholds. Accepts mean, minmax, or both. Default = meansigma: The sigma to use for the gaussian filter. Default = Noneminimum_structure_size: The minimum size of structures to keep in the segmentation. Default = 64
Further information about the function and its inputs can be found here (link to the API coming soon!)
Coming soon
Coming soon
Examples and workflows¶
Workflows that include the local adaptive thresholding:
Coming soon
Coming soon
Citation¶
If you use this function, please cite it as follows:
We used the adaptive local thresholding as implemented in ORMIR-XCT (Kuczynski et al. (2024)).
Coming soon
Coming soon
- Kuczynski, M. T., Neeteson, N. J., Stok, K. S., Burghardt, A. J., Hernandez, M. A. E., Vicory, J., Tse, J. J., Durongbhan, P., Bonaretti, S., Wong, A. K. O., Boyd, S. K., & Manske, S. L. (2024). ORMIR_XCT: A Python package for high resolution peripheral quantitative computed tomography image processing. Journal of Open Source Software, 9(97), 6084. 10.21105/joss.06084