pyCGM_Single.pyCGM.elbowJointCenter¶
-
pyCGM_Single.pyCGM.
elbowJointCenter
(frame, thorax, shoulderJC, wand, vsk=None)¶ Calculate the Elbow joint axis ( Humerus) function.
Takes in a dictionary of marker names to x, y, z positions, the thorax axis, and shoulder joint center.
Calculates each elbow joint axis.
Markers used: RSHO, LSHO, RELB, LELB, RWRA ,RWRB, LWRA, LWRB Subject Measurement values used: RightElbowWidth, LeftElbowWidth
- Parameters
- frame
Dictionaries of marker lists.
- thoraxarray
The x,y,z position of the thorax.
- shoulderJCarray
The x,y,z position of the shoulder joint center.
- wandarray
The x,y,z position of the wand.
- vskdict, optional
A dictionary containing subject measurements.
- Returns
- origin, axis, wrist_Oarray
Returns an array containing a 2x3 array containing the right elbow x, y, z marker positions 1x3, and the left elbow x, y, z marker positions 1x3, which is followed by a 2x3x3 array containing right elbow x, y, z axis components (1x3x3) followed by the left x, y, z axis components (1x3x3) which is then followed by the right wrist joint center x, y, z marker positions 1x3, and the left wrist joint center x, y, z marker positions 1x3.
Examples
>>> import numpy as np >>> from .pyCGM import elbowJointCenter >>> frame = {'RSHO': np.array([428.88, 270.55, 1500.73]), ... 'LSHO': np.array([68.24, 269.01, 1510.10]), ... 'RELB': np.array([658.90, 326.07, 1285.28]), ... 'LELB': np.array([-156.32, 335.25, 1287.39]), ... 'RWRA': np.array([776.51,495.68, 1108.38]), ... 'RWRB': np.array([830.90, 436.75, 1119.11]), ... 'LWRA': np.array([-249.28, 525.32, 1117.09]), ... 'LWRB': np.array([-311.77, 477.22, 1125.16])} >>> thorax = [[[256.23, 365.30, 1459.66], ... [257.14, 364.21, 1459.58], ... [256.08, 354.32, 1458.65]], ... [256.14, 364.30, 1459.65]] >>> shoulderJC = [np.array([429.66, 275.06, 1453.95]), ... np.array([64.51, 274.93, 1463.63])] >>> wand = [[255.92, 364.32, 1460.62], ... [256.42, 364.27, 1460.61]] >>> vsk = { 'RightElbowWidth': 74.0, 'LeftElbowWidth': 74.0, ... 'RightWristWidth': 55.0, 'LeftWristWidth': 55.0} >>> [np.around(arr, 2) for arr in elbowJointCenter(frame,thorax,shoulderJC,wand,vsk)] [array([[ 633.66, 304.95, 1256.07], [-129.16, 316.86, 1258.06]]), array([[[ 633.81, 303.96, 1256.07], [ 634.35, 305.05, 1256.79], [ 632.95, 304.84, 1256.77]], [[-129.32, 315.88, 1258. ], [-128.45, 316.79, 1257.36], [-128.49, 316.72, 1258.78]]]), array([[ 793.32, 451.29, 1084.43], [-272.46, 485.79, 1091.37]])]