Registration

The purpose of the registration is to place consistent bone-specific coordinate frames between the experiment and model. In practice, the transform (\(T_{Im\_Sen}\)) will be used to define the position and orientation of the femur and tibia’s position sensor in the MR image coordinate system. Note that in the experiment, the femoral and tibial embedded coordinate systems are defined with respect to the corresponding body’s position sensor (the IRED sensors used to track bony motion). Registration places the fixed tibia and femoral coordinate systems within the MR image’s coordinate system, which is effectively defined using the centers of registration spheres that are common to both the experiment and MR images.

Fiducial (or “registration”) spheres that are fixed to the femur and tibia are used to facilitate the registration process. The sphere surfaces were digitized during experimental setup and reported in the data-MC-oks003/State.cfg file. See Digitized Points - Experimental for details on how the reported experimental data was used to define the digitized points with respect to the appropriate body’s position sensor. The spheres are also visible in the MR images. 3D Slicer is used to manually place 30 points around the perimeter of each fiducial to “digitize” the fiducials in the MR image’s coordinate system.

The digitized points are used in a sphere fitting procedure to estimate the center of each fiducial (see https://jekel.me/2015/Least-Squares-Sphere-Fit/ for more details). The points that define the center of each sphere, with respect to the image and position sensor’s coordinate system, are used as inputs to a landmark registration algorithm (Fig. 1). The algorithm computes the transform (\(T_{Im\_Sen}\)) that gives the least squared fit between the given target points and the transformed source points (https://vtk.org/doc/nightly/html/classvtkLandmarkTransform.html). In this application, the fiducial centers in the MR image’s coordinate system are the target points, and the centers in the rigid body’s sensor coordinate system are the source points.

alternate text

Fig. 1 A flowchart demonstrating how the digitized fiducial points in the MR image and the position sensor’s coordinate system are used to define the transform used for registration for a rigid body, such as the femur or tibia.

Digitized Points - Experimental

This section describes how the digitized point data that are reported in the data-MC-oks003/State.cfg file are used to define the points relative to the corresponding body’s position sensor. This demonstrates an example for one point on rigid body 1, however the same process is repeated for the remaining 9 points on rigid body 1, and the same process also applies to rigid body 2.

Below you can see the relevant data from that file (note that only one digitized point is shown):

[MRI Fiducial Sphere Positions]
... (data not shown)
Collected Points Rigid Body 1 (m) = "<size(s)=30 3> 0.9900980530 0.7572836873 0.0611828908
Collected Points Rigid Body 1 Position Sensor (m,rad) = 1.0580799235 0.8044003377 0.0868033719 1.8617229826 0.0655618814 1.0999982884

In the above example, the desired variables are

\[\begin{split}\begin{split} P_{Wx} &= 0.9900980530 \\ P_{Wy} &= 0.7572836873 \\ P_{Wz} &= 0.0611828908 \\ t_x &= 1.0580799235 \\ t_y &= 0.8044003377 \\ t_z &= 0.0868033719 \\ \alpha &= 1.8617229826 \\ \beta &= 0.0655618814 \\ \gamma &= 1.0999982884 \end{split}\end{split}\]

The line labeled Collected Points Rigid Body 1 (m) is used to define the coordinates of the digitized points relative to the Optotrak world coordinate system. Each set of three values defines the \(x\), \(y\), \(z\) coordinates of \(P_W\), which is the digitized point relative to the Optotrak world. These values are converted from meters to millimeters.

The line labeled Collected Points Rigid Body 1 Position Sensor (m,rad) is used to define the position of rigid body 1’s position sensor relative to the Optotrak world coordinate system. These six values define the translations \(t_x\), \(t_y\), \(t_z\) and rotations \(\alpha\), \(\beta\), \(\gamma\) of rigid body 1’s position sensor. The translations are converted from meters to millimeters.

The values \([t_x, t_y, t_z, \alpha, \beta, \gamma]\) are used to define a transformation matrix \(T_{W\_R1}\) which is the transform from the Optotrak world coordinate system to the position sensor’s coordinate system. The transofrm matrix (\(T_{W\_R1}\)) is defined as

\[T_{W\_R1} = r_z r_y r_x\]

Where

\[\begin{split}r_x = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & cos(\alpha) & -sin(\alpha) & 0 \\ 0 & sin(\alpha) & cos(\alpha) & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}\end{split}\]
\[\begin{split}r_y = \begin{bmatrix} cos(\beta) & 0 & sin(\beta) & 0 \\ 0 & 1 & 0 & 0 \\ -sin(\beta) & 0 & cos(\beta) & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}\end{split}\]
\[\begin{split}r_z = \begin{bmatrix} cos(\gamma) & -sin(\gamma) & 0 & 0 \\ sin(\gamma) & cos(\gamma) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix}\end{split}\]

and the translations (\(t_i\)) are then specified as the last column in \(T_{W\_R1}\) as

\[T_{0,3} = t_x\]
\[T_{1,3} = t_y\]
\[T_{2,3} = t_z\]

The transformation matrix (\(T_{W\_R1}\)) is used to define a point that is recorded relative to the Optotrak world (\(P_W\)) and specify its coordinates relative to rigid body 1’s position sensor (\(P_{R1}\))

\[P_{R1} = T_{W\_R1}^{-1}P_W\]

Note

To avoid error propagation, a python function from numpy (P_{R1} = numpy.linalg.solve(T_{W\_R1}, P_W)) is used to solve the system of linear equations for \(P_{R1}\). This is used to avoid inverting the transformation matrix \(T_{W\_R1}\). Also note that to ensure that the dimensions are compatible, 1. is appended to the end of \(P_W\) to create an array with a shape of 1x4. The first three values in \(P_{R1}\) are taken as the \(x,y,z\) coordinates.