# Newby question, Fiducial points for changin RAS orientation

**URL:** <https://discourse.slicer.org/t/newby-question-fiducial-points-for-changin-ras-orientation/3981>\
**Category:** Support\
**Created:** [September 4, 2018, 3:25am UTC](https://discourse.slicer.org/t/newby-question-fiducial-points-for-changin-ras-orientation/3981 "2018-09-04T03:25:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SebastianE93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sebastiane93/32/3112_2.png) [@SebastianE93](https://discourse.slicer.org/u/SebastianE93)\
**Post date:** [September 4, 2018, 3:25am UTC](https://discourse.slicer.org/t/newby-question-fiducial-points-for-changin-ras-orientation/3981/1 "2018-09-04T03:25:01Z")

</div>

Operating system: win 10 - 64  
Slicer version: 4.8.1  
Expected behavior:  
Actual behavior:

I would like to know how to use 3 fiducial points to get a plane that could be my anterior plane in RAS orientation. I tried to create a matrix that would represent this plane and use it for changing the base of the matrix but I don’t know how to code the transformation.

Basically I want to use a plane that I choose with 3 fiducial markers and therefore, change the RAS orientation. It is possible?

I’m using Python  
Thanks,

---

<div class="post-metadata">

**Author:** ![steffen-o](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/steffen-o/32/2660_2.png) [@steffen-o](https://discourse.slicer.org/u/steffen-o)\
**Post date:** [September 4, 2018, 2:34pm UTC](https://discourse.slicer.org/t/newby-question-fiducial-points-for-changin-ras-orientation/3981/2 "2018-09-04T14:34:09Z")

</div>

Have a look at the [Documentation/Nightly/ScriptRepository](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Fit_slice_plane_to_markup_fiducials)  
there you find what you are looking for --\> **Fit slice plane to markup fiducials**

---

<div class="post-metadata">

**Author:** ![SebastianE93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sebastiane93/32/3112_2.png) [@SebastianE93](https://discourse.slicer.org/u/SebastianE93)\
**Post date:** [September 5, 2018, 12:36am UTC](https://discourse.slicer.org/t/newby-question-fiducial-points-for-changin-ras-orientation/3981/3 "2018-09-05T00:36:58Z")

</div>

Thanks you, but I would like to fit the RAS orientation to the plane I create. The solution presented in **Fit slice plane to markup fiducials** is for the ‘red’ plane. Maybe it’s just changing the name but I have trouble with the coding.

---

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [September 5, 2018, 12:58am UTC](https://discourse.slicer.org/t/newby-question-fiducial-points-for-changin-ras-orientation/3981/4 "2018-09-05T00:58:02Z")

</div>

If you are using a [vtkPlane](https://www.vtk.org/doc/nightly/html/classvtkPlane.html) then you can calculate the normal with the formula in the linked solution, and use vtkPlane::SetNormal and vtkPlane::SetOrigin to set the orientation.

---

<div class="post-metadata">

**Author:** ![SebastianE93](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sebastiane93/32/3112_2.png) [@SebastianE93](https://discourse.slicer.org/u/SebastianE93)\
**Post date:** [September 5, 2018, 1:28am UTC](https://discourse.slicer.org/t/newby-question-fiducial-points-for-changin-ras-orientation/3981/5 "2018-09-05T01:28:29Z")

</div>

Thanks, it’s perfect!
