KneeCalibrationDecorator#

class pyCGM2.Model.modelDecorator.KneeCalibrationDecorator(iModel: Model)#

A decorator class for altering the hip joint center in the CGM model.

Parameters:

iModel (Model) – An instance of pyCGM2 model.

__init__(iModel: Model)#

Methods

__init__(iModel)

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.

calibrate2dof(side, **kwargs)

Run the calibration2Dof method.

checkCalibrationProperty(...)

Check if a calibration property matches a specific value.

decomposeTrackingMarkers(acq, ...)

Decompose tracking markers to their components.

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

Display a motion coordinate system.

displayMotionViconCoordinateSystem(acqui, ...)

Display a motion Vicon coordinate system.

displayStaticCoordinateSystem(aquiStatic, ...)

Display a static coordinate system.

fromKjcMarker(acq[, leftKJC_label, ...])

Positions knee joint centers from virtual KJC marker trajectories computed from another process.

getBodyPart()

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

getCentreOfMass()

Return the center of mass trajectory.

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

Return a clinical descriptor.

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.

isCalibrationProperty(label)

Check if a calibration property exists by its label.

isProperty(label)

Check if a property exists by its label.

midCondyles(acq[, side, ...])

Compute the knee joint centre from mid condyles.

midCondyles_KAD(acq[, side, ...])

Compute Knee joint centre from mid condyles and relocate AJC like KAD process.

removeJoint(jointLabels)

Remove Joint instances based on their labels.

removeSegment(segmentLabels)

Remove Segment instances based on their labels.

sara(side, **kwargs)

Compute Knee flexion axis, relocate knee joint centre from SARA functional calibration.

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.

setStaticFilename(name)

Set the static filename used for static calibration.

updateSegmentFromCopy(targetLabel, segmentToCopy)

Update a segment from a copy of another segment instance.

calibrate2dof(side: str, **kwargs) None#

Run the calibration2Dof method.

Parameters:

side (str) – Body side.

Kwargs:

indexFirstFrame (int): Start frame. indexLastFrame (int): Last frame. sequence (str): Euler sequence. jointRange (list): Flexion angle boundaries.

fromKjcMarker(acq: btkAcquisition, leftKJC_label: str = 'LKJC', rightKJC_label: str = 'RKJC', side: str = 'both') None#

Positions knee joint centers from virtual KJC marker trajectories computed from another process.

Parameters:
  • acq (btk.btkAcquisition) – An acquisition with virtual KJC marker trajectories.

  • leftKJC_label (str, optional) – Label of the left virtual KJC marker. Defaults to “LKJC”.

  • rightKJC_label (str, optional) – Label of the right virtual KJC marker. Defaults to “RKJC”.

  • side (str, optional) – Body side to apply the method (‘left’, ‘right’, or ‘both’). Defaults to “both”.

midCondyles(acq: btkAcquisition, side: str = 'both', leftLateralKneeLabel: str = 'LKNE', leftMedialKneeLabel: str = 'LKNM', rightLateralKneeLabel: str = 'RKNE', rightMedialKneeLabel: str = 'RKNM', markerDiameter: float = 14, widthFromMp: bool = True) None#

Compute the knee joint centre from mid condyles.

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

  • side (str, optional) – Body side to apply the method (‘left’, ‘right’, or ‘both’). Defaults to “both”.

  • leftLateralKneeLabel (str, optional) – Label of the left lateral knee marker. Defaults to “LKNE”.

  • leftMedialKneeLabel (str, optional) – Label of the left medial knee marker. Defaults to “LKNM”.

  • rightLateralKneeLabel (str, optional) – Label of the right lateral knee marker. Defaults to “RKNE”.

  • rightMedialKneeLabel (str, optional) – Label of the right medial knee marker. Defaults to “RKNM”.

  • markerDiameter (float, optional) – Diameter of the marker. Defaults to 14.

  • widthFromMp (bool, optional) – Use knee width from model anthropometric parameters. Defaults to True.

midCondyles_KAD(acq: btkAcquisition, side: str = 'both', leftLateralKneeLabel: str = 'LKNE', leftMedialKneeLabel: str = 'LKNM', rightLateralKneeLabel: str = 'RKNE', rightMedialKneeLabel: str = 'RKNM', markerDiameter: float = 14) None#

Compute Knee joint centre from mid condyles and relocate AJC like KAD process.

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

  • side (str, optional) – Body side to apply the method (‘left’, ‘right’, or ‘both’). Defaults to “both”.

  • leftLateralKneeLabel (str, optional) – Label of the left lateral knee marker. Defaults to “LKNE”.

  • leftMedialKneeLabel (str, optional) – Label of the left medial knee marker. Defaults to “LKNM”.

  • rightLateralKneeLabel (str, optional) – Label of the right lateral knee marker. Defaults to “RKNE”.

  • rightMedialKneeLabel (str, optional) – Label of the right medial knee marker. Defaults to “RKNM”.

  • markerDiameter (float, optional) – Diameter of the marker. Defaults to 14.

sara(side: str, **kwargs) None#

Compute Knee flexion axis, relocate knee joint centre from SARA functional calibration.

Parameters:

side (str) – Body side.

Kwargs:

indexFirstFrame (int): Start frame. indexLastFrame (int): Last frame.