{"name":"napari-pyclesperanto-assistant","display_name":"napari-pyclesperanto-assistant","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-pyclesperanto-assistant.Assistant","title":"Assistant","python_name":"napari_pyclesperanto_assistant._gui:Assistant","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_Lund","title":"_load_Lund","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_Lund","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_Lund_timelapse","title":"_load_Lund_timelapse","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_Lund_timelapse","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_CalibZAPWfixed","title":"_load_CalibZAPWfixed","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_CalibZAPWfixed","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_Sonneberg","title":"_load_Sonneberg","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_Sonneberg","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_Haase_MRT_tfl3d1","title":"_load_Haase_MRT_tfl3d1","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_Haase_MRT_tfl3d1","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_Pixel_cat","title":"_load_Pixel_cat","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_Pixel_cat","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_perfect_tissue","title":"_load_perfect_tissue","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_perfect_tissue","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_orderly_tissue","title":"_load_orderly_tissue","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_orderly_tissue","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant._load_chaotic_tissue","title":"_load_chaotic_tissue","python_name":"napari_pyclesperanto_assistant._napari_plugin:_load_chaotic_tissue","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"statistics_of_labeled_pixels","python_name":"napari_pyclesperanto_assistant._statistics_of_labeled_pixels:statistics_of_labeled_pixels","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"advanced_statistics","python_name":"napari_pyclesperanto_assistant._advanced_statistics:advanced_statistics","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"neighborhood_statistics","python_name":"napari_pyclesperanto_assistant._neighborhood_statistics:neighborhood_statistics","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"make_labels_editable","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:make_labels_editable","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"auto_brightness_contrast","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:auto_brightness_contrast","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"auto_brightness_contrast_all_images","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:auto_brightness_contrast_all_images","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"reset_brightness_contrast","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:reset_brightness_contrast","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"split_stack","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:split_stack","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"set_voxel_size","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:set_voxel_size","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"set_voxel_size_of_all_layers","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:set_voxel_size_of_all_layers","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"convert_image_to_labels","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:convert_image_to_labels","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"convert_labels_to_image","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:convert_labels_to_image","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"convert_to_numpy","python_name":"napari_pyclesperanto_assistant._convert_to_numpy:convert_to_numpy","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"label","python_name":"napari_pyclesperanto_assistant._napari_cle_functions:label","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"napari-pyclesperanto-assistant.napari_experimental_provide_function","title":"voronoi_otsu_labeling","python_name":"napari_pyclesperanto_assistant._napari_cle_functions:voronoi_otsu_labeling","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-pyclesperanto-assistant.Assistant","display_name":"Assistant","autogenerate":false},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"statistics_of_labeled_pixels","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"advanced_statistics","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"neighborhood_statistics","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"make_labels_editable","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"auto_brightness_contrast","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"auto_brightness_contrast_all_images","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"reset_brightness_contrast","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"split_stack","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"set_voxel_size","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"set_voxel_size_of_all_layers","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"convert_image_to_labels","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"convert_labels_to_image","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"convert_to_numpy","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"label","autogenerate":true},{"command":"napari-pyclesperanto-assistant.napari_experimental_provide_function","display_name":"voronoi_otsu_labeling","autogenerate":true}],"sample_data":[{"command":"napari-pyclesperanto-assistant._load_Lund","key":"lund","display_name":"Lund"},{"command":"napari-pyclesperanto-assistant._load_Lund_timelapse","key":"lund_timelapse_100_mb","display_name":"Lund timelapse (100 MB)"},{"command":"napari-pyclesperanto-assistant._load_CalibZAPWfixed","key":"calibzapwfixed","display_name":"CalibZAPWfixed"},{"command":"napari-pyclesperanto-assistant._load_Sonneberg","key":"sonneberg","display_name":"Sonneberg"},{"command":"napari-pyclesperanto-assistant._load_Haase_MRT_tfl3d1","key":"haase_mrt_tfl3d1","display_name":"Haase_MRT_tfl3d1"},{"command":"napari-pyclesperanto-assistant._load_Pixel_cat","key":"pixel_cat","display_name":"Pixel (cat)"},{"command":"napari-pyclesperanto-assistant._load_perfect_tissue","key":"artificial_perfect_tissue","display_name":"Artificial perfect tissue"},{"command":"napari-pyclesperanto-assistant._load_orderly_tissue","key":"artificial_orderly_tissue","display_name":"Artificial orderly tissue"},{"command":"napari-pyclesperanto-assistant._load_chaotic_tissue","key":"artificial_chaotic_tissue","display_name":"Artificial chaotic tissue"},{"key":"blobs_from_imagej","display_name":"Blobs (from ImageJ)","uri":"__dynamic__","reader_plugin":null}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"napari-pyclesperanto-assistant","version":"0.22.1","dynamic":null,"platform":null,"supported_platform":null,"summary":"GPU-accelerated image processing in napari using OpenCL","description":"# napari-pyclesperanto-assistant\n[![Image.sc forum](https://img.shields.io/badge/dynamic/json.svg?label=forum&url=https%3A%2F%2Fforum.image.sc%2Ftag%2Fclesperanto.json&query=%24.topic_list.tags.0.topic_count&colorB=brightgreen&suffix=%20topics&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABPklEQVR42m3SyyqFURTA8Y2BER0TDyExZ+aSPIKUlPIITFzKeQWXwhBlQrmFgUzMMFLKZeguBu5y+//17dP3nc5vuPdee6299gohUYYaDGOyyACq4JmQVoFujOMR77hNfOAGM+hBOQqB9TjHD36xhAa04RCuuXeKOvwHVWIKL9jCK2bRiV284QgL8MwEjAneeo9VNOEaBhzALGtoRy02cIcWhE34jj5YxgW+E5Z4iTPkMYpPLCNY3hdOYEfNbKYdmNngZ1jyEzw7h7AIb3fRTQ95OAZ6yQpGYHMMtOTgouktYwxuXsHgWLLl+4x++Kx1FJrjLTagA77bTPvYgw1rRqY56e+w7GNYsqX6JfPwi7aR+Y5SA+BXtKIRfkfJAYgj14tpOF6+I46c4/cAM3UhM3JxyKsxiOIhH0IO6SH/A1Kb1WBeUjbkAAAAAElFTkSuQmCC)](https://forum.image.sc/tag/clesperanto)\n[![website](https://img.shields.io/website?url=http%3A%2F%2Fclesperanto.net)](http://clesperanto.net)\n[![License](https://img.shields.io/pypi/l/napari-pyclesperanto-assistant.svg?color=green)](https://github.com/clesperanto/napari-pyclesperanto-assistant/raw/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/napari-pyclesperanto-assistant.svg?color=green)](https://pypi.org/project/napari-pyclesperanto-assistant)\n[![Python Version](https://img.shields.io/pypi/pyversions/napari-pyclesperanto-assistant.svg?color=green)](https://python.org)\n[![tests](https://github.com/clesperanto/napari_pyclesperanto_assistant/workflows/tests/badge.svg)](https://github.com/clesperanto/napari_pyclesperanto_assistant/actions)\n[![codecov](https://codecov.io/gh/clesperanto/napari_pyclesperanto_assistant/branch/master/graph/badge.svg)](https://codecov.io/gh/clesperanto/napari_pyclesperanto_assistant)\n[![Development Status](https://img.shields.io/pypi/status/napari_pyclesperanto_assistant.svg)](https://en.wikipedia.org/wiki/Software_release_life_cycle#Alpha)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-pyclesperanto-assistant)](https://napari-hub.org/plugins/napari-pyclesperanto-assistant)\n[![DOI](https://zenodo.org/badge/322312181.svg)](https://zenodo.org/badge/latestdoi/322312181)\n\nThe py-clEsperanto-assistant is a yet experimental [napari](https://github.com/napari/napari) plugin for building GPU-accelerated image processing workflows. \nIt is part of the [clEsperanto](http://clesperanto.net) project and thus, aims at removing programming language related barriers between image processing ecosystems in the life sciences. \nIt uses [pyclesperanto](https://github.com/clEsperanto/pyclesperanto_prototype) and with that [pyopencl](https://documen.tician.de/pyopencl/) as backend for processing images.\n\nThis napari plugin adds some menu entries to the Tools menu. You can recognize them with their suffix `(clEsperanto)` in brackets.\nFurthermore, it can be used from the [napari-assistant](https://www.napari-hub.org/plugins/napari-assistant) graphical user interface. \nTherefore, just click the menu `Tools > Utilities > Assistant (na)` or run `naparia` from the command line.\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/virtual_4d_support1.gif)\n\n## Usage\n\n### Start up the assistant\nStart up napari, e.g. from the command line:\n```\nnapari\n```\n\nLoad example data, e.g. from the menu `File > Open Samples > clEsperanto > CalibZAPWfixed` and \nstart the assistant from the menu `Tools > Utilities > Assistant (na)`.\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/screenshot1.png)\n\nIn case of two dimensional timelapse data, an initial conversion step might be necessary depending on your data source. \nClick the menu `Tools > Utilities > Convert to 2d timelapse`. In the dialog, select the dataset and click ok. \nYou can delete the original dataset afterwards:\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/screenshot1a.png)\n\n### Set up a workflow\n\nChoose categories of operations in the top right panel, for example start with denoising using a Gaussian Blur with sigma 1 in x and y.\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/screenshot2.png)\n\nContinue with background removal using the top-hat filter with radius 5 in x and y.\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/screenshot2a.png)\n\nFor labeling the objects, use [Voronoi-Otsu-Labeling](https://nbviewer.jupyter.org/github/clEsperanto/pyclesperanto_prototype/blob/master/demo/segmentation/voronoi_otsu_labeling.ipynb) with both sigma parameters set to 2.\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/screenshot2b.png)\n\nThe labeled objects can be extended using a Voronoi diagram to derive a estimations of cell boundaries.\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/screenshot2c.png)\n\nYou can then configure napari to show the label boundaries on top of the original image:\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/screenshot2d.png)\n\nWhen your workflow is set up, click the play button below your dataset:\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/timelapse_2d.gif)\n\n### Neighbor statistics\n\nWhen working with 2D or 3D data you can analyze measurements in relationship with their neighbors. \nFor example, you can measure the area of blobs as shown in the example shown below using the menu \n`Tools > Measurements > Statistics of labeled pixels (clesperant)` and visualize it as `area` image by double-clicking on the table column (1).\nAdditionally, you can measure the maximum area of the 6 nearest neighbors using the menu `Tools > Measurments > Neighborhood statistics of measurements`.\nThe new column will then be called \"max_nn6_area...\" (2). When visualizing such parametric images next by each other, it is recommended to use\n[napari-brightness-contrast](https://www.napari-hub.org/plugins/napari-brightness-contrast) and visualize the same intensity range to see differences correctly.\n\n![](https://github.com/clEsperanto/napari_pyclesperanto_assistant/raw/master/docs/images/neighbor_statistics.png)\n\n### Code generation\nYou can also export your workflow as Python/Jython code or as notebook. See the [napari-assistant documentation](https://www.napari-hub.org/plugins/napari-assistant) for details.\n\n## Features\n[pyclesperanto](https://github.com/clEsperanto/pyclesperanto_prototype) offers various possibilities for processing images. It comes from developers who work in life sciences and thus, it may be focused towards processing two- and three-dimensional microscopy image data showing cells and tissues. A selection of pyclesperanto's functionality is available via the assistant user interface. Typical workflows which can be built with this assistant include\n* image filtering\n * denoising / noise reduction (mean, median, Gaussian blur)\n * background subtraction for uneven illumination or out-of-focus light (bottom-hat, top-hat, subtract Gaussian background)\n * grey value morphology (local minimum, maximum. variance)\n * gamma correction\n * Laplace operator\n * Sobel operator\n* combining images\n * masking\n * image math (adding, subtracting, multiplying, dividing images) \n * absolute / squared difference\n* image transformations\n * translation\n * rotation\n * scale\n * reduce stack \n * sub-stacks\n* image projections\n * minimum / mean / maximum / sum / standard deviation projections\n* image segmentation\n * binarization (thresholding, local maxima detection)\n * labeling\n * regionalization\n * instance segmentation\n * semantic segmentation\n * detect label edges\n * label spots\n * connected component labeling\n * Voronoi-Otsu-labeling\n* post-processing of binary images\n * dilation\n * erosion\n * binary opening\n * binary closing \n * binary and / or / xor\n* post-processing of label images\n * dilation (expansion) of labels\n * extend labels via Voronoi\n * exclude labels on edges\n * exclude labels within / out of size / value range\n * merge touching labels\n* parametric maps\n * proximal / touching neighbor count\n * distance measurements to touching / proximal / n-nearest neighbors\n * pixel count map\n * mean / maximum / extension ratio map\n* label measurements / post processing of parametric maps\n * minimum / mean / maximum / standard deviation intensity maps\n * minimum / mean / maximum / standard deviation of touching / n-nearest / neighbors\n* neighbor meshes\n * touching neighbors\n * n-nearest neighbors\n * proximal neighbors\n * distance meshes\n* measurements based on label images\n * bounding box 2D / 3D\n * minimum / mean / maximum / sum / standard deviation intensity\n * center of mass\n * centroid\n * mean / maximum distance to centroid (and extension ratio shape descriptor)\n * mean / maximum distance to center of mass (and extension ratio shape descriptor)\n * statistics of neighbors (See related [publication](https://www.frontiersin.org/articles/10.3389/fcomp.2021.774396/full))\n* code export\n * python / Fiji-compatible jython\n * python jupyter notebooks\n* pyclesperanto scripting\n * cell segmentation\n * cell counting\n * cell differentiation\n * tissue classification\n\n## Installation\n\nIt is recommended to install the assistant using conda. If you have never used conda before, it is recommended to read \n[this blog post](https://biapol.github.io/blog/johannes_mueller/anaconda_getting_started/) first. \n\n```shell\nconda create --name cle_39 python=3.9 napari-pyclesperanto-assistant\nconda activate cle_39\n```\n\nMac-users please also install this:\n\n conda install -c conda-forge ocl_icd_wrapper_apple\n \nLinux users please also install this:\n \n conda install -c conda-forge ocl-icd-system\n\nYou can then start the napari-assistant using this command:\n\n```\nnaparia\n```\n\n\n## Feedback and contributions welcome!\nclEsperanto is developed in the open because we believe in the open source community. See our [community guidelines](https://clij.github.io/clij2-docs/community_guidelines). Feel free to drop feedback as [github issue](https://github.com/clEsperanto/pyclesperanto_prototype/issues) or via [image.sc](https://image.sc)\n\n## Acknowledgements\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[Imprint](https://clesperanto.github.io/imprint)\n\n","description_content_type":"text/markdown","keywords":null,"home_page":"https://github.com/clesperanto/napari_pyclesperanto_assistant","download_url":null,"author":"Robert Haase, Talley Lambert","author_email":"robert.haase@tu-dresden.de","maintainer":null,"maintainer_email":null,"license":"BSD-3-Clause","classifier":["Programming Language :: Python :: 3","License :: OSI Approved :: BSD License","Operating System :: OS Independent","Framework :: napari","Intended Audience :: Science/Research","Development Status :: 3 - Alpha"],"requires_dist":["napari-plugin-engine (>=0.1.4)","pyopencl","toolz","scikit-image","napari (>=0.4.15)","pyclesperanto-prototype (>=0.22.0)","magicgui","numpy (!=1.19.4)","pyperclip","loguru","jupytext","jupyter","pandas","napari-tools-menu (>=0.1.8)","napari-time-slicer (>=0.4.0)","napari-skimage-regionprops (>=0.2.0)","napari-workflows (>=0.1.1)","napari-assistant (>=0.2.0)"],"requires_python":">=3.6","requires_external":null,"project_url":["Bug Tracker, https://github.com/clEsperanto/napari_pyclesperanto_assistant/issues","Documentation, https://github.com/clEsperanto/napari_pyclesperanto_assistant/","Source Code, https://github.com/clEsperanto/napari_pyclesperanto_assistant","User Support, https://forum.image.sc/tag/clij"],"provides_extra":null,"provides_dist":null,"obsoletes_dist":null},"npe1_shim":true}