Switch¶
-
MLModule
¶ genre FlowControl
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLMiscModules
definition MLMiscModules.def see also Switch1toN
,SoSwitch
keywords select
,choice
,demultiplex
,input
,output
Purpose¶
The module Switch
selects one of several input images to output.
The selected image is passed unchanged to the output, even if the input is not connected or the input image is undefined.
Note that it is not necessary for all inputs to be connected. Unconnected or undefined inputs are bypassed as an undefined (empty) image.
Notifications are only propagated for the selected input, while notifications from all other inputs are ignored.
The number of shown inputs can be changed.
Tips¶
If a switch “UseSomething” is used to either use or bypass a subnetwork implementing a feature “Something”, the latter should be connected to the second input. This way, the bi-valued Active Input Index
can be used like a regular boolean, with 1 meaning “use Something” and 0 meaning “don’t use Something”.