Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnforceObjectsOneToOne: error if no pre-primary/secondary objects #270

Open
braymp opened this issue Feb 1, 2025 · 0 comments
Open

EnforceObjectsOneToOne: error if no pre-primary/secondary objects #270

braymp opened this issue Feb 1, 2025 · 0 comments

Comments

@braymp
Copy link
Contributor

braymp commented Feb 1, 2025

If an object label image with no objects is run through EnforceObjectsOneToOne for both pre-primary and pre-secondary objects (see attached EnforceObjectsOneToOne_pipeline.zip), the following error results:

Failed to run module EnforceObjectsOneToOne
Traceback (most recent call last):
File "C:\Users\brayma2.conda\envs\py38\lib\site-packages\cellprofiler-4.2.4-py3.8.egg\cellprofiler\gui\pipelinecontroller.py", line 3390, in do_step
self.__pipeline.run_module(module, workspace_model)
File "C:\Users\brayma2.conda\envs\py38\lib\site-packages\cellprofiler_core\pipeline_pipeline.py", line 1341, in run_module
module.run(workspace)
File "C:\Users\brayma2\github\cellprofiler-plugins\active_plugins\enforceobjectsonetoone.py", line 173, in run
primary_seg = self.enforce_unique(pre_primary_seg, pre_secondary_seg, erode_excess=True)
File "C:\Users\brayma2\github\cellprofiler-plugins\active_plugins\enforceobjectsonetoone.py", line 373, in enforce_unique
if matched_to_count.max() >1:
File "C:\Users\brayma2.conda\envs\py38\lib\site-packages\numpy\core_methods.py", line 41, in _amax
return umr_maximum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation maximum which has no identity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant