# Lock a specific plane for rotating or translating only

**URL:** <https://discourse.slicer.org/t/lock-a-specific-plane-for-rotating-or-translating-only/37327>\
**Category:** Development\
**Created:** [July 11, 2024, 3:56pm UTC](https://discourse.slicer.org/t/lock-a-specific-plane-for-rotating-or-translating-only/37327 "2024-07-11T15:56:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miguel\_Nobre\_Menezes](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/miguel_nobre_menezes/32/77210_2.png) [@Miguel\_Nobre\_Menezes](https://discourse.slicer.org/u/Miguel_Nobre_Menezes)\
**Post date:** [July 11, 2024, 3:56pm UTC](https://discourse.slicer.org/t/lock-a-specific-plane-for-rotating-or-translating-only/37327/1 "2024-07-11T15:56:25Z")

</div>

I’m currently building a module for CT analysis. I’ve managed to do quite a bit and am in the process of refining it. I already created planes, rotated and centered them, added custom measurements and plotted a way to get the 3D view to rotate perpendicularly to the plane to get the correct C-arm views.

I would now like to lock a specific plane from rotating or translating. Specifically, I need to stop the sagital and coronal planes from rotating, and the axial plane from translating. How can this be done with python for the module?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/f/bf51908d54ff650fe0f1d1835f3d8e935b54e605.jpeg)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 13, 2024, 8:21pm UTC](https://discourse.slicer.org/t/lock-a-specific-plane-for-rotating-or-translating-only/37327/2 "2024-07-13T20:21:35Z")

</div>

You can customize what actions and mouse&keyboard gestures are available for each view as shown in [examples in the script repository](https://slicer.readthedocs.io/en/latest/developer_guide/script_repository.html#disable-certain-user-interactions-in-slice-views).
