Skip to content

Fix for zoom used in a lazy pipeline#6437

Merged
wyli merged 3 commits intoProject-MONAI:devfrom
atbenmurray:lazy_zoom_fix
Apr 26, 2023
Merged

Fix for zoom used in a lazy pipeline#6437
wyli merged 3 commits intoProject-MONAI:devfrom
atbenmurray:lazy_zoom_fix

Conversation

@atbenmurray
Copy link
Copy Markdown
Contributor

@atbenmurray atbenmurray commented Apr 26, 2023

If you run the following pipeline with lazy resampling it breaks as the pending info contains a 3x3 affine transform and there are 4x4 affine transforms already in the list:

[Flip(0), Flip(1), Rotate90(1), Zoom(0.8), NormalizeIntensity()]

Although it could be fixed by ensuring that Zoom always puts out a 4x4 affine, the more flexible and pragmatic solution is to promote 2d affine transforms to 3d affine transforms as a matter of course. This way we never have the issue that a given transform (particularly potential 3rd party transforms modified for lazy execution) can subsequently cause this problem.

Description

A few sentences describing the changes proposed in this pull request.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

@atbenmurray atbenmurray requested review from KumoLiu, Nic-Ma and wyli April 26, 2023 19:29
@atbenmurray
Copy link
Copy Markdown
Contributor Author

atbenmurray commented Apr 26, 2023

Incidental bug noticed while prepping #6257

Signed-off-by: Ben Murray <[email protected]>
Copy link
Copy Markdown
Contributor

@wyli wyli left a comment

Choose a reason for hiding this comment

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

thanks!

@wyli
Copy link
Copy Markdown
Contributor

wyli commented Apr 26, 2023

/build

@wyli wyli marked this pull request as ready for review April 26, 2023 20:40
@wyli wyli enabled auto-merge (squash) April 26, 2023 20:40
@wyli wyli disabled auto-merge April 26, 2023 20:40
@wyli wyli enabled auto-merge (squash) April 26, 2023 20:40
@wyli wyli merged commit 4f29172 into Project-MONAI:dev Apr 26, 2023
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.

2 participants