Calculation of Multi-Planar Reconstruction axis

For example. If I rotate the axial-axis in sagittal plane, as a result, the axial plane will interpolate as the computer will capture the angle and point, and the axial-axis in coronal plane will rotate in some rules.
Is the axis for axial plane means the cross-line with coronal plane or sagittal plane?
How can I know how to calculate the axial-axis in coronal plane? What kind of the rules the calculation abided?

Computing the rotation axis position is the main challenge, as slice planes may not intersect each other in the same position (there may be several intersection points or there may be none). We choose to use the center of gravity of all the intersection points as center of rotation.

The rotation axis direction is the slice normal.

We then simply rotate all the slices around this rotation axis using homogeneous linear transformation.

You can find the source code of the intersection point computation here and all the other computations are in the same file or maybe some in the slice intersection widget class, too.

Thanks for your reply. I am trying to reproduce the function.
In the source code, line1 controled by mouse influences line2. After calculating the cross point, line2 is updated.
But the logic in my code is that I captured the horzView and vertView and calculate the projection on those plane then plot the line on the current view. It seems not correct?

Since there can be any number of intersecting slice views (not just two - horzView and vertView) and they can have any orientation (not horizontal and vertical) and they may not be orthogonal to the current slice (so projection does not necessarily produce a line), the method you describe does not seem to be usable in general. It might work in the special case when you only have 3 slices, all orthogonal to each other, but you haven’t described the entire method (just “plot the line on the current view” is probably not all that you need), so it is hard to tell.

Hi, there. I found that might be the angle calculated wrong. If I rotate like a radian like 3.0 from the axial-plane. How can I calculate the corresponding radian in coronal-plane and sagittal-plane? Is there some source code for these computations? Great thanks!

It seems that the source code of the intersection point just the output of rotation, then the changes of the rotation is calculated based on this point?
Is it necessary when slices update each new origin point in different plane need to be calculated again? It seems that the rotation in different planes is updated with the rotation axis.

The center of rotation is computed when the rotation is started and it is not changed by the rotation operation.

Sorry for the misunderstanding. The vectors is not the center of the rotation, but the coordinate projection from world to local. so after calculating the rotation radian, the coordinate projection is re-computed. But I am confused about the other plane coordinate projection calculation. For in my MPR project, the crossline of current plane is changed but other planes stay silent.
Is it possible for me to get the world situation of the mouse moving point, and then re-compute the rotation matrix in different plane? The X-Y-Z axis orient is the problem to solve.

hey there. after recalculate three planes(in my project is axial, sagittal and coronal), with reset the orients of these planes, I found that the rotation of cross lines like the propellers of helicopter. It seems that it is not necessary that updating all the orients(X,Y) each time.
I found that Slicer has the similar function Set/GetOrients like mine, too. But the input is “Qt::Orientation orientation” class or “int ID”, could you please tell me that how to calculate the rotation matrix for each plane in Slicer? Great thanks thanks a lot!

It seems that the logic of rotation matrix application is in here.