CGM2_2#

class pyCGM2.Model.CGM2.cgm2.CGM2_2#

Implementation of the CGM2.2 model.

This class extends the CGM1 model to provide functionalities specific to the CGM2.2 protocol.

decoratedModel#

Indicates if the model has been decorated. Defaults to False.

Type:

bool

version#

Version of the CGM model. Defaults to “CGM2.2”.

Type:

str

m_staticIkTargets#

List of marker labels used for static inverse kinematics. Defaults to None.

Type:

List[str] or None

__init__()#

Methods

__init__()

addAnthropoInputParameters(iDict[, optional])

Add measured anthropometric data to the model.

addChain(label, indexSegmentList)

Add a segment chain to the model.

addJoint(label, proxLabel, distLabel, ...)

Add a joint to the model.

addSegment(label, index, sideEnum[, ...])

Add a segment to the model.

calibrate(aquiStatic, dictRef, dictAnatomic)

Calibrate the model using static acquisition data.

calibrationProcedure()

Define the calibration procedure for the model.

checkCalibrationProperty(...)

Check if a calibration property matches a specific value.

computeMotion(aqui, dictRef, dictAnat, ...)

Compute poses of both Technical and Anatomical coordinate systems.

computeOptimizedSegmentMotion(aqui, ...)

Compute poses of both Technical and Anatomical coordinate systems for specific segments of the model.

configure([detectedCalibrationMethods])

Configure the model based on detected calibration methods.

decomposeTrackingMarkers(acq, ...)

Decompose tracking markers to their components.

detectCalibrationMethods(acqStatic)

Class method to detect the method used to calibrate knee and ankle joint centres.

displayMotionCoordinateSystem(acqui, ...[, ...])

Display a motion coordinate system.

displayMotionViconCoordinateSystem(acqui, ...)

Display a motion Vicon coordinate system.

displayStaticCoordinateSystem(aquiStatic, ...)

Display a static coordinate system.

getAbdAddAnkleJointOffset([side])

Calculate and store the ankle abduction/adduction offset for specified side(s).

getBodyPart()

[Obsolete] Return the body part represented by the model.

getCentreOfMass()

Return the center of mass trajectory.

getClinicalDescriptor(dataType, ...[, ...])

Return a clinical descriptor.

getFootOffset([side])

Calculate and store the foot offsets for specified side(s).

getJoint(label)

Retrieve a Joint instance based on its label.

getJointList()

Retrieve a list of all joint labels.

getProperty(propertyLabel)

Return a specified property.

getSegment(label)

Retrieve a Segment instance based on its label.

getSegmentByIndex(index)

Retrieve a Segment instance based on its index.

getSegmentIndex(label)

Retrieve the index of a Segment based on its label.

getSegmentList()

Retrieve a list of all segment labels.

getShankOffsets([side])

Calculate and store the shank offset for specified side(s).

getStaticIkTargets()

Get the marker labels used for static inverse kinematics.

getStaticMarkers(dcm)

Return static markers based on the detected calibration methods.

getStaticTrackingMarkers()

Get tracking markers.

getThighOffset([side])

Calculate and store the thigh offset for specified side(s).

getTibialTorsionOffset([side])

Calculate and store the tibial torsion offset for specified side(s).

getTrackingMarkers(acq)

Return tracking markers.

get_markerLabelForPiGStatic(dcm)

Class method returning marker labels of the knee and ankle joint centres.

isCalibrationProperty(label)

Check if a calibration property exists by its label.

isProperty(label)

Check if a property exists by its label.

opensimGeometry()

Provides geometry configuration for OpenSim models.

opensimIkTask()

Returns marker weights for Inverse Kinematics (IK) in OpenSim.

opensimTrackingMarkers()

Retrieves tracking markers for OpenSim model configuration, excluding specific segments.

removeJoint(jointLabels)

Remove Joint instances based on their labels.

removeSegment(segmentLabels)

Remove Segment instances based on their labels.

setBodyPart(bodypart)

[Obsolete] Specify which body part is represented by the model.

setCalibrationProperty(propertyLabel, value)

Set or update a calibration property in the property dictionary.

setCentreOfMass(com)

Set the center of mass trajectory.

setClinicalDescriptor(jointOrSegmentLabel, ...)

Set a clinical descriptor.

setCoordinateSystemDefinition(segmentLabel, ...)

Set coordinate system definition.

setProperty(propertyLabel, value)

Set or update a property in the property dictionary.

setSTAexpertMode(boolFlag)

Set STA expert mode.

setStaticFilename(name)

Set the static filename used for static calibration.

setStaticIkTargets(targetNames)

Set the marker labels used for static inverse kinematics.

setStaticTrackingMarkers(markers)

Set tracking markers.

setVersion(string)

Amend the model version.

updateSegmentFromCopy(targetLabel, segmentToCopy)

Update a segment from a copy of another segment instance.

viconExport(NEXUS, acq, vskName, ...)

Exports model outputs to Nexus for Vicon systems.

Attributes

ANALYSIS_KINEMATIC_LABELS_DICT

ANALYSIS_KINETIC_LABELS_DICT

KAD_MARKERS

LOWERLIMB_JOINTS

LOWERLIMB_SEGMENTS

LOWERLIMB_TRACKING_MARKERS

THORAX_JOINTS

THORAX_SEGMENTS

THORAX_TRACKING_MARKERS

UPPERLIMB_JOINTS

UPPERLIMB_SEGMENTS

UPPERLIMB_TRACKING_MARKERS

VERSIONS

getStaticIkTargets() List[str]#

Get the marker labels used for static inverse kinematics.

Returns:

List[str] – List of marker labels.

setStaticIkTargets(targetNames: List[str])#

Set the marker labels used for static inverse kinematics.

Parameters:

targetNames (List[str]) – List of marker labels.