topostats.thresholds#
Functions for calculating thresholds.
Attributes#
Functions#
|
Thresholding for producing masks. |
|
Creator component which determines which threshold method to use. |
|
|
|
|
|
|
|
|
|
Module Contents#
- topostats.thresholds.LOGGER#
- topostats.thresholds.threshold(image: numpy.ndarray, method: str = None, otsu_threshold_multiplier: float = None, **kwargs: dict) float #
Thresholding for producing masks.
- Parameters:
method (str) – Method to use for thresholding, currently supported methods are otsu (default), mean and minimum.
**kwargs (dict) – Additional keyword arguments to pass to skimage methods.
- Returns:
Threshold of image using specified method.
- Return type:
float
- topostats.thresholds._get_threshold(method: str = 'otsu') collections.abc.Callable #
Creator component which determines which threshold method to use.
- Parameters:
method (str) – Threshold method to use, currently supports otsu (default), mean, minimum, mean yen, and triangle.
- Returns:
Returns function appropriate for the required threshold method.
- Return type:
function
- Raises:
ValueError – Unsupported methods result in ValueError.
- topostats.thresholds._threshold_otsu(image: numpy.ndarray, otsu_threshold_multiplier: float = None, **kwargs) float #
- topostats.thresholds._threshold_mean(image: numpy.ndarray, otsu_threshold_multiplier: float = None, **kwargs) float #
- topostats.thresholds._threshold_minimum(image: numpy.ndarray, otsu_threshold_multiplier: float = None, **kwargs) float #
- topostats.thresholds._threshold_yen(image: numpy.ndarray, otsu_threshold_multiplier: float = None, **kwargs) float #
- topostats.thresholds._threshold_triangle(image: numpy.ndarray, otsu_threshold_multiplier: float = None, **kwargs) float #