https://github.com/ilastik/ilastik-napari
ilastik plugin for napari
https://github.com/ilastik/ilastik-napari
ilastik napari-plugin
Last synced: 7 days ago
JSON representation
ilastik plugin for napari
- Host: GitHub
- URL: https://github.com/ilastik/ilastik-napari
- Owner: ilastik
- License: mit
- Created: 2021-04-29T14:40:18.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-17T11:28:37.000Z (about 1 year ago)
- Last Synced: 2024-11-15T06:33:04.618Z (6 months ago)
- Topics: ilastik, napari-plugin
- Language: Python
- Homepage:
- Size: 2.58 MB
- Stars: 13
- Watchers: 19
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ilastik-napari
[Napari][napari] plugin for interactive pixel classification.
Designed to be similar to the pixel classification workflow in [classic ilastik][ilastik].## Installation
This plugin requires you to use a _conda_ environment. The environment manager conda comes in a few different forms.
If you haven't used conda before, you can find more information in the [conda user guide][conda-user-guide].
You can use whichever variant you prefer, as the resulting environment should be the same, but we recommend the [_mambaforge_][mambaforge] variant as it is usually the fastest.
When using mambaforge, the `mamba` command usually replaces the `conda` command one would otherwise use.Once you have installed mambaforge, set up a conda environment with napari and the _fastfilters_ package, and then use pip to install _ilastik-napari_:
```shell
mamba create -y -c ilastik-forge -c conda-forge -n my-napari-env napari fastfilters
mamba activate my-napari-env
pip install ilastik-napari
```Finally, run napari:
```shell
napari
```
That's it! You should be able to find the ilastik-napari plugin in the Plugins menu.If you prefer to __install napari using pip__ instead of conda:
Make sure to install `napari[all]`.
Unless you want to [choose a PyQt implementation other than _PyQt5_][napari-pyqt], in which case you should leave out the `[all]` extra.## Usage
As a prerequisite, make sure you understand the [napari basics][napari-quickstart].
1. Open your image, or use a sample in _File - Open Sample_.

2. Activate the plugin in the _Plugins_ menu.

3. In _layer list_, create a new _Labels_ layer.

4. In _layers control_, switch to the _paint_ action.

5. Draw your background labels.

6. Switch to a new label.

7. Draw your foreground labels.

8. Select output types you need, and click _Run_.

9. The plugin will create one layer for each output type, which you save as normal napari layers.

## Development
Create a development environment:
```
mamba create -y -n ilastik-napari-dev -c ilastik-forge fastfilters setuptools-scm conda-build anaconda-client
conda activate napari-ilastik-dev
pip install -e .
```Build conda package:
```
conda activate napari-ilastik-dev
mamba build -c ilastik-forge conda-recipe
anaconda upload /path/to/the/new/package.tar.bz2
```Build wheel and sdist packages:
```
conda activate napari-ilastik-dev
pip install build twine
python -m build
python -m twine upload --repository testpypi dist/*
```[napari]: https://napari.org/
[ilastik]: https://www.ilastik.org/
[conda-user-guide]: https://docs.conda.io/projects/conda/en/latest/user-guide/index.html
[miniconda]: https://docs.conda.io/en/latest/miniconda.html
[mambaforge]: https://github.com/conda-forge/miniforge#mambaforge
[napari-quickstart]: https://napari.org/tutorials/fundamentals/quick_start.html
[napari-pyqt]: https://napari.org/stable/plugins/best_practices.html#don-t-include-pyside2-or-pyqt5-in-your-plugin-s-dependencies