{"name":"guanine-crystal-analysis","display_name":"Guanine Crystal Analysis","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"guanine-crystal-analysis.normalization","title":"normalization","python_name":"guanine_crystal_analysis._widget:normalization","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"guanine-crystal-analysis.segmentation","title":"segmentation","python_name":"guanine_crystal_analysis._widget:segmentation","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"guanine-crystal-analysis.analyze_image","title":"analyze_image","python_name":"guanine_crystal_analysis._widget:analyze_image","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"guanine-crystal-analysis.classify_objects","title":"classify_objects","python_name":"guanine_crystal_analysis._widget:classify_objects","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"guanine-crystal-analysis.bad_label_exclusion","title":"bad_label_exclusion","python_name":"guanine_crystal_analysis._widget:bad_label_exclusion","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"guanine-crystal-analysis.analyze_deluxe","title":"analyze_deluxe","python_name":"guanine_crystal_analysis._widget:analyze_deluxe","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"guanine-crystal-analysis.normalization","display_name":"Normalization","autogenerate":true},{"command":"guanine-crystal-analysis.segmentation","display_name":"Segmentation","autogenerate":true},{"command":"guanine-crystal-analysis.analyze_image","display_name":"Analyze Image","autogenerate":true},{"command":"guanine-crystal-analysis.classify_objects","display_name":"Classify Objects","autogenerate":true},{"command":"guanine-crystal-analysis.bad_label_exclusion","display_name":"Bad Label Exclusion","autogenerate":true},{"command":"guanine-crystal-analysis.analyze_deluxe","display_name":"Analyze Deluxe","autogenerate":true}],"sample_data":[{"command":"guanine-crystal-analysis.make_sample_data","key":"unique_id.1","display_name":"Guanine Crystal Analysis"}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"guanine-crystal-analysis","version":"0.0.2","dynamic":null,"platform":null,"supported_platform":null,"summary":"A plugin for the guanine crystal segmentation, classification and characterization in the zebrafish eye","description":"# guanine-crystal-analysis\n\n[![License BSD-3](https://img.shields.io/pypi/l/guanine-crystal-analysis.svg?color=green)](https://github.com/biopo/guanine-crystal-analysis/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/guanine-crystal-analysis.svg?color=green)](https://pypi.org/project/guanine-crystal-analysis)\n[![Python Version](https://img.shields.io/pypi/pyversions/guanine-crystal-analysis.svg?color=green)](https://python.org)\n[![tests](https://github.com/biopo/guanine-crystal-analysis/workflows/tests/badge.svg)](https://github.com/biopo/guanine-crystal-analysis/actions)\n[![codecov](https://codecov.io/gh/biopo/guanine-crystal-analysis/branch/main/graph/badge.svg)](https://codecov.io/gh/biopo/guanine-crystal-analysis)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/guanine-crystal-analysis)](https://napari-hub.org/plugins/guanine-crystal-analysis)\n\nA plugin for guanine crystal segmentation and classification in the zebrafish eye. More precisely, it provides a workflow that measures on guanine crystal labels and sorts out overlaying partially segmented crystals during classification.\n\nThis [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.\n\n\n\n## Usage \n\nThis plugin is suited for users who\n- want to derive size-, shape and intensity-based parameters from individual guanine crystals\n- struggle with partially segmented or overlapping crystals\n- want to investigate further the size and shape of these guanine crystals\n\nThis plugin is not suited for users who \n- are interested in further investigations of intensity of guanine crystals\n\nYou can find the plugin in napari under `Plugins` → `guanine-crystal-analysis`\n\n### Image Input\n\nThis plugin can be used on individual 2D slices of z-stacks as the workflow was developed on such input.\nTherefore, the quality of the result might differ on differing input, like crops or maximum projections.\n\n### 1. Normalization\n\nYou can normalize the image selecting `Normalization` where you only need to specify your input image and click on the `Run` button. \n\n![](img/plugin/normalization.png)\n\nNormalizing the image helps to adjust the intensity values and needs to be applied here because the object segmenter is only trained on normalized images.\n\n### 2. Segmentation\n\nWhen selecting `Segmentation`, you need to select the normalized image and a minimum pixel count of label images and click on the `Run` button again.\n![](img/plugin/segmentation.png)\nThis avoids having too small and unhelpful labels and is set by default to 50 pixels. \nFor the training of the model, an [APOC](https://github.com/haesleinhuepf/apoc) pixel classifier was used.\n\n### 3. Analyze Image\n\nUnder `Analyze Image`, you can extract features from your image and label image by selecting them and clicking on the `Run` button. \n![](img/plugin/analyzeimage.png)\nThe extracted features are a combination of the two libraries [napari-skimage-regionprops](https://github.com/haesleinhuepf/napari-skimage-regionprops) and [napari-simpleitk-image-processing](https://github.com/haesleinhuepf/napari-simpleitk-image-processing). They can be devided into size-, shape-, and intensity-based parameters: \n\n| **size** | **shape** | **intensity** \n|----------|---------------------------|-------------------|\n|![](img/plugin/size.png) \t|![](img/plugin/shape.png) \t|![](img/plugin/intensity.png) \t|\n| area \t| aspect ratio \t| maximum intensity \t|\n| \t| perimeter \t| mean intensity \t|\n| \t| major-axis-length \t| minimum intensity \t|\n| \t| minor-axis-length \t| median \t|\n| \t| circularity \t| sum \t|\n| \t| solidity \t| variance \t|\n| \t| eccentricity \t| \t|\n| \t| roundness \t| \t|\n| \t| perimeter-on-border \t| \t|\n| \t| perimeter-on-border-ratio \t| \t|\n\nYou can find a glossary with an explanation of these features [in this blog post](https://focalplane.biologists.com/2023/05/03/feature-extraction-in-napari/)\nSome of the guanine crystals are not correctly segmented because of overlay or interference patterns. This problem is addressed with the help of a classification step demonstrated next\n\n### 4. Classify Objects\n\nYou can divide the crystal labels into predicted (blue) and discarded (brown) crystal labels using `Classify Objects`. There you can choose classifiers trained on intensity-, shape- and/or size-based parameters with the help of the checkboxes.\n![](img/plugin/classifyobjects.png)\nFor the training of the model, an [APOC](https://github.com/haesleinhuepf/apoc) object classifier was used.\nIt is recommended to later on not measure the parameters that the classifier was trained on, but other ones.\n\n### 5. Bad Label Exclusion\n\nNow, you can get rid of the discarded (brown) labels for further analysis using `Bad Label Exclusion`. Select the two label images of segmentation and classification result and press the `Run` button again. \n![](img/plugin/badlabelexclusion.png)\nThe result is a label image with only the predicted (blue) labels which are relabeled sequentially. If you want to derive measurements on these predicted labels, you can just use `Analyze Image` again.\n\n### \"Analyze Deluxe\"\n\nYou can also do all the explained steps in one click using the `Analyze Deluxe` function.\n![](img/plugin/analyzedeluxe.png)\n\n\n## Installation\n\nYou can install `guanine-crystal-analysis` via [pip]:\n\n pip install guanine-crystal-analysis\n\n\n\nTo install latest development version :\n\n pip install git+https://github.com/biopo/guanine-crystal-analysis.git\n\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## Acknowledgements\nThis project was done in collaboration with the [Rita Mateus Laboratory](https://www.ritamateus.com/). The images shown in the documentation and in the demo jupyter notebooks were acquired there. \nThis project was supported by the Deutsche Forschungsgemeinschaft under Germany’s Excellence Strategy – EXC2068 - Cluster of Excellence \"Physics of Life\" of TU Dresden. \nThis project has been made possible in part by grant number [2021-240341 (Napari plugin accelerator grant)](https://chanzuckerberg.com/science/programs-resources/imaging/napari/improving-image-processing/) from the Chan Zuckerberg Initiative DAF, an advised fund of the Silicon Valley Community Foundation.\n\n\n## License\n\nDistributed under the terms of the [BSD-3] license,\n\"guanine-crystal-analysis\" 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\n[file an issue]: https://github.com/biopo/guanine-crystal-analysis/issues\n\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","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/biapol/guanine-crystal-analysis","download_url":null,"author":"Mara Lampert","author_email":"mara_harriet.lampert@mailbox.tu-dresden.de","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.8","Programming Language :: Python :: 3.9","Programming Language :: Python :: 3.10","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy","magicgui","qtpy","apoc","scikit-image","pandas","napari-simpleitk-image-processing","napari-skimage-regionprops","pyclesperanto-prototype","scikit-learn","napari-workflows","tox ; extra == 'testing'","pytest ; extra == 'testing'","pytest-cov ; extra == 'testing'","pytest-qt ; extra == 'testing'","napari ; extra == 'testing'","pyqt5 ; extra == 'testing'"],"requires_python":">=3.8","requires_external":null,"project_url":["Bug Tracker, https://github.com/biapol/guanine-crystal-analysis/issues","Documentation, https://github.com/biapol/guanine-crystal-analysis#README.md","Source Code, https://github.com/biapol/guanine-crystal-analysis","User Support, https://github.com/biapol/guanine-crystal-analysis/issues"],"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}