====== Temporal Distance Calculations for Gait ====== These spatiotemporal metrics are part of the common cohort of [[https://www.sciencedirect.com/science/article/abs/pii/0167945796000061|Gait Parameters]]. Visual3D calculates a set of for temporal and distance information based on a set of 4 gait events (Right and Left Heel Strike and Toe Off). * If the Events do not exist, the metrics will return values of zero. * If a Right and Left foot segment do not exist, stride length and stride width cannot be computed. **Note that the treadmill unit vector refers to the Anterior Direction of walking.** [[Visual3D:Documentation:Pipeline:Signal_Commands:Mimicking_Temporal_Distance_Command|Mimicking the Temporal Distance Calculations with Metrics]] ==== Metric_Compute_Temporal_Distance ==== === Current Command === Metric_Compute_Temporal_Distance ! /GLOBAL_RESULT_METRIC_FOLDER=TEMPORAL_DISTANCE ! /CALCULATE_PER_FILE=FALSE ! /CREATE_ALL_INSTANCES=FALSE ! /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 ! /INCLUDE_EVENTS= ! /EXCLUDE_EVENTS= ! /EVENT_INSTANCE=0 ! /COMPUTE_SPEED=TRUE ! /COMPUTE_STATURES_PER_SECOND=TRUE ! /COMPUTE_STRIDE_WIDTH=TRUE ! /COMPUTE_STRIDE_LENGTH=TRUE ! /COMPUTE_CYCLE_TIME=TRUE ! /COMPUTE_STEP_LENGTH=TRUE ! /COMPUTE_STEP_TIME=TRUE ! /COMPUTE_STANCE_TIME=TRUE ! /COMPUTE_SWING_TIME=TRUE ! /COMPUTE_STEPS_PER_MINUTE=TRUE ! /COMPUTE_STRIDES_PER_MINUTE=TRUE ! /COMPUTE_DOUBLE_LIMB_SUPPORT_TIME=TRUE ! /COMPUTE_RIGHT_INITIAL_DOUBLE_LIMB_SUPPORT_TIME=TRUE ! /COMPUTE_RIGHT_TERMINAL_DOUBLE_LIMB_SUPPORT_TIME=TRUE ! /TREADMILL_SPEED= ! /LEFT_TREADMILL_SPEED= ! /TREADMILL_DIRECTION= === Legacy Command === Metric_Compute_Temporal_Distance ! /GLOBAL_RESULT_METRIC_FOLDER=TEMPORAL_DISTANCE /RHS_EVENT=RHS /LHS_EVENT=LHS /RTO_EVENT=RTO /LTO_EVENT=LTO ! /STRICT_EVENT_SEQUENCE_VALIDATION=FALSE ! /COMPUTE_SPEED=TRUE ! /COMPUTE_STATURES_PER_SECOND=TRUE ! /COMPUTE_STRIDE_WIDTH=TRUE ! /COMPUTE_STRIDE_LENGTH=TRUE ! /COMPUTE_CYCLE_TIME=TRUE ! /COMPUTE_STEP_LENGTH=TRUE ! /COMPUTE_STEP_TIME=TRUE ! /COMPUTE_STANCE_TIME=TRUE ! /COMPUTE_SWING_TIME=TRUE ! /COMPUTE_STEPS_PER_MINUTE=TRUE ! /COMPUTE_STRIDES_PER_MINUTE=TRUE ! /COMPUTE_DOUBLE_LIMB_SUPPORT_TIME=TRUE ! /COMPUTE_RIGHT_INITIAL_DOUBLE_LIMB_SUPPORT_TIME=TRUE ! /COMPUTE_RIGHT_TERMINAL_DOUBLE_LIMB_SUPPORT_TIME=TRUE ! /TREADMILL_SPEED=0.0 ! /TREADMILL_SPEED_TYPE=ANALOG ! /TREADMILL_SPEED_FOLDER=ORIGINAL ! /TREADMILL_SPEED_NAME= ! /TREADMILL_DIRECTION_X=0.0 ! /TREADMILL_DIRECTION_Y=0.0 ! /TREADMILL_DIRECTION_Z=0.0 ! /TREADMILL_DIRECTION_TYPE=METRIC ! /TREADMILL_DIRECTION_FOLDER=PROCESSED ! /TREADMILL_DIRECTION_NAME= ; ==== Temporal Distance Dialog ==== |{{:EditTemporalDistancev5_FILES2.jpg}} |- The default command will create average temporal distance values for the ACTIVE files and results can be found in the GLOBAL workspace\\ - **Calculate For Each File:** Calculate average values across entire trial\\ - **Create All Instances:** value for each sequence (multiple values per trial)\\ \\ **NOTE:** To use the Calculate For Each File option, Calculate for Each Trial must be selected as well. | \\ |{{:EditTemporalDistancev5_Signal.jpg}} |- If the user would like to define temporal distance metrics using a signal other than the default signal (such as the proximal end of the foot), the user can select a different signal (such as the heel target).\\ \\ - The height is used to calculate [[#Statures.2FSecond|statures/second]] | \\ |{{:EditTemporalDistancev5_PROPERTIES.jpg}} |- The event labels may be changed to any events desired.\\ \\ - Selecting **Strict Event Label Sequence** will create temporal distance measures for events that occur within a gait cycle. For example Swing Time which occurs between RTO and RHS will only be calculated if the event sequence is RHS+RTO+RHS.\\ \\ - Explanations of the calculations of the temporal distance items can be found [[visual3d:documentation:pipeline:metric_commands:metric_compute_temporal_distance|here]]. | \\ |{{:EditTemporalDistancev5_RANGE.jpg}} |- **Event Instance:** 0 indicates all instances, 1 indicates the first event sequence\\ \\ - **Exclude Sequence:** Creating an event BAD would exclude the trial during which the event occurred | \\ |{{:EditTemporalDistancev5_TREADMILL.jpg}} |- The treadmill unit vector refers to the direction the subject would have been progressing in the lab if there were no treadmill\\ - Speed (positive), (left/right/average) stride and step length, and statures/second are dependent on belt speed | \\ |{{:EditTemporalDistancev5_FOLDER.jpg}} |- The result folder may have any name and will be a subfolder of the METRIC folder. | \\ ==== Report TD Horizontal Chart ==== {{:TemporalDistance.gif}}\\ ==== Report TD Vertical Chart ==== This chart has the option of linking to a control data set. **Control Data Folder** The name of the metric is the same as the Temporal Distance metric signal names created automatically for the report (only the suffix MEAN is removed) There are many ways to create these GLOBAL METRIC signals, but many labs have numbers hard coded. The following example will create a metric signal with 3 components (mean, min, max) Evaluate_Expression /EXPRESSION=VECTOR(113.6,99.6,127.6) ! /SIGNAL_TYPES= ! /SIGNAL_FOLDER=ORIGINAL ! /SIGNAL_NAMES= /RESULT_TYPES=METRIC /RESULT_FOLDERS=CONTROL_TEMPORAL_DISTANCE /RESULT_NAME=STEPS_PER_MINUTE ! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE ; {{:TDVerticalBarsDlg.jpg}} **Note** the selection of the Global Control Data Folder near the top of the dialog\\ **Note** the selection of the vertical bars at the bottom right of the dialog. {{:TDVerticalBars.jpg}} ==== Explanation of the Metrics computed ==== The temporal distance calculations use snippets of the gait cycle to compute averages for each part. If a range is missing, that part will not be calculated. === Stance Time === The stance time for a given side of the body is the portion of the gait cycle when that side's leg is in contact with the ground. It is calculated as the time from that foot's heel strike event to its toe off event. Right Stance Time = RHS-RTO Left Stance Time= LHS-LTO === Swing Time === The swing time for a given side of the body is the portion of the gait cycle when that side's leg is not contacting the ground. It is calculated as the time from that foot's toe off event to its heel strike event. Right Swing Time= RTO-RHS Left Swing Time= LTO-LHS === Step Time === The step time for a given side of the body is the portion of the gait cycle between the opposite side's heel strike event and the given side's heel strike event. Right Step Time= LHS-RHS Left Step Time= RHS-LHS === Double Limb Support Time === The double limb support time for a gait cycle is the total time where both feet are in contact with the ground. This is the sum of an initial double limb support phase and a terminal double limb support phase. Right Initial Double Limb= RHS to LTO Right Terminal Double Limb= LHS to RTO The global mean double limb support time (stored in the global workspace as METRIC::TEMPORAL_DISTANCE::Double_Limb_Support_Time_Ave) is calculated via a two-step process. First, the mean Right_Initial_Double_Limb_Support_Time and the mean Right_Terminal_Double_Limb_Support_Time are calculated. Second, these two times are then summed to represent the average time spent during the double limb support phases throughout an entire gait cycle. This calculation captures that during a gait cycle there are two phases during which the individual is supported by both limbs: from RHS to LTO and from LHS to RTO. **Note:** Left Initial Double Limb Support (stance) = Right Terminal Double Limb Support (stance) Left Terminal Double Limb Support (stance) = Right Initial Double Limb Support (stance) === Cycle Time === Cycle time is computed as an actual and computed. Actual uses the actual stride length / stride time. Computed speed uses the average of all the parts of the gait cycle which are seen, and sums up the parts. This is more accurate since more parts are used in the computation, and can provide a measure even if a full stride is not present in the data (RHS-RHS or LHS-LHS). === Flight Time === 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. === Stride Length === Stride length is the distance between proximal end position of the foot at ipsilateral heel strike to the proximal end position of the foot at the next ipsilateral heel strike. Stride length and width requires a walking direction to be computed, so at least 1 completed stride needs to be present. == Right Stride Length == Right Stride length is defined as the length of the Right Stride vector from the Proximal End of the Right Foot Segment at successive RHS events Right Stride Length Count is the number of Right Strides. == Left Stride Length == Left Stride length is defined as the length of the Left Stride vector from the Proximal End of the Left Foot Segment at successive LHS events. Left Stride Length Count is the number of Right Strides. == Stride Length Count == Stride Length Count is the sum of Right Stride length Count and Left Stride Length Count. == Treadmill == If the person is walking on a treadmill, the distance travelled by the belt is added to the measured distance. === Stride Width === Stride width is the medio-lateral distance between proximal end position of the foot at ipsilateral heel strike to the proximal end position of the foot at the next contralateral heel strike. Calculated by taking a stride vector, and the step in between, and computing the cross product (distance between the stride vector and the opposing step (heel) position Left Stride Width is the perpendicular distance from the proximal end of the Left foot segment to the Right Stride vector. Right Stride Width is the perpendicular distance from the proximal end of the Right foot segment to the Left Stride vector. We don't actually report (or store) a left and right stride width, but rather an average stride width. === Step Length === Step length is the distance between proximal end position of the contralateral foot at the previous contralateral heel strike to the proximal end position of the ipsilateral foot at the ipsilateral heel strike. This is calculated as the distance in the walking path direction. If the person is walking on a treadmill, the distance traveled by the belt under the stance foot is added to the measured distance. === Speed === Speed is computed using the actual stride length / actual stride time. If there are no completed strides, no speed can be computed since the stride distance can't be computed using parts. === Statures/Second === Average speed divided by the subject height === Cadence === Cadence is the rate at which a person walks, expressed in steps per minute. In other words: Left Steps Per Minute = 60 / [[#Step_Time|Left Step Time]] Right Steps Per Minute = 60 / [[#Step_Time|Right Step Time]] ==== Changing the text in the temporal distance chart ==== In the folder in which you have placed Visual3D.exe, you should find a folder labeled [[Visual3D:Documentation:Modeling:Segments:Config_Folder|config]]. Inside this folder you will find a file labeled **custom_text.ini** The contents of this ini file containing a mapping from the text used internally in Visual3D to the text that appears in the report graph. The text appearing to the right of the "=" sign appears in the report. The default config file looks like this. \\ **Temporal Distance**\\ **Step Length Prompt=**Left Step Length / Right Step Length\\ **Step Time Prompt=**Left Step Time / Right Step Time\\ **Left Side Time Prompt=**Left Stance Time / Left Swing Time\\ **Right Side Time Prompt=**Right Stance Time / Right Swing Time\\ **Stance Time Prompt=**Left Stance Time / Right Stance Time\\ **Swing Time Prompt=**Left Swing Time / Right Swing Time\\ **Cycle Time Prompt=**Left Cycle Time / Right Cycle Time\\ **Steps per Minute Prompt=**Left Steps per Minute / Right Steps per Minute\\ **Strides per Minute Prompt=**Left Strides per Minute / Right Strides per Minute\\ **Speed=**Speed\\ **Stride=**Stride\\ **Width=**Wid\\ **Length=**Len **Cycle Time=**Cycle Time\\ **Computed=**Computed\\ **Actual=**Actual\\ **Measure=**Measure\\ **StdDev=**StdDev\\ **Left=**Left\\ **Right=**Right\\ **Step Length=**Step Length\\ **Step Time=**Step Time\\ **Stance Swing Time=**Stance/Swing Time\\ **Left Stance=**Left Stance\\ **Left Swing=**Left Swing\\ **Right Stance=**Right Stance\\ **Right Swing=**Right Swing\\ **Stance Time=**Stance Time\\ **Swing Time=**Swing Time\\ **Double Limb Support Time=**Double Limb Support Time\\ **Right Initial Double Limb Support Time=**Right Initial Double Limb Support Time\\ **Right Terminal Double Limb Support Time=**Right Terminal Double Limb Support Time\\ **Flight Time=**Flight Time\\ \\ \\ ==== Subject computation using subject name/prefix parameters ==== Visual3D is in the process of supporting multiple subjects within the same workspace, and across CMO/Z library workspaces. Older versions of Visual3D will not support the subject prefix extensions of this command.\\ \\ When using a version of Visual3D prior to implementing multisubject support, Visual3D treats each CMO/Z file as a single subject. In this way, the temporal and distance metrics are computed in the CMO/Z GLOBAL for the subject processed within that CMO. In the same manner, when computing the temporal and distance metrics across a library of subjects, each CMO/Z is treated as a single subject and then the subject averages are computed across CMO/Z files and placed into the workspace GLOBAL for the overall mean values across subjects.\\ \\ Visual3D with multisubject support extends these metric calculations to be computed for each subject that is identified in the .C3D parameters SUBJECT section. In this way, the a single CMO/Z GLOBAL will contain the computed metrics for each subject within the CMO/Z file, prefixed with the subject's prefix identifier contained in the .C3D parameters. The GLOBAL of the CMO/Z will also contain an unprefixed set of metrics for the average across the subjects contained inside the CMO/Z file.\\ \\ When working across CMO/Z files in the CMO/Z library, multisubject support for this command will treat each subject mean in each CMO/Z file as separate subject averages to be included for calculating the temporal and distance metric averages across all the subjects in the CMO/Z library. \\ \\