Skip to content

A C++ application that bridges NatNet motion capture data to OpenIGTLinkIO for real-time tracking communication with medical imaging software like 3D Slicer.

License

Notifications You must be signed in to change notification settings

Vitor-Padovani/DAQBroadcaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NatNetToOIGTLIO

A C++ application that bridges NatNet motion capture data to OpenIGTLinkIO for real-time tracking communication with medical imaging software like 3D Slicer.

Requirements

Dependencies

  • VTK (Visualization Toolkit)
  • OpenIGTLink - Communication protocol for medical imaging
  • OpenIGTLinkIO - I/O library for OpenIGTLink
  • NatNet SDK - OptiTrack's motion capture SDK (included in project)
  • TinyXML2 - XML parsing library (included in project)

Project Structure

NatNetToOIGTLIO/
├── main.cpp                 # Main application entry point
├── utils.cpp               # Utility functions
├── utils.h                 # Utility headers
├── xmlReader.cpp           # XML configuration reader
├── xmlReader.h             # XML reader headers
├── config.xml              # Configuration file
├── include/                # NatNet SDK headers
│   ├── NatNetCAPI.h
│   ├── NatNetClient.h
│   └── NatNetTypes.h
├── lib/                    # NatNet SDK libraries
│   ├── NatNetLib.dll
│   └── NatNetLib.lib
├── tinyxml2/               # TinyXML2 library
│   ├── tinyxml2.cpp
│   └── tinyxml2.h
├── CMakeLists.txt          # Build configuration
└── README.md               # This file

Building the Project

Prerequisites

  1. Build the following libraries from source:
    • VTK - Follow VTK build instructions
    • OpenIGTLink - Build from OpenIGTLink repository
    • OpenIGTLinkIO - Build from OpenIGTLinkIO repository

Usage

Setup

  1. Start Motive: Ensure OptiTrack Motive is running and streaming data
  2. Configure Network: Make sure both applications are on the same network
  3. Run Application: Execute the built executable

Configuration File

Edit config.xml to configure tools and network settings. The application will automatically use the rigid body names from Motive that match the configured tool names.

Runtime Controls

  • Press 'q' or 'Q': Quit the application
  • Console Output: Shows connection status and frame rate statistics

Data Flow

  1. NatNet Client receives rigid body data from Motive
  2. Data Handler processes each frame of motion capture data
  3. Transform Conversion converts quaternion/position to 4x4 matrix
  4. OpenIGTLink Server streams transforms to connected clients
  5. Frame Rate Monitoring displays performance statistics

Integration with 3D Slicer

  1. Install OpenIGTLink Extension in 3D Slicer
  2. Create IGTLink Connector in Slicer
  3. Set Connection: localhost:18944

About

A C++ application that bridges NatNet motion capture data to OpenIGTLinkIO for real-time tracking communication with medical imaging software like 3D Slicer.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors