pyCGM_Single.pyCGM.kneeJointCenter

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

Calculate the knee joint center and axis.

Takes in a dictionary of marker names to x, y, z positions, 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 [1].

Parameters
framedict

dictionaries of marker lists.

hip_JCarray

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

deltafloat, optional

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

vskdict, optional

A dictionary containing subject measurements.

Returns
R, L, axisarray

Returns an array that contains the knee axis center in a 1x3 array 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.

References

1

Baker, R. (2013). Measuring walking : a handbook of clinical gait analysis. Mac Keith Press.

Examples

>>> import numpy as np
>>> from .pyCGM import kneeJointCenter
>>> vsk = { 'RightKneeWidth' : 105.0, 'LeftKneeWidth' : 105.0 }
>>> frame = { 'RTHI': np.array([426.50, 262.65, 673.66]),
...           'LTHI': np.array([51.93, 320.01, 723.03]),
...           'RKNE': np.array([416.98, 266.22, 524.04]),
...           'LKNE': np.array([84.62, 286.69, 529.39])}
>>> hip_JC = [[182.57, 339.43, 935.52],
...         [309.38, 32280342417, 937.98]]
>>> delta = 0
>>> [arr.round(2) for arr in kneeJointCenter(frame,hip_JC,delta,vsk)] 
[array([413.2 , 266.22, 464.66]), array([143.55, 279.91, 524.77]), array([[[414.2 , 266.22, 464.6 ],
[413.14, 266.22, 463.66],
[413.2 , 267.22, 464.66]],
[[143.65, 280.89, 524.62],
[142.56, 280.02, 524.85],
[143.65, 280.05, 525.76]]])]