User Tools

Site Tools


visual3d:documentation:pipeline:metric_commands:metric_compute_temporal_distance

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
visual3d:documentation:pipeline:metric_commands:metric_compute_temporal_distance [2025/05/20 18:28] – Made consistent with the Gait Temporal Distance page. wikisysopvisual3d:documentation:pipeline:metric_commands:metric_compute_temporal_distance [2025/09/23 19:10] (current) – [Examples] wikisysop
Line 1: Line 1:
 ====== Metric Compute Temporal Distance ====== ====== Metric Compute Temporal Distance ======
  
-This pipeline computes the [[Visual3D:Documentation:Pipeline:Metric_Commands:Temporal_Distance_Calculations_for_Gait|Gait Temporal Distance]] values consistent with the Visual3D report item. Note that the results consist of data from multiple files, so the results are stored in the [[Visual3D:Documentation:Definitions:Global_Workspace|Global_Workspace]]. As with most other pipeline commands, this command acts on the [[Visual3D:Documentation:Definitions:Active_Files|Active_Files]].+====Overview==== 
 + 
 +This pipeline computes the [[Visual3D:Documentation:Pipeline:Metric_Commands:Temporal_Distance_Calculations_for_Gait|Gait Temporal Distance]] values consistent with the Visual3D report item. Note that the results consist of data from multiple files, so the results are stored in the [[Visual3D:Documentation:Definitions:Global_Workspace|Global_Workspace]]. As with most other pipeline commands, this command acts on the [[Visual3D:Documentation:Definitions:Active_Files|Active_Files]]. Compute Temporal Distance might be used when computing stride length, or other similar values.
  
 If, for example, you have two groups of files (e.g. 2 TAGS) and you want to compute temporal distance metrics independently for each group. If, for example, you have two groups of files (e.g. 2 TAGS) and you want to compute temporal distance metrics independently for each group.
Line 9: Line 11:
 ===== Pipeline Command ===== ===== Pipeline Command =====
  
-Command including default values.+Command including default values. This command can be found in the **Pipeline Workshop** within the **Metric** folder
  
 <code> <code>
Line 69: Line 71:
  
 /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0) /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0)
 +
 +====Command Parameters====
 +
 +The following table shows the command parameters seen above and their descriptions:
 +
 +|**GLOBAL_RESULT_METRIC_FOLDER**|**Name of metric result folder**|
 +|**CALCULATE_PER_FILE**|**Calculate average values across entire trial**|
 +|**CALCULATE_PER_ALL_CMO_GLOBALS**|**Calculate global average**|
 +|**CREATE_ALL_INSTANCES**|**value for each sequence (multiple values per trial)**|
 +|**CREATE_EMPTY_VALUES**|****|
 +|**RIGHT/LEFT_FOOT_LOCATION**|**Signal/marker defining foot location**|
 +|**HEIGHT**|**Signal type and name defining height**|
 +|**---_EVENT**|**Event signal names for foot on/off**|
 +|**STRICT_EVENT_SEQUENCE_VALIDATION**|**---**|
 +|**R/LSTRIDE_EXCLUDE**|**Excluding right or left side of stride**|
 +|**INCLUDE/EXCLUDE_EVENTS**|**Including or excluding certain events in command**|
 +|**EVENT_INSTANCE**|**Which instance of an event to use**|
 +|**COMPUTE_--------**|**Which values to be computed or excluded**|
 +|**TREADMILL_SPEED**|**Speed of treadmill used for recording (if applicable)**|
 +|**TREADMILL_DIRECTION**|**Direction of treadmill used for recording (if applicable)**|
  
 ===== Temporal Distance Dialog ===== ===== Temporal Distance Dialog =====
Line 81: Line 103:
 |{{:EditTemporalDistancev5_TREADMILL.jpg}}  |- The treadmill unit vector refers to the Anterior Direction of walking\\ - Speed, (left/right/average) stride and step length, and statures/second are dependent on belt speed.\\- The result folder may have any name and will be a subfolder of the METRIC folder.  | |{{:EditTemporalDistancev5_TREADMILL.jpg}}  |- The treadmill unit vector refers to the Anterior Direction of walking\\ - Speed, (left/right/average) stride and step length, and statures/second are dependent on belt speed.\\- The result folder may have any name and will be a subfolder of the METRIC folder.  |
  
 +====Examples====
 +===Simple example: Flight Time ===
 +
 +To use the **Compute Temporal Distance** command on gait cycle trials we must first identify key gait events. This can be done using the **Automatic Gait Events** command as shown below.
 +
 +<code>
 +Automatic_Gait_Events
 +! /FRAME_WINDOW=8
 +! /USE_TPR=TRUE
 +! /TPR_EVENT_INSTANCE=1
 +;
 +</code>
 +
 +Now that key events in the gait cycle have been identified we can use the **Compute Temporal Distance** command to compute the mean left and right flight time for each trial. 
 +
 +Flight time is the average time from LTO to RHS (ensuring no LHS or RTO events occur between LTO and RHS) and RTO to LHS (ensuring no RHS or LTO events occur between RTO and LHS).
 +  * Left flight time is calculated from LTO to RHS.
 +  * Right flight time is calculated from RTO to LHS.
 +
 +<code>
 +Metric_Compute_Temporal_Distance
 +! /GLOBAL_RESULT_METRIC_FOLDER=TEMPORAL_DISTANCE
 +/CALCULATE_PER_FILE=TRUE
 +! /CALCULATE_PER_ALL_CMO_GLOBALS=FALSE
 +! /CREATE_ALL_INSTANCES=FALSE
 +! /CREATE_EMPTY_VALUES=TRUE
 +! /RIGHT_FOOT_LOCATION=KINETIC_KINEMATIC::RFT::ProxEndPos
 +! /LEFT_FOOT_LOCATION=KINETIC_KINEMATIC::LFT::ProxEndPos
 +! /HEIGHT=METRIC::PROCESSED::HEIGHT
 +/RHS_EVENT=RHS
 +/LHS_EVENT=LHS
 +/RTO_EVENT=RTO
 +/LTO_EVENT=LTO
 +! /STRICT_EVENT_SEQUENCE_VALIDATION=FALSE
 +! /RSTRIDE_EXCLUDE=
 +! /LSTRIDE_EXCLUDE=
 +! /INCLUDE_EVENTS=
 +! /EXCLUDE_EVENTS=
 +/EVENT_INSTANCE=ALL
 +/COMPUTE_SPEED=FALSE
 +/COMPUTE_STATURES_PER_SECOND=FALSE
 +/COMPUTE_STRIDE_WIDTH=FALSE
 +/COMPUTE_STRIDE_LENGTH=FALSE
 +/COMPUTE_CYCLE_TIME=FALSE
 +/COMPUTE_STEP_LENGTH=FALSE
 +/COMPUTE_STEP_TIME=FALSE
 +/COMPUTE_STANCE_TIME=FALSE
 +/COMPUTE_SWING_TIME=FALSE
 +/COMPUTE_STEPS_PER_MINUTE=FALSE
 +/COMPUTE_STRIDES_PER_MINUTE=FALSE
 +/COMPUTE_DOUBLE_LIMB_SUPPORT_TIME=FALSE
 +/COMPUTE_RIGHT_INITIAL_DOUBLE_LIMB_SUPPORT_TIME=FALSE
 +/COMPUTE_RIGHT_TERMINAL_DOUBLE_LIMB_SUPPORT_TIME=FALSE
 +/COMPUTE_FLIGHT_TIME=TRUE
 +! /TREADMILL_SPEED=
 +! /LEFT_TREADMILL_SPEED=
 +! /TREADMILL_DIRECTION=
 +;
 +</code>
 +
 +Once the pipeline has been executed you should see a new **TEMPORAL_DISTANCE** folder in the METRIC section of the Signals and Events tab. Within this folder you can find the mean flight time for the left and right sides.
 +
 +{{:visual3d:documentation:pipeline:metric_commands:flight_time.png?500|}}
 +
 +===Complex example: Comparing Left and Right Stride Length for treadmill trial===
 +
 +Here we will look at a gait cycle trial using data for users running on a treadmill and compare their mean stride length for the left and right sides. 
 +
 +Similarly to above, we will start by using **Automatic Gait Events** to define the gait cycle.
 +
 +Next, we will use **Metric_Compute_Temporal_Distance** to compute the length of each stride for both sides, and adjust the command parameters to account for the speed of the single belt treadmill used to record the data. In this case the treadmill was moving at 1.25 m/s and the subject walking in the y-direction (0,1,0).
 +
 +<code>
 +Metric_Compute_Temporal_Distance
 +! /GLOBAL_RESULT_METRIC_FOLDER=TEMPORAL_DISTANCE
 +/CALCULATE_PER_FILE=TRUE
 +! /CALCULATE_PER_ALL_CMO_GLOBALS=FALSE
 +! /CREATE_ALL_INSTANCES=FALSE
 +! /CREATE_EMPTY_VALUES=TRUE
 +! /RIGHT_FOOT_LOCATION=KINETIC_KINEMATIC::RFT::ProxEndPos
 +! /LEFT_FOOT_LOCATION=KINETIC_KINEMATIC::LFT::ProxEndPos
 +! /HEIGHT=METRIC::PROCESSED::HEIGHT
 +/RHS_EVENT=RHS
 +/LHS_EVENT=LHS
 +/RTO_EVENT=RTO
 +/LTO_EVENT=LTO
 +/STRICT_EVENT_SEQUENCE_VALIDATION=TRUE
 +! /RSTRIDE_EXCLUDE=
 +! /LSTRIDE_EXCLUDE=
 +! /INCLUDE_EVENTS=
 +! /EXCLUDE_EVENTS=
 +/EVENT_INSTANCE=ALL
 +/COMPUTE_SPEED=FALSE
 +/COMPUTE_STATURES_PER_SECOND=FALSE
 +! /COMPUTE_STRIDE_WIDTH=TRUE
 +! /COMPUTE_STRIDE_LENGTH=TRUE
 +/COMPUTE_CYCLE_TIME=FALSE
 +/COMPUTE_STEP_LENGTH=FALSE
 +/COMPUTE_STEP_TIME=FALSE
 +/COMPUTE_STANCE_TIME=FALSE
 +/COMPUTE_SWING_TIME=FALSE
 +/COMPUTE_STEPS_PER_MINUTE=FALSE
 +/COMPUTE_STRIDES_PER_MINUTE=FALSE
 +/COMPUTE_DOUBLE_LIMB_SUPPORT_TIME=FALSE
 +/COMPUTE_RIGHT_INITIAL_DOUBLE_LIMB_SUPPORT_TIME=FALSE
 +/COMPUTE_RIGHT_TERMINAL_DOUBLE_LIMB_SUPPORT_TIME=FALSE
 +! /COMPUTE_FLIGHT_TIME=FALSE
 +/TREADMILL_SPEED=1.25
 +/LEFT_TREADMILL_SPEED=1.25
 +/TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0)
 +;
 +</code>
 +
 +The computed stride data can now be found in the **Metric** folder under **Temporal_Distance**.
 +
 +To compare the left and right stride lengths we will create a horizontal chart in the **Reports** tab.
 +
 +Start by adding a new page to your report, and adding **Temporal and Distance Metrics** as an item.
 +
 +{{:visual3d:documentation:pipeline:metric_commands:temporalitem.png?400|}}
 +
 +Fill out the dialog box as so:
 +
 +{{:visual3d:documentation:pipeline:metric_commands:temporaldialog.png?500|}}
 +
 +Click done. You should now see a bar chart comparing the left and right step length for your trial.
 +
 +{{:visual3d:documentation:pipeline:metric_commands:tempgraph_.png?550|}}
 ===== Multisubject Support ===== ===== Multisubject Support =====
  
visual3d/documentation/pipeline/metric_commands/metric_compute_temporal_distance.1747765722.txt.gz · Last modified: 2025/05/20 18:28 by wikisysop