Tutorial: Comparing Data Sets

From Visual3D Wiki Documentation
Jump to: navigation, search
Language:  English  • français • italiano • português • español 


The objective of this tutorial is to demonstrate how two data sets can be compared in the Reports. The basis of the comparison is by grouping trials.

File tags are used to differentiate or group movement trials. In this way calculations can be performed against a select set of movement trials, and reports can be created based on a subset of movement data.

Movement trials can have multiple tags assigned. For example, all files associated with trials in which the subjects walked barefoot can have a tag labeled "Bare Foot" assigned to them. Those trials that are "Bare Foot" and are only women subjects could have another tag labeled "Female" to that file. A graph in the report can then display only files with a certain tag.

Tags are most easily created on the Workspace Status Tab in visual3D by clicking the ”Add New File Tag” button. Fine-tuning tags on thousands of motion trials can be done using the File->”Add/Modify File Tags” option.
Tags are added to the Data Tree under the Parameters folder. Since empty folders or parameters are not saved, this means that a tag must be used as soon as it is created in order to be kept in the workspace. It also means that any tag that is not assigned (i.e. no boxes checked in the column) effectively doesn’t exist. To delete a tag, simply don’t assign it to anything.

File tags are also displayed in the combo box on the toolbar in the Signal and Event Processing tab. This lets any checked signals and events for groups of trials be collectively processed.

Tags are used to limit reporting to specific trials, and for limiting model based calculations to only certain trials.

Preparing the Workspace

For the purpose of this tutorial, two data sets have been prepared and can be downloaded here

Merging the two .CMO workspaces

There are many ways to combine and compare different data sets in Visual3D. It is possible to create multiple models in a single .cmo file, and have each of them assign to their corresponding trials. However, it is advisable in most cases to create separate .cmo file for each analysis, especially when dealing with a large number of movement trials.

For this tutorial, we have opted to create to separate .CMO workspaces, one containing experimental data and the other control data. Once the models have been created and assigned to their movement files, the two workspaces can be combined.

To combine the two workspaces:

  1. Open Visual3D
  2. Load the first workspace, Polymyositis.cmo by clicking on the CMO C3D button or by selecting Open/Add from the File menu.
  3. Load the second workspace by clicking on the CMO C3D icon located in the top left corner of the screen. Locate and select the workspace to be merged with the currently opened workspace, in this case: Control.cmo
  4. A new window will open Files Already Open..., select Merge currently open workspace with the new files to create a new workspace (Current workspace becomes Untitled)

Merge CMO.png

The two workspaces should now be combined into a single workspace, and should display both models associated with their corresponding movement trials.

Merged Workspaces.png

Tagging the Movement Trials (.c3d files)

Once the two workspaces have been merged, the movement files need to be tagged to group the trials by condition.

  1. Go the to Workspace tab
  2. Click on Add New File Tag
  3. In the Enter new file tag window, enter CONTROL
  4. Check the box, under the newly created CONTROL tag, corresponding to Walking Trial 1.c3d
  5. Click on Add New File Tag
  6. In the Enter new file tag window, enter POLYMYOSITIS
  7. Check the box, under the newly created POLYMYOSITIS tag, corresponding to all mvc00X.c3d trials.
Tagged Workspaces.png

Computing Model Based Data

Model based data must first be computed so kinematic and kinetic comparisons can be made between the two data sets.

Follow the Model Based Computation Tutorial to learn how to perform these computations in Visual3D.

For the purpose of the present tutorial, only right knee joint angle will be computed. Note however that the user is free to choose any computation for comparison.


Note: Because Model Based Computations will only process the Active Files, it is possible to apply different Model Based Computations to different trial by selecting which trial or group of trials to be processed. You can apply the Model Based Computation on a group of files using the File Tags.

Creating a Report for Data Set Comparison

Once the Model Based Computations have been performed, the results can then be compared between the different data sets via a report graph.

Report 2D Graph

To compare the patient's Right Knee Angle to the Control data, a 2D graph with the overlaid data can be created.

  1. Go to the Report tab
  2. In the Item to Add box, select 2D graph
  3. Click Add

The following window allows you to create the 2D graphs. For a detailed description of the options available in this window, please consult the 2D Graph Options

Within the Graph Properties section:

  1. In the Graph Title box, insert Right Knee Angle
  2. In the 'Line Color box, change the color to Green
  3. In the Files to Graph box, select POLYMYOSITIS

Within the X Axis Properties section:

  1. In the X Axis Label, enter Gait Cycle
  2. In the Data Type box, select FRAME_NUMBERS
  3. In the Data Name box, select TIME
  4. Check the Graph within a range of events
  5. In the Range Begin box, select RHS
  6. In the Range End box, select RHS

Within the Y Axis Properties section:

  1. In the Y Axis Label, enter Angle
  2. In the Data Type box, select LINK_MODEL_BASED
  3. In the Data Name box, select Right Knee Angle
  4. In the Component box, select X
  5. Click Done


After these steps are completed, you should now have a graph similar to this one: ReportGraphPoly.png

Adding another Item to the same graph

Depending on your preference and/or requirements, it is possible to either add another item to the same graph, so that the 2 data sets are overlaid, or to create another graph next to, or below the current graph, allowing a side-by-side comparison. To overlay the two data sets, simply follow the previous steps, but making sure to set the Row and Column to the same values as the current graph, which in this case is 1 and 1 AND changing the Files to Graph to CONTROL.

However, if many graphs have to be created, the following is a simply trick to speed up the process:

  1. In the box, in the top-left corner, select the Report Item corresponding to the graph already created.
  2. In the 'Item to add box, select 2D Graph
  3. Click Add (by having selected the Report Item prior to adding a new 2D graph, the Add / Modify Graph window is now already populated with the parameters defined from the selected Report Item.
  4. In the Files to Graph box, select CONTROL
  5. In the Line Color box, select Black
  6. In the Line Type box, select Dot
  7. Click Done


You should now have a graph similar to this one:

Note: If you want to compare the graphs side-by-side, simply set the Row or Column to 2 in the Add / Modify Graph window.

The same can then be repeated for each Model Based Computation.


This tutorial demonstrate one way to compare two separate data sets in Visual3D.

  1. Merge the different workspaces (.cmo files) containing the data sets to be compared
  2. Perform the necessary Model Based Computations
  3. Create a report either overlaying the 2 data sets in the same 2D graph or side-by-side

The final result, with a complete report, can be found here

Retrieved from ""