OpenIGTLink =========== IO algorithm for managing incoming (receiving) and outgoing (sending) connections using the OpenIGTLink protocol Input ----- All OpenIGTLink connections require a connection partner (either server or client) to establish a TCP/IP connection. Outgoing connections furthermore require a stream for forwarding stream data via OpenIGTLink. Output ------ For each OpenIGTLink connection, a stream element is added to the data widget. Description ----------- The algorithm allows to manage an arbitrary amount of OpenIGTLink connections. For creating a new connection, the following parameters need to be specified: * ``Connection Name`` defines the name of the stream for subsequent identification. * ``Operation Mode`` defines whether the connection should behave as *Server* or *Client*. * ``CRC Check`` flag turns on CRC integrity checks of all incoming OpenIGTLink messages. * ``Hostname`` can be an IP address or DNS-resolvable hostname to connect to (only for *Client*). * ``Port`` sets the TCP/IP port to be used. * ``Type`` defines both the *connection direction* and the *data type* expected. The connection direction can be either incoming (default) or outgoing (*Output*). Currently, *image* as well as *tracking* streams are supported. A click on **Create New** adds the connection to the list of connections and also creates a stream instance, which is added to the data widget. Note that no TCP/IP action is performed automatically. Instead, the context menu in the connection list has to be used. For *Server* connections, **Start listening** will open the specified port and listen to connecting clients. For *Client* connections, **Connect** will try to establish a connection with the specified host. Incoming streams can directly be used, for instance for stream recording. Outgoing streams need to be linked to other streams in the data widget using :ref:`Forward to OutStream`.