visual3d:documentation:pipeline:expressions:reserved_names
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
visual3d:documentation:pipeline:expressions:reserved_names [2024/06/19 12:50] – sgranger | visual3d:documentation:pipeline:expressions:reserved_names [2025/06/20 18:45] (current) – Cleaned up page and added section headers. wikisysop | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | visual3d reserved names | + | ====== Reserved Names ====== |
- | ===== contents ===== | + | Certain names are reserved within the Visual3D pipeline/ |
+ | ===== CURRENT_SIGNAL ===== | ||
- | * [[# | + | The CURRENT_SIGNAL reserved named is used to refer to a specific signal within the input to [[visual3d: |
- | * [[# | + | |
- | * [[# | + | |
- | * [[# | + | |
- | * [[#nan|2 nan]] | + | |
- | * [[#isnan|3 isnan]] | + | |
+ | ==== Example: Compute the length of one signal ==== | ||
- | ===== current_signal ===== | + | The legacy syntax is: |
- | used to refer to a specific signal with a simple syntax | + | < |
- | compute the length of one signal. | + | Evaluate_Expression |
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
- | the legacy syntax | + | The legacy syntax |
- | **evaluate_expression** | + | < |
- | / | + | ! Create a pipeline parameter containing the marker name |
- | / | + | Set_Pipeline_Parameter |
- | /result_folders=processed | + | /PARAMETER_NAME=MARKER |
- | /result_name=_length | + | /PARAMETER_VALUE=RFT1 |
- | / | + | ; |
- | **;** | + | |
- | the legacy syntax can get complicated if [[visual3d: | + | |
- | ! create a pipeline parameter containing the marker name | + | Evaluate_Expression |
- | **set_pipeline_parameter** | + | /EXPRESSION=LENGTH(TARGET::ORIGINAL&:&:&:: |
- | / | + | /RESULT_TYPES=DERIVED |
- | / | + | /RESULT_FOLDERS=PROCESSED |
- | **;** | + | /RESULT_NAME=_LENGTH |
- | **evaluate_expression** | + | ; |
- | /expression=length(target::original&:&:&:: | + | </ |
- | /result_types=derived | + | |
- | /result_folders=processed | + | |
- | /result_name=_length | + | |
- | **;** | + | |
- | this gets even more complicate if the folder is also a pipeline parameter. | + | |
- | an alternative is the following | + | This gets even more complicate if the folder is also a pipeline parameter. An alternative is the following: |
- | **evaluate_expression** | + | < |
- | /expression=length(current_signal) | + | Evaluate_Expression |
- | /signal_types=target | + | /EXPRESSION=LENGTH(CURRENT_SIGNAL) |
- | /signal_folder=original | + | /SIGNAL_TYPES=TARGET |
- | /signal_names=::marker | + | /SIGNAL_FOLDER=ORIGINAL |
- | /result_types=derived | + | /SIGNAL_NAMES=::MARKER |
- | /result_folders=processed | + | /RESULT_TYPES=DERIVED |
- | /result_name=_length | + | /RESULT_FOLDERS=PROCESSED |
- | /apply_as_suffix_to_signal_name=true | + | /RESULT_NAME=_LENGTH |
- | **;** | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | \\ | + | ; |
+ | </ | ||
- | === used to allow multiple signals | + | ==== Example: Specify |
- | compute | + | This example computes |
- | the legacy implementation requires a [[visual3d: | + | < |
+ | For_Each | ||
+ | / | ||
+ | /Items= RFT1+RFT2+RFT3 | ||
+ | ; | ||
- | [[visual3d: | + | Evaluate_Expression |
- | / | + | /EXPRESSION=LENGTH(TARGET::ORIGINAL&:&:&:: |
- | /items= rft1+rft2+rft3 | + | /SIGNAL_TYPES=TARGET |
- | **;** | + | /SIGNAL_FOLDER=ORIGINAL |
- | **evaluate_expression** | + | /SIGNAL_NAMES= |
- | /expression=length(target::original&:&:&:: | + | /RESULT_TYPES=DERIVED |
- | /signal_types=target | + | /RESULT_FOLDERS=PROCESSED |
- | /signal_folder=original | + | /RESULT_NAME=::MARKERS |
- | /signal_names= | + | /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE |
- | /result_types=derived | + | ; |
- | /result_folders=processed | + | |
- | /result_name=::markers | + | |
- | /apply_as_suffix_to_signal_name=true | + | |
- | **;** | + | |
- | end_for_each | + | |
- | / | + | |
- | **;** | + | |
- | using current_signal | + | |
- | **evaluate_expression** | + | End_For_Each |
- | /expression=length(current_signal) | + | /Iteration_Parameter_Name=MARKERS |
- | / | + | ; |
- | /signal_folder=original | + | </code> |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | \\ | + | |
+ | Instead, using the CURRENT_SIGNAL reserved name: | ||
- | === used to specifying all signals of a given type === | + | < |
+ | Evaluate_Expression | ||
+ | /EXPRESSION=LENGTH(CURRENT_SIGNAL) | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
- | compute the length of all targets in the original folder | + | ==== Example: Specify |
- | the legacy implementation requires a [[visual3d:documentation:pipeline:pipeline_commands:for_each_and_end_for_each|for_each]] command and a command to get the names of all of the targets | + | This example computes |
- | [[visual3d: | + | < |
- | / | + | Set_Pipeline_Parameter_To_List_Of_Signal_Names |
- | /signal_type=target | + | /PARAMETER_NAME=ALL_TARGETS |
- | /signal_folder=original | + | /SIGNAL_TYPE=TARGET |
- | **;** | + | /SIGNAL_FOLDER=ORIGINAL |
- | [[visual3d: | + | ; |
- | /iteration_parameter_name= markers | + | |
- | / | + | |
- | **;** | + | |
- | **evaluate_expression** | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | end_for_each | + | |
- | / | + | |
- | **;** | + | |
- | using current_signal | + | |
- | **evaluate_expression** | + | For_Each |
- | /expression=length(current_signal) | + | /Iteration_Parameter_Name= MARKERS |
- | /signal_types=target | + | /Items= :: |
- | / | + | ; |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | \\ | + | |
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
- | === apply_as_suffix_to_signal_name === | + | End_For_Each |
+ | / | ||
+ | ; | ||
+ | </ | ||
- | if **apply_as_suffix_to_signal_name** is **true**, or result_names.size() == signal_names.size() | + | Instead, using the CURRENT_SIGNAL reserved name: |
- | compute the length of all targets in the original folder | + | < |
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
- | **evaluate_expression** | + | ==== Example: Apply suffix to signal name ==== |
- | /expression=length(current_signal) | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | compute the length of two targets (rft1 and rft2) in the original folder | + | |
- | **evaluate_expression** | + | If the /APPLY_AS_SUFFIX_TO_SIGNAL_NAME parameter is true or if the number of result signals is the same as the number of input signals, then a suffix can be easily added for the result signal' |
- | /expression=length(current_signal) | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | compute | + | |
- | **evaluate_expression** | + | For example, when computing the length of all TARGETS in the ORIGINAL folder. |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | \\ | + | |
- | if **apply_as_suffix_to_signal_name** is **false**, and result_names.size() == 1 | + | |
- | compute the length of one target | + | < |
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
- | **evaluate_expression** | + | Or when computing the length |
- | / | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | ===== nan ===== | + | |
- | nan is a reserved string used to designate "not a number" | + | < |
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
- | visual3d commands refer to [[visual3d: | + | Also when calculating a Best_Plane_Fit for multiple signals at each frame of data. |
- | for example, the expression 1/0 results in nan | + | < |
- | ===== isnan ===== | + | Evaluate_Expression |
+ | /EXPRESSION=Best_Fit_Plane(CURRENT_SIGNAL) | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
- | isnan(expression) tests values against nan - if the number is nan the result is 1, otherwise the result is 0 | + | ===== NAN ===== |
- | [set_pipeline_parameter_from_expression] | + | NAN is a reserved string used to designate "Not a Number" |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | ::nan_test = 1 | + | |
- | [set_pipeline_parameter_from_expression] | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
- | ::nan_test = 1 | + | |
- | returns " | + | |
- | [set_pipeline_parameter_from_expression] | + | For example, the expression |
- | / | + | |
- | /expression=isnan(15) | + | |
- | /as_integer=true | + | |
- | **;** | + | |
- | ::nan_test = 0 | + | |
- | example: set negative values to no_data | + | |
- | if the z-component of the lelb signal is below 0 set the frame to no_data | + | ==== isNAN function ==== |
- | **evaluate_expression** | + | The function isNAN(expression) |
- | /expression=(target:: | + | |
- | / | + | |
- | / | + | |
- | / | + | |
- | **;** | + | |
+ | < | ||
+ | Set_Pipeline_Parameter_From_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | ::NAN_TEST = 1 | ||
+ | |||
+ | Set_Pipeline_Parameter_From_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ::NAN_TEST = 1 ! Returns " | ||
+ | |||
+ | Set_Pipeline_Parameter_From_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | |||
+ | ::NAN_TEST = 0 | ||
+ | </ | ||
+ | |||
+ | ==== Example: Set negative values to NO_DATA ==== | ||
+ | |||
+ | In this example, if the z-component of the LELB signal is below 0 then we will set the frame to NO_DATA. | ||
+ | |||
+ | < | ||
+ | Evaluate_Expression | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | ; | ||
+ | </ | ||
+ | |||
+ | ===== ORIGIN ===== | ||
+ | |||
+ | Internally Visual3D specifies the location ORIGIN. To avoid confusion, this string cannot be used to name either a TARGET or a LANDMARK. |
visual3d/documentation/pipeline/expressions/reserved_names.1718801400.txt.gz · Last modified: 2024/06/19 12:50 by sgranger