copick convert picks2mesh
utils
Convert picks to meshes using convex hull or alpha shapes.
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.
Convert picks to meshes using convex hull or alpha shapes.
Usage
Description
For each matched pick set, builds a single surface mesh that encloses the pick
coordinates. Two methods are supported: convex_hull wraps the points in their
tightest convex envelope, while alpha_shape (requires --alpha) yields a tighter,
possibly non-convex surface. Optional clustering (DBSCAN or KMeans) first splits the
picks into groups, and --individual-meshes writes one mesh per cluster/instance via
the {instance_id} placeholder.
Input and output URIs select picks and meshes by object name, user id and session id.
They support exact, glob, regex (re: prefix) and bare-wildcard matching, enabling
one-to-one, one-to-many and many-to-many conversions through {input_session_id} and
{instance_id} placeholders in the output URI.
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 picks URI (format: object_name:user_id/session_id). Supports glob patterns. |
Tool Options
| Option | Type | Default | Description |
|---|---|---|---|
--mesh-type, -t |
choice (convex_hull | alpha_shape) | convex_hull |
Type of mesh to create. |
--alpha, -a |
float | — | Alpha parameter for alpha shapes (required if mesh-type=alpha_shape). |
--use-clustering, -cl / --no-use-clustering |
boolean flag | False |
Cluster points before mesh creation. |
--clustering-method |
choice (dbscan | kmeans) | dbscan |
Clustering method. |
--clustering-eps |
float | 1.0 |
DBSCAN eps parameter - maximum distance between points in a cluster (in angstroms). |
--clustering-min-samples |
integer | 3 |
DBSCAN min_samples parameter. |
--clustering-n-clusters |
integer | 1 |
K-means n_clusters parameter. |
--all-clusters, -mm / --largest-cluster-only |
boolean flag | True |
Use all clusters (True) or only the largest cluster (False). |
--workers, -w |
integer | 8 |
Number of worker processes. |
Output Options
| Option | Type | Default | Description |
|---|---|---|---|
--output, -o |
COPICK_URI | required | Output mesh URI. Supports smart defaults (e.g., "membrane", "membrane/my-session", or "/my-session"). Full format: object_name:user_id/session_id. |
--individual-meshes, -im / --no-individual-meshes |
boolean flag | False |
Create individual meshes for each instance (enables {instance_id} placeholder). |
Examples
# Convert a single pick set to a single convex-hull mesh
copick convert picks2mesh -i "ribosome:user1/manual-001" -o "ribosome:picks2mesh/mesh-001"
# Create individual meshes from clusters
copick convert picks2mesh -i "ribosome:user1/manual-001" \
-o "ribosome:picks2mesh/mesh-{instance_id}" --individual-meshes
# Build alpha-shape surfaces for all manual picks via regex matching
copick convert picks2mesh --mesh-type alpha_shape --alpha 150 \
-i "re:ribosome:user\d+/manual-.*" -o "ribosome:picks2mesh/mesh-{input_session_id}"
See also
copick convert picks2sphere— convert picks to sphere meshes insteadcopick convert mesh2seg— voxelize the resulting mesh into a segmentationcopick convert mesh2caps— extract the top/bottom caps of a slab box mesh