I have a set of CT images and their masks (segmentations). What I want to do is to rotate/resample them without losing the correspondence between the image and the mask.
Using the LinearInterpolator yields good images but bad segmentation masks, and using the NearestNeighbourInterpolator yields better masks but bad images.
Using the LinearInterpolator on the image and the NearestNeighbourInterpolator on the mask yields an image and a mask that don’t really match.
What would you suggest in this situation?
Thanks for the quick reply and the suggestion.
The discrepancies are really small. When I view the image and its mask in ITK-Snap, I notice a couple of extra pixels in the mask that go over the edge of the original image; I was worrying that it would influence the sensitivity of the neural network I’m planning to feed them to.
There is a representation problem here that needs some thought and analysis for your particular problem and application.
Another option, is to use a distance map filter to convert the mask to a level set, where zero value is representation of the surface. This would readily resample well.