User Tools

Site Tools


visual3d:documentation:modeling:segments:segment_properties_example

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:modeling:segments:segment_properties_example [2024/06/19 12:49] sgrangervisual3d:documentation:modeling:segments:segment_properties_example [2025/05/05 13:22] (current) – Added links. wikisysop
Line 1: Line 1:
-this example specifies segment properties from pipeline commands. for a variety of legacy reasons, visual3d does not allow users to specify the segment depth as an expression. this limitation means that the command [[visual3d:documentation:pipeline:model_commands:modeling_commands#set_model_metric|set_model_metric]] cannot be used for segment depth.+====== Segment Properties Examples ======
  
-prompted by customer that wanted to use a pipeline command to modify segment depth we documented this in several pipeline examples.+This example demonstrates how [[visual3d:documentation:modeling:segments:segment_overview|segment]] properties can be specified using pipeline commands. For variety of legacy reasons, Visual3D does not allow users to specify the segment depth as an expression which means that the command [[Visual3D:Documentation:Pipeline:Model_Commands:Modeling_Commands#Set_Model_Metric|Set_Model_Metric]] cannot be used for segment depth.
  
-**note:** as of visual3dv5.01.20, user's are able to enter equations into the depth measurements for the pelvis and thorax.+**NOTE:** As of Visual3D v5.01.20, user's are able to enter equations into the depth measurements for the Pelvis and Thorax.
  
-\\+===== Example 1: Specifying segment properties from a value =====
  
- +This example is for the [[visual3d:documentation:modeling:segments:pelvis_overview|Pelvis]] and assumes that the Pelvis segment has been constructed.
-===== specifying segment properties from a value ===== +
- +
-this example is for the pelvis and assumes that the pelvis segment has been constructed.+
  
 <code> <code>
-first set a pipeline parameter for the segment depth +First set a pipeline parameter for the segment depth 
-this value could be obtained by prompting the user or in this case is set to 0.12  +This value could be obtained by prompting the user or in this case is set to 0.12  
-set_pipeline_parameter  +Set_Pipeline_Parameter  
-/parameter_name=depth  +/PARAMETER_NAME=DEPTH  
-/parameter_value=0.12 +/PARAMETER_VALUE=0.12 
 ; ;
  
-explicitly set the mass and inertial properties for an elliptical cylinder +Explicitly set the mass and inertial properties for an elliptical cylinder 
-this example is for the pelvis segment +This example is for the Pelvis segment 
-set_segment_properties  +Set_Segment_Properties  
-/calibration_file=  +/CALIBRATION_FILE=  
-/segment_name=rpv  +/SEGMENT_NAME=RPV  
-/mass=0.142*mass  +/MASS=0.142*Mass  
-/cg_from_prox_axial=0.5*rpv_seg_length  +/CG_FROM_PROX_AXIAL=0.5*RPV_Seg_Length  
-/cg_from_prox_ml=0  +/CG_FROM_PROX_ML=0  
-/cg_from_prox_ap=0  +/CG_FROM_PROX_AP=0  
-/inertia_xx=0.142*mass*(3*&::depth&^2+rpv_seg_length^2)/12  +/INERTIA_XX=0.142*Mass*(3*&::DEPTH&^2+RPV_Seg_Length^2)/12  
-/inertia_yy=0.142*mass*(3*rpv_distal_radius^2+rpv_seg_length^2)/12  +/INERTIA_YY=0.142*Mass*(3*RPV_Distal_Radius^2+RPV_Seg_Length^2)/12  
-/inertia_zz=0.142*mass*(&::depth&^2+rpv_distal_radius^2)/4  +/INERTIA_ZZ=0.142*Mass*(&::DEPTH&^2+RPV_Distal_radius^2)/4  
-! /ap_direction=  +! /AP_DIRECTION=  
-! /axial_direction=  +! /AXIAL_DIRECTION=  
-! /model_file=  +! /MODEL_FILE=  
-! /material_file+! /MATERIAL_FILE
 ; ;
 </code> </code>
  
-===== specifying segment properties from a metric =====+===== Examples 2A & 2B: Specifying segment properties from a metric =====
  
-there are two examples: one for the pelvis segment and one for the thorax.+There are two examples: one for the [[visual3d:documentation:modeling:segments:pelvis_overview|pelvis segment]] and one for the [[visual3d:tutorials:modeling:modeling_the_thorax|thorax]].
  
-==== pelvis ====+==== Example 2A: Pelvis ====
  
-create a metric to compute the depth as the distance between two markers/landmarks. this example is for the pelvis and assumes that the pelvis segment has ben constructed. in addition, the landmark **mid_asis** has been created.+Create a metric to compute the depth as the distance between two markers/landmarks. This example is for the Pelvis and assumes that the [[visual3d:documentation:modeling:segments:pelvis_overview|Pelvis segment]] has ben constructed. In addition, the landmark **MID_ASIS** has been created.
  
 <code> <code>
-set global active +Set Global active 
-select_active_file +Select_Active_File 
-/file_name=global +/FILE_NAME=GLOBAL 
-! /query=+! /QUERY=
 ; ;
  
-metric_explicit +Metric_Explicit 
-/result_metric_name=pelvic_depth +/RESULT_METRIC_NAME=PELVIC_DEPTH 
-/result_metric_folder=processed +/RESULT_METRIC_FOLDER=PROCESSED 
-/metric_value=distance(model::target::sacr,model::landmark::mid_asis)+/METRIC_VALUE=DISTANCE(MODEL::TARGET::SACR,MODEL::LANDMARK::MID_ASIS)
 ; ;
  
-first set a pipeline parameter for the segment depth +First set a pipeline parameter for the segment depth 
-set_pipeline_parameter +Set_Pipeline_Parameter 
-/parameter_name=depth +/PARAMETER_NAME=DEPTH 
-/parameter_value=global::metric::processed::pelvic_depth+/PARAMETER_VALUE=GLOBAL::METRIC::PROCESSED::PELVIC_DEPTH
 ; ;
  
-explicitly set the mass and inertial properties for an elliptical cylinder +Explicitly set the mass and inertial properties for an elliptical cylinder 
-this example is for the pelvis segment +This example is for the Pelvis segment 
-set_segment_properties  +Set_Segment_Properties  
-/calibration_file=  +/CALIBRATION_FILE=  
-/segment_name=rpv  +/SEGMENT_NAME=RPV  
-/mass=0.142*mass  +/MASS=0.142*Mass  
-/cg_from_prox_axial=0.5*rpv_seg_length  +/CG_FROM_PROX_AXIAL=0.5*RPV_Seg_Length  
-/cg_from_prox_ml=0  +/CG_FROM_PROX_ML=0  
-/cg_from_prox_ap=0  +/CG_FROM_PROX_AP=0  
-/inertia_xx=0.142*mass*(3*&::depth&^2+rpv_seg_length^2)/12  +/INERTIA_XX=0.142*Mass*(3*&::DEPTH&^2+RPV_Seg_Length^2)/12  
-/inertia_yy=0.142*mass*(3*rpv_distal_radius^2+rpv_seg_length^2)/12  +/INERTIA_YY=0.142*Mass*(3*RPV_Distal_Radius^2+RPV_Seg_Length^2)/12  
-/inertia_zz=0.142*mass*(&::depth&^2+rpv_distal_radius^2)/4  +/INERTIA_ZZ=0.142*Mass*(&::DEPTH&^2+RPV_Distal_radius^2)/4  
-! /ap_direction=  +! /AP_DIRECTION=  
-! /axial_direction=  +! /AXIAL_DIRECTION=  
-! /model_file=  +! /MODEL_FILE=  
-! /material_file+! /MATERIAL_FILE
 ; ;
 </code> </code>
  
-==== thorax ====+==== Example 2B: Thorax ====
  
-this example is for the thorax and assumes that the thorax segment has ben constructed. since visual3d does not allow users to specify the segment depth as an expression, a user could construct the thorax segment with a "dummy" depth number (0.12) and use the pipeline below to calculate a depth value based on targets/landmarks on the segment.+This example is for the Thorax and assumes that the [[visual3d:tutorials:modeling:modeling_the_thorax|Thorax segment]] has been constructed. Since Visual3D does not allow users to specify the segment depth as an expression, a user could construct the Thorax segment with a "dummy" depth number (0.12) and use the pipeline below to calculate a depth value based on targets/landmarks on the segment.
  
 <code> <code>
-set thorax depth +Set Thorax Depth 
  
-select_active_file +Select_Active_File 
-/file_name=global +/FILE_NAME=GLOBAL 
-! /query=+! /QUERY=
 ; ;
  
-the cylindrical depth is equal to one-half the distance from anterior to posterior. +The cylindrical depth is equal to one-half the distance from anterior to posterior. 
-metric_explicit +Metric_Explicit 
-/result_metric_name=thorax_depth +/RESULT_METRIC_NAME=THORAX_DEPTH 
-/result_metric_folder=processed +/RESULT_METRIC_FOLDER=PROCESSED 
-/metric_value=distance(model::target::t10,model::landmark::strn)/2+/METRIC_VALUE=DISTANCE(MODEL::TARGET::T10,MODEL::LANDMARK::STRN)/2
 ; ;
  
-first set a pipeline parameter for the segment depth +First set a pipeline parameter for the segment depth 
-set_pipeline_parameter +Set_Pipeline_Parameter 
-/parameter_name=depth +/PARAMETER_NAME=DEPTH 
-/parameter_value=global::metric::processed::thorax_depth+/PARAMETER_VALUE=GLOBAL::METRIC::PROCESSED::THORAX_DEPTH
 ; ;
  
-explicitly set the mass and inertial properties for an elliptical cylinder for the thorax segment +Explicitly set the mass and inertial properties for an elliptical cylinder for the Thorax segment 
-set_segment_properties +Set_Segment_Properties 
-/calibration_file+/CALIBRATION_FILE
-/segment_name=rta +/SEGMENT_NAME=RTA 
-/mass=0.355*mass +/MASS=0.355*Mass 
-/cg_from_prox_axial=0.5*rta_seg_length +/CG_FROM_PROX_AXIAL=0.5*RTA_Seg_Length 
-/cg_from_prox_ml=0 +/CG_FROM_PROX_ML=0 
-/cg_from_prox_ap=0 +/CG_FROM_PROX_AP=0 
-/inertia_xx=0.355*mass*(3*&::depth&^2+rta_seg_length^2)/12 +/INERTIA_XX=0.355*Mass*(3*&::DEPTH&^2+RTA_Seg_Length^2)/12 
-/inertia_yy=0.355*mass*(3*rta_distal_radius^2+rta_seg_length^2)/12 +/INERTIA_YY=0.355*Mass*(3*RTA_Distal_Radius^2+RTA_Seg_Length^2)/12 
-/inertia_zz=0.355*mass*(&::depth&^2+rta_distal_radius^2)/4 +/INERTIA_ZZ=0.355*Mass*(&::DEPTH&^2+RTA_Distal_radius^2)/4 
-! /ap_direction+! /AP_DIRECTION
-! /axial_direction+! /AXIAL_DIRECTION
-! /model_file+! /MODEL_FILE
-! /material_file=+! /MATERIAL_FILE=
 ; ;
 </code> </code>
  
 +===== See Also =====
  
 +Go back to the [[visual3d:documentation:modeling:segments:segment_overview|Segment Overview]] page for more information about segments in Visual3D.
  
visual3d/documentation/modeling/segments/segment_properties_example.1718801348.txt.gz · Last modified: 2024/06/19 12:49 by sgranger