FZJ-INM1-BDA / siibra-python

Software interfaces for interacting with brain atlases - Python client
Apache License 2.0
48 stars 10 forks source link

Exclude background from connected_components #567

Closed dickscheid closed 7 months ago

dickscheid commented 7 months ago

The commons.connected_components always returned at least two components - the background and the actual foreground structure. Of course the background is not desired. This PR excludes it.

I am quite sure that earlier siibra versions did not include the background component.

codecov-commenter commented 7 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 53.31%. Comparing base (5a0e6b3) to head (b4dfd33). Report is 406 commits behind head on main.

Files Patch % Lines
siibra/commons.py 0.00% 1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #567 +/- ## =========================================== + Coverage 36.81% 53.31% +16.49% =========================================== Files 61 69 +8 Lines 5421 6645 +1224 =========================================== + Hits 1996 3543 +1547 + Misses 3425 3102 -323 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dickscheid commented 7 months ago

background kwarg is ok, I had this idea as well but wanted to keep the change minimal. If you introduce it, fine.