TCP/IP Socket implementation

Operating system: Windows
Slicer version: 4.8


I need to connect a device with Slicer through TCP/IP socket connection. The device runs in real time and the data from the device need to be sent to Slicer in every certain milliseconds. Meanwhile commands will send to the device through Slicer. Could you please suggest how to implement the TCP/IP communication? Can I use OpenIGTLink? If yes, could I find any documents or examples? Shall I implement the socket connection using Qt Socket, Qt TCPServer, etc.? Or any other way?
Any suggestion is highly appreciated!


OpenIGTLink is a very simple TCP/IP protocol that is already well supported in Slicer. I would highly recommend using it, as it is not easy to implement stable and efficient multi-threaded communication in an frontend application. You can find OpenIGTLink implementations for most common programming languages (C++, Python, Java, MATLAB, etc.).

Thanks! Will try it.