SetSliceToRASByNTP

Set slice position and orientation from 3 markup fiducials
这段代码通过3个fiducials,来定位旋转red_slicer,怎样用同样的方法来定位和旋转yellow_slicer呢?就像这样…

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):

gelamb@sina.com

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.

我整明白了…三点决定一个平面,所以,要从两个视角来观察一条直线的关键是第3个点的选择!
下面是解决方案:

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.