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

5935 fixes spacing pixdim inplace change #5950

Merged
merged 3 commits into from
Feb 8, 2023

Conversation

wyli
Copy link
Member

@wyli wyli commented Feb 7, 2023

Signed-off-by: Wenqi Li wenqil@nvidia.com

Fixes #5935

Description

assigning out_d[idx] in the __call__ shouldn't change self.pixdim in Spacing

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.

Signed-off-by: Wenqi Li <wenqil@nvidia.com>
monai/transforms/spatial/array.py Show resolved Hide resolved
@wyli
Copy link
Member Author

wyli commented Feb 8, 2023

/build

@wyli wyli enabled auto-merge (squash) February 8, 2023 08:39
Signed-off-by: Wenqi Li <wenqil@nvidia.com>
@wyli
Copy link
Member Author

wyli commented Feb 8, 2023

/build

@wyli wyli merged commit 3a3f6c4 into Project-MONAI:dev Feb 8, 2023
@wyli wyli deleted the fixes-inplace-5935 branch February 8, 2023 11:05
@myron
Copy link
Collaborator

myron commented Feb 26, 2023

I struggled to find this bug for many hours in monai1.1
Spacing / Resampling transform changed the resolution randomly , in my case when using min_pixdim, max_pixdim, and Dataloader with several workers, each worker can potentially change the self.pixdim, and next image gets wrong result...
Thanks for fixing it.

@wyli
Copy link
Member Author

wyli commented Feb 26, 2023

I struggled to find this bug for many hours in monai1.1 Spacing / Resampling transform changed the resolution randomly , in my case when using min_pixdim, max_pixdim, and Dataloader with several workers, each worker can potentially change the self.pixdim, and next image gets wrong result... Thanks for fixing it.

Thanks for reporting. I hope there's a method to document recent unreleased bug fixes, it may save you some time. Currently we are not really using this unreleased section of the changelog https://github.com/Project-MONAI/MONAI/blob/dev/CHANGELOG.md#unreleased cc@Nic-Ma

@xxsxxsxxs666 really helped a lot by creating a small script for reproducing the issue #5935.

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.

Why the data shape are different through transform "spacingd.
4 participants