当前位置: 首页>>代码示例>>C++>>正文


C++ trackingdevice::Pointer类代码示例

本文整理汇总了C++中mitk::trackingdevice::Pointer的典型用法代码示例。如果您正苦于以下问题:C++ Pointer类的具体用法?C++ Pointer怎么用?C++ Pointer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Pointer类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DestroyInstrumentVisualization

void QmitkIGTTrackingLabView::DestroyInstrumentVisualization(mitk::DataStorage* ds, mitk::TrackingDevice::Pointer tracker)
{
  if(ds == NULL || tracker.IsNull())
    return;

  for(int i=0; i < tracker->GetToolCount(); ++i)
  {
    mitk::DataNode::Pointer dn = ds->GetNamedNode(tracker->GetTool(i)->GetToolName());

    if(dn.IsNotNull())
      ds->Remove(dn);
  }
}
开发者ID:beneon,项目名称:MITK,代码行数:13,代码来源:QmitkIGTTrackingLabView.cpp

示例2:

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;
  }
开发者ID:beneon,项目名称:MITK,代码行数:22,代码来源:mitkTrackingDeviceSourceConfigurator.cpp

示例3:

 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;
 }
开发者ID:Cdebus,项目名称:MITK,代码行数:26,代码来源:mitkPolhemusTrackerTypeInformation.cpp

示例4:

void mitk::TrackingVolumeGenerator::SetTrackingDevice (mitk::TrackingDevice::Pointer tracker)
{
  this->m_Data = mitk::GetFirstCompatibleDeviceDataForLine(tracker->GetType());
}
开发者ID:DiagnosisMultisystems,项目名称:MITK,代码行数:4,代码来源:mitkTrackingVolumeGenerator.cpp

示例5:

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;
}
开发者ID:DiagnosisMultisystems,项目名称:MITK,代码行数:13,代码来源:mitkTrackingDeviceSourceConfigurator.cpp


注:本文中的mitk::trackingdevice::Pointer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。