Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
22a4e1f
refactor: simplify modular architecture, keep only MVC views/models/v…
keejkrej May 24, 2026
b6744f7
123
keejkrej May 24, 2026
31bf27e
refactor: simplify modular architecture by consolidating all thin MVV…
keejkrej May 24, 2026
57c65d9
chore: restore cellacdc/gui.py to main branch
keejkrej May 24, 2026
c540a1b
refactor: remove cellacdc/domain folder
keejkrej May 24, 2026
552c2e7
refactor: rename mixins to strip _view and _viewmodel suffixes
keejkrej May 24, 2026
d60abca
refactor: modularize mixins as clean class mixins, fix compilation er…
keejkrej May 24, 2026
58534be
mixins
keejkrej May 24, 2026
7e26770
refactor: extract guiWin into mixins and slim gui.py to shell
keejkrej May 24, 2026
fd38312
refactor: move whitelist and combine GUI bases into mixins
keejkrej May 24, 2026
ff30e07
refactor: wire mixin dependency graph with upstream parent inheritance
keejkrej May 24, 2026
252d950
ruff format
keejkrej May 24, 2026
a9e52f5
Add composable GUI variants for viewer and segmentation workflows.
keejkrej May 24, 2026
8514bd5
Revert "Add composable GUI variants for viewer and segmentation workf…
keejkrej May 24, 2026
5b798db
Extract reusable GUI widgets into cellacdc/components modules.
keejkrej May 24, 2026
f4b9259
Add LangGraph-style workflow graphs for segm, measurements, and INI r…
keejkrej May 24, 2026
673f317
Split god files into feature packages with compatibility shims.
keejkrej May 24, 2026
03ed5c3
Rename myutils to utils and batch utilities package to tools.
keejkrej May 24, 2026
1486bab
Split widgets into canvas, controls, and toolbars subpackages.
keejkrej May 24, 2026
e54244c
Add napari-style script API to launch guiWin from Python.
keejkrej May 24, 2026
b701e96
Add ExperimentData for array and path-based script API loading.
keejkrej May 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ cellacdc/metrics/*
!cellacdc/metrics/CV.py
!cellacdc/metrics/combine_metrics_example.py
!cellacdc/metrics/channel_indipendent_metric_example.py
cellacdc/models/beno
cellacdc/models/Simone_cellpose
cellacdc/segmenters/beno
cellacdc/segmenters/Simone_cellpose
cellacdc/timon_tests
cellacdc/models/test_segm_model
cellacdc/segmenters/test_segm_model
cellacdc/trackers/example
cellacdc/test_qt_app.py
cellacdc/test_qthread.py
Expand Down Expand Up @@ -98,7 +98,7 @@ UserManual/*
# Ignore models folder but keep the folder with placeholder.txt dummy file
models/*
!models/placeholder.txt
cellacdc/models/*/model/*
cellacdc/segmenters/*/model/*

# Hide placeholder.txt dummy file (probably works only on Linux)
!models/.placeholder.txt
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ prune publications
prine notebooks
prune FijiMacros

exclude cellacdc/models/YeastMate/detectron2
exclude cellacdc/models/YeastMate/pycocotools
exclude cellacdc/segmenters/YeastMate/detectron2
exclude cellacdc/segmenters/YeastMate/pycocotools

exclude requirements.txt
exclude not_installed_requirements.txt
Expand Down
51 changes: 51 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,57 @@ Alternatively, you can also use **Cite this repository** button on the right
ribbon of the GitHub page.


Using Cell-ACDC from a script
=============================

Cell-ACDC can be launched from a Python script or notebook with a napari-style
API. Install the GUI dependencies first:

.. code-block:: bash

pip install "cellacdc[gui]"

Build a unified :class:`ExperimentData` object from arrays or from a path, then
pass it to the viewer:

.. code-block:: python

import cellacdc
import numpy as np

image = np.zeros((100, 128, 128), dtype=np.uint16) # T, Y, X
data = cellacdc.ExperimentData.from_arrays(image, axes="tyx")
viewer = cellacdc.Viewer(data)
cellacdc.run()

The convenience helper mirrors ``napari.imshow`` and returns both the viewer
and the data object:

.. code-block:: python

data = cellacdc.ExperimentData.from_arrays(image, axes="tyx")
viewer, data = cellacdc.imshow(data)
cellacdc.run()

Path-based loading:

.. code-block:: python

data = cellacdc.ExperimentData.from_path("/path/to/experiment")
viewer, data = cellacdc.imshow(data)
cellacdc.run()

Optional ``labels`` can be supplied when creating data from arrays. When no
``workspace`` path is given, Cell-ACDC uses a temporary folder so segmentation
outputs can still be saved from the GUI.

In a Jupyter notebook with ``%gui qt``, ``cellacdc.run()`` is a no-op because
IPython already runs the Qt event loop.

For view-only inspection of arrays without segmentation, use
``cellacdc.plot.imshow`` instead.


**IMPORTANT**: when citing Cell-ACDC make sure to also cite the paper of the
segmentation models and trackers you used!
See `here <https://cell-acdc.readthedocs.io/en/latest/citation.html>`__
Expand Down
12 changes: 11 additions & 1 deletion cellacdc/QtScoped.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,72 @@

from qtpy.QtWidgets import QAbstractSlider, QStyle


def SliderNoAction():
if PYQT6:
return QAbstractSlider.SliderAction.SliderNoAction.value
else:
return QAbstractSlider.SliderAction.SliderNoAction


def SliderSingleStepAdd():
if PYQT6:
return QAbstractSlider.SliderAction.SliderSingleStepAdd.value
else:
return QAbstractSlider.SliderAction.SliderSingleStepAdd


def SliderSingleStepSub():
if PYQT6:
return QAbstractSlider.SliderAction.SliderSingleStepSub.value
else:
return QAbstractSlider.SliderAction.SliderSingleStepSub


def SliderPageStepAdd():
if PYQT6:
return QAbstractSlider.SliderAction.SliderPageStepAdd.value
else:
return QAbstractSlider.SliderAction.SliderPageStepAdd


def SliderPageStepSub():
if PYQT6:
return QAbstractSlider.SliderAction.SliderPageStepAdd.value
else:
return QAbstractSlider.SliderAction.SliderPageStepAdd


def SliderToMinimum():
if PYQT6:
return QAbstractSlider.SliderAction.SliderPageStepAdd.value
else:
return QAbstractSlider.SliderAction.SliderPageStepAdd


def SliderToMaximum():
if PYQT6:
return QAbstractSlider.SliderAction.SliderPageStepAdd.value
else:
return QAbstractSlider.SliderAction.SliderPageStepAdd


def SliderMove():
if PYQT6:
return QAbstractSlider.SliderAction.SliderMove.value
else:
return QAbstractSlider.SliderAction.SliderMove


def QStyleCC_ScrollBar():
if PYQT6:
return QStyle.ComplexControl.CC_ScrollBar
else:
return QStyle.CC_ScrollBar


def QStyleSC_ScrollBarSubLine():
if PYQT6:
return QStyle.SubControl.SC_ScrollBarSubLine
else:
return QStyle.SC_ScrollBarSubLine
return QStyle.SC_ScrollBarSubLine
Loading
Loading