small-fish-gui 1.10.0__py3-none-any.whl → 1.10.1__py3-none-any.whl

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.
@@ -37,7 +37,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37
37
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
38
38
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39
39
  """
40
- __version__ = "1.10.0"
40
+ __version__ = "1.10.1"
41
41
  __wiki__ = "https://github.com/2Echoes/small_fish_gui/wiki"
42
42
 
43
43
  import os
@@ -55,6 +55,8 @@ def correct_spots(
55
55
  for im, color in zip(other_images, other_colors) :
56
56
  Viewer.add_image(im, scale=scale, blending='additive', visible=False, colormap=color, contrast_limits=[im.min(), im.max()])
57
57
 
58
+
59
+
58
60
  single_layer = Viewer.add_points( # single molecule spots; this layer can be update by user.
59
61
  spots,
60
62
  size = 5,
@@ -65,7 +67,7 @@ def correct_spots(
65
67
  symbol= 'disc',
66
68
  name= 'single spots',
67
69
  features={
68
- "cluster_id" : spot_cluster_id if not spot_cluster_id is None else [],
70
+ "cluster_id" : spot_cluster_id if not spot_cluster_id is None else [None] * len(spots),
69
71
  "end" : [True] * len(spots)
70
72
  }
71
73
  )
@@ -127,10 +129,6 @@ def correct_spots(
127
129
  Viewer.show(block=False)
128
130
  napari.run()
129
131
 
130
- new_spots = np.concatenate([
131
- single_layer.data,
132
- single_layer.features.loc[:,["cluster_id"]].to_numpy()
133
- ], axis=1).astype(int)
134
132
 
135
133
  if type(clusters) != type(None) :
136
134
  new_clusters = np.concatenate([
@@ -138,10 +136,16 @@ def correct_spots(
138
136
  cluster_layer.features.loc[:,["spot_number","cluster_id"]].to_numpy()
139
137
  ],axis=1)
140
138
 
139
+ new_spots = np.concatenate([
140
+ single_layer.data,
141
+ single_layer.features.loc[:,["cluster_id"]].to_numpy()
142
+ ], axis=1).astype(int)
143
+
141
144
  new_cluster_radius = widget_cluster_updater.cluster_radius
142
145
  new_min_spot_number = widget_cluster_updater.min_spot
143
146
 
144
- else :
147
+ else :
148
+ new_spots = single_layer.data
145
149
  new_clusters = None
146
150
  new_cluster_radius = None
147
151
  new_min_spot_number = None
@@ -217,16 +217,16 @@ def initiate_detection(user_parameters : pipeline_parameters, map_, shape) :
217
217
  if voxel_size is None or not user_parameters.get('voxel_size') is None:
218
218
  pass
219
219
  else :
220
- detection_parameters['voxel_size'] = [int(v) for v in voxel_size]
221
- detection_parameters['voxel_size_z'] = round(voxel_size[0])
222
- detection_parameters['voxel_size_y'] = round(voxel_size[1])
223
- detection_parameters['voxel_size_x'] = round(voxel_size[2])
220
+ detection_parameters['voxel_size'] = [round(v) if isinstance(v, (float,int)) else None for v in voxel_size]
221
+ detection_parameters['voxel_size_z'] = detection_parameters['voxel_size'][0]
222
+ detection_parameters['voxel_size_y'] = detection_parameters['voxel_size'][1]
223
+ detection_parameters['voxel_size_x'] = detection_parameters['voxel_size'][2]
224
224
 
225
225
  #Setting default spot size to 1.5 voxel
226
226
  if detection_parameters.get('spot_size') is None :
227
- detection_parameters['spot_size_z'] = round(detection_parameters['voxel_size_z']*1.5) if not detection_parameters['voxel_size_z'] is None else None
228
- detection_parameters['spot_size_y'] = round(detection_parameters['voxel_size_y']*1.5) if not detection_parameters['voxel_size_y'] is None else None
229
- detection_parameters['spot_size_x'] = round(detection_parameters['voxel_size_x']*1.5) if not detection_parameters['voxel_size_x'] is None else None
227
+ detection_parameters['spot_size_z'] = round(detection_parameters['voxel_size_z']*1.5) if isinstance(detection_parameters['voxel_size_z'], (float,int)) else None
228
+ detection_parameters['spot_size_y'] = round(detection_parameters['voxel_size_y']*1.5) if isinstance(detection_parameters['voxel_size_y'],(float,int)) else None
229
+ detection_parameters['spot_size_x'] = round(detection_parameters['voxel_size_x']*1.5) if isinstance(detection_parameters['voxel_size_x'],(float,int)) else None
230
230
 
231
231
  while True :
232
232
  detection_parameters = detection_parameters_promt(
@@ -275,7 +275,8 @@ def _launch_detection(image, image_input_values: dict) :
275
275
 
276
276
  if type(threshold) == type(None) :
277
277
  threshold = threshold_penalty * compute_auto_threshold(image, voxel_size=voxel_size, spot_radius=spot_size, log_kernel_size=log_kernel_size, minimum_distance=minimum_distance)
278
-
278
+ threshold = max(threshold,15) # Force threshold to be at least 15 to match napari widget and to not have too many spots for weak configs
279
+
279
280
  filtered_image = _apply_log_filter(
280
281
  image=image,
281
282
  voxel_size=voxel_size,
@@ -827,7 +828,7 @@ def _create_threshold_slider(
827
828
  'size': 5,
828
829
  'scale' : scale,
829
830
  'face_color' : 'transparent',
830
- 'edge_color' : 'red',
831
+ 'border_color' : 'red',
831
832
  'symbol' : 'disc',
832
833
  'opacity' : 0.7,
833
834
  'blending' : 'translucent',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: small_fish_gui
3
- Version: 1.10.0
3
+ Version: 1.10.1
4
4
  Summary: Small Fish is a python application for the analysis of smFish images. It provides a ready to use graphical interface to combine famous python packages for cell analysis without any need for coding.
5
5
  Project-URL: Homepage, https://github.com/2Echoes/small_fish
6
6
  Project-URL: Wiki, https://github.com/2Echoes/small_fish_gui/wiki
@@ -10,7 +10,7 @@ License-File: LICENSE
10
10
  Classifier: License :: OSI Approved :: BSD License
11
11
  Classifier: Operating System :: OS Independent
12
12
  Classifier: Programming Language :: Python :: 3
13
- Requires-Python: >=3.8
13
+ Requires-Python: >=3.9
14
14
  Requires-Dist: aicsimageio>=4.14.0
15
15
  Requires-Dist: big-fish==0.6.2
16
16
  Requires-Dist: cellpose==3.0.7
@@ -1,6 +1,6 @@
1
1
  small_fish_gui/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
2
2
  small_fish_gui/README.md,sha256=SFXhmWiISVrOd_cBUodAYaHhMPeKBXyVoPe-fiBxuBw,4671
3
- small_fish_gui/__init__.py,sha256=FQ99kPNleb90KdywZ4bt2NiizCwyfooTZhndH5O_no8,2050
3
+ small_fish_gui/__init__.py,sha256=44EaSpou5NLatD2ClFxZDEBAJwaf4uIHVZEIGzgeOI0,2050
4
4
  small_fish_gui/__main__.py,sha256=mgO_BmBGBsp8steg_lcwCPZ7QzgjgeScL8Npgs1D9Pk,1643
5
5
  small_fish_gui/hints.py,sha256=57pO8WA_PymBm5QyXCgYxnZIqqt86B-hO_s_6sv8b5s,1962
6
6
  small_fish_gui/requirements.txt,sha256=udO54grAFrmnEqUQC4rDeUMaIyBz3hYB1LJtu1ld7tg,354
@@ -19,7 +19,7 @@ small_fish_gui/gui/__init__.py,sha256=k08QFdLv2IXR8a6f8aPzy6iJ6MjDI7ZV143CH-BEXu
19
19
  small_fish_gui/gui/_napari_widgets.py,sha256=SohHKdlPrnky4He-tbw6X10FOGSAUA0dN-3eEs_keU0,18781
20
20
  small_fish_gui/gui/animation.py,sha256=MnYsA1kxQZ72L_H0knxOs41lG0ZZv1re7gSgYNmZY00,983
21
21
  small_fish_gui/gui/layout.py,sha256=f45acK2I7o9Q3LYY23G4XAJ8HPoD9mp7AJNNlLbUByI,14371
22
- small_fish_gui/gui/napari_visualiser.py,sha256=L_A4V8FN2a-6Kr45t8KBdZVj5qnzajSvSTIUrGlXU9M,9937
22
+ small_fish_gui/gui/napari_visualiser.py,sha256=g9ZIcCBQ3HHjclbk8EsJYLLAIdCK-uSYg123-vjP5PQ,10011
23
23
  small_fish_gui/gui/prompts.py,sha256=Z1ZAaayS1ywK4PxK4YyzrAUNYBFIQH4W05oX6P47OdM,15508
24
24
  small_fish_gui/gui/testing.ipynb,sha256=4TJar2T0Q_EdnCzMFGqdLu7tVbNYud5C8DQcoVRttpU,74574
25
25
  small_fish_gui/gui/theme.py,sha256=30nujS48ZRdD1HVbzdEBkiAWlhow1AGgXSQNZcGEsaQ,118
@@ -36,14 +36,14 @@ small_fish_gui/pipeline/_custom_errors.py,sha256=tQ-AUhgzIFpK30AZiQQrtHCHyGVRDdA
36
36
  small_fish_gui/pipeline/_preprocess.py,sha256=AzSbfIFWXVWs_WRGgZ_2X5afVkbnC0iBMvuP9F3Quc4,15136
37
37
  small_fish_gui/pipeline/_signaltonoise.py,sha256=7A9t7xu7zghI6cr201Ldm-LjJ5NOuP56VSeJ8KIzcUo,8497
38
38
  small_fish_gui/pipeline/actions.py,sha256=nwXD3NLSJHLQC3hpeNRf_JfBbnCZEQsRgH2W74vXAyk,16048
39
- small_fish_gui/pipeline/detection.py,sha256=fEdSt8Tw6dETGg_qLrxVHv7Znmb1om5Qd09tQhQsjP4,36949
39
+ small_fish_gui/pipeline/detection.py,sha256=M4Ez2g-GKWcNl3FhgOOPQ1WNv9UePIXYsAd0OTuC5_g,37222
40
40
  small_fish_gui/pipeline/main.py,sha256=5Mjw1glru0WL0o2D4uL8Gf5DtZMCd506Wn2C4wRkyNQ,5850
41
41
  small_fish_gui/pipeline/segmentation.py,sha256=CwjNwcFiHYbbjuZednmE8P3S7bnVpebLqD_9mXfQoII,19864
42
42
  small_fish_gui/pipeline/spots.py,sha256=9hNOGnOZhrtrIORt8UGBcI-SGCh1XftcUGerkBwN-QY,2201
43
43
  small_fish_gui/pipeline/test.py,sha256=w4ZMGDmUDXxVgWTlZ2TKw19W8q5gcE9gLMKe0SWnRrw,2827
44
44
  small_fish_gui/pipeline/testing.ipynb,sha256=Rs7VQ7TImNyUzT2_59JgbOjR5_Qs-0NjHHnqS87eiwA,76481
45
45
  small_fish_gui/pipeline/utils.py,sha256=run6qtqCAe_mFnE3o1CnmF1xBBmK3ydgc8-jOV9P-_w,448
46
- small_fish_gui-1.10.0.dist-info/METADATA,sha256=xMAo4wKuzpFdVgG4y8SFIagCEVDinLBYaJRUqyR4TUA,2670
47
- small_fish_gui-1.10.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
48
- small_fish_gui-1.10.0.dist-info/licenses/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
49
- small_fish_gui-1.10.0.dist-info/RECORD,,
46
+ small_fish_gui-1.10.1.dist-info/METADATA,sha256=plUMEokmc4m78E11yK6v-oNmqIuEiDfmskj9XrTMpy0,2670
47
+ small_fish_gui-1.10.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
48
+ small_fish_gui-1.10.1.dist-info/licenses/LICENSE,sha256=-iFy8VGBYs5VsHglKpk4D-hxqQ2jMJaqmfq_ulIzDks,1303
49
+ small_fish_gui-1.10.1.dist-info/RECORD,,