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 support to pass shape and affine to Resample #640

Merged
merged 5 commits into from
Aug 31, 2021

Conversation

fepegar
Copy link
Owner

@fepegar fepegar commented Aug 30, 2021

Fixes #638.

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

@fepegar
Copy link
Owner Author

fepegar commented Aug 30, 2021

TODO: update docstring.

@romainVala Can you try your snippet in #638 and see if this is better?

@codecov
Copy link

codecov bot commented Aug 30, 2021

Codecov Report

Merging #640 (1097139) into master (e4342b2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #640   +/-   ##
=======================================
  Coverage   96.85%   96.86%           
=======================================
  Files         126      126           
  Lines        6517     6564   +47     
=======================================
+ Hits         6312     6358   +46     
- Misses        205      206    +1     
Impacted Files Coverage Δ
tests/data/test_io.py 100.00% <100.00%> (ø)
tests/transforms/preprocessing/test_resample.py 100.00% <100.00%> (ø)
torchio/data/io.py 96.91% <100.00%> (+0.48%) ⬆️
...ansforms/augmentation/spatial/random_anisotropy.py 93.33% <100.00%> (+0.31%) ⬆️
...rchio/transforms/preprocessing/spatial/resample.py 90.27% <100.00%> (-0.50%) ⬇️
torchio/typing.py 100.00% <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 e4342b2...1097139. Read the comment docs.

@romainVala
Copy link
Contributor

just get a quick look !
amazing quite a lot of changes and the result seems to be ok for me !
the pickel is ok, and the history looks as expected

great job, i'll look more to better understand, but difficult to review

Copy link
Contributor

@romainVala romainVala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

torchio/transforms/preprocessing/spatial/resample.py Outdated Show resolved Hide resolved
torchio/transforms/preprocessing/spatial/resample.py Outdated Show resolved Hide resolved
@fepegar fepegar marked this pull request as ready for review August 30, 2021 22:12
@fepegar fepegar marked this pull request as draft August 30, 2021 22:59
@fepegar fepegar marked this pull request as ready for review August 31, 2021 09:41
@fepegar fepegar merged commit e85db2b into master Aug 31, 2021
@fepegar fepegar deleted the 638-support-shape-affine-resample branch August 31, 2021 11:43
@fepegar
Copy link
Owner Author

fepegar commented Aug 31, 2021

Thanks for reporting and reviewing, @romainVala!

@fepegar fepegar restored the 638-support-shape-affine-resample branch July 4, 2022 22:01
@fepegar fepegar deleted the 638-support-shape-affine-resample branch July 4, 2022 22:02
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.

Resample transform should not need Image attribut
2 participants