How to Use the Scale Tool
The topics covered in this section include:
How to Use the GUI
The Scale Tool is accessed by:
- Select Tools → Scale Model... from the OpenSim main menu bar.
You need the model you want to be scale to be current. To learn how to make a model current visit Opening, Closing, and Using the Navigator Window.
The Scale Tool is controlled by a window with three tabbed panes. The Settings Pane is used to specify parameters relating to the subject data, the generic model, and how the model is to be scaled. The Scale Factors Pane is used to specify the scale factors for each segment. The Scale Static Pose Weights Panel pane is used to specify weights on marker positions and joint angles for solving an inverse kinematics problem for the static pose. The inverse kinematics solution for the static pose is used to place the virtual markers on the model so that they coincide with the measured marker locations on the subject.
The Control Panel
At the bottom of all the Tool dialog windows are four buttons, located in what we call the Control Panel.
Note that the Close button can be clicked immediately after execution has begun; the execution will complete even though the window has been closed.
|
---|
The Settings Pane
The Settings pane is used to specify parameters related to the subject data, the generic model, and how the model is to be scaled. The panel is organized into four main sections, described below.
Generic Model Data
|
Subject Data Section
|
Controlling Model Scaling
|
To use measurement-based scaling, a .trc file that contains suitable marker data must be specified. A static trial (i.e., a trial in which the subject is stationary in some known position) is typically used for this purpose. To specify a file containing marker data, check the box labeled Marker data for measurements. When this is done, you will be able to specify a file in the text box to the right. Click the button to browse for a file. Once the marker data is loaded, information about the trial will be displayed in a box on the far right entitled Marker Data. The information includes the total number of markers in the .trc file (the marker data is arranged in columns of x, y, and z coordinates), number of frames, frame rate, and the time interval over which the data is available. The distances between marker pairs used to compute the scale factors for the segments is based on averaging the marker positions over a time interval. To specify the time interval, enter the starting and final times in the text boxes to the right of the label Average measurements between times. The starting time should always be less than or equal to the final time. If you are computing scale factors based on a dynamic trial (i.e., a trial in which the subject was moving), use a small time interval or specify the same starting and final time to pick out a single frame of data.
Adjusting Model Markers
|
Before the virtual markers on the model can be moved, the model must be put into a position that closely matches the position of the subject. This includes placing the model in the correct location in the laboratory (three translations and three rotations) and also finding an appropriate set of joint angles to match the pose of the subject. To do this, the locations of all the experimental markers are averaged over a specified time interval, and an inverse kinematics problem is solved to find the joint angles that minimize the position error between the model markers and the corresponding average experimental markers. To specify the time interval over which the experimental marker locations are averaged, enter the starting and final times in the text boxes to the right of the label Average markers between times. The starting time should always be less than or equal to the final time. If you are using a dynamic trial (i.e., a trial in which the subject was moving), use a small time interval or specify the same starting and final time to pick out a single frame of data.
Unlike the settings controlling the scaling of the model, the settings for adjusting the model markers also allow you to specify coordinate data (e.g., angle joints in the model). This data can be used to control or influence the inverse kinematics solution. For example, if you already had joint angles for the static pose provided by the motion capture software that was used, you could specify a .mot file and use the joint angles contained in the motion file to place the model in an appropriate pose for adjusting the marker positions. To specify a coordinate data file, select the box labeled Coordinate data for static pose. Once this box is checked, you can type the name of a .mot file in the text box directly to the right or use the button to browse for one.
Previewing Scale Solution and Static Pose
Frequently, it is helpful to preview the inverse kinematic solution for the static pose before adjusting the positions of the model markers. This can be useful for identifying markers that are poorly placed on the model that you may need to manually adjust or may decide not to include in the inverse kinematic problem. Checking the box labeled Preview static pose (no marker movement) will display the inverse kinematic solution in a 3D View without any adjustments made to the original model marker locations.
Once all the settings have been made on the Settings pane, use the Scale Factors pane to control exactly how each segment in the model is scaled.
Scale Factors Pane
|
The controls at the bottom of the pane are used to specify the type of scaling and the scale factors for the selected segment. When a body is selected, such as the pelvis, the settings for that segment become editable. You can select one of two radio buttons to Use measurements or Use manual scales. To the right of each of the radio buttons are three text fields that are used to specify the scale factors that will be applied to the segment along the X, Y, and Z axes of the body. A typical choice for reference frames is X perpendicular to the frontal plane pointing forward, Y perpendicular to the transverse plane pointing up, and Z perpendicular to the sagittal plane pointing to the right. The choice of reference frames depends on how the model was constructed and may vary from model to model.
Using Measurement-Based Scaling
To specify scale factors based on measurement:
|
Using Manual Scale Factors
To specify scale factors manually:
|
For each segment, you may choose to apply one uniform scale factor, or three different scale factors along the X, Y, and Z axes of the segment. The checkboxes labeled Uniform to the right of the three scale-factor fields are used to choose between uniform and non-uniform scaling. When checked, equal signs appear between the three scale-factor fields, and any value specified in one field will be propagated to the other two. When a box is not checked, you can specify the measurement or scale factors for the X, Y, and Z directions independently.
The Reset to Measurement button is used in conjunction with manual scale factors. As a convenience, clicking the Reset to Measurement button will compute scale factors based on any measurements that were previously set for a segment, giving a starting place for modifying the manual scale factors.
Editing the Measurement Set
Clicking the Edit Measurement Set button of the Scale Factors pane brings up an editor that allows you to inspect and edit the definitions of the measurements that can be used to compute scale factors for body segments. The name of each measurement is displayed in the far left-hand column, and the marker pairs that make up a measurement are listed to the right.
|
Scale Static Pose Weights Panel
Once a marker and possibly a coordinate file have been specified, the specific behavior of the scaling tool can be described and modified using the Weights pane (Figure below). Each entry in the table represents a task in the least-squares matching for either a marker (top table) or a coordinate (lower table). By left-clicking on a row, you select it, making the entry fields below the tables editable so you can specify weights and values for the selected marker(s) or coordinate(s). This means the coordinate is being actively tracked (e.g. constrained to a specific joint angle). You can select multiple rows to edit by using ctrl + left-mouse-click or shift + left-mouse-click.
|
Command-line Execution
The Scaling Tool can also be run using the command scale -S <setup file name>, for example:
scale -S subject01_Setup_Scale.xml
Video Tutorials
Setting up the scale tool:
https://www.youtube.com/watch?v=V5f7OMkfRBs&t=3s
Evaluating your results:
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.