PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
vtkPlusNDITracker Class Reference

Interface class for Northern Digital's tracking devices. More...

#include <src/PlusDataCollection/NDICAPITracking/vtkPlusNDITracker.h>

Inheritance diagram for vtkPlusNDITracker:
Inheritance graph
[legend]
Collaboration diagram for vtkPlusNDITracker:
Collaboration graph
[legend]

Public Types

enum  LedState { TR_LED_OFF = 0, TR_LED_ON = 1, TR_LED_FLASH = 2 }
 
typedef vtkPlusDevice Superclass
 
- Public Types inherited from vtkPlusDevice
typedef vtkImageAlgorithm Superclass
 

Public Member Functions

std::string Command (const char *format,...)
 
virtual int GetBaudRate ()
 
virtual bool GetCheckDSR ()
 
virtual const char * GetClassName ()
 
virtual int GetHardwareDataAveragingDepth ()
 
virtual int GetMeasurementVolumeNumber ()
 
virtual int GetNetworkPort ()
 
virtual std::string GetSdkVersion ()
 
virtual int GetSerialPort ()
 
virtual int GetTrackingFrequencyNumber ()
 
PlusStatus InternalUpdate ()
 
virtual int IsA (const char *type)
 
virtual bool IsTracker () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
PlusStatus Probe ()
 
virtual PlusStatus ReadConfiguration (vtkXMLDataElement *config)
 
virtual void SetBaudRate (int)
 
virtual void SetCheckDSR (bool)
 
virtual void SetHardwareDataAveragingDepth (int)
 
virtual void SetMeasurementVolumeNumber (int)
 
virtual void SetNetworkPort (int)
 
virtual void SetSerialPort (int)
 
PlusStatus SetToolLED (const char *portName, int led, LedState state)
 
virtual void SetTrackingFrequencyNumber (int)
 
 vtkGetStdStringMacro (NetworkHostname)
 
 vtkSetStdStringMacro (NetworkHostname)
 
virtual PlusStatus WriteConfiguration (vtkXMLDataElement *config)
 
- Public Member Functions inherited from vtkPlusDevice
PlusStatus AddFieldDataSource (vtkPlusDataSource *aSource)
 
PlusStatus AddInputChannel (vtkPlusChannel *aChannel)
 
PlusStatus AddOutputChannel (vtkPlusChannel *aChannel)
 
PlusStatus AddTool (vtkPlusDataSource *tool, bool requireUniquePortName=true)
 
PlusStatus AddVideoSource (vtkPlusDataSource *anImage)
 
void ClearAllBuffers ()
 
virtual PlusStatus Connect ()
 
virtual PlusStatus CreateDefaultOutputChannel (const char *channelId=NULL, bool addSource=true)
 
void DeepCopy (const vtkPlusDevice &device)
 
virtual PlusStatus Disconnect ()
 
virtual PlusStatus ForceUpdate ()
 
virtual double GetAcquisitionRate () const
 
virtual PlusStatus GetBufferSize (vtkPlusChannel &aChannel, int &outVal, const std::string &aSourceId=std::string(""))
 
virtual int GetConnected () const
 
virtual bool GetCorrectlyConfigured () const
 
PlusStatus GetDataSource (const char *aSourceId, vtkPlusDataSource *&aSource)
 
PlusStatus GetDataSource (const std::string &aSourceId, vtkPlusDataSource *&aSource)
 
virtual double GetDesiredTimestamp ()
 
virtual std::string GetDeviceId () const
 
PlusStatus GetFieldDataSource (const char *aSourceId, vtkPlusDataSource *&aSource) const
 
PlusStatus GetFieldDataSource (const std::string &aSourceId, vtkPlusDataSource *&aSource) const
 
DataSourceContainerConstIterator GetFieldDataSourcessIteratorBegin () const
 
DataSourceContainerConstIterator GetFieldDataSourcessIteratorEnd () const
 
PlusStatus GetFirstActiveOutputVideoSource (vtkPlusDataSource *&aVideoSource)
 
PlusStatus GetFirstActiveTool (vtkPlusDataSource *&aTool) const
 
PlusStatus GetFirstOutputChannel (vtkPlusChannel *&aChannel)
 
PlusStatus GetFirstVideoSource (vtkPlusDataSource *&anImage)
 
virtual unsigned long GetFrameNumber () const
 
virtual double GetFrameTimeStamp () const
 
virtual PlusStatus GetImage (const std::string &requestedImageId, std::string &assignedImageId, const std::string &imageReferencFrameName, vtkImageData *imageData, vtkMatrix4x4 *ijkToReferenceTransform)
 
virtual PlusStatus GetImageMetaData (igsioCommon::ImageMetaDataList &imageMetaDataItems)
 
virtual US_IMAGE_TYPE GetImageType (vtkPlusChannel &aChannel)
 
PlusStatus GetInputDevices (std::vector< vtkPlusDevice * > &outDeviceList) const
 
PlusStatus GetInputDevicesRecursive (std::vector< vtkPlusDevice * > &outDeviceList) const
 
virtual PlusStatus GetInputFrameSize (vtkPlusChannel &aChannel, unsigned int &x, unsigned int &y, unsigned int &z) const
 
virtual PlusStatus GetInputFrameSize (vtkPlusChannel &aChannel, FrameSizeType &dim) const
 
double GetInternalUpdateRate () const
 
virtual double GetLocalTimeOffsetSec () const
 
double GetMissingInputGracePeriodSec () const
 
virtual int GetNumberOfFieldDataSources () const
 
virtual int GetNumberOfTools () const
 
virtual int GetNumberOfVideoSources () const
 
PlusStatus GetOutputChannelByName (vtkPlusChannel *&aChannel, const char *aChannelId)
 
PlusStatus GetOutputChannelByName (vtkPlusChannel *&aChannel, const std::string &aChannelId)
 
ChannelContainerConstIterator GetOutputChannelsEnd () const
 
ChannelContainerIterator GetOutputChannelsEnd ()
 
ChannelContainerConstIterator GetOutputChannelsStart () const
 
ChannelContainerIterator GetOutputChannelsStart ()
 
virtual PlusStatus GetOutputFrameSize (vtkPlusChannel &aChannel, unsigned int &x, unsigned int &y, unsigned int &z) const
 
virtual PlusStatus GetOutputFrameSize (vtkPlusChannel &aChannel, FrameSizeType &dim) const
 
virtual std::string GetParameter (const std::string &key) const
 
virtual PlusStatus GetParameter (const std::string &key, std::string &outValue) const
 
virtual igsioCommon::VTKScalarPixelType GetPixelType (vtkPlusChannel &aChannel)
 
virtual double GetStartTime ()
 
virtual double GetTimestampClosestToDesired ()
 
PlusStatus GetTool (const char *aToolSourceId, vtkPlusDataSource *&aTool) const
 
PlusStatus GetTool (const std::string &aToolSourceId, vtkPlusDataSource *&aTool) const
 
PlusStatus GetToolByPortName (const char *aPortName, vtkPlusDataSource *&aSource)
 
PlusStatus GetToolByPortName (const std::string &aPortName, vtkPlusDataSource *&aSource)
 
DataSourceContainerConstIterator GetToolIteratorBegin () const
 
DataSourceContainerConstIterator GetToolIteratorEnd () const
 
std::string GetToolReferenceFrameName () const
 
virtual int GetUpdateWithDesiredTimestamp ()
 
PlusStatus GetVideoSource (const char *aSourceId, vtkPlusDataSource *&aVideoSource)
 
PlusStatus GetVideoSourceByIndex (const unsigned int index, vtkPlusDataSource *&aVideoSource)
 
DataSourceContainerConstIterator GetVideoSourceIteratorBegin () const
 
DataSourceContainerConstIterator GetVideoSourceIteratorEnd () const
 
std::vector< vtkPlusDataSource * > GetVideoSources () const
 
PlusStatus GetVideoSourcesByPortName (const char *aPortName, std::vector< vtkPlusDataSource * > &sources)
 
PlusStatus GetVideoSourcesByPortName (const std::string &aPortName, std::vector< vtkPlusDataSource * > &sources)
 
virtual bool IsConnected () const
 
virtual bool IsRecording () const
 
virtual bool IsResettable ()
 
virtual bool IsVirtual () const
 
virtual PlusStatus NotifyConfigured ()
 
virtual int OutputChannelCount () const
 
virtual int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *)
 
virtual PlusStatus Reset ()
 
virtual PlusStatus SendText (const std::string &textToSend, std::string *textReceived=NULL)
 
PlusStatus SetAcquisitionRate (double aRate)
 
virtual PlusStatus SetBufferSize (vtkPlusChannel &aChannel, int FrameBufferSize, const std::string &aSourceId=std::string(""))
 
virtual void SetDataCollector (vtkPlusDataCollector *_arg)
 
virtual void SetDesiredTimestamp (double)
 
void SetDeviceId (const std::string &id)
 
void SetFieldDataSourcesBufferSize (int aBufferSize)
 
virtual PlusStatus SetImageType (vtkPlusChannel &aChannel, US_IMAGE_TYPE imageType)
 
virtual PlusStatus SetInputFrameSize (vtkPlusDataSource &aSource, unsigned int x, unsigned int y, unsigned int z)
 
virtual void SetLocalTimeOffsetSec (double aTimeOffsetSec)
 
virtual void SetMissingInputGracePeriodSec (double)
 
virtual PlusStatus SetParameter (const std::string &key, const std::string &value)
 
virtual PlusStatus SetPixelType (vtkPlusChannel &aChannel, igsioCommon::VTKScalarPixelType pixelType)
 
virtual void SetStartTime (double startTime)
 
void SetToolReferenceFrameName (const std::string &frameName)
 
void SetToolsBufferSize (int aBufferSize)
 
virtual void SetUpdateWithDesiredTimestamp (int)
 
virtual PlusStatus StartRecording ()
 
virtual PlusStatus StopRecording ()
 
virtual void UpdateWithDesiredTimestampOff ()
 
virtual void UpdateWithDesiredTimestampOn ()
 
virtual PlusStatus WriteToolsToSequenceFile (const std::string &filename, bool useCompression=false)
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkPlusNDITrackerNew ()
 
static vtkPlusNDITrackerSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkPlusDevice
static PlusStatus GetToolReferenceFrameFromTrackedFrame (igsioTrackedFrame &aFrame, std::string &aToolReferenceFrameName)
 
static int IsTypeOf (const char *type)
 
static vtkPlusDeviceNew ()
 
static vtkPlusDeviceSafeDownCast (vtkObject *o)
 

Protected Member Functions

PlusStatus Beep (int n)
 
PlusStatus ClearVirtualSromInTracker (NdiToolDescriptor &toolDescriptor)
 
PlusStatus CloseDevice (ndicapi *&device)
 
void DisableToolPorts ()
 
PlusStatus DoBX2Update ()
 
PlusStatus DoBXUpdate ()
 
PlusStatus EnableToolPorts ()
 
virtual uint32_t GetFirmwareMajorRevision ()
 
virtual uint32_t GetFirmwareMinorRevision ()
 
PlusStatus GetFirmwareRevision ()
 
PlusStatus InternalConnect ()
 
PlusStatus InternalConnectNetwork ()
 
PlusStatus InternalConnectSerial ()
 
PlusStatus InternalDisconnect ()
 
PlusStatus InternalStartRecording ()
 
PlusStatus InternalStopRecording ()
 
void LogVolumeList (int selectedVolume, vtkPlusLogger::LogLevelType logLevel)
 
void LogVolumeListSFLIST (unsigned int numVolumes, int selectedVolume, vtkPlusLogger::LogLevelType logLevel)
 
PlusStatus ReadSromFromFile (NdiToolDescriptor &toolDescriptor, const char *filename)
 
PlusStatus SelectDataAveraging ()
 
PlusStatus SelectMeasurementVolume ()
 
PlusStatus SelectMeasurementVolumeDeprecated ()
 
PlusStatus SelectTrackingFrequency ()
 
PlusStatus SelectTrackingFrequencyDeprecated ()
 
PlusStatus SendSromToTracker (const NdiToolDescriptor &toolDescriptor)
 
PlusStatus UpdatePortHandle (NdiToolDescriptor &toolDescriptor)
 
 vtkPlusNDITracker ()
 
 ~vtkPlusNDITracker ()
 
- Protected Member Functions inherited from vtkPlusDevice
virtual PlusStatus AddVideoItemToVideoSources (const std::vector< vtkPlusDataSource * > &videoSources, const igsioVideoFrame &frame, long frameNumber, double unfilteredTimestamp=UNDEFINED_TIMESTAMP, double filteredTimestamp=UNDEFINED_TIMESTAMP, const igsioFieldMapType *customFields=NULL)
 
virtual PlusStatus AddVideoItemToVideoSources (const std::vector< vtkPlusDataSource * > &videoSources, void *imageDataPtr, US_IMAGE_ORIENTATION usImageOrientation, const FrameSizeType &frameSizeInPx, igsioCommon::VTKScalarPixelType pixelType, unsigned int numberOfScalarComponents, US_IMAGE_TYPE imageType, int numberOfBytesToSkip, long frameNumber, double unfilteredTimestamp=UNDEFINED_TIMESTAMP, double filteredTimestamp=UNDEFINED_TIMESTAMP, const igsioFieldMapType *customFields=NULL)
 
PlusStatus EnsureUniqueDataSourceId (const std::string &aSourceId)
 
vtkXMLDataElement * FindInputChannelElement (vtkXMLDataElement *rootXMLElement, const char *aChannelId)
 
vtkXMLDataElement * FindOutputChannelElement (vtkXMLDataElement *rootXMLElement, const char *aChannelId)
 
vtkXMLDataElement * FindThisDeviceElement (vtkXMLDataElement *rootXMLElement)
 
virtual vtkPlusDataCollectorGetDataCollector ()
 
double GetRecordingStartTime () const
 
bool GetStartThreadForInternalUpdates () const
 
bool HasGracePeriodExpired ()
 
virtual void InternalWriteInputChannels (vtkXMLDataElement *rootXMLElement)
 
virtual void InternalWriteOutputChannels (vtkXMLDataElement *rootXMLElement)
 
virtual void SetCorrectlyConfigured (bool)
 
virtual void SetRecordingStartTime (double)
 
virtual void SetStartThreadForInternalUpdates (bool)
 
virtual PlusStatus ToolTimeStampedUpdate (const std::string &aToolSourceId, vtkMatrix4x4 *matrix, ToolStatus status, unsigned long frameNumber, double unfilteredtimestamp, const igsioFieldMapType *customFields=NULL)
 
virtual PlusStatus ToolTimeStampedUpdateWithoutFiltering (const std::string &aToolSourceId, vtkMatrix4x4 *matrix, ToolStatus status, double unfilteredtimestamp, double filteredtimestamp, const igsioFieldMapType *customFields=NULL)
 
 vtkPlusDevice ()
 
virtual ~vtkPlusDevice ()
 

Static Protected Member Functions

static int ConvertBaudToNDIEnum (int baudRate)
 
- Static Protected Member Functions inherited from vtkPlusDevice
static void * vtkDataCaptureThread (vtkMultiThreader::ThreadInfo *data)
 

Protected Attributes

int BaudRate
 
bool CheckDSR
 
vtkIGSIORecursiveCriticalSection * CommandMutex
 
char CommandReply [VTK_NDI_REPLY_LEN]
 
ndicapi * Device
 
uint32_t FirmwareMajorRevision
 
uint32_t FirmwareMinorRevision
 
int HardwareDataAveragingDepth
 
int IsDeviceTracking
 
unsigned long LastFrameNumber
 
bool LeaveDeviceOpenAfterProbe
 
int MeasurementVolumeNumber
 
NdiToolDescriptorsType NdiToolDescriptors
 
std::string NetworkHostname
 
int NetworkPort
 
std::string SerialDevice
 
int SerialPort
 
int TrackingFrequencyNumber
 
- Protected Attributes inherited from vtkPlusDevice
double AcquisitionRate
 
int Connected
 
bool CorrectlyConfigured
 
StreamBufferItemCurrentStreamBufferItem
 
vtkPlusDataCollectorDataCollector
 
double DesiredTimestamp
 
std::string DeviceId
 
DataSourceContainer Fields
 
unsigned long FrameNumber
 
double FrameTimeStamp
 
ChannelContainer InputChannels
 
double LocalTimeOffsetSec
 
double MissingInputGracePeriodSec
 
ChannelContainer OutputChannels
 
int OutputNeedsInitialization
 
std::map< std::string, std::string > Parameters
 
int Recording
 
double RecordingStartTime
 
std::set< std::string > ReportedUnknownTools
 
bool RequireImageOrientationInConfiguration
 
bool RequirePortNameInDeviceSetConfiguration
 
bool StartThreadForInternalUpdates
 
bool ThreadAlive
 
vtkMultiThreader * Threader
 
int ThreadId
 
double TimestampClosestToDesired
 
std::string ToolReferenceFrameName
 
DataSourceContainer Tools
 
int UpdateWithDesiredTimestamp
 
DataSourceContainer VideoSources
 

Additional Inherited Members

- Public Attributes inherited from vtkPlusDevice
double InternalUpdateRate
 
vtkIGSIORecursiveCriticalSection * UpdateMutex
 
vtkTimeStamp UpdateTime
 
- Static Public Attributes inherited from vtkPlusDevice
static const std::string BMODE_PORT_NAME = "B"
 
static const std::string PARAMETER_XML_ELEMENT_TAG = "Parameter"
 
static const std::string PARAMETERS_XML_ELEMENT_TAG = "Parameters"
 
static const std::string RFMODE_PORT_NAME = "Rf"
 
- Static Protected Attributes inherited from vtkPlusDevice
static const int VIRTUAL_DEVICE_FRAME_RATE = 50
 

Detailed Description

Interface class for Northern Digital's tracking devices.

The vtkPlusNDITracker class provides an interface to the AURORA and POLARIS (Northern Digital Inc., Waterloo, Canada) using the new "combined API" and should also support all newer NDI tracking devices. Any POLARIS systems purchased before 2002 will not support the combined API.

For active (wired) tools specify PortName attribute. For example, PortName="0" is the first port, PortName="1" is the second, etc.

If multi-channel tools are used then the PortName is <ChannelNumber><PortNumber>, for example for two 5-DOF sensors plugged into the first connector: PortName="0" and PortName="100", for two 5-DOF sensors plugged into the second connector: PortName="1" and PortName="101".

For passive (wireless) tools specify RomFile attribute. For example, RomFile="NdiToolDefinitions/8700339.rom".

Important notes on the data collection rate of the Polaris:

The camera frame rate is 60Hz, and therefore the maximum data collection rate is also 60Hz. The maximum data transfer rate to the computer is also 60Hz.

Depending on the number of enabled tools, the data collection rate might be reduced. Each of the active tools requires one camera frame, and all the passive tools (if any are enabled) collectively require one camera frame.

Therefore if there are two enabled active tools, the data rate is reduced to 30Hz. Ditto for an active tool and a passive tool. If all tools are passive, the data rate is 60Hz. With 3 active tools and one or more passive tools, the data rate is 15Hz. With 3 active tools, or 2 active and one or more passive tools, the data rate is 20Hz.

The data transfer rate to the computer is independent of the data collection rate, and there might be duplicated records. The data transfer rate is limited by the speed of the serial port and by the number of characters sent per data record. If tools are marked as 'missing' then the number of characters that are sent will be reduced.

Definition at line 102 of file vtkPlusNDITracker.h.

Member Typedef Documentation

◆ Superclass

Definition at line 117 of file vtkPlusNDITracker.h.

Member Enumeration Documentation

◆ LedState

Flags for tool LEDs

Enumerator
TR_LED_OFF 
TR_LED_ON 
TR_LED_FLASH 

Definition at line 121 of file vtkPlusNDITracker.h.

Constructor & Destructor Documentation

◆ vtkPlusNDITracker()

vtkPlusNDITracker::vtkPlusNDITracker ( )
protected

Definition at line 85 of file vtkPlusNDITracker.cxx.

◆ ~vtkPlusNDITracker()

vtkPlusNDITracker::~vtkPlusNDITracker ( )
protected

Definition at line 113 of file vtkPlusNDITracker.cxx.

Member Function Documentation

◆ Beep()

PlusStatus vtkPlusNDITracker::Beep ( int  n)
protected

Cause the device to beep the specified number of times

Definition at line 834 of file vtkPlusNDITracker.cxx.

◆ ClearVirtualSromInTracker()

PlusStatus vtkPlusNDITracker::ClearVirtualSromInTracker ( NdiToolDescriptor &  toolDescriptor)
protected

This is a low-level method for loading a virtual SROM. You must halt the tracking thread and take the device out of tracking mode before you use it.

Definition at line 983 of file vtkPlusNDITracker.cxx.

◆ CloseDevice()

PlusStatus vtkPlusNDITracker::CloseDevice ( ndicapi *&  device)
protected

Intelligently detect which connection is used and close it

Definition at line 1286 of file vtkPlusNDITracker.cxx.

◆ Command()

std::string vtkPlusNDITracker::Command ( const char *  format,
  ... 
)

Send a command to the NDI in the format INIT: or VER:0 (the command should include a colon). Commands can only be done after either Probe() or StartTracking() has been called. The text reply from the NDI is returned, without the CRC or final carriage return.

Definition at line 246 of file vtkPlusNDITracker.cxx.

◆ ConvertBaudToNDIEnum()

int vtkPlusNDITracker::ConvertBaudToNDIEnum ( int  baudRate)
staticprotected

Lookup table function to convert from baudrate to enum

Definition at line 1522 of file vtkPlusNDITracker.cxx.

◆ DisableToolPorts()

void vtkPlusNDITracker::DisableToolPorts ( )
protected

Methods for detecting which ports have tools in them, and auto-enabling those tools.

Definition at line 788 of file vtkPlusNDITracker.cxx.

◆ DoBX2Update()

PlusStatus vtkPlusNDITracker::DoBX2Update ( )
protected

Perform a frame parse from a BX2 request

Definition at line 1654 of file vtkPlusNDITracker.cxx.

◆ DoBXUpdate()

PlusStatus vtkPlusNDITracker::DoBXUpdate ( )
protected

Perform a frame parse from a BX request

Definition at line 1550 of file vtkPlusNDITracker.cxx.

◆ EnableToolPorts()

PlusStatus vtkPlusNDITracker::EnableToolPorts ( )
protected

Methods for detecting which ports have tools in them, and auto-enabling those tools.

Definition at line 585 of file vtkPlusNDITracker.cxx.

◆ GetBaudRate()

virtual int vtkPlusNDITracker::GetBaudRate ( )
virtual

◆ GetCheckDSR()

virtual bool vtkPlusNDITracker::GetCheckDSR ( )
virtual

◆ GetClassName()

virtual const char* vtkPlusNDITracker::GetClassName ( )
virtual

Reimplemented from vtkPlusDevice.

◆ GetFirmwareMajorRevision()

virtual uint32_t vtkPlusNDITracker::GetFirmwareMajorRevision ( )
protectedvirtual

◆ GetFirmwareMinorRevision()

virtual uint32_t vtkPlusNDITracker::GetFirmwareMinorRevision ( )
protectedvirtual

◆ GetFirmwareRevision()

PlusStatus vtkPlusNDITracker::GetFirmwareRevision ( )
protected

Determine the firmware version of the device

Definition at line 347 of file vtkPlusNDITracker.cxx.

◆ GetHardwareDataAveragingDepth()

virtual int vtkPlusNDITracker::GetHardwareDataAveragingDepth ( )
virtual

◆ GetMeasurementVolumeNumber()

virtual int vtkPlusNDITracker::GetMeasurementVolumeNumber ( )
virtual

◆ GetNetworkPort()

virtual int vtkPlusNDITracker::GetNetworkPort ( )
virtual

◆ GetSdkVersion()

std::string vtkPlusNDITracker::GetSdkVersion ( )
virtual

Hardware device SDK version.

Reimplemented from vtkPlusDevice.

Definition at line 160 of file vtkPlusNDITracker.cxx.

◆ GetSerialPort()

virtual int vtkPlusNDITracker::GetSerialPort ( )
virtual

◆ GetTrackingFrequencyNumber()

virtual int vtkPlusNDITracker::GetTrackingFrequencyNumber ( )
virtual

◆ InternalConnect()

PlusStatus vtkPlusNDITracker::InternalConnect ( )
protectedvirtual

Connect to the tracker hardware

Reimplemented from vtkPlusDevice.

Definition at line 312 of file vtkPlusNDITracker.cxx.

◆ InternalConnectNetwork()

PlusStatus vtkPlusNDITracker::InternalConnectNetwork ( )
protected

Definition at line 457 of file vtkPlusNDITracker.cxx.

◆ InternalConnectSerial()

PlusStatus vtkPlusNDITracker::InternalConnectSerial ( )
protected

Definition at line 391 of file vtkPlusNDITracker.cxx.

◆ InternalDisconnect()

PlusStatus vtkPlusNDITracker::InternalDisconnect ( )
protectedvirtual

Disconnect from the tracker hardware

Reimplemented from vtkPlusDevice.

Definition at line 479 of file vtkPlusNDITracker.cxx.

◆ InternalStartRecording()

PlusStatus vtkPlusNDITracker::InternalStartRecording ( )
protectedvirtual

Start the tracking system. The tracking system is brought from its ground state into full tracking mode. The device will only be reset if communication cannot be established without a reset.

Reimplemented from vtkPlusDevice.

Definition at line 502 of file vtkPlusNDITracker.cxx.

◆ InternalStopRecording()

PlusStatus vtkPlusNDITracker::InternalStopRecording ( )
protectedvirtual

Stop the tracking system and bring it back to its ground state: Initialized, not tracking, at 9600 Baud.

Reimplemented from vtkPlusDevice.

Definition at line 524 of file vtkPlusNDITracker.cxx.

◆ InternalUpdate()

PlusStatus vtkPlusNDITracker::InternalUpdate ( )
virtual

Get an update from the tracking system and push the new transforms to the tools. This should only be used within vtkTracker.cxx.

Reimplemented from vtkPlusDevice.

Definition at line 543 of file vtkPlusNDITracker.cxx.

◆ IsA()

virtual int vtkPlusNDITracker::IsA ( const char *  type)
virtual

Reimplemented from vtkPlusDevice.

◆ IsTracker()

virtual bool vtkPlusNDITracker::IsTracker ( ) const
inlinevirtual

Is this device a tracker

Reimplemented from vtkPlusDevice.

Definition at line 128 of file vtkPlusNDITracker.h.

◆ IsTypeOf()

static int vtkPlusNDITracker::IsTypeOf ( const char *  type)
static

◆ LogVolumeList()

void vtkPlusNDITracker::LogVolumeList ( int  selectedVolume,
vtkPlusLogger::LogLevelType  logLevel 
)
protected

Parse and log available volume list response

Definition at line 1129 of file vtkPlusNDITracker.cxx.

◆ LogVolumeListSFLIST()

void vtkPlusNDITracker::LogVolumeListSFLIST ( unsigned int  numVolumes,
int  selectedVolume,
vtkPlusLogger::LogLevelType  logLevel 
)
protected

Definition at line 1195 of file vtkPlusNDITracker.cxx.

◆ New()

static vtkPlusNDITracker* vtkPlusNDITracker::New ( )
static

◆ PrintSelf()

void vtkPlusNDITracker::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Reimplemented from vtkPlusDevice.

Definition at line 129 of file vtkPlusNDITracker.cxx.

◆ Probe()

PlusStatus vtkPlusNDITracker::Probe ( )
virtual

Probe to see if the tracking system is present on the specified serial port. If the SerialPort is set to -1, then all serial ports will be checked.

Reimplemented from vtkPlusDevice.

Definition at line 168 of file vtkPlusNDITracker.cxx.

◆ ReadConfiguration()

PlusStatus vtkPlusNDITracker::ReadConfiguration ( vtkXMLDataElement *  config)
virtual

Read NDI tracker configuration from xml data

Reimplemented from vtkPlusDevice.

Definition at line 999 of file vtkPlusNDITracker.cxx.

◆ ReadSromFromFile()

PlusStatus vtkPlusNDITracker::ReadSromFromFile ( NdiToolDescriptor &  toolDescriptor,
const char *  filename 
)
protected

Read a virtual SROM from file and store it in the tool descriptor

Definition at line 564 of file vtkPlusNDITracker.cxx.

◆ SafeDownCast()

static vtkPlusNDITracker* vtkPlusNDITracker::SafeDownCast ( vtkObject *  o)
static

◆ SelectDataAveraging()

PlusStatus vtkPlusNDITracker::SelectDataAveraging ( )
protected

Enable/disable data averaging and calculate the new necessary timeout

Definition at line 1439 of file vtkPlusNDITracker.cxx.

◆ SelectMeasurementVolume()

PlusStatus vtkPlusNDITracker::SelectMeasurementVolume ( )
protected

Select the measurement volume, fallback to deprecated

Definition at line 1302 of file vtkPlusNDITracker.cxx.

◆ SelectMeasurementVolumeDeprecated()

PlusStatus vtkPlusNDITracker::SelectMeasurementVolumeDeprecated ( )
protected

Select the measurement volume using deprecated commands Only used if newer commands are not supported by a device

Definition at line 1344 of file vtkPlusNDITracker.cxx.

◆ SelectTrackingFrequency()

PlusStatus vtkPlusNDITracker::SelectTrackingFrequency ( )
protected

Select the tracking frequency, fallback to deprecated

Definition at line 1359 of file vtkPlusNDITracker.cxx.

◆ SelectTrackingFrequencyDeprecated()

PlusStatus vtkPlusNDITracker::SelectTrackingFrequencyDeprecated ( )
protected

Select the tracking frequency using deprecated commands Only used if newer commands are not supported by a device

Definition at line 1425 of file vtkPlusNDITracker.cxx.

◆ SendSromToTracker()

PlusStatus vtkPlusNDITracker::SendSromToTracker ( const NdiToolDescriptor &  toolDescriptor)
protected

This is a low-level method for loading a virtual SROM. You must halt the tracking thread and take the device out of tracking mode before you use it. This call also sets the port handle in the descriptor.

Definition at line 951 of file vtkPlusNDITracker.cxx.

◆ SetBaudRate()

virtual void vtkPlusNDITracker::SetBaudRate ( int  )
virtual

Set the desired baud rate. Default: 9600.

◆ SetCheckDSR()

virtual void vtkPlusNDITracker::SetCheckDSR ( bool  )
virtual

◆ SetHardwareDataAveragingDepth()

virtual void vtkPlusNDITracker::SetHardwareDataAveragingDepth ( int  )
virtual

◆ SetMeasurementVolumeNumber()

virtual void vtkPlusNDITracker::SetMeasurementVolumeNumber ( int  )
virtual

Measurement volume number. It can be used for defining volume type (dome, cube) and size. Default is 0, which means that the default volume is used. First valid volume number is 1. If an invalid value is set (for example -1) then a list of available volumes is logged. See VSEL command in the NDI API documentation for details.

◆ SetNetworkPort()

virtual void vtkPlusNDITracker::SetNetworkPort ( int  )
virtual

◆ SetSerialPort()

virtual void vtkPlusNDITracker::SetSerialPort ( int  )
virtual

Set which serial port to use, 1 through 4

◆ SetToolLED()

PlusStatus vtkPlusNDITracker::SetToolLED ( const char *  portName,
int  led,
LedState  state 
)

Set the specified tool LED to the specified state

Definition at line 856 of file vtkPlusNDITracker.cxx.

◆ SetTrackingFrequencyNumber()

virtual void vtkPlusNDITracker::SetTrackingFrequencyNumber ( int  )
virtual

Tracking frequency number. It can be used for changing the frequency at which tools are tracked. Default is 0, i.e. the tracking frequency is 1/3 of the frame frequency. 1 makes the tracking frequency 1/2 of the frame frequency. 2 makes the tracking frequency match the frame frequency. See IRATE command in the NDI API documentation for details.

◆ UpdatePortHandle()

PlusStatus vtkPlusNDITracker::UpdatePortHandle ( NdiToolDescriptor &  toolDescriptor)
protected

Sets the port handle in the descriptor. For wired tools it iterates through the existing connections, for wireless tools it requests a new handle.

Definition at line 900 of file vtkPlusNDITracker.cxx.

◆ vtkGetStdStringMacro()

vtkPlusNDITracker::vtkGetStdStringMacro ( NetworkHostname  )

◆ vtkSetStdStringMacro()

vtkPlusNDITracker::vtkSetStdStringMacro ( NetworkHostname  )

◆ WriteConfiguration()

PlusStatus vtkPlusNDITracker::WriteConfiguration ( vtkXMLDataElement *  config)
virtual

Read NDI tracker configuration from xml data

Reimplemented from vtkPlusDevice.

Definition at line 1092 of file vtkPlusNDITracker.cxx.

Member Data Documentation

◆ BaudRate

int vtkPlusNDITracker::BaudRate
protected

Definition at line 334 of file vtkPlusNDITracker.h.

◆ CheckDSR

bool vtkPlusNDITracker::CheckDSR
protected

Definition at line 338 of file vtkPlusNDITracker.h.

◆ CommandMutex

vtkIGSIORecursiveCriticalSection* vtkPlusNDITracker::CommandMutex
protected

Definition at line 340 of file vtkPlusNDITracker.h.

◆ CommandReply

char vtkPlusNDITracker::CommandReply[VTK_NDI_REPLY_LEN]
protected

Definition at line 341 of file vtkPlusNDITracker.h.

◆ Device

ndicapi* vtkPlusNDITracker::Device
protected

Definition at line 331 of file vtkPlusNDITracker.h.

◆ FirmwareMajorRevision

uint32_t vtkPlusNDITracker::FirmwareMajorRevision
protected

Definition at line 342 of file vtkPlusNDITracker.h.

◆ FirmwareMinorRevision

uint32_t vtkPlusNDITracker::FirmwareMinorRevision
protected

Definition at line 343 of file vtkPlusNDITracker.h.

◆ HardwareDataAveragingDepth

int vtkPlusNDITracker::HardwareDataAveragingDepth
protected

Definition at line 344 of file vtkPlusNDITracker.h.

◆ IsDeviceTracking

int vtkPlusNDITracker::IsDeviceTracking
protected

Definition at line 335 of file vtkPlusNDITracker.h.

◆ LastFrameNumber

unsigned long vtkPlusNDITracker::LastFrameNumber
protected

Definition at line 327 of file vtkPlusNDITracker.h.

◆ LeaveDeviceOpenAfterProbe

bool vtkPlusNDITracker::LeaveDeviceOpenAfterProbe
protected

Definition at line 337 of file vtkPlusNDITracker.h.

◆ MeasurementVolumeNumber

int vtkPlusNDITracker::MeasurementVolumeNumber
protected

Definition at line 336 of file vtkPlusNDITracker.h.

◆ NdiToolDescriptors

NdiToolDescriptorsType vtkPlusNDITracker::NdiToolDescriptors
protected

Definition at line 339 of file vtkPlusNDITracker.h.

◆ NetworkHostname

std::string vtkPlusNDITracker::NetworkHostname
protected

Definition at line 346 of file vtkPlusNDITracker.h.

◆ NetworkPort

int vtkPlusNDITracker::NetworkPort
protected

Definition at line 347 of file vtkPlusNDITracker.h.

◆ SerialDevice

std::string vtkPlusNDITracker::SerialDevice
protected

Definition at line 332 of file vtkPlusNDITracker.h.

◆ SerialPort

int vtkPlusNDITracker::SerialPort
protected

Definition at line 333 of file vtkPlusNDITracker.h.

◆ TrackingFrequencyNumber

int vtkPlusNDITracker::TrackingFrequencyNumber
protected

Definition at line 348 of file vtkPlusNDITracker.h.


The documentation for this class was generated from the following files: