napari_ndev.morphology
#
Functions for processing label morphology.
Process labels with various functions using pyclesperanto and scikit-image. Intended to be compatible with workflow.yaml files, and will be incorporated into napari-workflows and napari-assistant in the future. Should accept both OCLArray and other ArrayLike types.
Functions:
-
skeletonize_labels : Create skeletons with label identities from a label image.
–
connect_breaks_between_labels
#
connect_breaks_between_labels(label, connect_distance)
Connect breaks between labels in a label image.
Return the input label image with new label identities connecting breaks between the original labels. The new labels have the original label dimensions, so this is intended to keep the overall morphology the same, just with new labels connecting the original labels if under the specified distance.
Parameters:
-
label
(ArrayLike
) –Label image.
-
connect_distance
(float
) –Maximum distance to connect labels, in pixels.
Returns:
-
ArrayLike
–Label image with new labels connecting breaks between original labels.
Source code in src/napari_ndev/morphology.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
|
label_voronoi_based_on_intensity
#
label_voronoi_based_on_intensity(label, intensity_image)
Create a voronoi label masks of labels based on an intensity image.
Return a label image with Voronoi regions based on the intensity image. The intensity image should be the same shape as the label image, and the labels will be assigned to the Voronoi regions based on the intensity values.
Parameters:
-
label
(ArrayLike
) –Label image.
-
intensity_image
(ArrayLike
) –Intensity image.
Returns:
-
ArrayLike
–Label image with Voronoi regions based on the intensity image.
Source code in src/napari_ndev/morphology.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|
skeletonize_labels
#
skeletonize_labels(label)
Create skeletons and maintains label identities from a label image.
Parameters:
-
label
(ArrayLike
) –Label image.
Returns:
-
ndarray
–Skeletonized label image.
Source code in src/napari_ndev/morphology.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
|