NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
Base class for NifTK interfaces to NDI trackers. More...
Public Member Functions | |
mitkClassMacroItkParent (NDITracker, itk::Object) virtual int GetPreferredFramesPerSecond() | |
virtual std::map< std::string, vtkSmartPointer< vtkMatrix4x4 > > | GetTrackingData ()=0 |
Retrives the current tracking data. More... | |
void | SetVisibilityOfTrackingVolume (bool isVisible) |
Set the tracking volume visible or invisible. More... | |
bool | GetVisibilityOfTrackingVolume () const |
Get the visibility flag for the tracking volume. More... | |
Protected Member Functions | |
NDITracker (mitk::DataStorage::Pointer dataStorage, std::string portName, mitk::TrackingDeviceData deviceData, std::string toolConfigFileName, int preferredFramesPerSecond) | |
virtual | ~NDITracker () |
NDITracker (const NDITracker &) | |
NDITracker & | operator= (const NDITracker &) |
Protected Attributes | |
mitk::DataStorage::Pointer | m_DataStorage |
std::string | m_PortName |
mitk::TrackingDeviceData | m_DeviceData |
std::string | m_ToolConfigFileName |
int | m_PreferredFramesPerSecond |
mitk::NavigationToolStorage::Pointer | m_NavigationToolStorage |
mitk::TrackingVolumeGenerator::Pointer | m_TrackingVolumeGenerator |
mitk::DataNode::Pointer | m_TrackingVolumeNode |
Base class for NifTK interfaces to NDI trackers.
The main design point is that tracking starts during the constructor, and stops during the destructor. All errors are thrown as mitk::Exception. Then you repeatedly call GetTrackingData(). This class does not do threading. It is assumed that the calling client can manage buffers of matrices, threading etc. This thing just grabs the latest tracking matrices each time you you call GetTrackingData().
|
protected |
|
protectedvirtual |
|
protected |
|
pure virtual |
Retrives the current tracking data.
Given that errors are thrown during construction, (like RAII pattern), then once the constructor is complete we can assume that the tracker is valid.
Therefore we repeated call this method. If a tool is not visible, nothing for that tool will be returned. So, this will return a varying number of items, depending on how many tools are visible to the tracker. So zero items returned is a valid output.
bool niftk::NDITracker::GetVisibilityOfTrackingVolume | ( | ) | const |
Get the visibility flag for the tracking volume.
niftk::NDITracker::mitkClassMacroItkParent | ( | NDITracker | , |
itk::Object | |||
) |
|
protected |
void niftk::NDITracker::SetVisibilityOfTrackingVolume | ( | bool | isVisible | ) |
Set the tracking volume visible or invisible.
Each tracker loads a tracking volume for visualisation purposes.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |