Skip to content

feat: filaments, instance and panoptic segmentations, Copick Edit toolbar and Annotate window (v2.0) - #112

Merged
uermel merged 3 commits into
uermel/keep-pick-shifts-v2from
uermel/filaments-instances-v2
Oct 6, 2026
Merged

uermel merged 3 commits into
uermel/keep-pick-shifts-v2from
uermel/filaments-instances-v2

Conversation

@uermel

@uermel uermel commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

v2.0 (Zarr v3) counterpart of #111. ChimeraX support for copick's filaments and instance / panoptic segmentations, with editing tools, a Copick Annotate window and a Copick Edit toolbar tab.

Display and data

  • Filaments:
    • a Filaments tab with a stepper (<< k of N >>, fp / fn);
    • filament sets drawn as tubes in instance colours, with direction arrowheads;
    • control-point handles while editing.
  • Segmentations:
    • the Segmentations tab shows types (binary, multilabel, instance, panoptic);
    • instance and panoptic segmentations are drawn as per-instance surfaces;
    • deleting a segmentation now passes its type, so a same-key segmentation of another type is kept (data-loss fix).
  • Tables: compact two-line object tables (swatch, name, type chip / "user · session"), a header sort menu, outline selection, search across user / session / type, and wrap-around arrow keys.

Editing

  • Filaments:
    • trace mouse mode (add / drag / remove control points) and cut mode;
    • join (also on tubes selected in the 3D view; the 3D selection and the filament list share one selection), reverse, delete, convert;
    • save, optionally with sampled picks.
    • Every filament edit is a step on ChimeraX's undo stack: Cmd/Ctrl+Z, including in copick's keyboard-shortcut mode.
  • Instances: paint / erase / pick-ID mouse modes, brush sizes, new ID, merge, delete, undo, save.
  • Copick Annotate window:
    • Filaments, Instances and Pick instances pages, using the shared instance browser;
    • tabbed with the right-hand panel group and kept in front when ArtiaX raises its options panel.
  • Copick Edit toolbar tab (31 buttons, at most as many as the Copick tab):
    • annotate, new picks / filaments / instances, save all;
    • common particle tools;
    • filaments, instances, brush sizes and pick colours.
    • Particle tools stay in the Copick tab as before.
  • Commands, shortcuts, docs: copick filament …, copick instance …, copick annotate, copick save, copick colorpicks; filament / instance shortcuts; documentation pages.

Depends on

Testing

  • pytest tests -m "not chimerax": 35 passed.
  • Scripted self-tests driving ChimeraX Daily over REST, on a CryoET Data Portal test project with filaments, picks, instance and panoptic segmentations:
    • display, tables, stepper, saving: 39 checks;
    • undo / cut / join / 3D-selection: 53 checks.

🤖 Generated with Claude Code

uermel added a commit to copick/copick-shared-ui that referenced this pull request Oct 6, 2026
… (v2.0) (#74)

## Summary
v2.0 counterpart of #73.
Shared, viewer-independent support for copick's filaments and instance /
panoptic segmentations, used by napari-copick
(copick/napari-copick#50) and chimerax-copick
(copick/chimerax-copick#112).

- **Types** (`core/types.py`): object and segmentation type detection
(binary, multilabel, instance, panoptic) and filament specs, tolerant of
older copick.
- **Filament editing** (`util/filament_session.py`,
`util/filaments.py`): `FilamentEditSession` with add / move / remove
control points, new, reverse, delete, convert, **cut** and **join**.
Curves are regenerated through copick core's curve API. Undo / redo
history that hosts can mirror. Pick sampling along filaments and
direction markers.
- **Instances** (`util/instances.py`): shared instance colours (same
IDs, same colours in every viewer), ID sets, label counts, merge /
delete, browser rows with compact titles and captions.
- **Widgets**:
- `InstanceBrowserWidget`: step, focus, show / hide, filter, sort menu,
new / delete / merge / reverse, selection signal.
- `compact_delegate`: two-line / inline compact rows, outline selection,
header sort menu, wrap-around arrow keys.
  - `FlowLayout`: wrapping rows that keep native button heights.
- **Fixes**: the Edit Object Types dialog keeps object metadata, which
it used to drop, and edits filament specs. The info widget, data worker,
URI widget and CLI forms know filaments and segmentation types.

## Depends on
- copick >= 2.0.0a3 (released; the first published v2.0 alpha with
copick/copick#481, #482, #493, #495).

## Testing
- `pytest tests`: 103 passed, 3 skipped.
- Exercised end to end through the napari-copick and chimerax-copick
self-tests on a CryoET Data Portal test project.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@uermel
uermel marked this pull request as ready for review October 6, 2026 08:24
@uermel
uermel added this pull request to stack #116 October 6, 2026 08:25
uermel and others added 3 commits October 6, 2026 01:37
…lbar and Annotate window

Display and data
- Filaments tab and stepper; filament sets drawn as tubes in instance colours with direction arrowheads and
  control-point handles while editing. Picks of filament objects coloured by instance.
- Segmentations tab with types (binary, multilabel, instance, panoptic); instance and panoptic segmentations as
  per-instance surfaces. Deleting a segmentation passes its type, so a same-key segmentation of another type is kept.
- Compact two-line object tables (swatch, name, type chip / "user · session"), header sort menu, outline selection,
  search across user, session and type, wrap-around arrow keys.

Editing
- Filament tracing mouse mode (add / drag / remove control points), cut mode, join, reverse, delete, convert,
  save with sampled picks. Every filament edit is a step on ChimeraX's undo stack (Cmd/Ctrl+Z, also in copick
  keyboard-shortcut mode). The 3D selection of filament tubes and the filament list share one selection.
- Instance editing: paint / erase / pick ID mouse modes with brush sizes, new ID, merge, delete, undo, save.
- Copick Annotate tool window (Filaments, Instances, Pick instances pages with the shared instance browser), tabbed
  with the right-hand group and kept in front of ArtiaX's options panel.
- Copick Edit toolbar tab (annotate, new picks / filaments / instances, save all, common particle tools, filaments,
  instances, brush, pick colours); particle tools stay in the Copick tab as before.
- Commands: copick filament ..., copick instance ..., copick annotate, copick save, copick colorpicks; shortcuts for
  filaments and instances; documentation pages.

Requires copick >= 2.0.0a2 (copick/copick#481, #482, #493, #495) and copick-shared-ui with the filament / instance
helpers (copick/copick-shared-ui, same branch name). v2.0 counterpart of the main-branch change, stacked on the
v2.0 port of #108 (uermel/keep-pick-shifts-v2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
copick 2.0.0a2 never reached PyPI (the release setup skipped it); 2.0.0a3 is the first published v2.0 alpha with
filaments, curves, instance and panoptic segmentations. The copick-shared-ui alpha with the filament / instance helpers (copick/copick-shared-ui#74)
follows 2.0.0a2 as well, so require 2.0.0a3 there too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The wheel / bundle metadata checks still expected the 2.0.0a1 floor; the requirements now start at 2.0.0a3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@uermel
uermel force-pushed the uermel/filaments-instances-v2 branch from 5c04645 to d32a16b Compare October 6, 2026 08:38
@uermel
uermel merged commit f463801 into v2.0 Oct 6, 2026
3 checks passed
uermel added a commit that referenced this pull request Oct 6, 2026
…110)

## Summary
v2.0 port of #108: keep pick shifts, and default
score and ID for new picks.
- The two commits of #108 are cherry-picked unchanged; they apply
cleanly to `v2.0`.
- One extra commit extends the v2.0 test harness: `tests/conftest.py`
replaces the bundle's modules with stubs, and the tool now imports the
new pick helpers from `misc.pickops`, so the stub provides them.

The filament / instance PR for v2.0
(#112) is stacked on this
branch, as the main-branch one is stacked on #108.

## Testing
- `pytest tests -m "not chimerax"` on this branch alone: 33 passed,
including the new `test_pickops.py`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
uermel pushed a commit that referenced this pull request Oct 6, 2026
🤖 I have created a release *beep* *boop*
---


##
[2.0.0-alpha.5](chimerax-copick-v2.0.0-alpha.4...chimerax-copick-v2.0.0-alpha.5)
(2026-10-06)


### ✨ Features

* filaments, instance and panoptic segmentations, Copick Edit toolbar
and Annotate window (v2.0)
([#112](#112))
([f463801](f463801))


### 🐞 Bug Fixes

* keep pick shifts, and default score and id for new picks (v2.0)
([#110](#110))
([b53ba98](b53ba98))

---
Merging this PR will publish a chimerax-copick alpha GitHub prerelease.
It will not publish to the ChimeraX Toolshed.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant