pyCGM_Single.pycgmStatic.rotaxis_nonfootflat¶
-
pyCGM_Single.pycgmStatic.
rotaxis_nonfootflat
(frame, ankle_JC)¶ Calculate the anatomically correct foot joint center and axis function for a non-flat foot.
Takes in a dictionary of xyz positions & marker names and the ankle axis then calculates the anatomically correct foot axis for a non-flat foot.
Markers used: RTOE, LTOE, RHEE, LHEE
- Parameters
- framedict
Dictionary of marker lists.
- ankle_JCarray
An array of ankle_JC each x,y,z position.
- Returns
- R, L, foot_axis: list
Returns a list representing the correct foot joint center for a non-flat foot, the list contains two 1x3 arrays representing the foot axis origin x, y, z positions and a 3x2x3 list containing the foot axis center in the first dimension and the direction of the axis in the second dimension.
Examples
>>> import numpy as np >>> from .pycgmStatic import rotaxis_nonfootflat >>> frame = { 'RHEE': [374.01, 181.58, 49.51], ... 'LHEE': [105.30, 180.21, 47.16], ... 'RTOE': [442.82, 381.62, 42.66], ... 'LTOE': [39.44, 382.45, 41.79]} >>> ankle_JC = [np.array([393.76, 247.68, 87.74]), ... np.array([98.75, 219.47, 80.63]), ... [[np.array([394.48, 248.37, 87.72]), ... np.array([393.07, 248.39, 87.62]), ... np.array([393.69, 247.78, 88.73])], ... [np.array([98.47, 220.43, 80.53]), ... np.array([97.79, 219.21, 80.76]), ... np.array([98.85, 219.60, 81.62])]]] >>> [np.around(arr, 2) for arr in rotaxis_nonfootflat(frame,ankle_JC)] [array([442.82, 381.62, 42.66]), array([ 39.44, 382.45, 41.79]), array([[[442.72, 381.69, 43.65], [441.88, 381.94, 42.54], [442.49, 380.67, 42.69]], [[ 39.56, 382.51, 42.78], [ 38.5 , 382.15, 41.92], [ 39.75, 381.5 , 41.82]]])]