Package: napari-pyclesperanto-assistant
napari-pyclesperanto-assistantThe py-clEsperanto-assistant is a yet experimentalnapariplugin for building GPU-accelerated image processing workflows.
It is part of theclEsperantoproject and thus, aims at removing programming language related barriers between image processing ecosystems in the life sciences.
It usespyclesperantoand with thatpyopenclas backend for processing images.This napari plugin adds some menu entries to the Tools menu. You can recognize them with their suffix(clEsperanto)in brackets.
Furthermore, it can be used from thenapari-assistantgraphical user interface.
Therefore, just click the menuTools > Utilities > Assistant (na)or runnapariafrom the command line.UsageStart up the assistantStart up napari, e.g. from the command line:napariLoad example data, e.g. from the menuFile > Open Samples > clEsperanto > CalibZAPWfixedand
start the assistant from the menuTools > Utilities > Assistant (na).In case of two dimensional timelapse data, an initial conversion step might be necessary depending on your data source.
Click the menuTools > Utilities > Convert to 2d timelapse. In the dialog, select the dataset and click ok.
You can delete the original dataset afterwards:Set up a workflowChoose categories of operations in the top right panel, for example start with denoising using a Gaussian Blur with sigma 1 in x and y.Continue with background removal using the top-hat filter with radius 5 in x and y.For labeling the objects, useVoronoi-Otsu-Labelingwith both sigma parameters set to 2.The labeled objects can be extended using a Voronoi diagram to derive a estimations of cell boundaries.You can then configure napari to show the label boundaries on top of the original image:When your workflow is set up, click the play button below your dataset:Neighbor statisticsWhen working with 2D or 3D data you can analyze measurements in relationship with their neighbors.
For example, you can measure the area of blobs as shown in the example shown below using the menuTools > Measurements > Statistics of labeled pixels (clesperant)and visualize it asareaimage by double-clicking on the table column (1).
Additionally, you can measure the maximum area of the 6 nearest neighbors using the menuTools > Measurments > Neighborhood statistics of measurements.
The new column will then be called "max_nn6_area..." (2). When visualizing such parametric images next by each other, it is recommended to usenapari-brightness-contrastand visualize the same intensity range to see differences correctly.Code generationYou can also export your workflow as Python/Jython code or as notebook. See thenapari-assistant documentationfor details.Featurespyclesperantooffers 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 includeimage filteringdenoising / noise reduction (mean, median, Gaussian blur)background subtraction for uneven illumination or out-of-focus light (bottom-hat, top-hat, subtract Gaussian background)grey value morphology (local minimum, maximum. variance)gamma correctionLaplace operatorSobel operatorcombining imagesmaskingimage math (adding, subtracting, multiplying, dividing images)absolute / squared differenceimage transformationstranslationrotationscalereduce stacksub-stacksimage projectionsminimum / mean / maximum / sum / standard deviation projectionsimage segmentationbinarization (thresholding, local maxima detection)labelingregionalizationinstance segmentationsemantic segmentationdetect label edgeslabel spotsconnected component labelingVoronoi-Otsu-labelingpost-processing of binary imagesdilationerosionbinary openingbinary closingbinary and / or / xorpost-processing of label imagesdilation (expansion) of labelsextend labels via Voronoiexclude labels on edgesexclude labels within / out of size / value rangemerge touching labelsparametric mapsproximal / touching neighbor countdistance measurements to touching / proximal / n-nearest neighborspixel count mapmean / maximum / extension ratio maplabel measurements / post processing of parametric mapsminimum / mean / maximum / standard deviation intensity mapsminimum / mean / maximum / standard deviation of touching / n-nearest / neighborsneighbor meshestouching neighborsn-nearest neighborsproximal neighborsdistance meshesmeasurements based on label imagesbounding box 2D / 3Dminimum / mean / maximum / sum / standard deviation intensitycenter of masscentroidmean / maximum distance to centroid (and extension ratio shape descriptor)mean / maximum distance to center of mass (and extension ratio shape descriptor)statistics of neighbors (See relatedpublication)code exportpython / Fiji-compatible jythonpython jupyter notebookspyclesperanto scriptingcell segmentationcell countingcell differentiationtissue classificationInstallationIt is recommended to install the assistant using conda. If you have never used conda before, it is recommended to readthis blog postfirst.condacreate--namecle_39python=3.9napari-pyclesperanto-assistant
condaactivatecle_39Mac-users please also install this:conda install -c conda-forge ocl_icd_wrapper_appleLinux users please also install this:conda install -c conda-forge ocl-icd-systemYou can then start the napari-assistant using this command:napariaFeedback and contributions welcome!clEsperanto is developed in the open because we believe in the open source community. See ourcommunity guidelines. Feel free to drop feedback asgithub issueor viaimage.scAcknowledgementsThis project was supported by the Deutsche Forschungsgemeinschaft under Germanyâ€™s Excellence Strategy â€“ EXC2068 - Cluster of Excellence "Physics of Life" of TU Dresden.
This project has been made possible in part by grant number2021-240341 (Napari plugin accelerator grant)from the Chan Zuckerberg Initiative DAF, an advised fund of the Silicon Valley Community Foundation.Imprint