SmoothDistTransform
Bases: OnlyInstMapTransform
__init__ ¶
Generate FIM distance transforms from a label mask.
https://www.biorxiv.org/content/10.1101/2021.11.03.467199v2
Parameters:
Name | Type | Description | Default |
---|---|---|---|
deduplicate
|
bool, default=True
|
Whether to fix duplicate values in the mask before transforming. This adds overhead, so use only if you know that the mask has duplicates. |
True
|
__call__ ¶
Generate smooth distance transforms.
Parameters inst (np.ndarray): Instance labelled mask. Shape (H, W).
Returns:
Type | Description |
---|---|
ndarray
|
np.ndarray: Smooth distance transforms of objects. Shape: (H, W). Dtype: float64. |