Hi,
I’m looking into using slicer for the visualisation of results from another tool. Therefore, I’d like to import plane definitions to quickly inspect whether they are as expected.
I use a point and normal vector in world coordinates. I keep the rest of a slicer generated json file as template while replacing “center” and “normal”.
The “objectToBase” matrix seems straight forward enough the conversion between the image orientation to the default LPS orientation of the markups.
But it’s not immediately clear how the “baseToNode” and “orientation” matrices are defined and I can’t find a reference. I hoped I could omit those in the definition as the point and normal should be sufficient for defining a plane (to my needs). This does not seem to be the case so I assume I will have to calculate the matrices to make Slicer read my file.

Could someone point me to a resource of how these should behave or how they would be calculated based on the point and normal vector? Much appreciated!

If you specify a plane by a single point ("planeType": "pointNormal") then you only need to specify:

plane position: position of the one and only control point

plane orientation: baseToNode matrix. Note that a plane in mathematical sense is specified by a position and a normal, but if you want to display a plane then you need to specify its rotation around that normal. baseToNode contains the two axis of the plane and the plane normal. If you don’t care about the rotation then you can choose an arbitrary orientation and use cross product with the normal vector to make it orthogonal to the normal vector. Translation component of baseToNode matrix is ignored (because position is set by the control point), so it can be set to 0.0, 0.0, 0.0.

plane bounds: specifies how far the plane extends in 4 directions (-x, +x, -y, +y) from the plane position

Dear teacher,
Hello, Thanks for your excellent work!
I have a question, If I know the plane center(c1,c2,c3) and normal(n1,n2,n3), How can I calculate the ‘baseToNode’?