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


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

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


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

示例1: PointSetCompare

    void PointSetCompare(mitk::PointSet::Pointer pointSet2,
                         mitk::PointSet::Pointer pointSet1, bool& /*identical*/)
    {
        MITK_TEST_CONDITION(pointSet1->GetSize() == pointSet2->GetSize(), "Testing if PointSet size is correct" );

        for (unsigned int t = 0; t < numberOfTimeSeries; t++)
        {
            for (unsigned int i = 0; i < (unsigned int) pointSet1->GetSize(t); ++i)
            {
                mitk::Point3D p1 = pointSet1->GetPoint(i);
                mitk::Point3D p2 = pointSet2->GetPoint(i);

                //test
                std::cout << "r point: " << p2 << std::endl;
                std::cout << "w point: " << p1 << std::endl;

                //test end

                MITK_TEST_CONDITION((p1[0] - p2[0]) <= 0.0001, "Testing if X coordinates of the Point are at the same Position" );
                MITK_TEST_CONDITION((p1[1] - p2[1]) <= 0.0001, "Testing if Y coordinates of the Point are at the same Position" );
                MITK_TEST_CONDITION((p1[2] - p2[2]) <= 0.0001, "Testing if Z coordinates of the Point are at the same Position" );

            }
        }

        // testing geometry
        MITK_TEST_CONDITION( mitk::Equal( *(pointSet1->GetGeometry()), *(pointSet2->GetGeometry()), 0.000001, true),
                             "Restored geometry must equal original one.");
    }
开发者ID:dkuegler,项目名称:MITK,代码行数:29,代码来源:mitkPointSetFileIOTest.cpp

示例2: Equal_DifferentGeometries_ReturnsFalse

  void Equal_DifferentGeometries_ReturnsFalse()
  {
    mitk::Point3D origin;
    origin[0] = 0.0;
    origin[1] = 0.0;
    origin[2] = 1.0 + 2*mitk::eps;
    m_AnotherPointSet->GetGeometry()->SetOrigin(origin);

    MITK_ASSERT_NOT_EQUAL( m_PointSet, m_AnotherPointSet, "Origin was modified. Result should be false.");
  }
开发者ID:Maggunator,项目名称:MITK,代码行数:10,代码来源:mitkPointSetEqualTest.cpp


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