21 #include <mitkIGTException.h> 22 #include <mitkIGTHardwareException.h> 34 if (NavigationTools.IsNotNull())
37 for (
unsigned int i=0; i<NavigationTools->GetToolCount(); i++)
76 m_ErrorMessage =
"At least one tool is not of the same type like the tracking device.";
87 mitk::NavigationDataObjectVisualizationFilter::Pointer dummy;
95 mitk::TrackingDeviceSource::Pointer returnValue;
103 MITK_ERROR <<
"No tracking device service found!";
117 if (visualizationFilter.IsNull()) {
MITK_WARN <<
"Cannot create tracking decive: " <<
m_ErrorMessage;
return nullptr;}
132 for (
unsigned int i=0; i<trackingDeviceSource->GetNumberOfIndexedOutputs(); i++)
136 mitk::NavigationTool::Pointer currentTool = navigationTools->GetToolByName(trackingDeviceSource->GetOutput(i)->GetName());
137 if (currentTool.IsNull())
139 this->
m_ErrorMessage =
"Error: did not find corresponding tool in tracking device after initialization.";
142 returnValue->SetInput(i,trackingDeviceSource->GetOutput(i));
143 returnValue->SetRepresentationObject(i,currentTool->GetDataNode()->GetData());
167 std::vector<std::string> returnValue = std::vector<std::string>();
mitk::TrackingDeviceSource::Pointer CreateTrackingDeviceSource()
std::vector< std::string > GetToolIdentifiersInToolStorage()
std::string GetToolIdentifierInToolStorage(unsigned int outputID)
This class is a collection for information of all Tracking Device Types (derived from abstract Tracki...
mitk::NavigationToolStorage::Pointer GetUpdatedNavigationToolStorage()
std::vector< int > m_ToolCorrespondencesInToolStorage
TrackingDeviceTypeInformation * GetTrackingDeviceTypeInformation(TrackingDeviceType type)
std::string GetErrorMessage()
TrackingDeviceSourceConfigurator(mitk::NavigationToolStorage::Pointer NavigationTools, mitk::TrackingDevice::Pointer TrackingDevice)
mitk::NavigationDataObjectVisualizationFilter::Pointer CreateNavigationDataObjectVisualizationFilter(mitk::TrackingDeviceSource::Pointer trackingDeviceSource, mitk::NavigationToolStorage::Pointer navigationTools)
Interface for all Tracking Devices.
bool IsCreateTrackingDeviceSourcePossible()
~TrackingDeviceSourceConfigurator() override
std::string m_ErrorMessage
int GetToolNumberInToolStorage(unsigned int outputID)
mitk::TrackingDevice::Pointer m_TrackingDevice
mitk::NavigationToolStorage::Pointer m_NavigationTools
std::vector< int > GetToolNumbersInToolStorage()
static ModuleContext * GetModuleContext()
Returns the module context of the calling module.