CGM2_3#
- class pyCGM2.Model.CGM2.cgm2.CGM2_3#
Implementation of the CGM2.3 model.
This class extends the CGM1 model to provide functionalities specific to the CGM2.3 protocol.
- LOWERLIMB_TRACKING_MARKERS#
Constant list of lower limb tracking markers.
- Type:
List[str]
- decoratedModel#
Indicates if the model has been decorated. Defaults to False.
- Type:
bool
- version#
Version of the CGM model. Defaults to “CGM2.3”.
- 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 with 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).
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.
Define the inverse kinematics tasks for 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
THORAX_JOINTS
THORAX_SEGMENTS
THORAX_TRACKING_MARKERS
UPPERLIMB_JOINTS
UPPERLIMB_SEGMENTS
UPPERLIMB_TRACKING_MARKERS
VERSIONS
- calibrate(aquiStatic: btkAcquisition, dictRef: Dict, dictAnatomic: Dict, options: Dict | None = None)#
Calibrate the model with static acquisition data.
- Parameters:
aquiStatic (btk.btkAcquisition) – Static acquisition data.
dictRef (Dict) – Reference dictionary for technical coordinate system.
dictAnatomic (Dict) – Reference dictionary for anatomical coordinate system.
options (Optional[Dict]) – Additional options for calibration.
- getStaticIkTargets() List[str] #
Get the marker labels used for static inverse kinematics.
- Returns:
List[str] – List of marker labels.
- opensimIkTask() Dict #
Define the inverse kinematics tasks for OpenSim.
- Returns:
Dict – Dictionary of inverse kinematics tasks with corresponding weights.
- setStaticIkTargets(targetNames: List[str])#
Set the marker labels used for static inverse kinematics.
- Parameters:
targetNames (List[str]) – List of marker labels.