CellProfiler-nightly 5.0.0.dev306__py3-none-any.whl → 5.0.0.dev313__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.
cellprofiler/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '5.0.0.dev306'
32
- __version_tuple__ = version_tuple = (5, 0, 0, 'dev306')
31
+ __version__ = version = '5.0.0.dev313'
32
+ __version_tuple__ = version_tuple = (5, 0, 0, 'dev313')
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -1,8 +1,7 @@
1
- import skimage
2
- import skimage.measure
3
1
  from cellprofiler_core.module.image_segmentation import ImageSegmentation
4
2
  from cellprofiler_core.setting import Binary
5
3
  from cellprofiler_core.setting.text import Integer
4
+ from cellprofiler_library.modules._convertimagetoobjects import convert_image_to_objects
6
5
 
7
6
  HELP_BINARY_IMAGE = """\
8
7
  This module can also convert a grayscale image to binary before converting it to an object.
@@ -110,7 +109,12 @@ If set to 0, a full connectivity of the input dimension is used.
110
109
  return __settings__
111
110
 
112
111
  def run(self, workspace):
113
- self.function = lambda data, cast_to_bool, preserve_label, background, connectivity: convert_to_objects(
112
+ def _validate_image(img):
113
+ if img.multichannel is not False:
114
+ raise TypeError("Input image should be grayscale")
115
+
116
+ self.validate_image = _validate_image
117
+ self.function = lambda data, cast_to_bool, preserve_label, background, connectivity: convert_image_to_objects(
114
118
  data, cast_to_bool, preserve_label, background, connectivity
115
119
  )
116
120
 
@@ -138,17 +142,3 @@ If set to 0, a full connectivity of the input dimension is used.
138
142
  x=1,
139
143
  y=0,
140
144
  )
141
-
142
-
143
- def convert_to_objects(data, cast_to_bool, preserve_label, background, connectivity):
144
- # Compatibility with skimage
145
- connectivity = None if connectivity == 0 else connectivity
146
-
147
- caster = skimage.img_as_bool if cast_to_bool else skimage.img_as_uint
148
- data = caster(data)
149
-
150
- # If preservation is desired, just return the original labels
151
- if preserve_label and not cast_to_bool:
152
- return data
153
-
154
- return skimage.measure.label(data, background=background, connectivity=connectivity)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: CellProfiler-nightly
3
- Version: 5.0.0.dev306
3
+ Version: 5.0.0.dev313
4
4
  Summary: CellProfiler is a free open-source software designed to enable biologists without training in computer vision or programming to quantitatively measure phenotypes from thousands of images automatically.
5
5
  Author: Anne Carpenter, Thouis (Ray) Jones, Lee Kamentsky, Vebjorn Ljosa, David Logan, Mark Bray, Madison Swain-Bowden, Allen Goodman, Claire McQuinn, Alice Lucas, Callum Tromans-Coia
6
6
  Author-email: Beth Cimini <bcimini@broadinstitute.org>, David Stirling <dstirling@glencoesoftware.com>, Nodar Gogoberidze <ngogober@broadinstitute.org>
@@ -1,6 +1,6 @@
1
1
  cellprofiler/__init__.py,sha256=AL2XeOBhIeYkBRyDd0QRgJan7j0DKjT1GD-RdzKvMUY,46
2
2
  cellprofiler/__main__.py,sha256=uy78oz5c6NBGRwDZkZ2Gl4HfhbJZQH6K1n54Qfl2OFc,38075
3
- cellprofiler/_version.py,sha256=G7VoognR8cVzAPvjy716XjRcsJUGbmEf3x2OzMxn-4o,721
3
+ cellprofiler/_version.py,sha256=X4VkWpCY3W1OoL-UO0Ujz6sOnuBoWBDUvHRgT9ivJRQ,721
4
4
  cellprofiler/knime_bridge.py,sha256=T6Op-KO79oULx92nGXRQ6lHsEcTutx1Uep1L4ZOKJgc,27767
5
5
  cellprofiler/misc.py,sha256=yqv873lP_mquxxkKcLgE_ZU4Hrc1trtuQ-NXLK2qQVc,553
6
6
  cellprofiler/data/examples/ExampleFly/ExampleFly.cppipe,sha256=JGZK9IZuYlOHOI4hi6a3DK36IahY69cfeLEd7eJ_rO0,15409
@@ -285,7 +285,7 @@ cellprofiler/modules/classifyobjects.py,sha256=wlQ5IqVEhCChFTtFY2GadUL1pAMB78DUS
285
285
  cellprofiler/modules/closing.py,sha256=62ug-EgtRYqJn6e0_jF1z8JE2EZqJu8H2Uc57JAiDSA,1879
286
286
  cellprofiler/modules/colortogray.py,sha256=RlFGmNxai_7vqtxprIceb0XILfdpm89c-DVBpuX2Cv4,24129
287
287
  cellprofiler/modules/combineobjects.py,sha256=N5cFbqAsGM11VuXdAlfr6L0AbnK0fxqB_Vb04C7ltOg,11043
288
- cellprofiler/modules/convertimagetoobjects.py,sha256=2uXlDgGGpixC1GhsGVW3GvJXB5xQwuDYjwjN3CMcKfQ,4953
288
+ cellprofiler/modules/convertimagetoobjects.py,sha256=qgPb6xNuvELt_GOdkyHsaH2tdSDKtZGVMpNtVcV28sI,4700
289
289
  cellprofiler/modules/convertobjectstoimage.py,sha256=zvn2nlnF3-i6g16F0um1yNT-Y03e2j5AIueZtKbfkoc,7113
290
290
  cellprofiler/modules/correctilluminationapply.py,sha256=ijqdJHt1keYFvssff46O36BWyGP6uOhtekXBPi79vH8,16247
291
291
  cellprofiler/modules/correctilluminationcalculate.py,sha256=wJMCy3W9zK-xPI8PUvh25MLtE_JSI3QuVVzdLjuTwD4,54200
@@ -374,9 +374,9 @@ cellprofiler/modules/plugins/segmentationtemplatewithdependencies.py,sha256=Sh76
374
374
  cellprofiler/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
375
375
  cellprofiler/utilities/morphology.py,sha256=8-81TrP8AmE3ETXIvQUKFD1vmKNBy2lfbc1QnM1eGIM,2685
376
376
  cellprofiler/utilities/rules.py,sha256=NoIHwFTA37zGvIP7vcB-aYeys0MDYVYxspfhLJe00OU,8790
377
- cellprofiler_nightly-5.0.0.dev306.dist-info/licenses/LICENSE,sha256=QLWaBS7kAioYx7PmJNXAMJaY8NODcFAag60YlUWuyz0,2276
378
- cellprofiler_nightly-5.0.0.dev306.dist-info/METADATA,sha256=oBF7FN7-iCY7cJF-9KdIGiIGr4fwSZwntFi2gtC4CEA,6063
379
- cellprofiler_nightly-5.0.0.dev306.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
380
- cellprofiler_nightly-5.0.0.dev306.dist-info/entry_points.txt,sha256=MNDCjguFW3dKiS5Pcdu1NfWo4I0HHI3DekJLUJ4AKkY,60
381
- cellprofiler_nightly-5.0.0.dev306.dist-info/top_level.txt,sha256=bK7AacDeSj9qAmW8MGlO5wA79hDj6-ACt_mENUNKSIk,13
382
- cellprofiler_nightly-5.0.0.dev306.dist-info/RECORD,,
377
+ cellprofiler_nightly-5.0.0.dev313.dist-info/licenses/LICENSE,sha256=QLWaBS7kAioYx7PmJNXAMJaY8NODcFAag60YlUWuyz0,2276
378
+ cellprofiler_nightly-5.0.0.dev313.dist-info/METADATA,sha256=MaaBNm0GqkDagvRVtGz09RSer5tfjcJx_6eEKsV3Yyk,6063
379
+ cellprofiler_nightly-5.0.0.dev313.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
380
+ cellprofiler_nightly-5.0.0.dev313.dist-info/entry_points.txt,sha256=MNDCjguFW3dKiS5Pcdu1NfWo4I0HHI3DekJLUJ4AKkY,60
381
+ cellprofiler_nightly-5.0.0.dev313.dist-info/top_level.txt,sha256=bK7AacDeSj9qAmW8MGlO5wA79hDj6-ACt_mENUNKSIk,13
382
+ cellprofiler_nightly-5.0.0.dev313.dist-info/RECORD,,