napari-tmidas 0.1.5__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/PKG-INFO +44 -14
  2. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/README.md +43 -13
  3. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/__init__.py +3 -0
  4. napari_tmidas-0.1.7/src/napari_tmidas/_crop_anything.py +1113 -0
  5. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_file_conversion.py +488 -256
  6. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_file_selector.py +267 -101
  7. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_label_inspection.py +10 -0
  8. napari_tmidas-0.1.7/src/napari_tmidas/_roi_colocalization.py +1175 -0
  9. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_version.py +2 -2
  10. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/napari.yaml +10 -0
  11. napari_tmidas-0.1.7/src/napari_tmidas/processing_functions/basic.py +125 -0
  12. napari_tmidas-0.1.7/src/napari_tmidas/processing_functions/colocalization.py +242 -0
  13. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/processing_functions/skimage_filters.py +17 -32
  14. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas.egg-info/PKG-INFO +44 -14
  15. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas.egg-info/SOURCES.txt +3 -0
  16. napari_tmidas-0.1.5/src/napari_tmidas/processing_functions/basic.py +0 -42
  17. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/.github/dependabot.yml +0 -0
  18. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/.github/workflows/test_and_deploy.yml +0 -0
  19. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/.gitignore +0 -0
  20. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/.napari-hub/DESCRIPTION.md +0 -0
  21. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/.napari-hub/config.yml +0 -0
  22. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/.pre-commit-config.yaml +0 -0
  23. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/LICENSE +0 -0
  24. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/MANIFEST.in +0 -0
  25. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/pyproject.toml +0 -0
  26. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/setup.cfg +0 -0
  27. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_reader.py +0 -0
  28. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_registry.py +0 -0
  29. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_sample_data.py +0 -0
  30. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_tests/__init__.py +0 -0
  31. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_tests/test_reader.py +0 -0
  32. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_tests/test_sample_data.py +0 -0
  33. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_tests/test_widget.py +0 -0
  34. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_tests/test_writer.py +0 -0
  35. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_widget.py +0 -0
  36. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/_writer.py +0 -0
  37. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/processing_functions/__init__.py +0 -0
  38. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas/processing_functions/scipy_filters.py +0 -0
  39. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas.egg-info/dependency_links.txt +0 -0
  40. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas.egg-info/entry_points.txt +0 -0
  41. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas.egg-info/requires.txt +0 -0
  42. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/src/napari_tmidas.egg-info/top_level.txt +0 -0
  43. {napari_tmidas-0.1.5 → napari_tmidas-0.1.7}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: napari-tmidas
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: Tissue Microscopy Image Data Analysis Suite
5
5
  Author: Marco Meer
6
6
  Author-email: marco.meer@pm.me
@@ -75,11 +75,31 @@ Dynamic: license-file
75
75
  [![tests](https://github.com/macromeer/napari-tmidas/workflows/tests/badge.svg)](https://github.com/macromeer/napari-tmidas/actions)
76
76
  [![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-tmidas)](https://napari-hub.org/plugins/napari-tmidas)
77
77
  <!-- [![codecov](https://codecov.io/gh/macromeer/napari-tmidas/branch/main/graph/badge.svg)](https://codecov.io/gh/macromeer/napari-tmidas) -->
78
- This Napari plugin allows you to perform batch image processing without a graphics processing unit (GPU). It will still be fast because computations will run in parallel on your central processing unit (CPU).
78
+ The `napari-tmidas` plugin consists of a growing collection of pipelines for fast batch processing of microscopy images. This is a WIP and based on the CLI version of [T-MIDAS](https://github.com/MercaderLabAnatomy/T-MIDAS).
79
79
 
80
- This plugin provides you with a growing collection of pipelines for batch image preprocessing, segmentation, regions-of-interest (ROI) analysis and other useful features.
80
+ ## Feature Overview
81
+
82
+ ### Current Pipelines
83
+ 1. **Batch Image Processing**
84
+ - Process image folders with: Gamma correction, Z-projection, channel splitting, Gaussian/median filters, thresholding (Otsu/manual), and label cleaning
85
+
86
+ 2. **Batch Label Inspection**
87
+ - Review and edit label images with auto-save
88
+
89
+ 3. **Batch Microscopy Image Conversion**
90
+ - Convert .nd2/.lif/.ndpi/.czi/acquifer → .tif/.zarr with metadata preservation
91
+
92
+ 4. **Batch Crop Anything**
93
+ - Interactive ROI selection via click interface
94
+
95
+ 5. Batch ROI Colocalization
96
+ - Count colocalized labels across multiple channels
97
+
98
+
99
+
100
+ ### Coming Soon
101
+ New features arriving April 2025
81
102
 
82
- `napari-tmidas` is a work in progress (WIP) and an evolutionary step away from the [terminal / command-line version of T-MIDAS](https://github.com/MercaderLabAnatomy/T-MIDAS).
83
103
 
84
104
  ## Installation
85
105
 
@@ -98,29 +118,35 @@ To install the latest development version:
98
118
  pip install git+https://github.com/macromeer/napari-tmidas.git
99
119
 
100
120
  ### Dependencies
101
- For the File converter, we need some libraries to read some microscopy formats and to write ome-zarr:
121
+ To use the Batch Microscopy Image Conversion pipeline, we need some libraries to read microscopy formats and to write ome-zarr:
122
+
123
+ pip install nd2 readlif tiffslide pylibCZIrw acquifer-napari ome-zarr napari-ome-zarr
102
124
 
103
- pip install nd2 readlif tiffslide pylibCZIrw acquifer-napari ome-zarr
125
+ For the Batch Crop Anything pipeline, we need to install MobileSAM and its dependencies:
104
126
 
127
+ pip install git+https://github.com/ChaoningZhang/MobileSAM.git
128
+ pip install torch torchvision timm opencv-python
105
129
 
106
130
  ## Usage
107
131
 
132
+ To use the plugin, start napari in the activated virtual environment with this terminal command:
133
+
134
+ mamba run -n napari-tmidas napari
135
+
108
136
  You can find the installed plugin here:
109
137
 
110
138
  ![image](https://github.com/user-attachments/assets/504db09a-d66e-49eb-90cd-3237024d9d7a)
111
139
 
112
140
 
113
- ### File converter
141
+ ### Batch Microscopy Image Conversion
114
142
 
115
- You might first want to batch convert microscopy image data. Currently, this plugin supports `.nd2, .lif, .ndpi, .czi` and acquifer data. After launching the file converter, you can scan a folder of your choice for microscopy image data. It will also detect series images that you can preview. Start by selecting an original image in the first column of the table. This allows you to preview or convert.
143
+ You can start this pipeline via `Plugins > T-MIDAS > Batch Microscopy Image Conversion`. Currently, this pipeline supports the conversion of `.nd2, .lif, .ndpi, .czi` and acquifer data. After scanning a folder of your choice for microscopy image data, select a file in the first column of the table and preview and export any image data it contains.
116
144
 
117
145
  ![image](https://github.com/user-attachments/assets/e377ca71-2f30-447d-825e-d2feebf7061b)
118
146
 
147
+ ### Batch File Processing
119
148
 
120
-
121
- ### File inspector
122
-
123
- 1. After opening `Plugins > T-MIDAS > File selector`, enter the path to the folder containing the images to be processed (currently supports TIF, later also ZARR). You can also filter for filename suffix.
149
+ 1. After opening `Plugins > T-MIDAS > Batch Image Processing`, enter the path to the folder containing the images to be processed (currently supports TIF, later also ZARR). You can also filter for filename suffix.
124
150
 
125
151
  ![image](https://github.com/user-attachments/assets/41ecb689-9abe-4371-83b5-9c5eb37069f9)
126
152
 
@@ -138,11 +164,15 @@ You might first want to batch convert microscopy image data. Currently, this plu
138
164
 
139
165
  Note that whenever you click on an `Original File` or `Processed File` in the table, it will replace the one that is currently shown in the viewer. So naturally, you'd first select the original image, and then the processed image to correctly see the image pair that you want to inspect.
140
166
 
141
- ### Label inspector
142
- If you have already segmented a folder full of images and now you want to maybe inspect and edit each label image, you can use the `Plugins > T-MIDAS > Label inspector`, which automatically saves your changes to the existing label image once you click the `Save Changes and Continue` button (bottom right).
167
+ ### Batch Label Inspection
168
+ If you have already segmented a folder full of images and now you want to maybe inspect and edit each label image, you can use the `Plugins > T-MIDAS > Batch Label Inspection`, which automatically saves your changes to the existing label image once you click the `Save Changes and Continue` button (bottom right).
143
169
 
144
170
  ![image](https://github.com/user-attachments/assets/0bf8c6ae-4212-449d-8183-e91b23ba740e)
145
171
 
172
+ ### Batch Crop Anything
173
+ This pipeline combines the Segment Anything Model (SAM) for automatic object detection with an interactive interface for selecting and cropping multiple objects from images. To launch the widget, open `Plugins > T-MIDAS > Batch Crop Anything`
174
+
175
+ ![image](https://github.com/user-attachments/assets/6d72c2a2-1064-4a27-b398-a9b86fcbc443)
146
176
 
147
177
 
148
178
  ## Contributing
@@ -6,11 +6,31 @@
6
6
  [![tests](https://github.com/macromeer/napari-tmidas/workflows/tests/badge.svg)](https://github.com/macromeer/napari-tmidas/actions)
7
7
  [![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-tmidas)](https://napari-hub.org/plugins/napari-tmidas)
8
8
  <!-- [![codecov](https://codecov.io/gh/macromeer/napari-tmidas/branch/main/graph/badge.svg)](https://codecov.io/gh/macromeer/napari-tmidas) -->
9
- This Napari plugin allows you to perform batch image processing without a graphics processing unit (GPU). It will still be fast because computations will run in parallel on your central processing unit (CPU).
9
+ The `napari-tmidas` plugin consists of a growing collection of pipelines for fast batch processing of microscopy images. This is a WIP and based on the CLI version of [T-MIDAS](https://github.com/MercaderLabAnatomy/T-MIDAS).
10
10
 
11
- This plugin provides you with a growing collection of pipelines for batch image preprocessing, segmentation, regions-of-interest (ROI) analysis and other useful features.
11
+ ## Feature Overview
12
+
13
+ ### Current Pipelines
14
+ 1. **Batch Image Processing**
15
+ - Process image folders with: Gamma correction, Z-projection, channel splitting, Gaussian/median filters, thresholding (Otsu/manual), and label cleaning
16
+
17
+ 2. **Batch Label Inspection**
18
+ - Review and edit label images with auto-save
19
+
20
+ 3. **Batch Microscopy Image Conversion**
21
+ - Convert .nd2/.lif/.ndpi/.czi/acquifer → .tif/.zarr with metadata preservation
22
+
23
+ 4. **Batch Crop Anything**
24
+ - Interactive ROI selection via click interface
25
+
26
+ 5. Batch ROI Colocalization
27
+ - Count colocalized labels across multiple channels
28
+
29
+
30
+
31
+ ### Coming Soon
32
+ New features arriving April 2025
12
33
 
13
- `napari-tmidas` is a work in progress (WIP) and an evolutionary step away from the [terminal / command-line version of T-MIDAS](https://github.com/MercaderLabAnatomy/T-MIDAS).
14
34
 
15
35
  ## Installation
16
36
 
@@ -29,29 +49,35 @@ To install the latest development version:
29
49
  pip install git+https://github.com/macromeer/napari-tmidas.git
30
50
 
31
51
  ### Dependencies
32
- For the File converter, we need some libraries to read some microscopy formats and to write ome-zarr:
52
+ To use the Batch Microscopy Image Conversion pipeline, we need some libraries to read microscopy formats and to write ome-zarr:
53
+
54
+ pip install nd2 readlif tiffslide pylibCZIrw acquifer-napari ome-zarr napari-ome-zarr
33
55
 
34
- pip install nd2 readlif tiffslide pylibCZIrw acquifer-napari ome-zarr
56
+ For the Batch Crop Anything pipeline, we need to install MobileSAM and its dependencies:
35
57
 
58
+ pip install git+https://github.com/ChaoningZhang/MobileSAM.git
59
+ pip install torch torchvision timm opencv-python
36
60
 
37
61
  ## Usage
38
62
 
63
+ To use the plugin, start napari in the activated virtual environment with this terminal command:
64
+
65
+ mamba run -n napari-tmidas napari
66
+
39
67
  You can find the installed plugin here:
40
68
 
41
69
  ![image](https://github.com/user-attachments/assets/504db09a-d66e-49eb-90cd-3237024d9d7a)
42
70
 
43
71
 
44
- ### File converter
72
+ ### Batch Microscopy Image Conversion
45
73
 
46
- You might first want to batch convert microscopy image data. Currently, this plugin supports `.nd2, .lif, .ndpi, .czi` and acquifer data. After launching the file converter, you can scan a folder of your choice for microscopy image data. It will also detect series images that you can preview. Start by selecting an original image in the first column of the table. This allows you to preview or convert.
74
+ You can start this pipeline via `Plugins > T-MIDAS > Batch Microscopy Image Conversion`. Currently, this pipeline supports the conversion of `.nd2, .lif, .ndpi, .czi` and acquifer data. After scanning a folder of your choice for microscopy image data, select a file in the first column of the table and preview and export any image data it contains.
47
75
 
48
76
  ![image](https://github.com/user-attachments/assets/e377ca71-2f30-447d-825e-d2feebf7061b)
49
77
 
78
+ ### Batch File Processing
50
79
 
51
-
52
- ### File inspector
53
-
54
- 1. After opening `Plugins > T-MIDAS > File selector`, enter the path to the folder containing the images to be processed (currently supports TIF, later also ZARR). You can also filter for filename suffix.
80
+ 1. After opening `Plugins > T-MIDAS > Batch Image Processing`, enter the path to the folder containing the images to be processed (currently supports TIF, later also ZARR). You can also filter for filename suffix.
55
81
 
56
82
  ![image](https://github.com/user-attachments/assets/41ecb689-9abe-4371-83b5-9c5eb37069f9)
57
83
 
@@ -69,11 +95,15 @@ You might first want to batch convert microscopy image data. Currently, this plu
69
95
 
70
96
  Note that whenever you click on an `Original File` or `Processed File` in the table, it will replace the one that is currently shown in the viewer. So naturally, you'd first select the original image, and then the processed image to correctly see the image pair that you want to inspect.
71
97
 
72
- ### Label inspector
73
- If you have already segmented a folder full of images and now you want to maybe inspect and edit each label image, you can use the `Plugins > T-MIDAS > Label inspector`, which automatically saves your changes to the existing label image once you click the `Save Changes and Continue` button (bottom right).
98
+ ### Batch Label Inspection
99
+ If you have already segmented a folder full of images and now you want to maybe inspect and edit each label image, you can use the `Plugins > T-MIDAS > Batch Label Inspection`, which automatically saves your changes to the existing label image once you click the `Save Changes and Continue` button (bottom right).
74
100
 
75
101
  ![image](https://github.com/user-attachments/assets/0bf8c6ae-4212-449d-8183-e91b23ba740e)
76
102
 
103
+ ### Batch Crop Anything
104
+ This pipeline combines the Segment Anything Model (SAM) for automatic object detection with an interactive interface for selecting and cropping multiple objects from images. To launch the widget, open `Plugins > T-MIDAS > Batch Crop Anything`
105
+
106
+ ![image](https://github.com/user-attachments/assets/6d72c2a2-1064-4a27-b398-a9b86fcbc443)
77
107
 
78
108
 
79
109
  ## Contributing
@@ -6,6 +6,7 @@ except ImportError:
6
6
 
7
7
  from ._label_inspection import label_inspector_widget
8
8
  from ._reader import napari_get_reader
9
+ from ._roi_colocalization import roi_colocalization_analyzer
9
10
  from ._sample_data import make_sample_data
10
11
  from ._writer import write_multiple, write_single_image
11
12
 
@@ -16,4 +17,6 @@ __all__ = (
16
17
  "make_sample_data",
17
18
  "file_selector",
18
19
  "label_inspector_widget",
20
+ "batch_crop_anything_widget",
21
+ "roi_colocalization_analyzer",
19
22
  )