{"name":"AlveolEye","display_name":"AlveolEye","visibility":"public","icon":"","categories":[],"schema_version":"0.2.0","on_activate":null,"on_deactivate":null,"contributions":{"commands":[{"id":"AlveolEye.get_reader","title":"Open data with AlveolEye","python_name":"alveoleye._reader:napari_get_reader","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"AlveolEye.write_mlultiple","title":"Save multi-layer data with AlveolEye","python_name":"alveoleye._writer:write_multiple","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"AlveolEye.write_single_image","title":"Save image data with AlveolEye","python_name":"alveoleye._writer:write_single_image","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"AlveolEye.make_sample_data","title":"Load sample data from AlveolEye","python_name":"alveoleye._sample_data:make_sample_data","short_title":null,"category":null,"icon":null,"enablement":null},{"id":"AlveolEye.make_qwidget","title":"Make example QWidget","python_name":"alveoleye._widget:WidgetMain","short_title":null,"category":null,"icon":null,"enablement":null}],"readers":[{"command":"AlveolEye.get_reader","filename_patterns":[".jpeg",".jpg",".png",".tif",".tiff"],"accepts_directories":false}],"writers":[{"command":"AlveolEye.write_multiple","layer_types":["image*","labels*"],"filename_extensions":[],"display_name":""},{"command":"AlveolEye.write_single_image","layer_types":["labels+"],"filename_extensions":[".npy"],"display_name":""}],"widgets":[{"command":"AlveolEye.make_qwidget","display_name":"AlveolEye","autogenerate":false}],"sample_data":[{"command":"AlveolEye.make_sample_data","key":"unique_id.1","display_name":"AlveolEye"}],"themes":null,"menus":{},"submenus":null,"keybindings":null,"configuration":[]},"package_metadata":{"metadata_version":"2.1","name":"AlveolEye","version":"0.1.2","dynamic":null,"platform":null,"supported_platform":null,"summary":"Reads lung slides with AI-driven and classical methods","description":"\n\n# AlveolEye: Automated lung morphometry made easy\n\nThis repository contains the beta version of AlveolEye, which is created by the Sucre lab.\nThis code is authored by Joseph Hirsh, Samuel Hirsh, Nick Negretti, and Shawyon Shirazi.\n\nThis project is a Napari plugin that uses computer vision tools and classical image processing\nto calculate mean linear intercept (MLI) and airspace volume density (ASVD) from histological images.\n\nA primary goal of this tool is to be an aid to the researcher, and not be a complete automated annotation solution.\n\n## Installation\n\nThe target of this process is to create a conda environment that has both napari, and all of the AlveolEye requirements.\n\nIf you already have conda setup, you can skip step 1\n\n1. Install miniconda by downlading the appropriate version from [here](https://docs.anaconda.com/free/miniconda/)\n\n a. Choose the version that matches your processor\n\n b. Download the \"pkg\" version for easy install\n2. Open a terminal, or miniconda prompt, and clone this git repository by running:\n\n ```git clone https://github.com/SucreLab/AlveolEye```\n3. Go to the AlveolEye directory\n\n ```cd AlveolEye```\n4. Create the conda environment\n\n ```conda env create -f ./environment.yml```\n5. Activate the new environment\n\n ```conda activate AlveolEye```\n6. Install the plugin\n\n ```pip install .```\n7. Launch napari, followed by locating the plugin in the plugin menu\n\n ```napari```\n\n## Running post-installation\n\n1. Open a terminal, or miniconda prompt, activate the environment and run napari\n\n```\nconda activate AlveolEye\nnapari\n```\n\n\n# AlveolEye Usage Tutorial\n\n## Annotated Diagram\n![annotated diagram](./docs/Colored_AlveolEye.png)\n\n## Processing: Identify and segment vessel and airway epithelium with an AI computer vision model.\n1. ![#FF3333](https://placehold.co/15x15/FF3333/FF3333.png) **Select an image**: The remaining steps will concern this image.\n\n a. Click the “Import Image” button.\n\n b. Use operating system default file dialogue to select an image (*.jpg, *.png, or *.tiff).\n\n c. Check the image in the “Image” layer (of the Napari Viewer) and the file name (displayed to the right of the “Import Image” button) to confirm that the image loaded correctly.\n2. ![#FF9933](https://placehold.co/15x15/FF9933/FF9933.png) **Select a model**: The selected model will run on the image and predict (segment) vessel and airway epithelium.\n\n a. To use the default model, skip to step 3; otherwise, proceed to step 2b. Use the provided default model unless you have a specific reason not to.\n\n b. Click the “Import Weights” button.\n\n c. Use operating system file dialogue to select a model (*.pth).\n\n d. Check the file name (displayed to the right of the “Import Weights” button) to confirm that the model loaded correctly.\n3. ![#FFFF33](https://placehold.co/15x15/FFFF33/FFFF33.png) **Select a confidence level**: Type a percentage and/or click the “-” and “+” buttons in the “Minimum confidence” input box to set the confidence level. Predictions with lower confidence then the set confidence level will not appear.\n4. ![#f03c15](https://placehold.co/15x15/33FF33/33FF33.png) **Run processing**: Click the “Run Processing” button to run the model and segment vessel and airway epithelium filtered by confidence level. Once completed, manually edit the prediction as necessary with the built-in napari tools to the left of the displayed image layer. See Napari documentation for more information about how to use these tools.\n\n---\n\n## Postprocessing: Identify alveolar tissue, and airwary and vessel lumens with “classical” (non-AI) methods; remove small particles and holes to prepare for assessments.\n1. ![#FF3333](https://placehold.co/15x15/FF3333/FF3333.png) **Toggle manual thresholding**: To manually set a threshold value, toggle manual threshold; otherwise, a threshold value will be determined with Otsu's method.\n\n a. To use manual thresholding, check the “Manual thresholding” box and proceed; to use automatic thresholding, leave the box unchecked and skip to step 2.\n\n b. Type a percentage and/or click the “-” and “+” buttons in the “Manual thresholding” input box to set the threshold level.\n2. ![#FF9933](https://placehold.co/15x15/FF9933/FF9933.png) **Remove small particles**: Type a percentage and/or click the “-” and “+” buttons in the “Remove small particles” input box to set the maximum size cutoff for particles to remove. Particles with fewer pixels than the set number will be removed.\n3. ![#FFFF33](https://placehold.co/15x15/FFFF33/FFFF33.png) **Remove small holes**: Type a percentage and/or click the “-” and “+” buttons in the “Remove small holes” input box to set the maximum size cutoff for holes to remove. Holes with fewer pixels than the set number will be removed.\n4. ![#f03c15](https://placehold.co/15x15/33FF33/33FF33.png) **Run postprocessing**: Click “Run Postprocessing” button to identify alveolar tissue, airwary lumens, and vessel lumens, and to remove small particles and holes. Once completed, manually edit the post-processing layer as necessary with the built-in napari tools to the left of the displayed image layer. See Napari documentation for more information about how to use these tools.\n\n---\n\n## Assessments: Calculate morphometry assessments—mean linear intercept (MLI) and airspace volume density (ASVD) on the fully classified image.\n1. ![#FF3333](https://placehold.co/15x15/FF3333/FF3333.png) **Select ASVD**: To include ASVD calculations in results, check the “ASVD” checkbox; otherwise, leave the box unchecked. Leave the box unchecked to increase the speed of the assessments calculation or to exclude unnecessary data from the final export file.\n2. ![#FF9933](https://placehold.co/15x15/FF9933/FF9933.png) **Select MLI**: To include MLI calculations in results, check the “MLI” checkbox; otherwise, leave the box unchecked. Leave the box unchecked to increase the speed of the assessments calculation or to exclude unnecessary data from the final export file.\n3. ![#FFFF33](https://placehold.co/15x15/FFFF33/FFFF33.png) **Set number of lines**: Type a number and/or click the “-” and “+” buttons in the “number of lines” input box to set the number of MLI lines.\n4. ![#f03c15](https://placehold.co/15x15/33FF33/33FF33.png) **Set minimum length**: Type a number and/or click the “-” and “+” buttons in the “minimum length” input box to set the minimum length required for a chord to be included in the mean calculation.\n5. ![#f03c15](https://placehold.co/15x15/3359FF/3359FF.png) **Set scale**: Type a number and/or click the “-” and “+” buttons in the “scale” input box to set the scale factor (i.e. a pixel to physical space multiplier).\n6. ![#f03c15](https://placehold.co/15x15/C433FF/C433FF.png) **Run Assessments**: Click the “Run Assessments” button to calculate the selected assessments. The ASVD and MLI calculation results will display to the right of the assessment checkboxes.\n\n---\n\n## Export Results: Collect assessment results for each image and export all the data into a file when done (*.csv or *.json).\n- **Interpreting Results**\n - **MLI:** Mean Linear Intercept for the given image\n - **Standard deviation:** The standard deviation of the lengths of the chord used to calculate MLI.\n - **Number of chords:** The number of chords used to calculate MLI.\n - **ASVD:** Airspace Volume Density calculation for the given image.\n - **Airspace pixels:** The total number of airspace pixels\n - **Non airspace pixels:** The total number non-airspace pixels.\n1. ![#FF3333](https://placehold.co/15x15/FF3333/FF3333.png) **Add last result**: Click the “Add” button to add the assessment data to the final export file. Once the results are added, you can return to the \"Processing\" step and do another image.\n2. ![#FF9933](https://placehold.co/15x15/FF9933/FF9933.png) **Remove last result**: Click the “Remove” button to remove the last results added to the export file.\n3. ![#FFFF33](https://placehold.co/15x15/FFFF33/FFFF33.png) **Clear export data**: Click the “Clear” button to clear the export data file.\n4. ![#f03c15](https://placehold.co/15x15/33FF33/33FF33.png) **Export Results**: Click the “Export Results” button to open a file dialogue for saving the assessments results. Note that the plugin supports two export result file types, *.csv and *.json that you can choose between.\n\n","description_content_type":"text/markdown","keywords":null,"home_page":null,"download_url":null,"author":"Joseph Hirsh","author_email":"josephhirsh9@gmail.com","maintainer":null,"maintainer_email":null,"license":"MIT","classifier":["Development Status :: 2 - Pre-Alpha","Framework :: napari","Intended Audience :: Developers","License :: OSI Approved :: MIT 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","pytest ; extra == 'testing'","pytest-cov ; extra == 'testing'","pytest-qt ; extra == 'testing'","napari ; extra == 'testing'","qtpy ; extra == 'testing'"],"requires_python":">=3.8","requires_external":null,"project_url":null,"provides_extra":["testing"],"provides_dist":null,"obsoletes_dist":null},"npe1_shim":false}