From 5376ab192e5669cde2bb02c01427b4cb5e6b043c Mon Sep 17 00:00:00 2001 From: Christian Kento Rasmussen <christian.kento@gmail.com> Date: Fri, 9 Feb 2024 09:37:23 +0100 Subject: [PATCH] added support for 2d connected components --- qim3d/utils/connected_components.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/qim3d/utils/connected_components.py b/qim3d/utils/connected_components.py index 6cccc489..abb182fa 100644 --- a/qim3d/utils/connected_components.py +++ b/qim3d/utils/connected_components.py @@ -88,10 +88,5 @@ def get_3d_connected_components(image: np.ndarray | torch.Tensor): Returns: class: Returns class object of the connected components. """ - if image.ndim != 3: - raise ValueError( - f"Given array is not a volume! Current dimension: {image.ndim}" - ) - connected_components, num_connected_components = label(image) return ConnectedComponents(connected_components, num_connected_components) -- GitLab