pyCGM_Single.pycgmStatic.hipJointCenter

pyCGM_Single.pycgmStatic.hipJointCenter(frame, pel_origin, pel_x, pel_y, pel_z, vsk=None)

Calculate the hip joint center function.

Takes in a dictionary of x,y,z positions and marker names, as well as an index. Calculates the hip joint center and returns the hip joint center.

Other landmarks used: origin, sacrum Subject Measurement values used: MeanLegLength, R_AsisToTrocanterMeasure, InterAsisDistance, L_AsisToTrocanterMeasure

Hip Joint Center: Computed using Hip Joint Center Calculation (ref. Davis_1991)

Parameters
framedict

Dictionary of marker lists.

pel_originarray

An array of pel_origin, pel_x, pel_y, pel_z each x,y,z position.

pel_x, pel_y, pel_zint

Respective axes of the pelvis.

vskdict, optional

A dictionary containing subject measurements from a VSK file.

Returns
hip_JCarray

Returns an array containing the left hip joint center x, y, z marker positions (1x3), followed by the right hip joint center x, y, z marker positions (1x3).

Examples

>>> import numpy as np
>>> from .pycgmStatic import hipJointCenter
>>> frame = None
>>> vsk = {'MeanLegLength': 940.0, 'R_AsisToTrocanterMeasure': 72.51,
...        'L_AsisToTrocanterMeasure': 72.51, 'InterAsisDistance': 215.91}
>>> pel_origin = [ 251.61, 391.74, 1032.89]
>>> pel_x = [251.74, 392.73, 1032.79]
>>> pel_y = [250.62, 391.87, 1032.87]
>>> pel_z = [251.60, 391.85, 1033.89]
>>> np.around(hipJointCenter(frame,pel_origin,pel_x,pel_y,pel_z,vsk), 2)    
array([[183.24, 338.8 , 934.65],
       [308.9 , 322.3 , 937.19]])