# Oblique 2D slices not properly oriented

**URL:** <https://discourse.itk.org/t/oblique-2d-slices-not-properly-oriented/5081>\
**Category:** Beginner Questions\
**Created:** [June 9, 2022, 3:07pm UTC](https://discourse.itk.org/t/oblique-2d-slices-not-properly-oriented/5081 "2022-06-09T15:07:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ale\_Ballester](https://discourse.itk.org/user_avatar/discourse.itk.org/ale_ballester/32/2707_2.png) [@Ale\_Ballester](https://discourse.itk.org/u/Ale_Ballester)\
**Post date:** [June 9, 2022, 3:07pm UTC](https://discourse.itk.org/t/oblique-2d-slices-not-properly-oriented/5081/1 "2022-06-09T15:07:24Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)\
**Post date:** [June 10, 2022, 8:06am UTC](https://discourse.itk.org/t/oblique-2d-slices-not-properly-oriented/5081/2 "2022-06-10T08:06:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mauigna06](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/ccd318/32.png) [@mauigna06](https://discourse.itk.org/u/mauigna06)\
**Post date:** [June 12, 2022, 10:28am UTC](https://discourse.itk.org/t/oblique-2d-slices-not-properly-oriented/5081/3 "2022-06-12T10:28:16Z")

</div>

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
