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

Periodic Boundary Conditions #117

Closed
william-silversmith opened this issue Apr 3, 2024 · 4 comments · Fixed by #119
Closed

Periodic Boundary Conditions #117

william-silversmith opened this issue Apr 3, 2024 · 4 comments · Fixed by #119
Labels
feature New feature or request

Comments

@william-silversmith
Copy link
Contributor

william-silversmith commented Apr 3, 2024

Hi,

It means that D(x)=D(x+L), where L is the length of the box along x, so that in the following case:

data = np.array([[3,3,0,3,3]])
labels_out = cc3d.connected_components(data, connectivity=6)

Thereby instead of array([[1,1,0,2,2]], dtype=unit16) it will output array([[1,1,0,1,1]], dtype=unit16) if periodic boundary condition is applied.
Maybe this wiki would be helpful in explaining what I meant.

@tengssh
Copy link

tengssh commented Apr 4, 2024

A simple solution could be to post-process the labels at the boundaries after labelling.

@william-silversmith
Copy link
Contributor Author

Done! Added 4 and 6 connected support to 3.13.0

@tengssh
Copy link

tengssh commented Apr 5, 2024

Great! Thank you!

@tengssh
Copy link

tengssh commented Apr 5, 2024

I will use your citation information if later I publish a paper.

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

Successfully merging a pull request may close this issue.

2 participants