A Python-based toolkit for quantitative 3D microglia morphology analysis
Pycroglia is a modern, open-source port of CellSelect-3DMorph, a MATLAB-based tool originally designed to isolate and analyze cell morphology from 3D fluorescence microscopy images. By reconstructing individual cells voxel by voxel, Pycroglia enables researchers to extract quantitative morphological descriptors such as cell volume, territorial volume, ramification index, branch length, number of branches, and endpoints, among others. It builds upon the logic of the original MATLAB scripts but introduces a robust and extensible Python architecture, supporting both GUI and library modes for interactive and automated workflows.
Pycroglia is available on PyPI
and can be installed or executed using
uv or the standard pip tool.
- uv (Recommended):
- Python 3.10 or later
You can install Pycroglia using pip directly from PyPI:
pip install pycrogliaand to run it
pycrogliaIf you prefer to use uv, which provides faster and isolated package management:
uv pip install pycrogliaand to run it
pycrogliaYou can run Pycroglia without installing it globally, using uvx:
uvx pycrogliaThis automatically downloads and runs the latest released version from PyPI in an isolated environment.
You can also specify a particular version:
uvx pycroglia==0.0.2If you cloned the repository and want to run it locally:
git clone https://github.com/CGK-Laboratory/pycroglia/pycroglia.git
cd pycroglia
uv run main.pyand for running the test suite
uv run pytestIf you want to work within a Jupyter Notebook, launch a notebook server connected to the project’s virtual environment:
uv run --with jupyter jupyter labIf you are interested in contributing to the project follow the following guidelines CONTRIBUTING
