seung-lab / connected-components-3d

Connected components on discrete and continuous multilabel 3D & 2D images. Handles 26, 18, and 6 connected variants; periodic boundaries (4, 8, & 6)
GNU Lesser General Public License v3.0
356 stars 42 forks source link

About the lastest_k function #113

Closed seisen0305 closed 1 year ago

seisen0305 commented 1 year ago

Hello, William
when i use lastest_k , i got some error this is code

import numpy as np import cc3d import cv2 labels_in = np.ones((512, 512, 512), dtype=np.int32) labels_out, N = cc3d.largest_k( labels_in, k=10, connectivity=26, return_N=True, )

and I got TypeError: Argument 'delta' has incorrect type (expected int, got float) so what can I do to reduce this error looking forward to your answer

william-silversmith commented 1 year ago

Hi! I just tried running this code and did not experience the error. Do you know which version of cc3d you're running? Is it the latest version?

seisen0305 commented 1 year ago

hello, my cc3d's version is 3.12.2,and I tried to run this code at another PC, but I have the same result as above.

seisen0305 commented 1 year ago

I reinstall version 3.12.1, and this error has disappeared. thanks for your cc3d package, it very useful for me.

william-silversmith commented 1 year ago

Hi! I just noticed that the CI was failing with this error. I wrote up a fix and am pushing 3.12.3 to PyPI. Let me know if you have any more issues!