Developer Documentation

Developer Documentation

License and Attribution Notice
MultiCellPose includes and modifies components from Cellpose.
Original copyright © 2020 Howard Hughes Medical Institute.
Original contributors include Marius Pachitariu and Carsen Stringer.
Distributed under the BSD 3-Clause License.
This project is an independent derivative work and is not endorsed by HHMI or the original contributors.
Full license text: MultiCellPose License

Image format loader guide

To add a new image format, implement a custom ImageReader and register it in cellpose/io.py. The GUI and services call the reader through the shared interface, so the app stays format-agnostic.

Requirements:

  • Provide read(...) and iter_frames(...).
  • If your format supports random access, implement read_frame(...) and get_series_time_info(...) for fast navigation.
  • Populate ImageMeta with accurate axes, shape, and sizes when possible.
  • Return channel-last arrays (YXC) for multi-channel 2D images.
  • Use frame_id values like S0, S0_T1, or T3 for series/time indexing.

Implementation steps:

  1. Add a reader class in cellpose/io.py (see _Nd2Reader and _LifReader).
  2. Implement extensions for your file suffixes.
  3. Register it with register_reader(...).
  4. If your format can be large, implement read_frame(...) and get_series_time_info(...) to avoid loading the full file.

Testing:

  • Add/extend tests in tests/test_io_*.py.
  • Validate that arrow-key navigation works for multi-frame files.

Custom plugin guide

Plugins live under guv_app/plugins and follow a standard interface. The Analyzer discovers and registers them at startup.

Requirements:

  • Implement the base interface in guv_app/plugins/interface.py.
  • Provide a unique name, optional config schema, and a run(...) method.
  • Keep plugins pure: do not mutate GUI state directly. Return results to the controller via the plugin interface.

Implementation steps:

  1. Create a new plugin module in guv_app/plugins/.
  2. Inherit from the plugin base class and implement required methods.
  3. If configuration is needed, add a config UI via guv_app/views/dialogs/plugin_config_dialog.py.
  4. Ensure results are serializable for CSV export.

Testing:

  • Add a unit test in guv_app/tests/ using existing plugin tests as templates.
  • Run the Analyzer and verify the plugin appears in the dropdown and produces output.