pyCGM_Single.pycgmStatic.kneeJointCenter

pyCGM_Single.pycgmStatic.kneeJointCenter(frame, hip_JC, delta, vsk=None)

Calculate the knee joint center and axis function.

Takes in a dictionary of xyz positions and marker names, as well as an index. and takes the hip axis and pelvis axis. Calculates the knee joint axis and returns the knee origin and axis

Markers used: RTHI, LTHI, RKNE, LKNE, hip_JC Subject Measurement values used: RightKneeWidth, LeftKneeWidth

Knee joint center: Computed using Knee Axis Calculation(ref. Clinical Gait Analysis hand book, Baker2013)

Parameters
framedict

dictionary of marker lists.

hip_JCarray

An array of hip_JC containing the x,y,z axes marker positions of the hip joint center.

deltafloat

The length from marker to joint center, retrieved from subject measurement file.

vskdict, optional

A dictionary containing subject measurements from a VSK file.

Returns
R, L, axislist

Returns a list that contains the knee axes’ center in two 1x3 arrays of xyz values, which is then followed by a 2x3x3 array composed of the knee axis center x, y, and z axis components. The xyz axis components are 2x3 arrays consisting of the axis center in the first dimension and the direction of the axis in the second dimension.

Notes

Delta is changed suitably to knee.

Examples

>>> import numpy as np
>>> from .pycgmStatic import kneeJointCenter
>>> vsk = { 'RightKneeWidth' : 105.0, 'LeftKneeWidth' : 105.0 }
>>> frame = { 'RTHI': np.array([426.50, 262.65, 673.66]),
...           'LTHI': np.array([51.94, 320.02, 723.03]),
...           'RKNE': np.array([416.99, 266.23, 524.04]),
...           'LKNE': np.array([84.62, 286.69, 529.40])}
>>> hip_JC = [[182.57, 339.43, 935.53],
...         [309.38, 322.80, 937.99]]
>>> delta = 0
>>> [np.around(arr, 2) for arr in kneeJointCenter(frame,hip_JC,delta,vsk)] 
[array([364.24, 292.34, 515.31]), array([143.55, 279.9 , 524.79]), array([[[364.69, 293.24, 515.31],
        [363.36, 292.78, 515.17],
        [364.12, 292.42, 516.3 ]],
       [[143.65, 280.88, 524.63],
        [142.56, 280.01, 524.86],
        [143.64, 280.04, 525.77]]])]