Skip to content

Commit

Permalink
feat: support binary_image flag in connected_components_stack
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Oct 9, 2024
1 parent 24bcc9a commit 4406885
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cc3d/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def connected_components_stack(
connectivity:int = 26,
return_N:bool = False,
out_dtype:Optional[Any] = None,
binary_image:bool = False,
):
"""
This is for performing connected component labeling
Expand Down Expand Up @@ -201,6 +202,7 @@ def connected_components_stack(
cc_labels, N = connected_components(
image, connectivity=connectivity,
return_N=True, out_dtype=np.uint64,
binary_image=bool(binary_image),
)
cc_labels[cc_labels != 0] += offset
offset += N
Expand Down

0 comments on commit 4406885

Please sign in to comment.