From 440688597de404a07e9a3ffb322ce20e350757fd Mon Sep 17 00:00:00 2001 From: William Silversmith Date: Wed, 9 Oct 2024 14:27:09 -0400 Subject: [PATCH] feat: support binary_image flag in connected_components_stack --- cc3d/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cc3d/__init__.py b/cc3d/__init__.py index 1a2dfbd..dcc43f5 100644 --- a/cc3d/__init__.py +++ b/cc3d/__init__.py @@ -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 @@ -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