{"name":"napari-bacteria-density","display_name":"Bacteria Density Tools","visibility":"public","icon":"","categories":[],"schema_version":"0.2.1","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"napari-bacteria-density.make_analysis_widget","title":"Open the bacteria density toolset","python_name":"bacteria_density:BacteriaDensityWidget","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":null,"writers":null,"widgets":[{"command":"napari-bacteria-density.make_analysis_widget","display_name":"Density vs. distance","autogenerate":false}],"sample_data":null,"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.4","name":"napari-bacteria-density","version":"1.0.0","dynamic":["license-file"],"platform":null,"supported_platform":null,"summary":"A Napari plugin to measure the density of bacteria vs the distance within tubular organs","description":"# Napari bacteria density\n\n<img width=\"3800\" height=\"2122\" alt=\"nbd\" src=\"https://github.com/user-attachments/assets/e748fbff-72c4-4c90-8026-5f1558e4d743\" />\n\n## Install\n\n- Make sure that you installed [Git](https://git-scm.com/downloads) on your system.\n- Make sure that you installed a Python environments manager (like [Miniconda](https://repo.anaconda.com/miniconda/)).\n- Open a terminal and create a new environment using the command `conda create -n bacteria-density -y python=3.10`.\n- Activate the newly created environment using `conda activate bacteria-density`.\n- Install the development version of the plugin using `pip install git+https://github.com/MontpellierRessourcesImagerie/bacteria-density.git`.\n- If you want to use it through a GUI, install Napari alongside it with `pip install napari[all]`.\n- To calibrate your images, you will need to install the calibration tool using `pip install set-calibration`.\n- If your images are not TIFF, you will need to install ImageJ's bridge using `pip install napari-imagej`.\n\n## Usage\n\n- Open a new terminal and activate the environment containing Napari using `conda activate bacteria-density`.\n- Launch Napari with the command `napari`.\n- In the top-bar, within the \"Plugins\" menu, you should find `ImageJ2`, `Scale tool` & `Density vs. distance`.\n- Start by using `ImageJ2` to open your image and import it in Napari. In the left column, you should now see one layer per channel. You can rename them as you wish.\n- You can now close the `ImageJ2` panel.\n- You should now open `Scale tool` to provide the physical size of voxels. Don't forget that in Napari, the order is ZYX instead of XYZ.\n- Once you're done providing the scale, you can close the `Scale tool` panel.\n- You can now open the `Density vs. distance` panel.\n\n## Process the image\n\n#### 1. Segmentation\n\n- In the dropdown menu, select the layer corresponding to the nuclei. \n\n#### 2. Measures\n\n- For each channel in which you want to make intensity measurements, indicate the layer (in the dropdown menu) and provide a name for what it contains (instead of the \"---\" in the box on the right). This name is used to name the columns in the results table.\n\n#### 3. ROIs\n\n- Above the \"layers list\" panel, add a new \"Shape layer\".\n- Add polygons for each region that you would like to process. \n- Use the `F1`, `F2`, `F3` & `F4` buttons to change the edge color of these polygons. Each color represents a filament. If several areas share a same color, it means that they are part of the same filament and were cut for some reason (obstacle, crossing, ...).\n    - 1: Red\n    - 2: Green\n    - 3: Blue\n    - 4: Yellow\n- Add a new \"Points layer\". In the \"layers control\" panel, switch to the \"Add points\" mode.\n- For each filament (each color), add a point approximately where the filament starts. There should be exactly one point per color.\n- In the dropdown menus of the ROIs box of the plugin, provide the new shape and point layers.\n\n#### 4. Settings\n\n- Using the \"Set output folder\", provide the path to an empty directory.\n- Select the binning length using the input below (binning of measures along the skeleton).\n- Select the list of measurements that you would like to process.\n\n#### 5. Workflow\n\n- From this point, you can click on each button from top to bottom:\n- **Chunk images:** Will export a copy of each selected area in the working directory.\n- **Skeletonize:** Will create a mask and a skeleton of the corresponding branch. An outline of the mask will be displayed.\n- **Make medial path:** Will process the path over the organ and assemble the fragments. You can check the result by searching for the middle of the stack using the slider under the image.\n- **Measure:** Will perform the measures and export the CSV.\n- **Create Plots:** Export the plots as PNG with a dashed-line between segments.\n\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"Clément H. Benedetti","author_email":"clement.benedetti@mri.cnrs.fr","maintainer":null,"maintainer_email":null,"license":null,"classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","Operating System :: OS Independent","Programming Language :: Python","Programming Language :: Python :: 3","Programming Language :: Python :: 3 :: Only","Programming Language :: Python :: 3.10","Programming Language :: Python :: 3.11","Programming Language :: Python :: 3.12","Programming Language :: Python :: 3.13","Topic :: Scientific/Engineering :: Image Processing"],"requires_dist":["numpy","qtpy","scikit-image","matplotlib","scipy","pandas","tifffile","termcolor","shapely","rasterio","napari[all]; extra == \"all\"","tox; extra == \"testing\"","pytest; extra == \"testing\"","pytest-cov; extra == \"testing\"","pytest-qt; extra == \"testing\"","napari[qt]; extra == \"testing\""],"requires_python":">=3.10","requires_external":null,"project_url":["Bug Tracker, https://github.com/MontpellierRessourcesImagerie/napari-bacteria-density/issues","Documentation, https://github.com/MontpellierRessourcesImagerie/napari-bacteria-density#README.md","Source Code, https://github.com/MontpellierRessourcesImagerie/napari-bacteria-density","User Support, https://github.com/MontpellierRessourcesImagerie/napari-bacteria-density/issues"],"provides_extra":["all","testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}