ModelCalibrationFilter#
- class pyCGM2.Model.modelFilters.ModelCalibrationFilter(procedure: GeneralCalibrationProcedure | StaticCalibrationProcedure, acq: btkAcquisition, iMod: Model, **options)#
Calibrate a model from a static acquisition.
The calibration consists of constructing both technical and anatomical coordinate systems for each segment constituting the model.
- Parameters:
procedure (Union[GeneralCalibrationProcedure,StaticCalibrationProcedure]) – Calibration procedure to be used.
acq (btk.btkAcquisition) – Acquisition instance containing static trial data.
iMod (Model) – Model instance to be calibrated.
- Kwargs:
markerDiameter (float): Diameter of the markers used. basePlate (float): Thickness of the base plate. viconCGM1compatible (bool): If True, replicate the Vicon Plugin-gait error related to the proximal and distal tibia. leftFlatFoot (bool): If True, set the longitudinal axis of the left foot parallel to the ground. rightFlatFoot (bool): If True, set the longitudinal axis of the right foot parallel to the ground. headFlat (bool): If True, set the longitudinal axis of the head parallel to the ground.
- __init__(procedure: GeneralCalibrationProcedure | StaticCalibrationProcedure, acq: btkAcquisition, iMod: Model, **options)#
Methods
__init__
(procedure, acq, iMod, **options)compute
([firstFrameOnly])Run the calibration filter.
setBoolOption
(label)Enable a boolean option.
setNoAnatomicalCalibration
(boolFlag)Set whether to perform anatomical calibration or not.
setOption
(label, value)Set or update an option for the calibration.
- compute(firstFrameOnly: bool = True)#
Run the calibration filter.
- Parameters:
firstFrameOnly (bool, optional) – Use only the first frame for calibration. Defaults to True.
- setBoolOption(label: str)#
Enable a boolean option.
- Parameters:
label (str) – Option label.
- setNoAnatomicalCalibration(boolFlag: bool)#
Set whether to perform anatomical calibration or not.
- Parameters:
boolFlag (bool) – Flag to enable or disable anatomical calibration.
- setOption(label: str, value)#
Set or update an option for the calibration.
- Parameters:
label (str) – Option label.
value – Value of the option.