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

cc3d.dust fails #99

Closed doiko closed 2 years ago

doiko commented 2 years ago

Working in Ubuntu 22.04 python 3.8 connected-components-3d==3.10.2 numpy==1.23.2

Trying

labels_out = cc3d.dust(
            source_cube[i_range, x_range, s_slice], threshold=100,
            connectivity=26, in_place=False
        )

results to error

    labels_out = cc3d.dust(
  File "cc3d.pyx", line 1070, in cc3d.dust
  File "cc3d.pyx", line 969, in cc3d.erase
  File "cc3d.pyx", line 937, in cc3d.draw
  File "cc3d.pyx", line 939, in cc3d.__pyx_fused_cpdef
TypeError: No matching signature found

Any idea

william-silversmith commented 2 years ago

Hi there, thanks for writing in!

Based on a cursory look at the code, the most likely reason for it to fail like that is if your source cube is not an unsigned integer type. Would you mind checking that out and let me know if that fixes it? This isn't an obvious constraint so my apologies if that's what happened here.

Will

On Sat, Sep 3, 2022, 2:10 AM Dimitrios Oikonomou @.***> wrote:

Working in Ubuntu 22.04 python 3.8 connected-components-3d==3.10.2 numpy==1.23.2

Trying

labels_out = cc3d.dust( source_cube[i_range, x_range, s_slice], threshold=100, connectivity=26, in_place=False )

results to error

labels_out = cc3d.dust(

File "cc3d.pyx", line 1070, in cc3d.dust File "cc3d.pyx", line 969, in cc3d.erase File "cc3d.pyx", line 937, in cc3d.draw File "cc3d.pyx", line 939, in cc3d.__pyx_fused_cpdef TypeError: No matching signature found

Any idea

— Reply to this email directly, view it on GitHub https://github.com/seung-lab/connected-components-3d/issues/99, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATGQSOMQPLVQTDXRKE7KG3V4LTUBANCNFSM6AAAAAAQDYOAFQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

doiko commented 2 years ago

Hi Will, You are right... Casting to bool sorted the problem... Please close the ticket. Dimitris

william-silversmith commented 2 years ago

Glad it's working for you!