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

the segmentation number is 0 when the segmentation array is the same object #63

Closed
jingpengw opened this issue Jan 21, 2021 · 1 comment · Fixed by #64
Closed

the segmentation number is 0 when the segmentation array is the same object #63

jingpengw opened this issue Jan 21, 2021 · 1 comment · Fixed by #64
Labels
bug Something isn't working

Comments

@jingpengw
Copy link
Member

fragments_chunk, seg_num = cc3d.connected_components(
                    np.ones(3,3,dtype=np.uint32), connectivity=6, return_N=True
                )

the seg_num is 0, which should be 1!

@william-silversmith william-silversmith added the bug Something isn't working label Jan 21, 2021
@william-silversmith
Copy link
Contributor

william-silversmith commented Jan 21, 2021

Oh dang, that's a great catch. Thank you Jingpeng! I recently introduced some early-exit changes but forgot to account for size_t& N in some of them.

In the mean time, you can use seg_num = np.max(fragments_chunk)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants