{"name":"napari-compressed-labels-io","display_name":"napari-compressed-labels-io","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-compressed-labels-io.labels_to_zarr","title":"labels_to_zarr","python_name":"napari_compressed_labels_io._writer:labels_to_zarr","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":[{"command":"napari-compressed-labels-io.get_zarr_labels","filename_patterns":["*"],"accepts_directories":true},{"command":"napari-compressed-labels-io.get_label_image_stack","filename_patterns":["*"],"accepts_directories":true}],"writers":[{"command":"napari-compressed-labels-io.labels_to_zarr","layer_types":["labels"],"filename_extensions":[],"display_name":"labels"}],"widgets":null,"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-compressed-labels-io","version":"0.0.2","dynamic":null,"platform":["UNKNOWN"],"supported_platform":null,"summary":"Plugin exploring different options for reading and writing compressed and portable labels layers in napari.","description":"# napari-compressed-labels-io\n\n[![License](https://img.shields.io/pypi/l/napari-compressed-labels-io.svg?color=green)](https://github.com/DragaDoncila/napari-compressed-labels-io/raw/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-compressed-labels-io.svg?color=green)](https://pypi.org/project/napari-compressed-labels-io)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-compressed-labels-io.svg?color=green)](https://python.org)\n[![tests](https://github.com/DragaDoncila/napari-compressed-labels-io/workflows/tests/badge.svg)](https://github.com/DragaDoncila/napari-compressed-labels-io/actions)\n[![codecov](https://codecov.io/gh/DragaDoncila/napari-compressed-labels-io/branch/master/graph/badge.svg)](https://codecov.io/gh/DragaDoncila/napari-compressed-labels-io)\n\n\n## Description\n\nThis napari plugin provides readers and writers for labels and their corresponding image layers into zarr format for compression and portability. Each reader/writer pair supports a round trip of saving and loading image and labels layers.\n\n## Writers\nTwo writers are provided by this plugin, each with its own reader.\n\n### `labels_to_zarr`\nThis writer is an alternative to napari's default label writer and will write an entire labels layer, regardless of its dimensions, into a single zarr file. This writer provides the best compression option and its associated reader `get_zarr_labels` will read the layer back into napari.\n\nThis writer will be called when the user tries to save a selected labels layer into a path ending with .zarr\n\n### `label_image_pairs_to_zarr`\nThis writer will save 3-dimensional labels and image layers from the viewer into individual zarrs for portability and convenience. For example, given one labels and one image layer of the shape (10, 200, 200) saved to my_stacks.zarr, 10 subdirectories will be created, each with two zarrs inside of shape (200, 200) corresponding to the labels and image layer.\n\nThis writer allows users to load stacks of associated images, label them, and then quickly save these stacks out into individual slices for easy loading, viewing and interaction. Its associated reader supports the loading into napari of the whole stack, all layers at one slice of the stack, and an individual layer of a given slice of the stack.\n\nThe writer currently supports only 3D layers, with the exception of RGB images of the form (z, y, x, 3), which are also supported.\n\n\n## Readers\n\nTwo readers are provided by this plugin for loading the formats saved by each writer. These are detailed below.\n\n### `get_zarr_labels`\n\nThis reader will open any zarr file with a .zarray at the top level in `path` as a labels layer. This is to be used in conjunction with `labels_to_zarr`.\n\n\n### `get_label_image_stack`\n\nThis reader will open any zarr containing a `.zmeta` file as layers into napari. Depending on what is being opened, the reader will either load a full stack of labels and images, one slice of a stack of images and labels or an individual layer within a slice. This is to be used in conjunction with `label_image_pairs_to_zarr`.\n\n## .zmeta\n\nThis metadata file contains information about the layer types in the stack and in each individual slice, as well as the number of image/label slices. This allows the reader plugin to load the correct layer types with appropriate names both at a stack level and at the individual slice level.\n\n### An example .zmeta specification\n\n```json\n{\n \"meta\": {\n \"stack\": 7 # number of slices in the entire stack (1 for an individual slice, 0 for a layer within a slice)\n },\n \"data\": {\n \"image\" : [ # all image layers must be listed here\n {\n \"name\": \"leaves_example_data\",\n \"shape\": [790, 790, 3],\n \"dtype\": \"uint8\",\n \"rgb\": true # where rgb is false the image will be loaded as greyscale (colormap support has not yet been implemented)\n }\n ],\n \"labels\" : [\n {\n \"name\": \"oak\",\n \"shape\": [790, 790],\n \"dtype\": \"int64\"\n },\n {\n \"name\": \"bg\",\n \"shape\": [790, 790],\n \"dtype\": \"int64\"\n }\n ]\n }\n}\n\n```\n\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using with [@napari]'s [cookiecutter-napari-plugin] template.\n\n\n\n## Installation\n\nYou can install `napari-compressed-labels-io` via [pip]:\n\n pip install napari-compressed-labels-io\n\n## Contributing\n\nContributions are very welcome. Tests can be run with [tox], please ensure\nthe coverage at least stays the same before you submit a pull request.\n\n## License\n\nDistributed under the terms of the [MIT] license,\n\"napari-compressed-labels-io\" is free and open source software\n\n## Issues\n\nIf you encounter any problems, please [file an issue] along with a detailed description.\n\n[napari]: https://github.com/napari/napari\n[Cookiecutter]: https://github.com/audreyr/cookiecutter\n[@napari]: https://github.com/napari\n[MIT]: http://opensource.org/licenses/MIT\n[BSD-3]: http://opensource.org/licenses/BSD-3-Clause\n[GNU GPL v3.0]: http://www.gnu.org/licenses/gpl-3.0.txt\n[GNU LGPL v3.0]: http://www.gnu.org/licenses/lgpl-3.0.txt\n[Apache Software License 2.0]: http://www.apache.org/licenses/LICENSE-2.0\n[Mozilla Public License 2.0]: https://www.mozilla.org/media/MPL/2.0/index.txt\n[cookiecutter-napari-plugin]: https://github.com/napari/cookiecutter-napari-plugin\n[file an issue]: https://github.com/DragaDoncila/napari-compressed-labels-io/issues\n[napari]: https://github.com/napari/napari\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n\n\n","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/DragaDoncila/napari-compressed-labels-io","download_url":null,"author":"Draga Doncila","author_email":"ddoncila@gmail.com","maintainer":null,"maintainer_email":null,"license":"MIT","classifier":["Development Status :: 4 - Beta","Intended Audience :: Developers","Framework :: napari","Topic :: Software Development :: Testing","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3.7","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Operating System :: OS Independent","License :: OSI Approved :: MIT License"],"requires_dist":["napari-plugin-engine (>=0.1.4)","numpy","zarr","dask[complete]"],"requires_python":">=3.6","requires_external":null,"project_url":null,"provides_extra":null,"provides_dist":null,"obsoletes_dist":null},"npe1_shim":true}