Differences between revisions 90 and 91
Revision 90 as of 2019-04-24 19:52:05
Size: 6705
Editor: ricimorrill1
Comment:
Revision 91 as of 2019-08-29 19:54:23
Size: 7736
Editor: ricimorrill1
Comment:
Deletions are marked like this. Additions are marked like this.
Line 48: Line 48:
 goal:: 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  goal:: 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.
Line 52: Line 52:
 input::

 logic::
 input:: 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 [[attachment:registration_xml_example.xml|example]].
Line 75: Line 72:
A=T_A_B \times B\\ A=T_{AB} \times B\\
Line 85: Line 82:
B=A \times T_A_B^{-1}\\ B=A \times T_{AB}^{-1}\\
Line 93: Line 90:
 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).
 1. 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).

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

  • Establish the relationship between bone the coordinate system of motion capture and joint testing (Optrotrak global coordinate system) and anatomical imaging coordinate system (MRI global coordinate system)

Prerequisities

Infrastructure

Previous Protocols

Requirements

Procedures

The following scripts, which can be found in the repository at https://simtk.org/websvn/wsvn/openknee/utl/Registration/Registration_final, 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). For Anatomical Imaging, surface coordinates will be acquired from the .stl model of each registration marker.

convert_to_image_CS.py

Tibiofemoral Joint Configuration Files

goal
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.
requirements

python [version 2.7] (https://www.python.org) and numpy (https://www.numpy.org)

input

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.

math
the transformation matrix extracted from each position sensor coordinate set (x,y,z,r,p,w) is as followed:
  • latex error! exitcode was 2 (signal 0), transscript follows:
    
    [Sun Aug 17 07:06:29.400028 2025] [wsgi:error] [pid 2360650:tid 2360650] [remote 216.73.216.111:41447] failed to exec() latex
    

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

  • latex error! exitcode was 2 (signal 0), transscript follows:
    
    [Sun Aug 17 07:06:29.440579 2025] [wsgi:error] [pid 2360652:tid 2360652] [remote 216.73.216.111:41447] failed to exec() latex
    

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

  • latex error! exitcode was 2 (signal 0), transscript follows:
    
    [Sun Aug 17 07:06:29.477655 2025] [wsgi:error] [pid 2360653:tid 2360653] [remote 216.73.216.111:41447] failed to exec() latex
    

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

output
  • 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).
  • 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).
  • examples

    Patellofemoral Joint Configuration Files

    goal
    to find the location of the center of the registration markers (on the patella) with regards to the optotrak sensor coordinate system given the coordinates of the divot points on the registration marker with respect to the global optotrak coordinate system
    requirements

    python [version 2.7] (https://www.python.org) and numpy (https://www.numpy.org)

    input
    logic
    math
    output
    examples

    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.

    References

    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)