# Rotate slice view up interactively

**URL:** <https://discourse.slicer.org/t/rotate-slice-view-up-interactively/31940>\
**Category:** Development\
**Created:** [September 27, 2023, 9:45pm UTC](https://discourse.slicer.org/t/rotate-slice-view-up-interactively/31940 "2023-09-27T21:45:04Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![mikebind](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@mikebind](https://discourse.slicer.org/u/mikebind)\
**Post date:** [September 28, 2023, 5:15am UTC](https://discourse.slicer.org/t/rotate-slice-view-up-interactively/31940/5 "2023-09-28T05:15:46Z")

</div>

Thanks @lassoan for the ideas. I actually already use an automatic approach to anatomical orientation ([Rotate reformat slice view (in plane) - #6 by mikebind](https://discourse.slicer.org/t/rotate-reformat-slice-view-in-plane/8127/6)) which works very well most of the time. However, sometimes, for very oblique views, it would actually be better to use some sort of custom rotation, and I’d like to give myself and other users the option to rotate as easily as we can reslice. This would also be helpful sometimes when, for example, a patient’s head is turned a bit to one side relative to the image volume axes, and it would be nicer just to rotate the axial view in plane so that anterior for the patient is up on the slice view. This could be accomplished in automated ways or interactive ways of varying complexity, but when it’s just for the aesthetics of screenshots, I’d love to have an easy way to just rotate the view. The Reformat module in my Slicer doesn’t have a Rotation/In-Plane slider; I see that newer versions do. I have been stuck on 5.2.1 for a while because updates to the Elastix module broke some of my code in \>5.2.1 and I haven’t dug into why yet (I don’t think it will be a difficult fix, I just haven’t gotten around to it yet, and I haven’t had a strong enough reason that I needed to update Slicer yet either). This might now be enough of a reason.

> [@lassoan](#):
>
> you can add a new widget action to vtkMRMLSliceIntersectionWidget that rotates the current slice (instead of rotating theintersecting slices). You can then map a new widget event (e.g., click-and-drag with some keyboard modifiers) or remap a widget event that you don’t need to do slice rotation. It should be all very straightforward and about 20-30 new lines of code in total.

Is this something I can do in python or would it require building Slicer from source?

---

_[View the full topic](https://discourse.slicer.org/t/rotate-slice-view-up-interactively/31940)._
