PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
Functions
BrainLabTrackerSim.cxx File Reference

This program simulates a BrainLab tracker with OpenIGTLink interface. More...

#include "PlusConfigure.h"
#include <iostream>
#include <math.h>
#include <cstdlib>
#include <cstring>
#include "igsioCommon.h"
#include "igtlImageMessage.h"
#include "igtlMessageFactory.h"
#include "igtlMessageHeader.h"
#include "igtlMultiThreader.h"
#include "igtlOSUtil.h"
#include "igtlServerSocket.h"
#include "igtlTrackingDataMessage.h"
Include dependency graph for BrainLabTrackerSim.cxx:

Go to the source code of this file.

Functions

void GetRandomTestMatrix (igtl::Matrix4x4 &matrix, float phi, float theta)
 
int main (int argc, char *argv[])
 
void SendTrackingData (igtl::Socket::Pointer &socket, igtl::TrackingDataMessage::Pointer &trackingMsg)
 
void * ThreadFunction (void *ptr)
 

Detailed Description

This program simulates a BrainLab tracker with OpenIGTLink interface.

The connection establishing procedure is not simulated accurately, as BrainLab requires user interaction to accept an incoming connection, while this simulator accepts connections automatically.

The simulator sends information about the ReferenceStar and Ultrasound tools in the first couple of seconds (to simulate the situation when a tool is not available at connection time), and later transforms are sent for an additional Pointer tool as well.

Definition in file BrainLabTrackerSim.cxx.

Function Documentation

◆ GetRandomTestMatrix()

void GetRandomTestMatrix ( igtl::Matrix4x4 &  matrix,
float  phi,
float  theta 
)

Definition at line 49 of file BrainLabTrackerSim.cxx.

◆ main()

int main ( int  argc,
char *  argv[] 
)

igtl Factory for message sending

Definition at line 166 of file BrainLabTrackerSim.cxx.

◆ SendTrackingData()

void SendTrackingData ( igtl::Socket::Pointer &  socket,
igtl::TrackingDataMessage::Pointer &  trackingMsg 
)

Definition at line 73 of file BrainLabTrackerSim.cxx.

◆ ThreadFunction()

void* ThreadFunction ( void *  ptr)

Definition at line 98 of file BrainLabTrackerSim.cxx.