You are viewing the documentation for OpenSim 2.4. Are you looking for the latest OpenSim 4.0 Documentation?

Measurement-Based Scaling File

The topics covered in this section include:

The measurement-based scaling file contains pairs of experimental markers, the distance between which are used to scale the generic musculoskeletal model. The experimental measurements used for scaling are specified in the example file gait2354_Scale_MeasurementSet.xml:

Example: XML file for a measurement-based scaling file

gait2354_Scale_MeasurementSet.xml
<?xml version="1.0" encoding="UTF-8"?> 

<MeasurementSet name="gait2354"> 

  <objects> 

    <!– . . additional <Measurement> tags cut for brevity . . –> 

    <Measurement name="thigh"> 

      <apply> true </apply> 

      <MarkerPairSet> 
        <objects> 
          <MarkerPair> 
            <markers> R.ASIS R.Knee.Lat </markers> 
          </MarkerPair> 
          <MarkerPair> 
            <markers> L.ASIS L.Knee.Lat </markers> 
          </MarkerPair> 
        </objects> 
      </MarkerPairSet> 

      <BodyScaleSet> 
         <objects> 
          <BodyScale name="femur_r"> 
            <axes> X Y Z </axes> 
          </BodyScale> 
          <BodyScale name="femur_l"> 
            <axes> X Y Z </axes> 
          </BodyScale> 
          <BodyScale name="patella_r"> 
            <axes> X Y Z </axes> 
          </BodyScale> 
          <BodyScale name="patella_l"> 
            <axes> X Y Z </axes> 
          </BodyScale> 
        </objects> 
      </BodyScaleSet> 

    </Measurement> 

    <!– . . additional <Measurement> tags cut for brevity . . –> 

  </objects> 
</MeasurementSet>

 

The <MeasurementSet> tag specifies a set of <Measurement> objects. Each set of <Measurement> tags lists the marker pairs that go into computing the scale factor, and all the bodies to which this scale factor will be applied. When defining the bodies, the axes to scale along are also defined. Details about specifying the marker pairs and the bodies are given below.

<apply> Tag

The <apply> property of <Measurement> is used to specify whether a measurement is enabled or not, and takes on the values of either true or false. It is true by default and so can typically be omitted.

Specifying Marker Pairs Used to Compute a Scale Factor

The list of marker pairs is enclosed in a <MarkerPairSet> tag, each pair being given in a <MarkerPair> object that is defined by the <markers> tag. Each set of <markers> tags provides the names of two markers. In Example 1 4, two marker pairs are given. Recall from How Scaling Works that this means that the final scale factor will be computed by averaging the scale factors determined by each individual pair.

Specifying Bodies to Be Scaled

The list of bodies to be scaled using the scale factors determined by the marker-pair-measurements is given in a <BodyScaleSet> tag, with each <BodyScale> specifying the body through its name attribute.
The <axes> tag indicates the axis/axes along which to scale and can take on the values X, Y, and/or Z. In the above example, the femur and patella on both sides of the body (r = right, l = left) will be uniformly scaled in the X, Y, and Z directions using these measurement-based scale factors.

 

OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.