Registry / data / fill-voids

fill-voids

JSON →
library2.1.2pypypiunverified

Fill voids (holes) in 3D binary images (numpy arrays) using a flood-fill algorithm. Fast and memory-efficient algorithm for hole filling in labeled or binary volumes. Current version 2.1.2, released Oct 2024. Releases are occasional, with breaking changes in the past (e.g., v2.0).

pip install fill-voids
INSTALL
IMPORT
SIG · FILL-VOIDS
F
fill-voids
datapythonv2.1.2
Install
4.0s avg
Import
Disk
123MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 4.0s · import 0.000s · 121MB
123MB installed
● package 123MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fill_voids
from fill_voids import fill_voids
from fill_voids import fill_voids

Fills holes in a 3D binary numpy array.

import numpy as np from fill_voids import fill_voids # Create a binary volume with a hole image = np.ones((5,5,5), dtype=bool) image[2:4, 2:4, 2:4] = False # hole # Fill the hole filled = fill_voids(image) print(filled.all()) # Should be True
Debug
Known issues
breakingIn v2.0, the main function was renamed from 'fill' to 'fill_voids'. Code using 'from fill_voids import fill' will break.
fix
Update import to 'from fill_voids import fill_voids' and call fill_voids() instead of fill().
affects: <2.0
breakingIn v2.0, the library no longer accepts 2D arrays by default. Use fill_voids with 3D or upgrade to handle 2D via a workaround (e.g., add a dummy axis).
fix
Ensure input is 3D (shape (Z, Y, X)). For 2D, reshape: image_3d = image[np.newaxis, ...]; then fill; then squeeze.
affects: <2.0
gotchafill_voids fills fully enclosed background regions only. It does not fill holes touching the image border by default.
fix
Pad the array with a border of foreground voxels before filling, or use the 'in_place' argument if available.
affects: all
gotchaThe function modifies the input array in place if in_place=True (default False). Setting in_place=True can save memory but alters the original array.
fix
Use in_place=False (default) to preserve input; copy the array first if needed.
affects: >=2.0
Upgrade
Version history
2.1.2latest on PyPI · released Apr 30, 2026
Audit
Dependencies
numpyrequiredCore dependency for array manipulation.
scipyoptionalOptional; used for some fast watershed operations.
fastremapoptionalOptional; needed for remapping after filling.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
fill-voids — pip install fill-voids · libregistry