Real-time processing of data retrieved from a Plus Server

Hi,

I am trying to process in real-time the data retrieved from a Plus Server and then visualise it in Slicer.
The only way I was able to handle this problem until now is the following:

  • In an external python script I initialised a client using pyigtl that retrieve the data.
  • In the same external script the data is processed.
  • In the same external script I initialised also a server using pyigtl that streams the processed data.
  • In Slicer using the OpenIGTLinkIF module I defined a client that retrieves the processed data from the server of the external script.

This works. However this workflow is not efficient.

Is there any way to process the data retrieved from a Plus server in real-time directly in Slicer?

Thank you