Metadata-Version: 2.4
Name: webknossos
Version: 2.4.4
Summary: Python API for working with WEBKNOSSOS datasets, annotations, and for WEBKNOSSOS server interaction.
Author-email: scalable minds <hello@scalableminds.com>
License: AGPL-3.0
Project-URL: Homepage, https://docs.webknossos.org/webknossos-py
Project-URL: Repository, https://github.com/scalableminds/webknossos-libs
Project-URL: Documentation, https://docs.webknossos.org
Project-URL: Changelog, https://github.com/scalableminds/webknossos-libs/blob/master/webknossos/Changelog.md
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Healthcare Industry
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Topic :: Education
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
Requires-Dist: aiohttp~=3.10.5
Requires-Dist: attrs>=22.0.0
Requires-Dist: boltons>=21.0.0
Requires-Dist: cattrs>=22.0.0
Requires-Dist: certifi>=2023
Requires-Dist: click<8.2.0
Requires-Dist: cluster-tools==2.4.4
Requires-Dist: httpx~=0.27.0
Requires-Dist: loxun~=2.0.0
Requires-Dist: natsort~=8.4.0
Requires-Dist: networkx~=3.2.1
Requires-Dist: numpy<3.0.0,>=2.0.0
Requires-Dist: pims~=0.7.0
Requires-Dist: psutil~=6.0.0
Requires-Dist: python-dateutil~=2.8.0
Requires-Dist: python-dotenv~=1.0.1
Requires-Dist: rich~=13.8.0
Requires-Dist: scipy>=1.13
Requires-Dist: tensorstore~=0.1.74
Requires-Dist: typer~=0.12.5
Requires-Dist: typing-extensions~=4.0
Requires-Dist: universal-pathlib~=0.2
Requires-Dist: wkw==1.1.24
Requires-Dist: zipp~=3.5.0
Provides-Extra: tifffile
Requires-Dist: tifffile<2025.5.21,>=2024.8.24; extra == "tifffile"
Provides-Extra: imagecodecs
Requires-Dist: imagecodecs>=2021.11.20; extra == "imagecodecs"
Provides-Extra: bioformats
Requires-Dist: JPype1~=1.5.0; extra == "bioformats"
Provides-Extra: czi
Requires-Dist: pylibCZIrw==5.0.0; extra == "czi"
Provides-Extra: examples
Requires-Dist: fastremap~=1.15.0; extra == "examples"
Requires-Dist: pandas~=2.2.0; extra == "examples"
Requires-Dist: pooch~=1.5.2; extra == "examples"
Requires-Dist: s3fs>=2023.9.0; extra == "examples"
Requires-Dist: tabulate>=0.9.0; extra == "examples"
Requires-Dist: scikit-learn~=1.5.1; extra == "examples"
Requires-Dist: scikit-image~=0.25.0; extra == "examples"
Provides-Extra: all
Requires-Dist: webknossos[tifffile]; extra == "all"
Requires-Dist: webknossos[imagecodecs]; extra == "all"
Requires-Dist: webknossos[bioformats]; extra == "all"
Requires-Dist: webknossos[examples]; extra == "all"

# WEBKNOSSOS Python Library
[![PyPI version](https://img.shields.io/pypi/v/webknossos)](https://pypi.python.org/pypi/webknossos)
[![Supported Python Versions](https://img.shields.io/pypi/pyversions/webknossos.svg)](https://pypi.python.org/pypi/webknossos)
[![Build Status](https://img.shields.io/github/actions/workflow/status/scalableminds/webknossos-libs/.github/workflows/ci.yml?branch=master)](https://github.com/scalableminds/webknossos-libs/actions?query=workflow%3A%22CI%22)
[![Documentation](https://img.shields.io/badge/docs-passing-brightgreen.svg)](https://docs.webknossos.org/webknossos-py)
[![Code Style](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://docs.astral.sh/ruff/)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)

Python API for working with [WEBKNOSSOS](https://webknossos.org) datasets, annotations, and for WEBKNOSSOS server interaction.

For the WEBKNOSSOS server, please refer to https://github.com/scalableminds/webknossos.

## Features

- easy-to-use dataset API for reading/writing/editing raw 2D/3D image data and volume annotations/segmentation in WEBKNOSSOS-compatiböe format
    - convert from other formats, e.g. tiff stacks
    - add/remove layers
    - update metadata (`datasource-properties.json`) 
    - up/downsample layers
    - compress layers 
    - add/remove magnifications
- Command line tool (CLI) for manipulating and creating WEBKNOSSOS datasets
- manipulation of WEBKNOSSOS skeleton annotations (*.nml) as Python objects
    - access to nodes, comments, trees, bounding boxes, metadata, etc.
    - create new skeleton annotation from Graph structures or Python objects
- interaction, connection & scripting with your WEBKNOSSOS instance over the REST API
    - list datastets, annotations, and tasks
    - up- & downloading annotations and datasets

Please refer to [the documentation for further instructions](https://docs.webknossos.org/webknossos-py).

## Installation
The `webknossos` package requires at least Python 3.10.

You can install it from [pypi](https://pypi.org/project/webknossos/), e.g. via pip:

```bash
pip install webknossos
```

To install `webknossos` with the dependencies for all examples, support for more file types, and BioFormats conversions, run: `pip install webknossos[all]`.

For working with Zeiss CZI microscopy data use `pip install --extra-index-url https://pypi.scm.io/simple/ webknossos[czi]`.

By default `webknossos` can only distribute any computations through multiprocessing or Slurm. For Kubernetes or Dask install these additional dependencies:

```bash
pip install cluster_tools[kubernetes]
pip install cluster_tools[dask]
```

## Examples
See the [examples folder](examples) or the [the documentation](https://docs.webknossos.org/webknossos-py).
The dependencies for the examples are not installed by default. Use `pip install webknossos[examples]` to install them.

## Contributions & Development
Please see the [respective documentation page](https://docs.webknossos.org/webknossos-py/CONTRIBUTING.html).

## License
[AGPLv3](https://www.gnu.org/licenses/agpl-3.0.html)
Copyright [scalable minds](https://scalableminds.com)

## Test Data Credits
Excerpts for testing purposes have been sampled from:

* Dow Jacobo Hossain Siletti Hudspeth (2018). **Connectomics of the zebrafish's lateral-line neuromast reveals wiring and miswiring in a simple microcircuit.** eLife. [DOI:10.7554/eLife.33988](https://elifesciences.org/articles/33988)
* Zheng Lauritzen Perlman Robinson Nichols Milkie Torrens Price Fisher Sharifi Calle-Schuler Kmecova Ali Karsh Trautman Bogovic Hanslovsky Jefferis Kazhdan Khairy Saalfeld Fetter Bock (2018). **A Complete Electron Microscopy Volume of the Brain of Adult Drosophila melanogaster.** Cell. [DOI:10.1016/j.cell.2018.06.019](https://www.cell.com/cell/fulltext/S0092-8674(18)30787-6). License: [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/)
* Bosch Ackels Pacureanu et al (2022). **Functional and multiscale 3D structural investigation of brain tissue through correlative in vivo physiology, synchrotron microtomography and volume electron microscopy.** Nature Communications. [DOI:10.1038/s41467-022-30199-6](https://www.nature.com/articles/s41467-022-30199-6)
* Hanke, M., Baumgartner, F. J., Ibe, P., Kaule, F. R., Pollmann, S., Speck, O., Zinke, W. & Stadler, J. (2014). **A high-resolution 7-Tesla fMRI dataset from complex natural stimulation with an audio movie. Scientific Data, 1:140003.** [DOI:10.1038/sdata.2014.3](http://www.nature.com/articles/sdata20143)
* Sample OME-TIFF files (c) by the OME Consortium [https://downloads.openmicroscopy.org/images/OME-TIFF/2016-06/bioformats-artificial/](https://downloads.openmicroscopy.org/images/OME-TIFF/2016-06/bioformats-artificial/)
