This is an old revision of the document!
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
![]() | The condition verifies if the dimensionality of the input IO at the first position is three. |
![]() | The condition is true, therefore the statement will not pass the IO to the logic FourierProcesses. |
![]() | The condition is true, therefore the statement will pass the IO to the logic Projection. |
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 |