Condition
With this element smaller if-clauses can be implemented. It can be verified if the I/O fulfills certain conditions and therefore needs different processing. The condition will not modify the I/O.
Usage
Relational operators from Lua are used to construct valid condition statements. All statements formulated with relational operators return true or false. The condition will not modify the I/O. It only passes the IO to either the then - true or else - false output stream.
In order to verify a specification of an I/O it is necessary to formulate a conditional statement.
To compare a certain I/O header value it is possible to read this value by standard Lua scripting.
cow.io[0][“image header value name”] == value
Furthermore, Variables can be checked to fulfill certain requirements. A Variable is called with the prefix “cow.”
cow.VariableName > = value
A third option is to compare a header value of an I/O with a Variable.
cow.VariableName < = cow.io[0][“image header value name”]
Example
Properties Window
The condition here in the example verifies the dimension of the I/O from the Import logic on the first position of the I/O. It checks whether the header key dimensionality is equal to three. In this case the condition is true and therefore the statement will pass the I/O to the logic Projection. The logic ran through and went green. The logic FourierProcesses is pending. |
Parameters and I/O
Input | Description |
---|---|
FirstInput | IO to be passed unmodified |
Output | Description |
---|---|
FirstOutput | IO passed, if the condition is true |
SecondOutput | IO passed, if the condition is false |