celldetective 1.3.2__tar.gz → 1.3.3.post1__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 (114) hide show
  1. {celldetective-1.3.2 → celldetective-1.3.3.post1}/PKG-INFO +6 -6
  2. {celldetective-1.3.2 → celldetective-1.3.3.post1}/README.md +5 -5
  3. celldetective-1.3.3.post1/celldetective/_version.py +1 -0
  4. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/control_panel.py +2 -2
  5. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/measurement_options.py +35 -32
  6. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/process_block.py +5 -94
  7. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/retrain_segmentation_model_options.py +3 -1
  8. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/thresholds_gui.py +195 -199
  9. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/viewers.py +267 -13
  10. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/io.py +54 -7
  11. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/measure.py +125 -88
  12. celldetective-1.3.3.post1/celldetective/models/segmentation_effectors/ricm_bf_all_last/config_input.json +79 -0
  13. celldetective-1.3.3.post1/celldetective/models/segmentation_effectors/ricm_bf_all_last/ricm_bf_all_last +0 -0
  14. celldetective-1.3.3.post1/celldetective/models/segmentation_effectors/ricm_bf_all_last/training_instructions.json +37 -0
  15. celldetective-1.3.3.post1/celldetective/models/segmentation_effectors/test-transfer/config_input.json +39 -0
  16. celldetective-1.3.3.post1/celldetective/models/segmentation_effectors/test-transfer/test-transfer +0 -0
  17. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective.egg-info/PKG-INFO +6 -6
  18. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective.egg-info/SOURCES.txt +5 -0
  19. celldetective-1.3.2/celldetective/_version.py +0 -1
  20. {celldetective-1.3.2 → celldetective-1.3.3.post1}/LICENSE +0 -0
  21. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/__init__.py +0 -0
  22. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/__main__.py +0 -0
  23. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/datasets/segmentation_annotations/blank +0 -0
  24. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/datasets/signal_annotations/blank +0 -0
  25. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/events.py +0 -0
  26. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/extra_properties.py +0 -0
  27. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/filters.py +0 -0
  28. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/InitWindow.py +0 -0
  29. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/__init__.py +0 -0
  30. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/about.py +0 -0
  31. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/analyze_block.py +0 -0
  32. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/btrack_options.py +0 -0
  33. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/classifier_widget.py +0 -0
  34. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/configure_new_exp.py +0 -0
  35. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/generic_signal_plot.py +0 -0
  36. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/gui_utils.py +0 -0
  37. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/DL-segmentation-strategy.json +0 -0
  38. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/Threshold-vs-DL.json +0 -0
  39. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/cell-populations.json +0 -0
  40. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/exp-structure.json +0 -0
  41. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/feature-btrack.json +0 -0
  42. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/neighborhood.json +0 -0
  43. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/prefilter-for-segmentation.json +0 -0
  44. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/preprocessing.json +0 -0
  45. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/propagate-classification.json +0 -0
  46. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/track-postprocessing.json +0 -0
  47. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/help/tracking.json +0 -0
  48. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/json_readers.py +0 -0
  49. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/layouts.py +0 -0
  50. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/neighborhood_options.py +0 -0
  51. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/plot_measurements.py +0 -0
  52. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/plot_signals_ui.py +0 -0
  53. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/retrain_signal_model_options.py +0 -0
  54. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/seg_model_loader.py +0 -0
  55. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/signal_annotator.py +0 -0
  56. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/signal_annotator2.py +0 -0
  57. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/signal_annotator_options.py +0 -0
  58. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/styles.py +0 -0
  59. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/survival_ui.py +0 -0
  60. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/gui/tableUI.py +0 -0
  61. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/logo-large.png +0 -0
  62. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/logo.png +0 -0
  63. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/signals_icon.png +0 -0
  64. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/splash-test.png +0 -0
  65. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/splash.png +0 -0
  66. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/splash0.png +0 -0
  67. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/survival2.png +0 -0
  68. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/vignette_signals2.png +0 -0
  69. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/icons/vignette_signals2.svg +0 -0
  70. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/links/zenodo.json +0 -0
  71. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/pair_signal_detection/blank +0 -0
  72. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/segmentation_effectors/blank +0 -0
  73. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/segmentation_generic/blank +0 -0
  74. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/segmentation_targets/blank +0 -0
  75. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/signal_detection/blank +0 -0
  76. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/tracking_configs/biased_motion.json +0 -0
  77. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/tracking_configs/mcf7.json +0 -0
  78. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/tracking_configs/no_z_motion.json +0 -0
  79. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/tracking_configs/ricm.json +0 -0
  80. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/models/tracking_configs/ricm2.json +0 -0
  81. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/neighborhood.py +0 -0
  82. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/preprocessing.py +0 -0
  83. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/relative_measurements.py +0 -0
  84. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/analyze_signals.py +0 -0
  85. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/measure_cells.py +0 -0
  86. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/measure_relative.py +0 -0
  87. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/segment_cells.py +0 -0
  88. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/segment_cells_thresholds.py +0 -0
  89. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/track_cells.py +0 -0
  90. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/train_segmentation_model.py +0 -0
  91. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/scripts/train_signal_model.py +0 -0
  92. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/segmentation.py +0 -0
  93. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/signals.py +0 -0
  94. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/tracking.py +0 -0
  95. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective/utils.py +0 -0
  96. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective.egg-info/dependency_links.txt +0 -0
  97. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective.egg-info/entry_points.txt +0 -0
  98. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective.egg-info/not-zip-safe +0 -0
  99. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective.egg-info/requires.txt +0 -0
  100. {celldetective-1.3.2 → celldetective-1.3.3.post1}/celldetective.egg-info/top_level.txt +0 -0
  101. {celldetective-1.3.2 → celldetective-1.3.3.post1}/setup.cfg +0 -0
  102. {celldetective-1.3.2 → celldetective-1.3.3.post1}/setup.py +0 -0
  103. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/__init__.py +0 -0
  104. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_events.py +0 -0
  105. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_filters.py +0 -0
  106. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_io.py +0 -0
  107. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_measure.py +0 -0
  108. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_neighborhood.py +0 -0
  109. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_preprocessing.py +0 -0
  110. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_qt.py +0 -0
  111. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_segmentation.py +0 -0
  112. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_signals.py +0 -0
  113. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_tracking.py +0 -0
  114. {celldetective-1.3.2 → celldetective-1.3.3.post1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: celldetective
3
- Version: 1.3.2
3
+ Version: 1.3.3.post1
4
4
  Summary: description
5
5
  Home-page: http://github.com/remyeltorro/celldetective
6
6
  Author: Rémy Torro
@@ -172,20 +172,20 @@ For more information about how to get started, please check the [documentation](
172
172
  # How to cite?
173
173
 
174
174
  If you use this software in your research, please cite the
175
- [Celldetective](https://www.biorxiv.org/content/10.1101/2024.03.15.585250v1)
175
+ [Celldetective](https://www.biorxiv.org/content/10.1101/2024.03.15.585250v3)
176
176
  paper (currently preprint):
177
177
 
178
178
  ``` raw
179
179
  @article {Torro2024.03.15.585250,
180
- author = {R{\'e}my Torro and Beatriz D{\`\i}az-Bello and Dalia El Arawi and Lorna Ammer and Patrick Chames and Kheya Sengupta and Laurent Limozin},
180
+ author = {Torro, R{\'e}my and D{\'\i}az-Bello, Beatriz and Arawi, Dalia El and Dervanova, Ksenija and Ammer, Lorna and Dupuy, Florian and Chames, Patrick and Sengupta, Kheya and Limozin, Laurent},
181
181
  title = {Celldetective: an AI-enhanced image analysis tool for unraveling dynamic cell interactions},
182
182
  elocation-id = {2024.03.15.585250},
183
183
  year = {2024},
184
184
  doi = {10.1101/2024.03.15.585250},
185
185
  publisher = {Cold Spring Harbor Laboratory},
186
- abstract = {A current key challenge in bioimaging is the analysis of multimodal and multidimensional data reporting dynamic interactions between diverse cell populations. We developed Celldetective, a software that integrates AI-based segmentation and tracking algorithms and automated signal analysis into a user-friendly graphical interface. It offers complete interactive visualization, annotation, and training capabilities. We demonstrate it by analyzing original experimental data of spreading immune effector cells as well as antibody-dependent cell cytotoxicity events using multimodal fluorescence microscopy.Competing Interest StatementThe authors have declared no competing interest.},
187
- URL = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250},
188
- eprint = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250.full.pdf},
186
+ abstract = {A current challenge in bioimaging for immunology and immunotherapy research lies in analyzing multimodal and multidimensional data that capture dynamic interactions between diverse cell populations. Here, we introduce Celldetective, an open-source Python-based software designed for high-performance, end-to-end analysis of image-based in vitro immune and immunotherapy assays. Purpose-built for multicondition, 2D multichannel time-lapse microscopy of mixed cell populations, Celldetective is optimized for the needs of immunology assays. The software seamlessly integrates AI-based segmentation, Bayesian tracking, and automated single-cell event detection, all within an intuitive graphical interface that supports interactive visualization, annotation, and training capabilities. We demonstrate its utility with original data on immune effector cell interactions with an activating surface, mediated by bispecific antibodies, and further showcase its potential for analyzing extensive sets of pairwise interactions in antibody-dependent cell cytotoxicity events.Competing Interest StatementThe authors have declared no competing interest.},
187
+ URL = {https://www.biorxiv.org/content/early/2024/11/13/2024.03.15.585250},
188
+ eprint = {https://www.biorxiv.org/content/early/2024/11/13/2024.03.15.585250.full.pdf},
189
189
  journal = {bioRxiv}
190
190
  }
191
191
  ```
@@ -128,20 +128,20 @@ For more information about how to get started, please check the [documentation](
128
128
  # How to cite?
129
129
 
130
130
  If you use this software in your research, please cite the
131
- [Celldetective](https://www.biorxiv.org/content/10.1101/2024.03.15.585250v1)
131
+ [Celldetective](https://www.biorxiv.org/content/10.1101/2024.03.15.585250v3)
132
132
  paper (currently preprint):
133
133
 
134
134
  ``` raw
135
135
  @article {Torro2024.03.15.585250,
136
- author = {R{\'e}my Torro and Beatriz D{\`\i}az-Bello and Dalia El Arawi and Lorna Ammer and Patrick Chames and Kheya Sengupta and Laurent Limozin},
136
+ author = {Torro, R{\'e}my and D{\'\i}az-Bello, Beatriz and Arawi, Dalia El and Dervanova, Ksenija and Ammer, Lorna and Dupuy, Florian and Chames, Patrick and Sengupta, Kheya and Limozin, Laurent},
137
137
  title = {Celldetective: an AI-enhanced image analysis tool for unraveling dynamic cell interactions},
138
138
  elocation-id = {2024.03.15.585250},
139
139
  year = {2024},
140
140
  doi = {10.1101/2024.03.15.585250},
141
141
  publisher = {Cold Spring Harbor Laboratory},
142
- abstract = {A current key challenge in bioimaging is the analysis of multimodal and multidimensional data reporting dynamic interactions between diverse cell populations. We developed Celldetective, a software that integrates AI-based segmentation and tracking algorithms and automated signal analysis into a user-friendly graphical interface. It offers complete interactive visualization, annotation, and training capabilities. We demonstrate it by analyzing original experimental data of spreading immune effector cells as well as antibody-dependent cell cytotoxicity events using multimodal fluorescence microscopy.Competing Interest StatementThe authors have declared no competing interest.},
143
- URL = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250},
144
- eprint = {https://www.biorxiv.org/content/early/2024/03/17/2024.03.15.585250.full.pdf},
142
+ abstract = {A current challenge in bioimaging for immunology and immunotherapy research lies in analyzing multimodal and multidimensional data that capture dynamic interactions between diverse cell populations. Here, we introduce Celldetective, an open-source Python-based software designed for high-performance, end-to-end analysis of image-based in vitro immune and immunotherapy assays. Purpose-built for multicondition, 2D multichannel time-lapse microscopy of mixed cell populations, Celldetective is optimized for the needs of immunology assays. The software seamlessly integrates AI-based segmentation, Bayesian tracking, and automated single-cell event detection, all within an intuitive graphical interface that supports interactive visualization, annotation, and training capabilities. We demonstrate its utility with original data on immune effector cell interactions with an activating surface, mediated by bispecific antibodies, and further showcase its potential for analyzing extensive sets of pairwise interactions in antibody-dependent cell cytotoxicity events.Competing Interest StatementThe authors have declared no competing interest.},
143
+ URL = {https://www.biorxiv.org/content/early/2024/11/13/2024.03.15.585250},
144
+ eprint = {https://www.biorxiv.org/content/early/2024/11/13/2024.03.15.585250.full.pdf},
145
145
  journal = {bioRxiv}
146
146
  }
147
147
  ```
@@ -0,0 +1 @@
1
+ __version__ = "1.3.3.post1"
@@ -450,8 +450,8 @@ class ControlPanel(QMainWindow, Styles):
450
450
  self.view_stack_btn.setEnabled(False)
451
451
  self.ProcessEffectors.signal_analysis_action.setEnabled(True)
452
452
  self.ProcessTargets.signal_analysis_action.setEnabled(True)
453
-
454
- self.delete_tracks_btn.hide()
453
+ if hasattr(self,'delete_tracks_btn'):
454
+ self.delete_tracks_btn.hide()
455
455
  self.ProcessTargets.delete_tracks_btn.hide()
456
456
  self.ProcessEffectors.delete_tracks_btn.hide()
457
457
  else:
@@ -10,7 +10,7 @@ from superqt import QLabeledDoubleSlider
10
10
  from superqt.fonticon import icon
11
11
  from fonticon_mdi6 import MDI6
12
12
 
13
- from celldetective.gui.thresholds_gui import ThresholdSpot
13
+ #from celldetective.gui.thresholds_gui import ThresholdSpot
14
14
  from celldetective.utils import extract_experiment_channels, get_software_location
15
15
  from celldetective.io import load_frames, auto_load_number_of_frames
16
16
  from celldetective.measure import compute_haralick_features
@@ -26,7 +26,7 @@ from tifffile import imread
26
26
  from pathlib import Path
27
27
  import gc
28
28
 
29
- from celldetective.gui.viewers import CellEdgeVisualizer
29
+ from celldetective.gui.viewers import CellEdgeVisualizer, SpotDetectionVisualizer
30
30
  from celldetective.gui.layouts import ProtocolDesignerLayout, BackgroundFitCorrectionLayout, LocalCorrectionLayout
31
31
  from celldetective.gui.gui_utils import ThresholdLineEdit
32
32
  from celldetective.gui import Styles
@@ -951,51 +951,54 @@ class ConfigMeasurements(QMainWindow, Styles):
951
951
 
952
952
  layout.addWidget(self.threshold_lbl, 4, 0)
953
953
  layout.addWidget(self.threshold_value, 4, 1)
954
- self.preview_spot = QPushButton('Preview')
955
- self.preview_spot.clicked.connect(self.spot_preview)
956
- self.preview_spot.setStyleSheet(self.button_style_sheet_2)
957
- layout.addWidget(self.preview_spot, 5, 0, 1, 2)
958
- self.spot_channel.setEnabled(False)
959
- self.spot_channel_lbl.setEnabled(False)
960
- self.diameter_value.setEnabled(False)
961
- self.diameter_lbl.setEnabled(False)
962
- self.threshold_value.setEnabled(False)
963
- self.threshold_lbl.setEnabled(False)
964
- self.preview_spot.setEnabled(False)
965
954
 
955
+ self.spot_viewer_btn = QPushButton()
956
+ self.spot_viewer_btn.clicked.connect(self.spot_preview)
957
+ self.spot_viewer_btn.setIcon(icon(MDI6.image_check, color="k"))
958
+ self.spot_viewer_btn.setStyleSheet(self.button_select_all)
959
+ self.spot_viewer_btn.setToolTip('Set detection parameters visually.')
960
+ layout.addWidget(self.spot_viewer_btn, 1, 1, 1, 1, alignment=Qt.AlignRight)
961
+
962
+ self.spot_detection_widgets = [self.spot_channel, self.spot_channel_lbl, self.diameter_value, self.diameter_lbl, self.threshold_value, self.threshold_lbl, self.spot_viewer_btn]
963
+ for wg in self.spot_detection_widgets:
964
+ wg.setEnabled(False)
966
965
 
967
966
  def enable_spot_preview(self):
968
967
 
969
968
  diam = self.diameter_value.text().replace(',','').replace('.','')
970
969
  thresh = self.threshold_value.text().replace(',','').replace('.','')
971
970
  if diam.isnumeric() and thresh.isnumeric():
972
- self.preview_spot.setEnabled(True)
971
+ self.spot_viewer_btn.setEnabled(True)
973
972
  else:
974
- self.preview_spot.setEnabled(False)
973
+ self.spot_viewer_btn.setEnabled(False)
975
974
 
976
975
  def spot_preview(self):
977
976
  self.locate_image()
978
977
  if self.test_frame is not None:
979
978
  self.locate_mask()
980
979
  if self.test_mask is not None:
981
- self.spot_visual = ThresholdSpot(current_channel=self.spot_channel.currentIndex(), img=self.test_frame,
982
- mask=self.test_mask, parent_window=self)
980
+ self.spot_visual = SpotDetectionVisualizer(frame_slider=True,
981
+ contrast_slider=True,
982
+ cell_type=self.mode,
983
+ channel_cb=True,
984
+ channel_names = self.channel_names,
985
+ stack_path=self.current_stack,
986
+ n_channels=len(self.channel_names),
987
+ target_channel=self.spot_channel.currentIndex(),
988
+ window_title='Detect spots',
989
+ parent_channel_cb=self.spot_channel,
990
+ parent_diameter_le=self.diameter_value,
991
+ parent_threshold_le=self.threshold_value,
992
+ PxToUm = 1,)
993
+ self.spot_visual.show()
994
+ #self.spot_visual = ThresholdSpot(current_channel=self.spot_channel.currentIndex(), img=self.test_frame,
995
+ # mask=self.test_mask, parent_window=self)
983
996
 
984
997
  def enable_spot_detection(self):
985
- if self.spot_check.isChecked():
986
- self.spot_channel.setEnabled(True)
987
- self.spot_channel_lbl.setEnabled(True)
988
- self.diameter_value.setEnabled(True)
989
- self.diameter_lbl.setEnabled(True)
990
- self.threshold_value.setEnabled(True)
991
- self.threshold_lbl.setEnabled(True)
992
- self.preview_spot.setEnabled(True)
993
998
 
999
+ if self.spot_check.isChecked():
1000
+ for wg in self.spot_detection_widgets:
1001
+ wg.setEnabled(True)
994
1002
  else:
995
- self.spot_channel.setEnabled(False)
996
- self.spot_channel_lbl.setEnabled(False)
997
- self.diameter_value.setEnabled(False)
998
- self.diameter_lbl.setEnabled(False)
999
- self.threshold_value.setEnabled(False)
1000
- self.threshold_lbl.setEnabled(False)
1001
- self.preview_spot.setEnabled(False)
1003
+ for wg in self.spot_detection_widgets:
1004
+ wg.setEnabled(False)
@@ -291,6 +291,7 @@ class ProcessPanel(QFrame, Styles):
291
291
  self.signal_models_list.addItems(signal_models)
292
292
 
293
293
  def generate_tracking_options(self):
294
+
294
295
  grid_track = QHBoxLayout()
295
296
 
296
297
  self.track_action = QCheckBox("TRACK")
@@ -303,16 +304,6 @@ class ProcessPanel(QFrame, Styles):
303
304
  padding-top: 5px;
304
305
  """)
305
306
  grid_track.addWidget(self.track_action, 75)
306
- #self.to_disable.append(self.track_action_tc)
307
-
308
- # self.show_track_table_btn = QPushButton()
309
- # self.show_track_table_btn.setIcon(icon(MDI6.table,color="black"))
310
- # self.show_track_table_btn.setIconSize(QSize(20, 20))
311
- # self.show_track_table_btn.setToolTip("Show trajectories table.")
312
- # self.show_track_table_btn.setStyleSheet(self.button_select_all)
313
- # #self.show_track_table_btn.clicked.connect(self.display_trajectory_table)
314
- # self.show_track_table_btn.setEnabled(False)
315
- # grid_track.addWidget(self.show_track_table_btn, 6) #4,3,1,1, alignment=Qt.AlignLeft
316
307
 
317
308
  self.delete_tracks_btn = QPushButton()
318
309
  self.delete_tracks_btn.setIcon(icon(MDI6.trash_can,color="black"))
@@ -640,25 +631,6 @@ class ProcessPanel(QFrame, Styles):
640
631
 
641
632
  self.seg_model_list.insertSeparator(len(self.models_truncated))
642
633
 
643
-
644
- #if ("live_nuclei_channel" in self.exp_channels)*("dead_nuclei_channel" in self.exp_channels):
645
- # print("both channels found")
646
- # index = self.tc_seg_model_list.findText("MCF7_Hoescht_PI_w_primary_NK", Qt.MatchFixedString)
647
- # if index >= 0:
648
- # self.tc_seg_model_list.setCurrentIndex(index)
649
- # elif ("live_nuclei_channel" in self.exp_channels)*("dead_nuclei_channel" not in self.exp_channels):
650
- # index = self.tc_seg_model_list.findText("MCF7_Hoescht_w_primary_NK", Qt.MatchFixedString)
651
- # if index >= 0:
652
- # self.tc_seg_model_list.setCurrentIndex(index)
653
- # elif ("live_nuclei_channel" not in self.exp_channels)*("dead_nuclei_channel" in self.exp_channels):
654
- # index = self.tc_seg_model_list.findText("MCF7_PI_w_primary_NK", Qt.MatchFixedString)
655
- # if index >= 0:
656
- # self.tc_seg_model_list.setCurrentIndex(index)
657
- # elif ("live_nuclei_channel" not in self.exp_channels)*("dead_nuclei_channel" not in self.exp_channels)*("adhesion_channel" in self.exp_channels):
658
- # index = self.tc_seg_model_list.findText("RICM", Qt.MatchFixedString)
659
- # if index >= 0:
660
- # self.tc_seg_model_list.setCurrentIndex(index)
661
-
662
634
  def tick_all_actions(self):
663
635
  self.switch_all_ticks_option()
664
636
  if self.all_ticked:
@@ -884,28 +856,7 @@ class ProcessPanel(QFrame, Styles):
884
856
  if self.segment_action.isChecked():
885
857
  self.segment_action.setChecked(False)
886
858
 
887
- # QApplication.restoreOverrideCursor()
888
- # self.unfreeze()
889
-
890
- # def view_current_stack_with_scale_bar(self):
891
-
892
- # self.parent_window.locate_image()
893
- # if self.parent_window.current_stack is not None:
894
- # self.viewer = CellSizeViewer(
895
- # initial_diameter = float(self.diameter_le.text().replace(',', '.')),
896
- # parent_le = self.diameter_le,
897
- # stack_path=self.parent_window.current_stack,
898
- # window_title=f'Position {self.parent_window.position_list.currentText()}',
899
- # frame_slider = True,
900
- # contrast_slider = True,
901
- # channel_cb = True,
902
- # channel_names = self.parent_window.exp_channels,
903
- # n_channels = self.parent_window.nbr_channels,
904
- # PxToUm = 1,
905
- # )
906
- # self.viewer.show()
907
-
908
-
859
+ self.cellpose_calibrated = False
909
860
 
910
861
  def open_napari_tracking(self):
911
862
  print(f'View the tracks before post-processing for position {self.parent_window.pos} in napari...')
@@ -933,24 +884,6 @@ class ProcessPanel(QFrame, Styles):
933
884
  if returnValue == QMessageBox.Ok:
934
885
  return None
935
886
 
936
- # def interpret_pos_location(self):
937
-
938
- # """
939
- # Read the well/position selection from the control panel to decide which data to load
940
- # Set position_indices to None if all positions must be taken
941
-
942
- # """
943
-
944
- # if self.well_option==len(self.wells):
945
- # self.well_indices = np.arange(len(self.wells))
946
- # else:
947
- # self.well_indices = np.array([self.well_option],dtype=int)
948
-
949
- # if self.position_option==0:
950
- # self.position_indices = None
951
- # else:
952
- # self.position_indices = np.array([self.position_option],dtype=int)
953
-
954
887
  def load_available_tables(self):
955
888
 
956
889
  """
@@ -1016,6 +949,7 @@ class ProcessPanel(QFrame, Styles):
1016
949
  self.process_population()
1017
950
 
1018
951
 
952
+
1019
953
  class NeighPanel(QFrame, Styles):
1020
954
  def __init__(self, parent_window):
1021
955
 
@@ -1523,35 +1457,12 @@ class NeighPanel(QFrame, Styles):
1523
1457
  rel_measure_at_position(self.pos)
1524
1458
 
1525
1459
  if self.signal_analysis_action.isChecked():
1526
-
1527
- # df_targets = get_position_pickle(self.pos, population='targets')
1528
- # df_effectors = get_position_pickle(self.pos, population='effectors')
1529
- # self.dataframes = {
1530
- # 'targets': df_targets,
1531
- # 'effectors': df_effectors,
1532
- # }
1533
-
1534
- # df_pairs = get_position_table(self.pos, population='pairs')
1535
-
1536
- # # Need to identify expected reference / neighbor tables
1537
- # model_path = locate_signal_model(self.pair_signal_models_list.currentText(), pairs=True)
1538
- # print(f'Looking for model in {model_path}...')
1539
- # complete_path = model_path
1540
- # complete_path = rf"{complete_path}"
1541
- # model_config_path = os.sep.join([complete_path, 'config_input.json'])
1542
- # model_config_path = rf"{model_config_path}"
1543
- # f = open(model_config_path)
1544
- # model_config_path = json.load(f)
1545
-
1546
- # reference_population = model_config_path['reference_population']
1547
- # neighbor_population = model_config_path['neighbor_population']
1548
-
1549
- # analyze_pair_signals(df_pairs, self.dataframes[reference_population], self.dataframes[neighbor_population], model=self.pair_signal_models_list.currentText())
1460
+
1550
1461
  analyze_pair_signals_at_position(self.pos, self.pair_signal_models_list.currentText(), use_gpu=self.parent_window.parent_window.use_gpu)
1462
+
1551
1463
  self.parent_window.update_position_options()
1552
1464
  print('Done.')
1553
1465
 
1554
-
1555
1466
  def check_signals2(self):
1556
1467
 
1557
1468
  test = self.parent_window.locate_selected_position()
@@ -616,4 +616,6 @@ class ConfigSegmentationModelTraining(QMainWindow, Styles):
616
616
 
617
617
  train_segmentation_model(model_folder+"training_instructions.json", use_gpu=self.parent_window.parent_window.parent_window.use_gpu)
618
618
 
619
- # self.parent.refresh_signal_models()
619
+ self.parent_window.init_seg_model_list()
620
+ idx = self.parent_window.seg_model_list.findText(model_name)
621
+ self.parent_window.seg_model_list.setCurrentIndex(idx)