Target Outcome

The overall goal of this specification is to provide coordinate systems for each registration marker sets on femur, tibia, and patella with the intention to allow transformation between joint testing and anatomical imaging coordinate systems. In this regard, the goals are



Previous Protocols



The following scripts, which can be found in the repository at, will allow for a relationship between the coordinate systems. The workflow of the registration and data re-sampling process is included here.

Note: Previously documented registration methods have been moved to the Discussion page.

Obtaining Coordinates of Registration Marker Centers

The registration markers are spherical objects. The boundaries of these spheres will be digitized from magnetic resonance imaging and during joint testing using a digitizing probe, see Previous Protocols above. More than 10 points are expected to be acquired for each registration marker for a given experimentation modality. For TibioFemoral Joint Experimentation, roughly 10 surface points will be acquired for each registration markers. For PatelloFemoral Joint Experimentation, the locations of the 12 divot points will be acquired (see Specifications/SpecimenPreparation). In order to find the location of the centers of three spheres given the 12 divot points, the dimensional relationship among the CAD points is used. This relationship is described at For Anatomical Imaging, surface coordinates will be acquired from the .stl model of each registration marker.

Tibiofemoral and Patellofemoral Joint Configuration Files

to find the location of the center of the registration markers (on the femur and tibia) with regards to the optotrak sensor coordinate system given the coordinates of points on the surface of the markers with respect to the global optotrak coordinate system.

python [version 2.7] ( and numpy (


A registration xml is used to define the knee directory, knee side (left or right) and the stl files to be used for registration. See example.

the transformation matrix extracted from each position sensor coordinate set (x,y,z,r,p,w) is as followed:
  • \begin{displaymath}
q = (q_1,q_2,q_3,q_4,q_5,q_6) = (x,y,z,roll,pitch,yaw)\\
T_{Opto World To Bone Sensor} = \left [ \begin{array}{cccc} cos q_6 & -sin q_6 & 0 & q_1 \\ -sin q_6 & cos q_6 & 0 & q_2 \\ 0 & 0 & 1 & q_3 \\ 0 & 0 & 0 & 1 \end{array}\right]\left [\begin{array}{cccc} cos q_5 & 0 & sin q_5 & 0 \\ 0 & 1 & 0 & 0 \\-sin q_5 & 0 & cos  q_5 & 0 \\ 0 & 0 & 0 & 1 \end{array}\right]\left [\begin{array}{cccc} 1 & 0 & 0 & 0 \\ 0 & cos q_4 & -sin  q_4 & 0 \\ 0 & sin  q_4 & cos q_4 & 0 \\ 0 & 0 & 0 & 1 \end{array} \right]\\
T_{Opto World To Bone Sensor} = \left [ \begin{array}{cccc} cos q_6 cos q_5 & cos q_6 sin q_5 sin q_4 - sin q_6 cos q_4 & cos q_6 sin q_5 cos q_4 + sin q_6 sin q_4 & q_1 \\ sin  q_6  cos  q_5 & sin q_6 sin q_5 sin q_4 + sin q_6 cos q_4 & sin q_6 sin q_5 cos q_4 + cos q_6 sin q_4 & q_2 \\ -sin q_5 & cos q_5 sin q_4 & cos q_5 cos q_4 & q_3 \\ 0 & 0 & 0 & 1 \end{array} \right]\\

Imagine the matrix containing points portraying the position of registration markers in the world coordinates as "A" and the transformation matrix we extracted as "T_A_B", and B is the coordinates in the bone sensor coordinates that we want

As a result we need the inverse of that transformation matrix to multiply by A

(Side Note: the transformation matrix is 4 by 4 for each set of x,y,z coordinates. As a result we change the 3 by 1 coordinate arrays into a 4 by 1 array by adding a 1 at the end. This will cancel out by the end and we can just take the first 3 resulting coordinates of the array since the 4th will still be a 1)

  1. Within the registration directory, all processed tibiofemoral and patellofemoral trials are evaluated and transformation matrices needed for data analysis are saved using the trial name (.npz extension).
  2. Registration error files are also saved for each bone (oksXXX_registration_errors_BONE.txt). Bone is defined as FEM for femur, TIB for tibia, and PAT for patella. Within this file, the radius and center of each sphere fit to digitized (transformed to image coordinate system) and stl surface points are reported. In addition, distances and vector coordinates between all registration markers are reported for both data sets. The error is reported as the difference in line segment length (expressed in mm and percent difference) and angle between line segments from each coordinate system (defined from digitized and stl surface points).

Transformation Matrices

-- aerdemir 2015-06-30 12:31:16 This session already has documentation to calculate transformation matrices between bone registration marker coordinate system and Optotrak coordinate system and bone registration marker coordinate system and image coordinate system. It will be good to expand this session for patellofemoral registration marker assembly. Particularly, by providing the necessary inputs for calculations. Also, we need to correct the information to emphasize that we are finding transformation matrices in reference to local (bone specific) Optotrak coordinate systems not global.


Söderkvist I, Wedin PA. Determining the movements of the skeleton using well-configured markers. J Biomech. 1993 Dec;26(12):1473-7. PubMed

Specifications/Registration (last edited 2019-08-29 20:01:09 by ricimorrill1)