Replies: 1 comment 2 replies
-
Hi, @jmlipman. I think a size of 0 is meaningless, so I agree it could be detected by the transform and do nothing along that direction. Are you interested in contributing with a PR? Another option is just using |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any scenario in which setting 0 to one of the dimensions of CropOrPad makes sense? For example, if you apply CropOrPad((256, 256, 0)) you will get a (256, 256, 0) image, which seems incorrect, isn't it?
I'm planning to modify torchio so that users can indicate with a 0 the dimension in which they don't want to CropOrPad (I initially thought of using -1, but it's a bit more complex because of the function that checks the validity of the provided bounds). In other words, this would be another workaround to use torchio with 2D images, where we might be interested in applying CropOrPad on the slices but not across the slices.
Regards.
Beta Was this translation helpful? Give feedback.
All reactions