13 #ifndef mitkOpenIGTLinkTrackingDevice_h
14 #define mitkOpenIGTLinkTrackingDevice_h
16 #include <mitkIGTConfig.h>
22 #include <igtlQuaternionTrackingDataMessage.h>
23 #include <igtlTrackingDataMessage.h>
24 #include <igtlTransformMessage.h>
39 itkFactorylessNewMacro(Self);
43 void SetPortNumber(
int portNumber);
46 void SetHostname(std::string hostname);
50 std::string GetHostname();
57 bool StartTracking()
override;
63 bool StopTracking()
override;
69 bool OpenConnection()
override;
74 bool CloseConnection()
override;
79 unsigned int GetToolCount()
const override;
86 TrackingTool* GetTool(
unsigned int toolNumber)
const override;
95 bool DiscoverTools(
int WaitingTime = 10000);
108 bool AutoDetectToolsAvailable()
override;
114 mitk::NavigationToolStorage::Pointer AutoDetectTools()
override;
116 bool IsDeviceInstalled()
override;
118 itkSetMacro(UpdateRate,
int);
119 itkGetConstMacro(UpdateRate,
int);
131 bool InternalAddTool(OpenIGTLinkTrackingTool::Pointer tool);
139 mitk::IGTLMessage::Pointer ReceiveMessage(
int waitingTime);
144 std::vector<OpenIGTLinkTrackingTool::Pointer> GetAllTools();
158 enum TrackingMessageType
160 TDATA, TRANSFORM, QTDATA, UNKNOWN
163 mitk::OpenIGTLinkTrackingDevice::TrackingMessageType GetMessageTypeFromString(
const char* messageTypeString);
167 mitk::NavigationToolStorage::Pointer DiscoverToolsAndConvertToNavigationTools(mitk::OpenIGTLinkTrackingDevice::TrackingMessageType type,
int NumberOfMessagesToWait = 50);
169 void AddNewToolForName(std::string name,
int i);
171 mitk::NavigationTool::Pointer ConstructDefaultOpenIGTLinkTool(std::string name, std::string identifier);