-
Notifications
You must be signed in to change notification settings - Fork 240
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
Resize sometimes adds a dimension to LabelMap images #1023
Comments
Hi, @Bigsealion. Thanks for reporting and for sharing the data. How strange. I will investigate this. |
I'm getting this warning. It might be causing the issue.
|
That warning is raised by ITK here. |
Given that your images seem to be meant to share physical space, that their metadata is similar and that your transform = tio.Compose([
tio.CopyAffine('mask'),
tio.Resize(target_shape=tar_shape)
]) Would that work for you? |
Thanks! It works! |
Is there an existing issue for this?
Bug summary
After re-storing the
tio.DATA
and applyingtio.Resize
, the following error occursBut I have done the same for many images and only this one has an error
For a subject with ["img", "mask"], resized image shape is (320, 320, 112) but mask shape is (320, 320, 113)
There is already a similar issue but I will provide a sample data
img
mask
Code for reproduction
Actual outcome
For a subject with ["img", "mask"], resized image shape is (320, 320, 112) but mask shape is (320, 320, 113)
like this:
{'img': (320, 320, 112), 'mask': (320, 320, 113)}
Error messages
Expected outcome
no error info
System info
The text was updated successfully, but these errors were encountered: