Metadata-Version: 2.4
Name: napari-reco-plugin
Version: 0.1.2
Summary: Napari plugin for GPU-accelerated tomographic reconstruction with Paganin phase retrieval
Author-email: Clément Capdeville <clement.capdeville@univ-lyon1.fr>
License: MIT License
        
        Copyright (c) 2024 Clément Capdeville
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Bug Tracker, https://github.com/Clementcmoi/Reconstruction-napari-plugin/issues
Project-URL: Source Code, https://github.com/Clementcmoi/Reconstruction-napari-plugin
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: napari
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: h5py
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: tqdm
Requires-Dist: scikit-image
Requires-Dist: matplotlib>=3.5
Requires-Dist: dask[array]
Requires-Dist: qtpy
Requires-Dist: napari>=0.4.18
Provides-Extra: testing
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-qt; extra == "testing"
Requires-Dist: napari[pyqt5]; extra == "testing"
Dynamic: license-file

# Reconstruction Napari Plugin

A Napari plugin for tomographic reconstruction using the [ASTRA Toolbox](https://www.astra-toolbox.com/), with optional Paganin phase retrieval filter for phase-contrast data.

Supported reconstruction algorithms: **FBP**, **BP**, **SIRT**, **SART**, **CGLS** — all available in CPU or GPU (CUDA) mode.

## Installation

### Option 1 — Install from Napari Hub (recommended)

Once published, the plugin can be installed directly from the Napari plugin manager:

1. Open **Napari**
2. Go to **Plugins > Install/Uninstall Plugins**
3. Search for **"napari-reco-plugin"**
4. Click **Install**

Alternatively, install via pip:

```bash
pip install napari-reco-plugin
```

---

### Option 2 — Manual installation (development)

#### 1. Create and activate a conda environment

```bash
conda create -n napari-env python=3.12
conda activate napari-env
```

#### 2. Install main dependencies

```bash
conda install -c conda-forge napari pyqt
conda install -c astra-toolbox -c nvidia astra-toolbox

# Ensure compatibility with ASTRA
pip install numpy==1.26.4

# Install CuPy depending on your CUDA version
pip install cupy-cuda12x  # or cupy-cuda11x
```

#### 3. Clone the repository

```bash
git clone https://github.com/Clementcmoi/Reconstruction-napari-plugin.git
cd Reconstruction-napari-plugin
```

#### 4. Install the plugin

```bash
pip install -e .
```

---

## Requirements

### Core

* Python ≥ 3.9
* Napari
* ASTRA Toolbox

### Optional (for GPU acceleration)

* CUDA Toolkit
* CuPy


> ⚠️ GPU dependencies are not installed automatically. You must install them manually according to your system configuration.

---

## Usage

Start Napari:

```bash
napari
```

Then open the plugin via:

```
Plugins > Reconstruction Plugin
```

Available tools:

* **Reconstruction**
* **Multi Paganin**

---

## Launchers Templates

Template scripts for launching Napari with the correct environment are available in the `launchers/` folder.

### Usage

1. Copy a `.bat` file from `launchers/`
2. Edit:

   * `<path_to_conda>` → your Anaconda/Miniconda path
   * `<your_napari_env>` → your environment name
3. Double-click to launch

### Desktop shortcut (optional)

* Right-click `.bat` → **Send to Desktop**
* (Optional) Change icon via shortcut properties

---

## Project Structure

* Plugin source code: `src/reco_plugin/`
* Plugin manifest: `src/reco_plugin/napari.yaml`

---

## License

This project is licensed under the GNU General Public License v3.0 (GPL-3.0), in compliance with the [ASTRA Toolbox license](https://www.astra-toolbox.com/).
