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

Add some label transforms for binary morphological operations #424

Merged
merged 2 commits into from
Jan 24, 2021

Conversation

fepegar
Copy link
Owner

@fepegar fepegar commented Jan 23, 2021

Description

  1. A tiny, convenient transform to remove all connected components in a binary label map but the largest.
  2. One more transform to keep only the borders of the connected components.

Checklist

  • I have read the CONTRIBUTING docs and have a developer setup (especially important are pre-commitand pytest)
  • Non-breaking change (would not break existing functionality)
  • Breaking change (would cause existing functionality to change)
  • Tests added or modified to cover the changes
  • Integration tests passed locally by running pytest
  • In-line docstrings updated
  • Documentation updated, tested running make html inside the docs/ folder
  • This pull request is ready to be reviewed
  • If the PR is ready and there are multiple commits, I have squashed them and force-pushed

@codecov
Copy link

codecov bot commented Jan 23, 2021

Codecov Report

Merging #424 (ce3c5af) into master (daf754b) will decrease coverage by 0.27%.
The diff coverage is 47.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
- Coverage   92.20%   91.93%   -0.28%     
==========================================
  Files         127      129       +2     
  Lines        6289     6324      +35     
==========================================
+ Hits         5799     5814      +15     
- Misses        490      510      +20     
Impacted Files Coverage Δ
...orms/preprocessing/label/keep_largest_component.py 31.25% <31.25%> (ø)
torchio/transforms/preprocessing/label/contour.py 35.71% <35.71%> (ø)
torchio/cli/apply_transform.py 77.50% <100.00%> (+0.57%) ⬆️
torchio/transforms/__init__.py 100.00% <100.00%> (ø)
torchio/transforms/preprocessing/__init__.py 100.00% <100.00%> (ø)
torchio/utils.py 89.25% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update daf754b...ce3c5af. Read the comment docs.

@fepegar fepegar changed the title Add KeepLargestComponent transform Add some label transforms for binary morphological operations Jan 24, 2021
@fepegar fepegar merged commit bec33c8 into master Jan 24, 2021
@fepegar fepegar deleted the add-keep-largest-cc branch January 24, 2021 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant