-
I'm preparing some easy flow of transformations to load MR images, change spacing to 1x1x1 and get random crop. I'm loading image and segmentation using single compose dict transforms (with two keys). The problem is that images and segmentations have a little bit different affines (but are in the same place in the physical/reference space). Before I go with any other transform (fix spacing, augment, etc.) I want to these two images have common afine - i.e. I want to resample segmentation into image space. How can I do that? Is it possible to include it within transforms chain? In SimpleITK it I use sitk.Resample(image, referenceImage). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
great question, there is a MONAI/tests/test_resample_to_matchd.py Lines 38 to 43 in 2cfb896 |
Beta Was this translation helpful? Give feedback.
great question, there is a
ResampleToMatch
transform:MONAI/tests/test_resample_to_matchd.py
Lines 38 to 43 in 2cfb896
#3823