copick process thickness-filter
utils
Remove thin regions from segmentations.
Plugin command — copick-utils
This command is provided by the copick-utils plugin, not copick core. Install it to make this command available:
See the plugin system guide for details.
Remove thin regions from segmentations.
Usage
Description
Remove thin regions from segmentations based on inscribed sphere diameter.
This command identifies thin sheet-like artifacts in a segmentation and removes them. A region is kept only if it contains at least one voxel whose largest inscribed sphere has a diameter >= min-thickness. The algorithm computes the Euclidean distance transform, thresholds to find thick cores, dilates them back, and intersects with the original mask.
For multilabel segmentations, each label is filtered independently.
URI Format
Options
| Option | Type | Default | Description |
|---|---|---|---|
-c, --config |
path | — | Path to the configuration file. |
--debug / --no-debug |
boolean flag | False |
Enable debug logging. |
Input Options
| Option | Type | Default | Description |
|---|---|---|---|
--run-names, -r |
text · multiple | — | Specific run names to process (default: all runs). |
--input, -i |
COPICK_URI | required | Input segmentation URI (format: name:user_id/session_id@voxel_spacing). Supports glob patterns. |
Tool Options
| Option | Type | Default | Description |
|---|---|---|---|
--min-thickness, -t |
float | required | Minimum thickness (diameter) of structures to keep. Unit set by --thickness-unit. |
--thickness-unit |
choice (angstrom | voxel) | angstrom |
Unit for --min-thickness: 'angstrom' for Å, 'voxel' for voxel diameters. |
--workers, -w |
integer | 8 |
Number of worker processes. |
Output Options
| Option | Type | Default | Description |
|---|---|---|---|
--output, -o |
COPICK_URI | required | Output segmentation URI. Supports smart defaults (e.g., "membrane", "membrane/my-session", or "/my-session"). Full format: object_name:user_id/session_id@voxel_spacing. |
Examples
# Remove membrane regions thinner than 50 Å
copick process thickness-filter -i "membrane:user1/auto-001@10.0" -o "membrane_thick" --min-thickness 50.0
# Filter by voxel diameters instead of angstroms
copick process thickness-filter -i "membrane:user1/auto-001@10.0" -o "membrane_thick" --min-thickness 5 --thickness-unit voxel
# Process specific runs with regex pattern
copick process thickness-filter -i "membrane:user1/.*@10.0" -o "membrane_thick" --min-thickness 40.0 -r run001 -r run002
See also
copick process filter-components— remove connected components below a size thresholdcopick process expand-labels— grow labels to fill holes left after filtering