cellfinder 1.3.0rc2__py3-none-any.whl → 1.3.2__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.
@@ -74,6 +74,7 @@ def ball_filter_imgs(
74
74
  good_tiles_mask = np.ones((1, 1, volume.shape[2]), dtype=np.bool_)
75
75
 
76
76
  plane_width, plane_height = volume.shape[:2]
77
+ current_z = ball_z_size // 2
77
78
 
78
79
  bf = BallFilter(
79
80
  plane_width,
@@ -86,9 +87,7 @@ def ball_filter_imgs(
86
87
  threshold_value=threshold_value,
87
88
  soma_centre_value=soma_centre_value,
88
89
  )
89
- cell_detector = CellDetector(
90
- plane_width, plane_height, start_z=ball_z_size // 2
91
- )
90
+ cell_detector = CellDetector(plane_width, plane_height, start_z=current_z)
92
91
 
93
92
  # FIXME: hard coded type
94
93
  ball_filtered_volume = np.zeros(volume.shape, dtype=np.uint32)
@@ -98,7 +97,11 @@ def ball_filter_imgs(
98
97
  if bf.ready:
99
98
  bf.walk()
100
99
  middle_plane = bf.get_middle_plane()
101
- ball_filtered_volume[:, :, z] = middle_plane[:]
100
+
101
+ # first valid middle plane is the current_z, not z
102
+ ball_filtered_volume[:, :, current_z] = middle_plane[:]
103
+ current_z += 1
104
+
102
105
  # DEBUG: TEST: transpose
103
106
  previous_plane = cell_detector.process(
104
107
  middle_plane.copy(), previous_plane
@@ -134,7 +137,10 @@ def iterative_ball_filter(
134
137
  vol, cell_centres = ball_filter_imgs(
135
138
  vol, threshold_value, soma_centre_value
136
139
  )
137
- vol -= 1
140
+
141
+ # vol is unsigned, so can't let zeros underflow to max value
142
+ vol[:, :, :] = np.where(vol != 0, vol - 1, 0)
143
+
138
144
  n_structures = len(cell_centres)
139
145
  ns.append(n_structures)
140
146
  centres.append(cell_centres)
@@ -113,7 +113,7 @@ class CurationWidget(QWidget):
113
113
  layer_names = [
114
114
  layer.name
115
115
  for layer in self.viewer.layers
116
- if type(layer) == layer_type
116
+ if isinstance(layer, layer_type)
117
117
  ]
118
118
 
119
119
  if layer_names:
@@ -329,7 +329,7 @@ class CurationWidget(QWidget):
329
329
 
330
330
  if len(self.viewer.layers.selection) == 1:
331
331
  layer = list(self.viewer.layers.selection)[0]
332
- if type(layer) == napari.layers.Points:
332
+ if isinstance(layer, napari.layers.Points):
333
333
  if len(layer.data) > 0:
334
334
  if point_type == "cell":
335
335
  destination_layer = self.training_data_cell_layer
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cellfinder
3
- Version: 1.3.0rc2
3
+ Version: 1.3.2
4
4
  Summary: Automated 3D cell detection in large microscopy images
5
5
  Author-email: "Adam Tyson, Christian Niedworok, Charly Rousseau" <code@adamltyson.com>
6
6
  License: BSD-3-Clause
@@ -16,44 +16,44 @@ Classifier: Intended Audience :: Science/Research
16
16
  Classifier: Operating System :: OS Independent
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
- Classifier: Programming Language :: Python :: 3.9
20
19
  Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Topic :: Scientific/Engineering :: Image Recognition
23
- Requires-Python: >=3.9
23
+ Requires-Python: >=3.10
24
24
  Description-Content-Type: text/markdown
25
25
  License-File: LICENSE
26
- Requires-Dist: brainglobe-utils >=0.5.0
27
- Requires-Dist: brainglobe-napari-io >=0.3.4
26
+ Requires-Dist: brainglobe-utils>=0.5.0
27
+ Requires-Dist: brainglobe-napari-io>=0.3.4
28
28
  Requires-Dist: dask[array]
29
- Requires-Dist: fancylog >=0.0.7
29
+ Requires-Dist: fancylog>=0.0.7
30
30
  Requires-Dist: natsort
31
31
  Requires-Dist: numba
32
- Requires-Dist: numpy
32
+ Requires-Dist: numpy<2
33
33
  Requires-Dist: scikit-image
34
34
  Requires-Dist: scikit-learn
35
- Requires-Dist: keras >=3.0.0
36
- Requires-Dist: torch >=2.1.0
35
+ Requires-Dist: keras>=3.0.0
36
+ Requires-Dist: torch>=2.1.0
37
37
  Requires-Dist: tifffile
38
38
  Requires-Dist: tqdm
39
39
  Provides-Extra: dev
40
- Requires-Dist: black ; extra == 'dev'
41
- Requires-Dist: pre-commit ; extra == 'dev'
42
- Requires-Dist: pyinstrument ; extra == 'dev'
43
- Requires-Dist: pytest-cov ; extra == 'dev'
44
- Requires-Dist: pytest-mock ; extra == 'dev'
45
- Requires-Dist: pytest-qt ; extra == 'dev'
46
- Requires-Dist: pytest-timeout ; extra == 'dev'
47
- Requires-Dist: pytest ; extra == 'dev'
48
- Requires-Dist: tox ; extra == 'dev'
40
+ Requires-Dist: black; extra == "dev"
41
+ Requires-Dist: pre-commit; extra == "dev"
42
+ Requires-Dist: pyinstrument; extra == "dev"
43
+ Requires-Dist: pytest-cov; extra == "dev"
44
+ Requires-Dist: pytest-mock; extra == "dev"
45
+ Requires-Dist: pytest-qt; extra == "dev"
46
+ Requires-Dist: pytest-timeout; extra == "dev"
47
+ Requires-Dist: pytest; extra == "dev"
48
+ Requires-Dist: tox; extra == "dev"
49
49
  Provides-Extra: napari
50
- Requires-Dist: brainglobe-napari-io ; extra == 'napari'
51
- Requires-Dist: magicgui ; extra == 'napari'
52
- Requires-Dist: napari-ndtiffs ; extra == 'napari'
53
- Requires-Dist: napari-plugin-engine >=0.1.4 ; extra == 'napari'
54
- Requires-Dist: napari[pyqt5] ; extra == 'napari'
55
- Requires-Dist: pooch >=1 ; extra == 'napari'
56
- Requires-Dist: qtpy ; extra == 'napari'
50
+ Requires-Dist: brainglobe-napari-io; extra == "napari"
51
+ Requires-Dist: magicgui; extra == "napari"
52
+ Requires-Dist: napari-ndtiffs; extra == "napari"
53
+ Requires-Dist: napari-plugin-engine>=0.1.4; extra == "napari"
54
+ Requires-Dist: napari[pyqt5]; extra == "napari"
55
+ Requires-Dist: pooch>=1; extra == "napari"
56
+ Requires-Dist: qtpy; extra == "napari"
57
57
 
58
58
  [![Python Version](https://img.shields.io/pypi/pyversions/cellfinder.svg)](https://pypi.org/project/cellfinder)
59
59
  [![PyPI](https://img.shields.io/pypi/v/cellfinder.svg)](https://pypi.org/project/cellfinder)
@@ -101,8 +101,14 @@ pip install cellfinder>=1.0.0
101
101
  Be sure to specify a version greater than version `v1.0.0` - prior to this version the `cellfinder` package had a very different structure that is incompatible with BrainGlobe version 1 and the other tools in the BrainGlobe suite.
102
102
  See [our blog posts](https://brainglobe.info/blog/) for more information on the release of BrainGlobe version 1.
103
103
 
104
- ## Contributing
104
+ ## Seeking help or contributing
105
+ We are always happy to help users of our tools, and welcome any contributions. If you would like to get in contact with us for any reason, please see the [contact page of our website](https://brainglobe.info/contact.html).
105
106
 
106
- If you have encountered a bug whilst using cellfinder, please [open an issue on GitHub](https://github.com/brainglobe/cellfinder/issues).
107
+ ## Citation
108
+ If you find this package useful, and use it in your research, please cite the following paper:
109
+ > Tyson, A. L., Rousseau, C. V., Niedworok, C. J., Keshavarzi, S., Tsitoura, C., Cossell, L., Strom, M. and Margrie, T. W. (2021) “A deep learning algorithm for 3D cell detection in whole mouse brain image datasets’ PLOS Computational Biology, 17(5), e1009074
110
+ [https://doi.org/10.1371/journal.pcbi.1009074](https://doi.org/10.1371/journal.pcbi.1009074)
107
111
 
108
- If you are interested in contributing to cellfinder (thank you!) - please head over to our [developer documentation](https://brainglobe.info/community/developers/index.html).
112
+ **If you use this, or any other tools in the brainglobe suite, please
113
+ [let us know](https://brainglobe.info/contact.html), and
114
+ we'd be happy to promote your paper/talk etc.**
@@ -22,7 +22,7 @@ cellfinder/core/detect/filters/plane/tile_walker.py,sha256=lhKrq-MB35bR0_JYgj7WM
22
22
  cellfinder/core/detect/filters/volume/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
23
  cellfinder/core/detect/filters/volume/ball_filter.py,sha256=ZEg8FNty-VD5N9j4FLZ18G-BuSvxjHs2-QTblwKcZgw,13894
24
24
  cellfinder/core/detect/filters/volume/structure_detection.py,sha256=mTHi0_A9FCK39I6fZm2dfMpDxIkfaidOIf6eCjTw-70,11307
25
- cellfinder/core/detect/filters/volume/structure_splitting.py,sha256=XzTYguVT8VdTu2h4-Jdt5Yyeu8VBYmdRo5jmwwLwuck,7660
25
+ cellfinder/core/detect/filters/volume/structure_splitting.py,sha256=DnYcCkcdEaubzaWxbM7Ee8icyHq3dN8CcvZj_i0QvGM,7880
26
26
  cellfinder/core/detect/filters/volume/volume_filter.py,sha256=BJ8bStlNvMWsGlBekeqXpS8d9YKoLe3ifMfrEPpva2Q,7035
27
27
  cellfinder/core/download/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  cellfinder/core/download/cli.py,sha256=X9L9ZIkWqs58hX8G8q_0AKN4gk8BhydGxI9nLpdHQQE,1764
@@ -39,7 +39,7 @@ cellfinder/core/tools/tools.py,sha256=G8oDGNRuWkzEJDnnC4r3SNGgpVbqbelCZR5ODk9JRz
39
39
  cellfinder/core/train/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
40
  cellfinder/core/train/train_yml.py,sha256=9QXv2wk24G8hYskMnBij7OngEELUWySK2fH4NFbYWw4,13260
41
41
  cellfinder/napari/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- cellfinder/napari/curation.py,sha256=nbxCwY2bhEPM15Wf3S_Ff8qGdLSWojr4X48mmAJqD3U,21447
42
+ cellfinder/napari/curation.py,sha256=Pfif12RUIMExxPuIp9U0mW5-4QycciDlkVE8_9UMgpY,21455
43
43
  cellfinder/napari/input_container.py,sha256=tkm0dkPt7kSL8Xkvs1fh8M6vKWw57QLIt_wv74HFkGk,2150
44
44
  cellfinder/napari/napari.yaml,sha256=WMR1CIAmYIVyQngbdbomTRZLvlDbb6LxsXsvTRClQnE,921
45
45
  cellfinder/napari/sample_data.py,sha256=oUST23q09MM8dxHbUCmO0AjtXG6OlR_32LLqP0EU2UA,732
@@ -51,9 +51,9 @@ cellfinder/napari/detect/thread_worker.py,sha256=PWM3OE-FpK-dpdhaE_Gi-2lD3u8sL-S
51
51
  cellfinder/napari/train/__init__.py,sha256=xo4CK-DvSecInGEc2ohcTgQYlH3iylFnGvKTCoq2WkI,35
52
52
  cellfinder/napari/train/train.py,sha256=zJY7zKcLqDTDtD76thmbwViEU4tTFCmXZze-zHsTpoo,5941
53
53
  cellfinder/napari/train/train_containers.py,sha256=1wZ_GPe7B5XsLYs5XIx4m8GMw5KeVhg6SchhPtXu4V8,4386
54
- cellfinder-1.3.0rc2.dist-info/LICENSE,sha256=Tw8iMytIDXLSmcIUsbQmRWojstl9yOWsPCx6ZT6dZLY,1564
55
- cellfinder-1.3.0rc2.dist-info/METADATA,sha256=DlFtBgJoeh7SHPbvxuQ7hn-jyLLylKYjCy6rUHBMdLA,6531
56
- cellfinder-1.3.0rc2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
57
- cellfinder-1.3.0rc2.dist-info/entry_points.txt,sha256=cKKjU8GPiN-TRelG2sT2JCKAcB9XDCjP6g9atE9pSoY,247
58
- cellfinder-1.3.0rc2.dist-info/top_level.txt,sha256=jyTQzX-tDjbsMr6s-E71Oy0IKQzmHTXSk4ZhpG5EDSE,11
59
- cellfinder-1.3.0rc2.dist-info/RECORD,,
54
+ cellfinder-1.3.2.dist-info/LICENSE,sha256=Tw8iMytIDXLSmcIUsbQmRWojstl9yOWsPCx6ZT6dZLY,1564
55
+ cellfinder-1.3.2.dist-info/METADATA,sha256=ZFTUiun0PsZyqoFqEE-FySxAPzYDt4VhHvn5T3nbICE,7076
56
+ cellfinder-1.3.2.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
57
+ cellfinder-1.3.2.dist-info/entry_points.txt,sha256=cKKjU8GPiN-TRelG2sT2JCKAcB9XDCjP6g9atE9pSoY,247
58
+ cellfinder-1.3.2.dist-info/top_level.txt,sha256=jyTQzX-tDjbsMr6s-E71Oy0IKQzmHTXSk4ZhpG5EDSE,11
59
+ cellfinder-1.3.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (72.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5