Newby question, Fiducial points for changin RAS orientation

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,

Have a look at the Documentation/Nightly/ScriptRepository
there you find what you are looking for --> Fit slice plane to markup fiducials

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.

If you are using a vtkPlane then you can calculate the normal with the formula in the linked solution, and use vtkPlane::SetNormal and vtkPlane::SetOrigin to set the orientation.

Thanks, it’s perfect!