opensimFittingFilter#

class pyCGM2.Model.Opensim.opensimFilters.opensimFittingFilter(ikToolFile, calibratedOsim, ikTagProcedure, dataDir, acqMotion, accuracy=1e-08)#

Filter running the OpenSim inverse kinematics of a calibrated OpenSim model.

__init__(ikToolFile, calibratedOsim, ikTagProcedure, dataDir, acqMotion, accuracy=1e-08)#
Parameters:
  • ikToolFile (str) – full filename of the opensim inverse kinematic tool file

  • calibratedOsim (osim file) – calibrated opensim file

  • ikTagProcedure (pyCGM2.opensim.procedure) – fitting procedure

  • dataDir (str) – path to opensim result directory

  • accuracy (double) – accuracy of the kinematic fitter

Methods

__init__(ikToolFile, calibratedOsim, ...[, ...])

exportXml(filename[, path])

Export the generated inverse kinematic Tool :param filename: filename of the generated inverse kinematic Tool :type filename: str

run(acqMotionFilename[, exportSetUp])

Run kinematic fitting :param acqMotion: acquisition of a motion trial :type acqMotion: btk.Acquisition :param acqMotionFilename: filename of the motion trial :type acqMotionFilename: filename

setAccuracy(value)

Set the accuracy of the inverse kinematics.

setResultsDirectory(path)

Set the results directory of the inverse kinematics tool.

setTimeRange(acq[, beginFrame, lastFrame])

Set the time range of the inverse kinematics.

updateConfig()

Write the updated inverse kinematics setup file and reload the kinematic fitter.

exportXml(filename, path=None)#

Export the generated inverse kinematic Tool :param filename: filename of the generated inverse kinematic Tool :type filename: str

run(acqMotionFilename, exportSetUp=False, **kwargs)#

Run kinematic fitting :param acqMotion: acquisition of a motion trial :type acqMotion: btk.Acquisition :param acqMotionFilename: filename of the motion trial :type acqMotionFilename: filename

setAccuracy(value)#

Set the accuracy of the inverse kinematics.

Parameters:

value (float) – Accuracy.

setResultsDirectory(path)#

Set the results directory of the inverse kinematics tool.

Parameters:

path (str) – Directory path.

setTimeRange(acq, beginFrame=None, lastFrame=None)#

Set the time range of the inverse kinematics.

Parameters:
  • acq (btk.btkAcquisition) – Motion acquisition.

  • beginFrame (int, optional) – First frame. Defaults to None (first frame of the acquisition).

  • lastFrame (int, optional) – Last frame. Defaults to None (last frame of the acquisition).

updateConfig()#

Write the updated inverse kinematics setup file and reload the kinematic fitter.