pyCGM_Single.pycgmStatic.pelvisJointCenter

pyCGM_Single.pycgmStatic.pelvisJointCenter(frame)

Make the Pelvis Axis function

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

Markers used: RASI,LASI,RPSI,LPSI Other landmarks used: origin, sacrum

Pelvis X_axis: Computed with a Gram-Schmidt orthogonalization procedure(ref. Kadaba 1990) and then normalized. Pelvis Y_axis: LASI-RASI x,y,z positions, then normalized. Pelvis Z_axis: Cross product of x_axis and y_axis.

Parameters
framedict

Dictionary of marker lists.

Returns
pelvislist

Returns a list that contains the pelvis origin in a 1x3 array of xyz values, a 4x1x3 array composed of the pelvis x, y, z axes components, and the sacrum x, y, z position.

Examples

>>> import numpy as np
>>> from .pycgmStatic import pelvisJointCenter
>>> frame = {'RASI': np.array([ 395.37,  428.1, 1036.83]),
...          'LASI': np.array([ 183.19,  422.79, 1033.07]),
...          'RPSI': np.array([ 341.42,  246.72, 1055.99]),
...          'LPSI': np.array([ 255.8,  241.42, 1057.3]) }
>>> [np.around(arr, 2) for arr in pelvisJointCenter(frame)] 
[array([ 289.28,  425.45, 1034.95]), array([[ 289.26,  426.44, 1034.83],
   [ 288.28,  425.42, 1034.93],
   [ 289.26,  425.56, 1035.94]]), array([ 298.61,  244.07, 1056.64])]