OpenIGTLink/ProtocolV2/Trial

From NAMIC Wiki
Jump to: navigation, search
Home < OpenIGTLink < ProtocolV2 < Trial

<< OpenIGTLink

About this page

This page describes how to try new features in OpenIGTLink Protocol Version 2 before its release in early 2011.

OpenIGTLink library with Version 2 features

The library for protocol version 2 is available from the OpenIGTLink repository (see library version 2 information). To build the library with version 2 features, please follow the instruction bellow:

0. Create a working directory and go to the directory.

1. Obtain the source code from the repository. If you are using command line tools from a UNIX/Linux terminal:

svn co http://svn.na-mic.org/NAMICSandBox/trunk/OpenIGTLink

2. Create a build directory and move into it. From the terminal:

mkdir OpenIGTLink-build
cd OpenIGTLink-build

3. Run CMake. Please make sure to turn on BUILD_EXAMPLES and OpenIGTLink_PROTOCOL_VERSION_2 options. From the terminal, run:

cmake -DBUILD_EXAMPLES:BOOL=ON -DOpenIGTLink_PROTOCOL_VERSION_2:BOOL=ON ../OpenIGTLink

4. Build the library. From the terminal, just run make command:

make

5. You can find the binary files including example programs in 'OpenIGTLink-build/bin' directory (or 'OpenIGTLink-build/bin/{Debug or Release}' on Windows).

Trying Protocol Version 2 with 3D Slicer

The latest 3D Slicer 3.6.3 beta (downloaded after Nov 19, 2010) can handle a part of newly introduced features in version 2. You can either build 3D Slicer on your machine or obtain a nightly build from Slicer Download Page. If you download a nightly build, please make sure to download a binary built after Nov 19.

Before you try...

Before you try the following sections, you may check if the 3D Slicer is actually built upon OpenIGTLink Library Version 2 as follows: open OpenIGTLinkIF module, create and configure a connector as a server in the "Connector" frame; once the connector is created, open the DATA I/O Configuration frame and right-click the connector (shown as vtkMRMLIGTLConnectorNode1, unless you change the connector name). If you see the pull-down menu as shown in the following image, the 3D Slicer is built upon the version 2 library and ready to try.


OpenIGTLink ProtocolV2 Check Slicer3.jpg

New tracking data message with flow control

Version 2 protocol defines a new tracking data message, that not only conveys transforms, but also some information about tracking instrument.

First, open a terminal and run TrackingDataServer, which comes as an example in OpenIGTLink (see the previous section), as follows:

cd <OpenIGTLink build directory>/bin
./TrackingDataServer 18944

Then launch 3D Slicer, open OpenIGTLinkIF module and create an client connector in Connectors frame as shown in the following figure.

OpenIGTLink ProtocolV2 Connectors1.jpg
OpenIGTLink ProtocolV2 Connectors2.jpg