Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Connects a mitk::TrackingDevice to a MITK-IGT NavigationData-Filterpipeline. More...
#include <mitkTrackingDeviceSource.h>
Public Member Functions | |
mitkClassMacro (TrackingDeviceSource, NavigationDataSource) | |
Pointer | Clone () const |
virtual void | SetTrackingDevice (mitk::TrackingDevice *td) |
sets the tracking device that will be used as a source for tracking data More... | |
virtual const mitk::TrackingDevice * | GetTrackingDevice () |
returns the tracking device that is used by this filter More... | |
void | Connect () |
Establishes a connection to the tracking device. If there is already a connection the method does nothing. More... | |
void | Disconnect () |
Closes the connection to the tracking device. More... | |
void | StartTracking () |
starts tracking. This needs to be called before Update() or GetOutput()->Update(). If the device is already tracking the method does nothing. More... | |
void | StopTracking () |
stops tracking. More... | |
virtual bool | IsConnected () |
returns true if a connection to the tracking device is established More... | |
virtual bool | IsTracking () |
returns true if tracking is in progress More... | |
virtual void | UpdateOutputInformation () override |
Used for pipeline update. More... | |
Public Member Functions inherited from mitk::NavigationDataSource | |
mitkClassMacroItkParent (NavigationDataSource, itk::ProcessObject) | |
virtual std::string | GetName () |
virtual void | SetName (std::string _arg) |
Sets the human readable name of this source. There is also a default name, but you can use this method if you need to define it on your own. More... | |
NavigationData * | GetOutput (void) |
return the output (output with id 0) of the filter More... | |
NavigationData * | GetOutput (DataObjectPointerArraySizeType idx) |
return the output with id idx of the filter More... | |
NavigationData * | GetOutput (const std::string &navDataName) |
return the output with name navDataName of the filter More... | |
DataObjectPointerArraySizeType | GetOutputIndex (std::string navDataName) |
return the index of the output with name navDataName, -1 if no output with that name was found More... | |
virtual void | RegisterAsMicroservice () |
Registers this object as a Microservice, making it available to every module and/or plugin. To unregister, call UnregisterMicroservice(). More... | |
virtual void | UnRegisterMicroservice () |
Registers this object as a Microservice, making it available to every module and/or plugin. More... | |
std::string | GetMicroserviceID () |
Returns the id that this device is registered with. The id will only be valid, if the NavigationDataSource has been registered using RegisterAsMicroservice(). More... | |
virtual void | GraftNthOutput (unsigned int idx, itk::DataObject *graft) |
Graft the specified DataObject onto this ProcessObject's output. More... | |
virtual void | GraftOutput (itk::DataObject *graft) |
Graft the specified DataObject onto this ProcessObject's output. More... | |
virtual itk::DataObject::Pointer | MakeOutput (DataObjectPointerArraySizeType idx) override |
virtual itk::DataObject::Pointer | MakeOutput (const DataObjectIdentifierType &name) override |
virtual void | SetParameters (const mitk::PropertyList *) |
Set all filter parameters as the PropertyList p. More... | |
virtual mitk::PropertyList::ConstPointer | GetParameters () const |
Get all filter parameters as a PropertyList. More... | |
virtual void | Freeze () |
virtual void | UnFreeze () |
virtual bool | GetIsFrozen () |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
TrackingDeviceSource () | |
virtual | ~TrackingDeviceSource () |
virtual void | GenerateData () override |
filter execute method More... | |
void | CreateOutputs () |
Create the necessary outputs for the TrackingTool objects in m_TrackingDevice. More... | |
Protected Member Functions inherited from mitk::NavigationDataSource | |
NavigationDataSource () | |
virtual | ~NavigationDataSource () |
Protected Attributes | |
mitk::TrackingDevice::Pointer | m_TrackingDevice |
the tracking device that is used as a source for this filter object More... | |
Protected Attributes inherited from mitk::NavigationDataSource | |
std::string | m_Name |
bool | m_IsFrozen |
Additional Inherited Members | |
Static Public Attributes inherited from mitk::NavigationDataSource | |
static const std::string | US_INTERFACE_NAME |
These Constants are used in conjunction with Microservices. More... | |
static const std::string | US_PROPKEY_DEVICENAME |
static const std::string | US_PROPKEY_ID |
static const std::string | US_PROPKEY_ISACTIVE |
Connects a mitk::TrackingDevice to a MITK-IGT NavigationData-Filterpipeline.
Documentation This class is the source of most navigation pipelines. It encapsulates a mitk::TrackingDevice and provides the position and orientation of the connected mitk::TrackingTool objects as NavigationData objects. Note, that the number of outputs of TrackingDeviceSource is equal to the number of tools connected to the TrackingDevice at the time SetTrackingDevice() is called. If tools are added to the TrackingDevice later, there will not be additional outputs in TrackingDeviceSource. You have to call SetTrackingDevice() again to add the new tools as additional outputs of the filter. Otherwise TrackingDeviceSource will raise an std::out_of_range exception when the filter pipeline is executed. the tool number corresponds with the output number, e.g. trackingDevice-GetTool(0) is the tool that will produce trackingDeviceSourceFilter->GetOutput().
Definition at line 42 of file mitkTrackingDeviceSource.h.
|
protected |
Definition at line 25 of file mitkTrackingDeviceSource.cpp.
|
protectedvirtual |
Definition at line 30 of file mitkTrackingDeviceSource.cpp.
References mitk::TrackingDevice::Ready, and mitk::TrackingDevice::Tracking.
Pointer mitk::TrackingDeviceSource::Clone | ( | ) | const |
void mitk::TrackingDeviceSource::Connect | ( | ) |
Establishes a connection to the tracking device. If there is already a connection the method does nothing.
Definition at line 139 of file mitkTrackingDeviceSource.cpp.
|
protected |
Create the necessary outputs for the TrackingTool objects in m_TrackingDevice.
This Method is called internally whenever outputs need to be reset. Old Outputs are deleted when called.
Definition at line 110 of file mitkTrackingDeviceSource.cpp.
References MITK_DEBUG.
void mitk::TrackingDeviceSource::Disconnect | ( | ) |
Closes the connection to the tracking device.
Definition at line 167 of file mitkTrackingDeviceSource.cpp.
|
overrideprotectedvirtual |
filter execute method
queries the tracking device for new position and orientation data for all tools and updates its output NavigationData objects with it.
Definition at line 46 of file mitkTrackingDeviceSource.cpp.
References mitk::IGTTimeStamp::GetElapsed(), mitk::TrackingTool::GetIGTTimeStamp(), mitk::NavigationData::GetIGTTimeStamp(), mitk::IGTTimeStamp::GetInstance(), mitk::TrackingTool::GetOrientation(), mitk::TrackingTool::GetPosition(), mitk::TrackingTool::GetTrackingError(), mitk::TrackingTool::IsDataValid(), mitk::TrackingTool::IsEnabled(), mitk::NavigationData::SetDataValid(), mitk::NavigationData::SetIGTTimeStamp(), mitk::NavigationData::SetOrientation(), mitk::NavigationData::SetOrientationAccuracy(), mitk::NavigationData::SetPosition(), and mitk::NavigationData::SetPositionAccuracy().
|
virtual |
returns the tracking device that is used by this filter
|
virtual |
returns true if a connection to the tracking device is established
Definition at line 199 of file mitkTrackingDeviceSource.cpp.
References mitk::TrackingDevice::Ready, and mitk::TrackingDevice::Tracking.
|
virtual |
returns true if tracking is in progress
Definition at line 207 of file mitkTrackingDeviceSource.cpp.
References mitk::TrackingDevice::Tracking.
mitk::TrackingDeviceSource::mitkClassMacro | ( | TrackingDeviceSource | , |
NavigationDataSource | |||
) |
|
static |
Referenced by mitk::MicronTrackerTypeInformation::CreateTrackingDeviceSource(), mitk::NDIAuroraTypeInformation::CreateTrackingDeviceSource(), mitk::VirtualTrackerTypeInformation::CreateTrackingDeviceSource(), mitk::NDIPolarisTypeInformation::CreateTrackingDeviceSource(), mitk::OpenIGTLinkTypeInformation::CreateTrackingDeviceSource(), mitk::NPOptitrackTrackingTypeInformation::CreateTrackingDeviceSource(), main(), and mitkTrackingDeviceSourceTest().
|
virtual |
sets the tracking device that will be used as a source for tracking data
Definition at line 97 of file mitkTrackingDeviceSource.cpp.
References MITK_DEBUG.
void mitk::TrackingDeviceSource::StartTracking | ( | ) |
starts tracking. This needs to be called before Update() or GetOutput()->Update(). If the device is already tracking the method does nothing.
Definition at line 157 of file mitkTrackingDeviceSource.cpp.
References mitk::TrackingDevice::Tracking.
void mitk::TrackingDeviceSource::StopTracking | ( | ) |
stops tracking.
Definition at line 175 of file mitkTrackingDeviceSource.cpp.
|
overridevirtual |
Used for pipeline update.
Definition at line 183 of file mitkTrackingDeviceSource.cpp.
|
protected |
the tracking device that is used as a source for this filter object
Definition at line 132 of file mitkTrackingDeviceSource.h.