Set slice position and orientation from 3 markup fiducials

This code uses 3 fiducials to position and orientation the red slice view, how to position and rotate the yellow_slicer in the same way? Just like this…

我的微信号(My WeChat ID):

You can rotate views by Ctrl-Alt-Left-click-and-drag or two-finger pinch on a Windows touchscreen or macOS touchpad (after enabling slice intersections).

There are many modules for exploring tool trajectories and rotating views.

For example, you can use Path Explorer module (in SlicerIGT extension) - specify entry and target point, create a trajectory, select it, and if you select an In Plane view, you can rotate it along the trajectory using the slider.

For just simple rotating of views, you can use or copy-paste code from Valve View module in SlicerHeart extension.


I fully understand…Three points determine a plane, so the key to observing a straight line from two perspectives is the third point!
Here is the solution:

只是得到的视角或slice view无法和坐标轴对齐…有点小遗憾…

It’s just that the obtained perspective or slice view cannot be aligned with the coordinate axis…it’s a little regrettable…

You can specify what is “up” in the slice view by the transverse vector (planeX in the code snippet above). See in this example how to make the “up” direction snap to meaningful anatomical axis directions.