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


C++ Pointer::GetPointer方法代码示例

本文整理汇总了C++中mitk::pointset::Pointer::GetPointer方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::GetPointer方法的具体用法?C++ Pointer::GetPointer怎么用?C++ Pointer::GetPointer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mitk::pointset::Pointer的用法示例。


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

示例1: testTrimmedAicpregistration

  void testTrimmedAicpregistration()
  {
    const double expFRE = 4.8912;
    const double expTRE = 0.0484215;

    mitk::AnisotropicIterativeClosestPointRegistration::Pointer aICP =
                      mitk::AnisotropicIterativeClosestPointRegistration::New();

    // Swap X and Y for partial overlapping registration
    aICP->SetMovingSurface(m_MovingSurface);
    aICP->SetFixedSurface(m_FixedSurface);
    aICP->SetCovarianceMatricesMovingSurface(m_SigmasMovingSurface);
    aICP->SetCovarianceMatricesFixedSurface(m_SigmasFixedSurface);
    aICP->SetFRENormalizationFactor(m_FRENormalizationFactor);
    aICP->SetThreshold(0.000001);
    aICP->SetTrimmFactor(0.50);

    // run the algorithm
    aICP->Update();

    MITK_INFO << "FRE: Expected: " << expFRE << ", computed: " << aICP->GetFRE();

    CPPUNIT_ASSERT_MESSAGE("mitkAnisotropicIterativeClosestPointRegistrationTest:AicpRegistration Test FRE",
                           mitk::Equal(aICP->GetFRE(),expFRE,0.01));

    // compute the target registration Error
    const double tre = mitk::AnisotropicRegistrationCommon::ComputeTargetRegistrationError(
                                                                                     m_TargetsMovingSurface.GetPointer(),
                                                                                     m_TargetsFixedSurface.GetPointer(),
                                                                                     aICP->GetRotation(),
                                                                                     aICP->GetTranslation()
                                                                                   );

    MITK_INFO << "TRE: Expected: " << expTRE << ", computed: " << tre;
    CPPUNIT_ASSERT_MESSAGE("mitkAnisotropicIterativeClosestPointRegistrationTest:AicpRegistration Test TRE",
                          mitk::Equal(tre,expTRE,0.01));
  }
开发者ID:0r,项目名称:MITK,代码行数:37,代码来源:mitkAnisotropicIterativeClosestPointRegistrationTest.cpp

示例2: testAicpRegistration

  void testAicpRegistration()
  {
    const double expFRE = 27.5799;
    const double expTRE = 1.68835;
    mitk::AnisotropicIterativeClosestPointRegistration::Pointer aICP =
                      mitk::AnisotropicIterativeClosestPointRegistration::New();

    // set up parameters
    aICP->SetMovingSurface(m_MovingSurface);
    aICP->SetFixedSurface(m_FixedSurface);
    aICP->SetCovarianceMatricesMovingSurface(m_SigmasMovingSurface);
    aICP->SetCovarianceMatricesFixedSurface(m_SigmasFixedSurface);
    aICP->SetFRENormalizationFactor(m_FRENormalizationFactor);
    aICP->SetThreshold(0.000001);

    // run the algorithm
    aICP->Update();

    MITK_INFO << "FRE: Expected: " << expFRE << ", computed: " << aICP->GetFRE();
    CPPUNIT_ASSERT_MESSAGE("mitkAnisotropicIterativeClosestPointRegistrationTest:AicpRegistration Test FRE",
                           mitk::Equal(aICP->GetFRE(),expFRE,0.0001));

    // compute the target registration Error
    const double tre = mitk::AnisotropicRegistrationCommon::ComputeTargetRegistrationError(
                                                                                     m_TargetsMovingSurface.GetPointer(),
                                                                                     m_TargetsFixedSurface.GetPointer(),
                                                                                     aICP->GetRotation(),
                                                                                     aICP->GetTranslation()
                                                                                   );

   // MITK_INFO << "R:\n" << aICP->GetRotation() << "T: "<< aICP->GetTranslation();

    MITK_INFO << "TRE: Expected: " << expTRE << ", computed: " << tre;
    CPPUNIT_ASSERT_MESSAGE("mitkAnisotropicIterativeClosestPointRegistrationTest:AicpRegistration Test TRE",
                           mitk::Equal(tre,expTRE,0.00001));
  }
开发者ID:0r,项目名称:MITK,代码行数:36,代码来源:mitkAnisotropicIterativeClosestPointRegistrationTest.cpp

示例3: PointSetLoadAndCompareTest

    void PointSetLoadAndCompareTest()
    {
        try
        {
            mitk::PointSet::Pointer pointSet = mitk::IOUtil::LoadPointSet(m_FilePath);
            MITK_TEST_CONDITION(pointSet.IsNotNull(), "Testing if the loaded Data are NULL" );

            bool identical(true);
            PointSetCompare(pointSet.GetPointer(), m_SavedPointSet.GetPointer(),
                            identical);
        } catch (std::exception& e)
        {
            MITK_ERROR << "Error during pointset creation: " << e.what();
        }
    }
开发者ID:dkuegler,项目名称:MITK,代码行数:15,代码来源:mitkPointSetFileIOTest.cpp


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