cellfinder 1.3.0rc2__py3-none-any.whl → 1.3.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.
@@ -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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cellfinder
3
- Version: 1.3.0rc2
3
+ Version: 1.3.1
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,11 +16,11 @@ 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
26
  Requires-Dist: brainglobe-utils >=0.5.0
@@ -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
@@ -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.1.dist-info/LICENSE,sha256=Tw8iMytIDXLSmcIUsbQmRWojstl9yOWsPCx6ZT6dZLY,1564
55
+ cellfinder-1.3.1.dist-info/METADATA,sha256=tdKnKSv42LLsTm89qJdCx0EuRLSDj8XN1gzl8XuB8cM,7097
56
+ cellfinder-1.3.1.dist-info/WHEEL,sha256=-oYQCr74JF3a37z2nRlQays_SX2MqOANoqVjBBAP2yE,91
57
+ cellfinder-1.3.1.dist-info/entry_points.txt,sha256=cKKjU8GPiN-TRelG2sT2JCKAcB9XDCjP6g9atE9pSoY,247
58
+ cellfinder-1.3.1.dist-info/top_level.txt,sha256=jyTQzX-tDjbsMr6s-E71Oy0IKQzmHTXSk4ZhpG5EDSE,11
59
+ cellfinder-1.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (71.0.3)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5