{"name":"napari-nD-annotator","display_name":"Annotation Toolbox","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-nD-annotator.annotator_widget","title":"Annotation Toolbox","python_name":"napari_nd_annotator:AnnotatorWidget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-nD-annotator.interpolation_widget","title":"Slice Interpolation","python_name":"napari_nd_annotator:InterpolationWidget","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-nD-annotator.object_list_widget","title":"Object List","python_name":"napari_nd_annotator:ListWidgetBB","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-nD-annotator.annotator_widget","display_name":"Annotation Toolbox","autogenerate":false},{"command":"napari-nD-annotator.interpolation_widget","display_name":"Slice Interpolator","autogenerate":false},{"command":"napari-nD-annotator.object_list_widget","display_name":"Object List","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-nD-annotator","version":"0.2.3","dynamic":null,"platform":null,"supported_platform":null,"summary":"A toolbox for annotating objects one by one in nD","description":"# napari-nD-annotator\n\n[![License BSD-3](https://img.shields.io/pypi/l/napari-nD-annotator.svg?color=green)](https://github.com/bauerdavid/napari-nD-annotator/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-nD-annotator.svg?color=green)](https://pypi.org/project/napari-nD-annotator)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-nD-annotator.svg?color=green)](https://python.org)\n[![tests](https://github.com/bauerdavid/napari-nD-annotator/workflows/tests/badge.svg)](https://github.com/bauerdavid/napari-nD-annotator/actions)\n[![codecov](https://codecov.io/gh/bauerdavid/napari-nD-annotator/branch/main/graph/badge.svg)](https://codecov.io/gh/bauerdavid/napari-nD-annotator)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-nD-annotator)](https://napari-hub.org/plugins/napari-nD-annotator)\n\n**A toolbox for annotating objects one by one in nD.**\n\nThis plugin contains some tools to make 2D/3D (and technically any dimensional) annotation easier.\nMain features:\n * auto-filling labels\n * label slice interpolation (geometric mean, RPSV representation)\n * minimal contour segmentation\n\nIf the [napari-bbox] plugin is also installed (see [Installation](#installation)), you can also\n * list objects annotated with bounding boxes \n * visualize selected objects from different projections\n\n----------------------------------\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n\n\n## Installation\n\nYou can install `napari-nD-annotator` via [pip]:\n\n pip install napari-nD-annotator\n\nThe plugin is also available in [napari-hub], to install it directly from napari, please refer to\n[plugin installation instructions] at the official [napari] website.\n\n\n### Optional packages\nThere are some functionalities which require additional Python packages.\n\n#### Bounding boxes\nThe bounding box and object list functionality requires the [napari-bbox] Python package.\nIf you want to use these features, install [napari-bbox] separately either using [pip] or directly from napari.\nYou can also install it together with this plugin:\n```\npip install napari-nD-annotator[bbox]\n```\n> [!WARNING]\n> The [napari-bbox] plugin currently works only with `napari<=0.4.17`. Do not install it with newer versions.\n\n#### Minimal surface\nTo use the minimal surface method, you will need the [minimal-surface] Python package as well. Please install it using [pip]:\n\nSeparately:\n```\npip install minimal-surface\n```\n\nOr bundled with the plugin:\n```\npip install napari-nD-annotator[ms]\n```\n> [!WARNING]\n> The [minimal-surface] package is only available for Windows at the time. We are actively working on bringing it to Linux and Mac systems as well.\n\n#\n\nIf you would like to install all optional packages, use\n```\npip install napari-nD-annotator[all]\n```\n###\nIf any problems occur during installation or while using the plugin, please [file an issue].\n\n## Usage\nYou can start napari with the plugin's widgets already opened as:\n\n napari -w napari-nD-annotator \"Object List\" \"Annotation Toolbox\"\n\n\n### Bounding boxes\nThe main idea is to create bounding boxes around objects we want to annotate, crop them, and annotate them one by one. This has mainly two advantages when visualizing in 3D:\n\n1. We don't have to load the whole data into memory\n2. The surrounding objects won't occlude the annotated ones, making it easier to check the annotation.\n\nBounding boxes can be created from the `Object list` widget. The dimensionality of the bounding box layer will be determined from the image layer. As bounding boxes are created, a small thumbnail will be displayed.\n\nThe proposed pipeline goes as follows:\n\n 1. Create a bounding box layer\n 2. Select data parts using the bounding boxes\n 3. Select an object from the object list\n 4. Annotate the object\n 5. Repeat from 3.\n\n### Slice interpolation\nThe `Interpolation` tab contains tools for estimating missing annotation slices from existing ones. There are multiple options:\n * Geometric: the interpolation will be determined by calculating the average of the corresponding contour points.\n * RPSV: A more sophisticated average contour calculation, see the preprint [here](https://arxiv.org/pdf/1901.02823.pdf).\n * Distance-based: a signed distance transform is applied to the annotations. The missing slices will be filled in using their \nweighted sum.\n\n> **Note**: Geometric and RPSV interpolation works only when there's a single connected mask on each slice. If you want to \n> interpolate disjoint objects (*e.g.* dividing cells), use distance based interpolation instead.\n\n> **Note**: Distance-based interpolation might give bad results if some masks are too far away from each other on the same slice\n> and there's a big offset compared to the other slice used in the interpolation. If you get unsatisfactory results, try\n> annotating more slices (skip less frames).\n\nhttps://user-images.githubusercontent.com/36735863/188876826-1771acee-93ba-4905-982e-bfb459329659.mp4\n\n### Minimal contour\nThis plugin can estimate a minimal contour, which is calculated from a point set on the edges of the object, which are provided by the user. This contour will follow some kind of image feature (pixels with high gradient or high/low intensity).\nFeatures:\n * With a single click a new point can be added to the set. This will also extend the contour with the curve shown in red\n * A double click will close the curve by adding both the red and gray curves to the minimal contour\n * When holding `Shift`, the gray and red highlight will be swapped, so the other curve can be added to the contour\n * With the `Ctrl` button down a straight line can be added instead of the minimal path\n * If the anchor points were misplaced, the last point can be removed by right-clicking, or the whole point set can be cleared by pressing `Esc`\n * The `Param` value at the widget will decide, how strongly should the contour follow edges on the image. Higher value means higher sensitivity to image data, while a lower value will be closer to straight lines.\n * Different features can be used, like image gradient or pixel intensities, and also user-defined features (using Python)\n * the image is accessed as the `image` variable, and the features should be stored in the `features` variable in the small code editor widget\n\nThis functionality can be used by selecting the `Minimal Contour` tab in the `Annotation Toolbox` widget, which will create a new layer called `Anchors`.\n\n> **Warning**: Do not remove the `Anchors` layer!\n\n> **Warning**: Some utility layers appear in the layer list when using the plugin. These are marked with a lock (:lock:) symbol.\n> __Do not remove them or modify their data, as this will most probably break the plugin!__ However, you can change their appearance,\n> *e.g.* their color settings.\n\n#### Intensity-based:\n\nhttps://user-images.githubusercontent.com/36735863/191023482-0dfafb5c-003a-47f6-a21b-8582a4e3930f.mp4\n\n#### Gradient-based:\n\nhttps://user-images.githubusercontent.com/36735863/191024941-f20f63a0-8281-47d2-be22-d1ec34fe1f5d.mp4\n\n#### Custom feature:\n\nhttps://user-images.githubusercontent.com/36735863/191025028-3f807bd2-1f2e-40d2-800b-48af820a7dbe.mp4\n\n### Shortcuts\n\n| Action | Mouse | Keyboard |\n|-----------------------------------------------|---------------------|----------------|\n| Increment selected label | `Shift + Wheel ⬆️` | `E` |\n| Decrement selected label | `Shift + Wheel ⬇️` | `Q` |\n| Previous slice | `Ctrl + Wheel ⬆️`\\* | `A` |\n| Next slice | `Ctrl + Wheel ⬇️`\\* | `D` |\n| Increase paint brush size of labels layer | `Alt + Wheel ⬆️` | `W` |\n| Decrease paint brush size of labels layer | `Alt + Wheel ⬇️` | `S` |\n| Interpolate | - | `Ctrl+I` |\n| Change between 'Anchors' and the labels layer | - | `Ctrl+Tab` |\n| Jump to layer `#i` | - | `Ctrl+'i'`\\*\\* |\n\n> *Built-in functionality of [napari]\n> \n> **`i`: 0-9\n\n> **Note**: you can check the list of available shortcuts by clicking the `?` button in the bottom right corner of the main widget.\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"napari-nD-annotator\" 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[napari-hub]: https://napari-hub.org/\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\n[tox]: https://tox.readthedocs.io/en/latest/\n[pip]: https://pypi.org/project/pip/\n[PyPI]: https://pypi.org/\n[plugin installation instructions]: https://napari.org/plugins/find_and_install_plugin.html\n[file an issue]: https://github.com/bauerdavid/napari-nD-annotator/issues/new/choose\n[napari-bbox]: https://github.com/bauerdavid/napari-bbox\n[minimal-surface]: https://pypi.org/project/minimal-surface\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"David Bauer, Jozsef Molnar, Dominik Hirling","author_email":"dbauer@brc.hu","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 2 - Pre-Alpha","Intended Audience :: Developers","Framework :: napari","Topic :: Software Development :: Testing","Programming Language :: C","Programming Language :: Cython","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: Implementation :: CPython","Operating System :: OS Independent","License :: OSI Approved :: BSD License"],"requires_dist":["numpy","magicgui","qtpy","opencv-python","matplotlib","napari >=0.4.11","scikit-image >=0.19","SimpleITK","napari-bbox ; extra == 'all'","minimal-surface ; extra == 'all'","napari-bbox ; extra == 'bbox'","minimal-surface ; extra == 'ms'","tox ; extra == 'testing'","pytest ; extra == 'testing'","pytest-cov ; extra == 'testing'","pytest-qt ; extra == 'testing'","napari ; extra == 'testing'","pyqt5 ; extra == 'testing'","numpy ; extra == 'testing'"],"requires_python":">=3.8","requires_external":null,"project_url":["Bug Tracker, https://github.com/bauerdavid/napari-nD-annotator/issues","Documentation, https://github.com/bauerdavid/napari-nD-annotator/blob/main/README.md","Source Code, https://github.com/bauerdavid/napari-nD-annotator","User Support, https://github.com/bauerdavid/napari-nD-annotator/issues"],"provides_extra":["all","bbox","ms","testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}