ScalingXmlProcedure#

class pyCGM2.Model.Opensim.interface.procedures.scaling.opensimScalingInterfaceProcedure.ScalingXmlProcedure(DATA_PATH: str, mass: float, height: float)#

Procedure for scaling XML processing in OpenSim. It handles the preparation and processing of static trials and setup files for scaling in OpenSim.

Parameters:
  • DATA_PATH (str) – The path to the data directory.

  • mass (float) – The mass of the subject.

  • height (float) – The height of the subject.

__init__(DATA_PATH: str, mass: float, height: float)#

Methods

__init__(DATA_PATH, mass, height)

finalize()

Finalizes the scaling process, including renaming and saving files.

getXml()

Retrieves the XML associated with the procedure.

prepareStaticTrial_fromBtkAcq(acq, ...)

Prepares a static trial from a BTK acquisition object.

prepareXml()

Prepares the XML for the scaling process.

run()

Runs the scaling process.

setModelVersion(modelVersion)

Sets the model version.

setResultsDirname(dirname)

Sets the directory name where the results will be stored.

setSetupFiles(genericOsimFile, ...)

Sets up the required files for scaling procedure in OpenSim.

finalize()#

Finalizes the scaling process, including renaming and saving files.

prepareStaticTrial_fromBtkAcq(acq: btkAcquisition, staticFileNoExt: str) None#

Prepares a static trial from a BTK acquisition object.

Parameters:
  • acq (btk.btkAcquisition) – The BTK acquisition object.

  • staticFileNoExt (str) – The filename (without extension) for the static file.

prepareXml()#

Prepares the XML for the scaling process.

run()#

Runs the scaling process.

setSetupFiles(genericOsimFile: str, markersetFile: str, scaleToolFile: str) None#

Sets up the required files for scaling procedure in OpenSim.

Parameters:
  • genericOsimFile (str) – Path to the generic OpenSim file.

  • markersetFile (str) – Path to the markerset file.

  • scaleToolFile (str) – Path to the scale tool file.