本文整理汇总了C++中mitk::trackingdevice::Pointer::GetPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetPointer方法的具体用法?C++ Pointer::GetPointer怎么用?C++ Pointer::GetPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mitk::trackingdevice::Pointer
的用法示例。
在下文中一共展示了Pointer::GetPointer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
mitk::TrackingDeviceSource::Pointer mitk::TrackingDeviceSourceConfigurator::CreateMicronTrackerTrackingDeviceSource(mitk::TrackingDevice::Pointer trackingDevice, mitk::NavigationToolStorage::Pointer navigationTools)
{
mitk::TrackingDeviceSource::Pointer returnValue = mitk::TrackingDeviceSource::New();
mitk::ClaronTrackingDevice::Pointer thisDevice = dynamic_cast<mitk::ClaronTrackingDevice*>(trackingDevice.GetPointer());
m_ToolCorrespondencesInToolStorage = std::vector<int>();
//add the tools to the tracking device
for (int i=0; i<navigationTools->GetToolCount(); i++)
{
mitk::NavigationTool::Pointer thisNavigationTool = m_NavigationTools->GetTool(i);
m_ToolCorrespondencesInToolStorage.push_back(i);
bool toolAddSuccess = thisDevice->AddTool(thisNavigationTool->GetToolName().c_str(),thisNavigationTool->GetCalibrationFile().c_str());
if (!toolAddSuccess)
{
//todo error handling
this->m_ErrorMessage = "Can't add tool, is the toolfile valid?";
return NULL;
}
thisDevice->GetTool(i)->SetToolTip(thisNavigationTool->GetToolTipPosition(),thisNavigationTool->GetToolTipOrientation());
}
returnValue->SetTrackingDevice(thisDevice);
return returnValue;
}
示例2:
mitk::TrackingDeviceSource::Pointer PolhemusTrackerTypeInformation::CreateTrackingDeviceSource(
mitk::TrackingDevice::Pointer trackingDevice,
mitk::NavigationToolStorage::Pointer navigationTools,
std::string* errorMessage,
std::vector<int>* toolCorrespondencesInToolStorage)
{
mitk::TrackingDeviceSource::Pointer returnValue = mitk::TrackingDeviceSource::New();
mitk::PolhemusTrackingDevice::Pointer thisDevice = dynamic_cast<mitk::PolhemusTrackingDevice*>(trackingDevice.GetPointer());
*toolCorrespondencesInToolStorage = std::vector<int>();
//add the tools to the tracking device
for (unsigned int i = 0; i < navigationTools->GetToolCount(); i++)
{
mitk::NavigationTool::Pointer thisNavigationTool = navigationTools->GetTool(i);
toolCorrespondencesInToolStorage->push_back(i);
bool toolAddSuccess = thisDevice->AddTool(thisNavigationTool->GetToolName().c_str(), std::stoi(thisNavigationTool->GetIdentifier()));
if (!toolAddSuccess)
{
//todo error handling
errorMessage->append("Can't add tool, is the toolfile valid?");
return NULL;
}
thisDevice->GetTool(i)->SetToolTipPosition(thisNavigationTool->GetToolTipPosition(), thisNavigationTool->GetToolAxisOrientation());
}
returnValue->SetTrackingDevice(thisDevice);
return returnValue;
}
示例3:
mitk::TrackingDeviceSource::Pointer mitk::TrackingDeviceSourceConfigurator::CreateOpenIGTLinkTrackingDeviceSource(mitk::TrackingDevice::Pointer trackingDevice, mitk::NavigationToolStorage::Pointer navigationTools)
{
mitk::TrackingDeviceSource::Pointer returnValue = mitk::TrackingDeviceSource::New();
mitk::OpenIGTLinkTrackingDevice::Pointer thisDevice = dynamic_cast<mitk::OpenIGTLinkTrackingDevice*>(trackingDevice.GetPointer());
thisDevice->DiscoverTools();
if (thisDevice->GetToolCount() != navigationTools->GetToolCount())
{
this->m_ErrorMessage = "The number of tools in the connected device differs from the tool storage, cannot add tools.";
return NULL;
}
returnValue->SetTrackingDevice(thisDevice);
return returnValue;
}