[BUG] Inappropriate handling of unsigned integer data types
alessandrofelder opened this issue · comments
Describe the bug
The connect_four
function in structure_detection.py
is called by structure_splitting.py:ball_filter_imgs
with planes of type uint16
. Inside the connect_four
function, we assign plane[x,y]
to struct_id
, a uint64
. If there are more than 2**16-1
(temporary struct id) this will lead to confusion between structure with id 1
and structure 2**16
!
To Reproduce
Pass cellfinder.detect a dataset that contains more than 2**16 individual structures.
Expected behaviour
Cell detection should be able to deal with >65000 structures.
Computer used (please complete the following information):
22.04.1-Ubuntu on a Dell Desktop
For completeness sake (so we know what happened), this used to work in Cython, because plane
(then layer
) used to consist of uint64 s... so this was introduced as part of the numba
refactoring