visual3d:documentation:modeling:virtual_lab:virtual_lab_direction_of_progression_method_1
This is an old revision of the document!
this script is explained in the virtual lab direction of progression tutorial. this script outlines method 1.
before running this script:
- a static trial must be loaded into the workspace
- a model template (with modified virtual lab) must be loaded into the workspace
- a dynamic trial must be loaded into the workspace
note: a modified virtual lab follows the same outline as the dynamic virtual lab, except instead of using the lab_x landmark, the dir_prog_x landmark is used. an example of this model template can be found here.
**__add_a_comment__** ! /comment= 1. find the rotation between the lab and the pelvis segment (trunk_rot) ; compute_model_based_data /result_name=rpv_lab_rot /function=joint_rotation /segment=rpv ! /reference_segment=lab /resolution_coordinate_system= ! /use_cardan_sequence=false ! /normalization=false ! /normalization_method= ! /normalization_metric= ! /negatex=false ! /negatey=false ! /negatez=false ! /axis1=x ! /axis2=y ! /axis3=z ; **__add_a_comment__** ! /comment= 2. project the pelvis' coordinate system onto the floor: ; ! project the y axis of the pelvis' coordinate system on the floor, then find the magnitude to calculate the unit vector evaluate_expression /expression=vector (link_model_based::original::rpv_lab_rot::4 , link_model_based::original::rpv_lab_rot::5 , 0 ) /result_name=rpv_lab_y_proj ! /result_type=derived /result_folder=progression ; signal_magnitude /signal_types=derived /signal_folder=progression /signal_names=rpv_lab_y_proj ! /result_types= /result_folder=progression ! /result_names= /result_suffix=_mag ; divide_signals /signal_types=derived+derived /signal_folder=progression+progression /signal_names=rpv_lab_y_proj+rpv_lab_y_proj_mag /component_sequence=all /result_name=rpv_lab_y_proj_unit /result_folder=progression ; ! create the z unit vector (0,0,1) evaluate_expression /expression=vector (0,0,1) * ( ( frame_numbers::original::frames * 0 + 1 ) ) /result_name=rpv_lab_z_proj_unit /result_type=derived /result_folder=progression ; ! create the x unit vector by crossing the y and z unit vectors evaluate_expression /expression=cross ( derived::progression::rpv_lab_y_proj_unit , derived::progression::rpv_lab_z_proj_unit ) /result_name=rpv_lab_x_proj_unit /result_type=derived /result_folder=progression ; **__add_a_comment__** ! /comment= calculate the metric direction of progression from the x unit vector ; metric_mean /result_metric_name=rpv_lab_x_proj_unit ! /apply_as_suffix_to_signal_name=false /result_metric_folder=progression /signal_types=derived /signal_names=rpv_lab_x_proj_unit /signal_folder=progression /signal_components= /component_sequence=all /event_sequence= /exclude_events= ! /generate_mean_and_stddev=true ! /append_to_existing_values=false ; **__add_a_comment__** ! /comment=create the virtual lab using x unit vector of the direction of progression ; set_pipeline_parameter_from_expression /parameter_name=rpv_prog_ml /expression=0.1 * ( metric::progression::rpv_lab_x_proj_unit_mean::x ) /as_integer=false ; set_pipeline_parameter_from_expression /parameter_name=rpv_prog_ap /expression=0.1 * ( metric::progression::rpv_lab_x_proj_unit_mean::y ) /as_integer=false ; add_landmark /landmark_name=dir_prog_x ! /calibration_file= ! /user_generated=true ! /use_percentage=false ! /calibration_only=false ! /use_targets=false /segment_name=lab ! /target_types= ! /target_names= /mcs_ml=::rpv_prog_ml /mcs_ap=::rpv_prog_ap /mcs_axial=0 ! /landmark_location= ! /reference_location_type= ! /reference_location_name= ! /use_reference_location=false ; build_model ! /calibration_file= ! /rebuild_all_models=false ! /display_results=true ; recalc ;
visual3d/documentation/modeling/virtual_lab/virtual_lab_direction_of_progression_method_1.1718804192.txt.gz · Last modified: 2024/06/19 13:36 by sgranger