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

Fix CropOrPad incorrectly storing bounds #760

Merged
merged 2 commits into from
Nov 28, 2021
Merged

Fix CropOrPad incorrectly storing bounds #760

merged 2 commits into from
Nov 28, 2021

Conversation

fepegar
Copy link
Owner

@fepegar fepegar commented Nov 28, 2021

Fixes #757.

Description
The current implementation of CropOrPad incorrectly stores some data in self, causing the bug described in:

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 Nov 28, 2021

Codecov Report

Merging #760 (a9d0ef2) into main (b6ba3d1) will decrease coverage by 0.14%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #760      +/-   ##
==========================================
- Coverage   94.03%   93.88%   -0.15%     
==========================================
  Files          72       72              
  Lines        4492     4499       +7     
==========================================
  Hits         4224     4224              
- Misses        268      275       +7     
Impacted Files Coverage Δ
...io/transforms/preprocessing/spatial/crop_or_pad.py 96.72% <100.00%> (-0.08%) ⬇️
torchio/utils.py 75.92% <100.00%> (+1.16%) ⬆️
torchio/transforms/transform.py 94.40% <0.00%> (-2.62%) ⬇️

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 b6ba3d1...a9d0ef2. Read the comment docs.

@fepegar fepegar merged commit bb36e2e into main Nov 28, 2021
@fepegar fepegar deleted the 757-fix-crop-pad branch November 28, 2021 17:40
@fepegar fepegar restored the 757-fix-crop-pad branch July 4, 2022 22:00
@fepegar fepegar deleted the 757-fix-crop-pad branch July 4, 2022 22:05
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.

CropOrPad self.bounds_parameters is set only for first image.
1 participant