OpgenIGTLinkIF: How to use BindMessages

openigtlink
bindmessage

(Andreas Kleinöder) #1

Hi everyone,

I am trying to receive some data via OpenIGTLink with additional data added. For example I can already receive a vtkMRMLScalarVolumeNode but in this node I cannot include information about the patient (e.g. UID). In the overview page of OpenIGTLinkIF I found some information that BindMessages could solve the problem (https://www.slicer.org/wiki/Documentation/Nightly/Developers/OpenIGTLinkIF).
Unfortunately I have not found further information on how to use it and in the source files of the project I also hardly found any hints. Are BindMessages support via the Python-Interface at all?
Anyone has a small example on how to use them?

Thanks!


(Kyle Sunderland) #2

The BindMessages are in the “Ideas” section. They have not been implemented.

The page is also out of date. The current source code is contained here: https://github.com/openigtlink/SlicerOpenIGTLink.

I can easily implement a mechanism to set node attributes from igtl message metadata if that would suit your purpose?


(Andras Lasso) #3

Could you write a bit more about your use case? There can be many solutions and we would need to know what your preferences and constraints are. What kind of images do you send? How often? How often do metadata change?

You can already send patient metadata in a STRING message when you start a procedure. @Sunderlandkyl’s proposal of saving metadata as node attribute would be useful in general and may help in your case, too.


(Andreas Kleinöder) #4

Hi,

Thanks for your reply. I almost thought that there is currently no such feature. But now I know for sure and can stop searching, thanks.

I am not sure whether your suggestion would help us in this case. We have a server running on another machine which processes data and then sends results (e.g. segmentation image) to our client. On client side we need to identify to which volume series the result belongs to. The server could send a message (Text) before or after the actual result for communicating the corresponding UID. But since the server is multi-threaded, results for different datasets could potentially arrive randomly.

Adding such info into somewhere in the metadata of the ogtl::ImageMessage is not possible, is it? Or is this what you are suggesting?

Thanks!


(Andreas Kleinöder) #5

Hi again,

the use case I have just described partially in my last reply. Maybe you are right and it will be sufficient to send such data only if the currently processed patient is changing. On both machines we received new volume data via dicom nodes which shall be processed on the fly. Our client allows to load and view the data in Slicer, the server does some post-processing based on the volume and sends the results. We need to make sure that each result is assigned to the correct acquisition. But we can assume that new acquisitions are not made too often. So probably we simply send it once.

Thanks again for your replies!

Andreas


(Andras Lasso) #6

You can identify volumes in Slicer based on the “device name” OpenIGTLink message field. This field is used as volume node name when Slicer receives the message. You can use any string, such as a randomly generated ID or by concatenation patient/study/series IDs. OpenIGTLink 2 has a limit of 20 characters but I think OpenIGTLink 3 has a mechanism to use longer device name.