An object of this class represents Polhemus tracking device. You can add tools to this device, then open the connection and start tracking. The tracking device will then continuously update the tool coordinates. The tools which are used by Polhemus need to be connected to the correct port. The port of the tool is stored as m_ToolPort in PolhemusTool AND as identifier in the NavigationTool (ToolStorage).
More...
#include <mitkPolhemusTrackingDevice.h>
An object of this class represents Polhemus tracking device. You can add tools to this device, then open the connection and start tracking. The tracking device will then continuously update the tool coordinates. The tools which are used by Polhemus need to be connected to the correct port. The port of the tool is stored as m_ToolPort in PolhemusTool AND as identifier in the NavigationTool (ToolStorage).
Documentation:
Definition at line 33 of file mitkPolhemusTrackingDevice.h.
◆ PolhemusTrackingDevice()
mitk::PolhemusTrackingDevice::PolhemusTrackingDevice |
( |
| ) |
|
|
protected |
◆ ~PolhemusTrackingDevice()
mitk::PolhemusTrackingDevice::~PolhemusTrackingDevice |
( |
| ) |
|
|
protected |
◆ AddTool()
mitk::TrackingTool* mitk::PolhemusTrackingDevice::AddTool |
( |
const char * |
toolName, |
|
|
int |
toolPort |
|
) |
| |
Create a new Polhemus tool with toolName and add it to the list of tools.
This method will create a new PolhemusTool object, set the tool name toolName and then add it to the list of tools. It returns a pointer of type mitk::TrackingTool to the tool that can be used to read tracking data from it. This is the only way to add tools to PolhemusTrackingDevice.
- Warning
- adding tools is not possible in tracking mode, only in setup and ready.
◆ AdjustHemisphere()
void mitk::PolhemusTrackingDevice::AdjustHemisphere |
( |
int |
_tool | ) |
|
Adjust the Hemisphere for this tool. User needs to make sure, that the tool is located in hemisphere (1|0|0) when calling this function. In contrast to SetHemisphere(1,0,0), this method restores the original HemisphereTracking settings at the end.
◆ AutoDetectTools()
virtual mitk::NavigationToolStorage::Pointer mitk::PolhemusTrackingDevice::AutoDetectTools |
( |
| ) |
|
|
virtual |
Autodetects tools from this device and returns them as a navigation tool storage.
- Returns
- Returns the detected tools. Returns an empty storage if no tools are present or if detection is not possible
Reimplemented from mitk::TrackingDevice.
◆ AutoDetectToolsAvailable()
virtual bool mitk::PolhemusTrackingDevice::AutoDetectToolsAvailable |
( |
| ) |
|
|
virtual |
- Returns
- Returns true if this device can autodetects its tools.
Reimplemented from mitk::TrackingDevice.
◆ Clone()
Pointer mitk::PolhemusTrackingDevice::Clone |
( |
| ) |
const |
◆ CloseConnection()
virtual bool mitk::PolhemusTrackingDevice::CloseConnection |
( |
| ) |
|
|
overridevirtual |
◆ GetAllTools()
std::vector<PolhemusTool::Pointer> mitk::PolhemusTrackingDevice::GetAllTools |
( |
| ) |
|
|
protected |
- Returns
- Returns all tools of the tracking device.
◆ GetDevice()
- Returns
- Gives back the device which is represented by an object of the class PolhemusInterface.
◆ GetHemisphere()
mitk::Vector3D mitk::PolhemusTrackingDevice::GetHemisphere |
( |
int |
_tool | ) |
|
Get the Hemisphere for _tool as mitk vector
◆ GetHemisphereTrackingEnabled()
bool mitk::PolhemusTrackingDevice::GetHemisphereTrackingEnabled |
( |
int |
_tool | ) |
|
Is Hemisphere Tracking Enabled for this tool?
◆ GetTool()
TrackingTool* mitk::PolhemusTrackingDevice::GetTool |
( |
unsigned int |
toolNumber | ) |
const |
|
overridevirtual |
- Parameters
-
toolNumber | The number of the tool which should be given back. |
- Returns
- Returns the tool which the number "toolNumber". Returns NULL, if there is no tool with this number.
Implements mitk::TrackingDevice.
◆ GetToolCount()
virtual unsigned int mitk::PolhemusTrackingDevice::GetToolCount |
( |
| ) |
const |
|
overridevirtual |
- Returns
- Returns the number of tools which have been added to the device.
Implements mitk::TrackingDevice.
◆ InternalAddTool()
bool mitk::PolhemusTrackingDevice::InternalAddTool |
( |
PolhemusTool::Pointer |
tool | ) |
|
|
protected |
Adds a tool to the tracking device.
- Parameters
-
tool | The tool which will be added. |
- Returns
- Returns true if the tool has been added, false otherwise.
◆ IsDeviceInstalled()
bool mitk::PolhemusTrackingDevice::IsDeviceInstalled |
( |
| ) |
|
|
virtual |
- Returns
- Returns true if the device is installed on this system an can be used. Installed means activated in MITK, in some cases this means the MITK installation / build has to know the installation path of the device libraries on this system. This path is usually given as cmake variable during the build configuration in devellopers mode. If the device should be available for end users with an installer the libraries can be included into the installer or the installer has to be adapted such that it asks for the path. Returns fals if the device is not installed. It cannot be used on this build in this case.
Note that some tracking systems communicate via a standard interface (e.g., serial port) and don't need any library or installation. These devices are always "installed".
Reimplemented from mitk::TrackingDevice.
◆ mitkClassMacro()
◆ New()
static Pointer mitk::PolhemusTrackingDevice::New |
( |
| ) |
|
|
static |
◆ OpenConnection()
virtual bool mitk::PolhemusTrackingDevice::OpenConnection |
( |
| ) |
|
|
overridevirtual |
Opens the connection to the device. This have to be done before the tracking is started.
- Exceptions
-
Implements mitk::TrackingDevice.
◆ SetHemisphere()
void mitk::PolhemusTrackingDevice::SetHemisphere |
( |
int |
_tool, |
|
|
mitk::Vector3D |
_hemisphere |
|
) |
| |
Sets the Hemisphere of tool _tool to the vector _hemisphere
◆ SetHemisphereTrackingEnabled()
void mitk::PolhemusTrackingDevice::SetHemisphereTrackingEnabled |
( |
bool |
_HemisphereTrackingEnabled | ) |
|
Enables/disables hemisphere tracking for all sensors.
◆ StartTracking()
virtual bool mitk::PolhemusTrackingDevice::StartTracking |
( |
| ) |
|
|
overridevirtual |
Starts the tracking.
- Returns
- Returns true if the tracking is started. Throws an exception if an error occures.
- Exceptions
-
Implements mitk::TrackingDevice.
◆ StopTracking()
virtual bool mitk::PolhemusTrackingDevice::StopTracking |
( |
| ) |
|
|
overridevirtual |
Stops the tracking.
- Returns
- Returns true if the tracking is stopped.
Reimplemented from mitk::TrackingDevice.
◆ ThreadStartTracking()
void mitk::PolhemusTrackingDevice::ThreadStartTracking |
( |
| ) |
|
|
protected |
◆ ToggleHemisphere()
void mitk::PolhemusTrackingDevice::ToggleHemisphere |
( |
int |
_tool = -1 | ) |
|
Toggles the current hemisphere. Parameter _tool describes, for which tool the hemisphere should change. Default -1 toggles all tools.
◆ TrackTools()
void mitk::PolhemusTrackingDevice::TrackTools |
( |
| ) |
|
|
protected |
This method tracks tools as long as the variable m_Mode is set to "Tracking". Tracking tools means grabbing frames from the camera an updating the tools.
- Exceptions
-
◆ m_AllTools
std::vector<PolhemusTool::Pointer> mitk::PolhemusTrackingDevice::m_AllTools |
|
protected |
◆ m_Device
PolhemusInterface::Pointer mitk::PolhemusTrackingDevice::m_Device |
|
protected |
◆ m_HemisphereTrackingEnabled
bool mitk::PolhemusTrackingDevice::m_HemisphereTrackingEnabled |
|
protected |
◆ m_Thread
std::thread mitk::PolhemusTrackingDevice::m_Thread |
|
protected |
The documentation for this class was generated from the following file: