-
Notifications
You must be signed in to change notification settings - Fork 7
/
AlveolEye.json
164 lines (164 loc) · 13.8 KB
/
AlveolEye.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"name": "AlveolEye",
"display_name": "AlveolEye",
"visibility": "public",
"icon": "",
"categories": [],
"schema_version": "0.2.1",
"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[![License MIT](https://img.shields.io/pypi/l/automated-lung-morphometry.svg?color=green)](https://github.com/Quooooooookka/automated-lung-morphometry/raw/main/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/automated-lung-morphometry.svg?color=green)](https://pypi.org/project/automated-lung-morphometry)\n[![Python Version](https://img.shields.io/pypi/pyversions/automated-lung-morphometry.svg?color=green)](https://python.org)\n[![tests](https://github.com/Quooooooookka/automated-lung-morphometry/workflows/tests/badge.svg)](https://github.com/Quooooooookka/automated-lung-morphometry/actions)\n[![codecov](https://codecov.io/gh/Quooooooookka/automated-lung-morphometry/branch/main/graph/badge.svg)](https://codecov.io/gh/Quooooooookka/automated-lung-morphometry)\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/automated-lung-morphometry)](https://napari-hub.org/plugins/automated-lung-morphometry)\n-->\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 \u201cImport Image\u201d 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 \u201cImage\u201d layer (of the Napari Viewer) and the file name (displayed to the right of the \u201cImport Image\u201d button) to confirm that the image loaded correctly.\n2. ![#FF9933](https://placehold.co/15x15/FF9933/FF9933.png) **Select a model**</span>: 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 \u201cImport Weights\u201d 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 \u201cImport Weights\u201d 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 \u201c-\u201d and \u201c+\u201d buttons in the \u201cMinimum confidence\u201d 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 \u201cRun Processing\u201d 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 \u201cclassical\u201d (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 \u201cManual thresholding\u201d 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 \u201c-\u201d and \u201c+\u201d buttons in the \u201cManual thresholding\u201d 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 \u201c-\u201d and \u201c+\u201d buttons in the \u201cRemove small particles\u201d 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 \u201c-\u201d and \u201c+\u201d buttons in the \u201cRemove small holes\u201d 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 \u201cRun Postprocessing\u201d 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\u2014mean 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 \u201cASVD\u201d 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 \u201cMLI\u201d 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 \u201c-\u201d and \u201c+\u201d buttons in the \u201cnumber of lines\u201d 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 \u201c-\u201d and \u201c+\u201d buttons in the \u201cminimum length\u201d 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 \u201c-\u201d and \u201c+\u201d buttons in the \u201cscale\u201d 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 \u201cRun Assessments\u201d 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 \u201cAdd\u201d 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 \u201cRemove\u201d 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 \u201cClear\u201d button to clear the export data file.\n4. ![#f03c15](https://placehold.co/15x15/33FF33/33FF33.png) **Export Results**: Click the \u201cExport Results\u201d 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": "[email protected]",
"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
}