{"categories":[{"label":"Scientific/Engineering","url":"https://skillfed.io/packages/category/scientific-engineering/5"}],"enrichment":{"capability":"Labels connected components in 2D and 3D images with support for multilabel, continuous-valued, and binary data using 26, 18, or 6-connected neighborhoods in 3D or 4 and 8-connected in 2D.","skillfed_tags":["image-processing","volumetric-segmentation","biomedical-imaging"],"use_cases":["Segment densely labeled 3D biomedical images where each voxel may belong to a different instance or semantic label.","Extract and analyze individual connected components from instance segmentation outputs without repeated masking and relabeling.","Process continuous-valued grayscale images by grouping nearby voxel values into components using a delta threshold.","Handle very large volumetric datasets that exceed available RAM using memory-mapped files or stack-based compressed output.","Compute component statistics (centroids, bounding boxes, voxel counts, contact networks) in a single operation after labeling."],"what_it_does":"connected-components-3d is a fast connected-components labeling library for 2D and 3D images that handles multilabel, binary, and continuous-valued data in a single pass. Unlike typical implementations that require masking and relabeling each label separately, this package labels all connected components simultaneously, making it particularly suited for densely labeled biomedical images where hundreds to thousands of labels may be present. It uses a 3D variant of the two-pass Rosenfeld-Pflatz method augmented with Union-Find and decision trees, supporting 26, 18, or 6-connected neighborhoods in 3D and 4 or 8-connected in 2D.\n\nThe package depends only on numpy and provides functions for component extraction, centroid and bounding-box calculation, small-object removal, contact-surface-area computation, and per-voxel connectivity graphs. It handles edge cases like periodic boundaries, memory-mapped files for images larger than RAM, and compressed output formats. The implementation supports Python 3.9 through 3.14 and is actively maintained.","worth_installing":"Yes, if you work with 2D/3D image segmentation or multilabel volumetric data. The single-pass multilabel algorithm offers genuine performance and convenience advantages over masking-based approaches. The copyleft license (LGPL-3.0-or-later) requires careful review if you plan proprietary distribution. Install friction is moderate due to C++ compilation, but prebuilt wheels cover most platforms. No known security vulnerabilities."},"id":"connected-components-3d","links":{"html":"https://skillfed.io/packages/connected-components-3d","md":"https://skillfed.io/packages/connected-components-3d.md","pypi":"https://pypi.org/project/connected-components-3d/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-05","license_spdx":null,"license_treatment":"copyleft","name":"connected-components-3d","python_support":"supports_current","summary":"Connected components on discrete and continuous multilabel 3D and 2D images. Handles 26, 18, and 6 connected variants; periodic boundaries (4, 8, & 6)."},"popularity":{"monthly_downloads":219951,"position":9317,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.0.0"}
