本文整理汇总了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));
}
示例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));
}
示例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();
}
}