Oblique 2D slices not properly oriented

Hello,

I want to extract some oblique 2D slices from a 3D image. My current approach to do this is a resampling operation changing the output direction so one of the axis coincides with the normal of the slicing plane. Then I use ExtractImageFilter to get my 2D slice. However, when I display the slices, they are oriented according to the rotation I set in the OutputDirection. I would like my slices to be consistently oriented, since this is for ultrasound simulation and I need to display the image as it would be seen in an actual ultrasound.

Thank you!

Maybe you need to invoke stuff like extractedSlice->SetDirection(identity); and extractedSlice->SetOrigin({0,0});. If this is not the solution, you will need to explain your problem in more detail, preferably with some images/screenshots.

From a theoric point of view it appears you need to apply the inverse transform of what you applied at the beginning to get your slice in the correct coordinate space