pyCGM_Single.pyCGM.thoraxJC

pyCGM_Single.pyCGM.thoraxJC(frame)

Calculate the thorax joint axis function.

Takes in a dictionary of marker names to x, y, z positions. Calculates and returns the thorax axis and origin.

Markers used: CLAV, C7, STRN, T10

Parameters
framedict

Dictionaries of marker lists.

Returns
thorax_axis, originarray

Returns an array which contains a 3x3 array representing the thorax axis x, y, z followed by 1x3 array of the thorax origin

Examples

>>> import numpy as np
>>> from .pyCGM import thoraxJC
>>> frame = {'C7': np.array([256.78, 371.28, 1459.70]),
...          'T10': np.array([228.64, 192.32, 1279.64]),
...          'CLAV': np.array([256.78, 371.28, 1459.70]),
...          'STRN': np.array([251.67, 414.10, 1292.08])}
>>> [np.around(arr, 2) for arr in thoraxJC(frame)] 
[array([[ 256.35,  365.72, 1461.92],
[ 257.27,  364.7 , 1462.23],
[ 256.18,  364.43, 1461.36]]), array([ 256.27,  364.8 , 1462.29])]