Metadata-Version: 2.4
Name: ca2roi
Version: 0.1.0
Summary: Calcium imaging automatic ROI selection and analysis tool
Author-email: Seung Hyun Klm <skim0119@gmail.com>
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.10
Requires-Dist: click
Requires-Dist: fastapi
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: opencv-python
Requires-Dist: pandas
Requires-Dist: pillow
Requires-Dist: python-multipart>=0.0.20
Requires-Dist: scikit-image
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: tqdm>=4.67.1
Requires-Dist: uvicorn[standard]
Provides-Extra: dev
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# MiV-Ca2 Intensity Analysis Toolbox

A CLI tool for calcium imaging video post-processing: bleaching analysis, ROI selection, and trace extraction.

The package is developed to provide light-weight and easy-to-use tools for calcium imaging video analysis.
Data can be saved in csv format for further analysis.
(Please note in [issue](https://github.com/skim0119/CA2-Sandbox/issues) if you have desired format other than csv).

![MiV-Ca2 Intensity Analysis Toolbox](assets-readme/v051.png)

## Easy installation

`pip install ca2roi`

> Recommend `python3.10+`.

## Easy launch

`ca2roi-gui`

## CLI usage (for batch processing)

```
ca2roi <video_path> [--workspace <output_folder>]
```

- `video_path`: Path to the calcium imaging video (e.g., AVI file)
- `--workspace`: Output directory (default: `result`)

The tool will:
- Compute and save bleaching info
- Compute and overlay fluctuation map
- Allow interactive ROI selection (or load existing ROIs)
- Save ROI traces, ROI images, and ROI locations

## Python-package ca2roi

```py
import ca2roi
```

## Project Structure

Project uses `Python3` as a main backend language. It uses `FastAPI` to connect frontend and backend.
Frontend is developed with `Vue3` and `TypeScript`.

The tool is not yet supported to be launched in a server.

All the core source code is in `src` folder.

- `ca2roi`: `Python` package for analysis functions.
- `frontend`: `Vue3` frontend for GUI development
- `commands`: CLI command scripts, written with `Python` with `click`.

## Contribution / Development

`Makefile` includes useful commands for development.

## Support

This project is mainly developed by [@skim0119](https://github.com/skim0119) as part of the support for [Mind-in-vitro project](https://mattia-lab.com/).
