RegIcp: fixed KDTreeMatcherIntensity build error on Mac.

This commit is contained in:
matlabbe
2020-12-11 17:22:29 -05:00
parent 7a5d04062d
commit 51826c9a97

View File

@@ -590,15 +590,7 @@ void RegistrationIcp::parseParameters(const ParametersMap & parameters)
if(_libpointmatcherIntensity)
{
PointMatcher<float> matcher;
typedef typename PointMatcherSupport::Registrar< PointMatcher<float>::Matcher >::template GenericClassDescriptor< KDTreeMatcherIntensity<float> > Desc;
#if POINTMATCHER_VERSION_INT >= 10300
matcher.MatcherRegistrar.reg("KDTreeMatcherIntensity", std::make_shared<Desc>() );
icp->matcher = matcher.MatcherRegistrar.create("KDTreeMatcherIntensity", params);
#else
matcher.MatcherRegistrar.reg("KDTreeMatcherIntensity", new Desc() );
icp->matcher.reset(matcher.MatcherRegistrar.create("KDTreeMatcherIntensity", params));
#endif
icp->matcher.reset(new KDTreeMatcherIntensity<float>(params));
}
else
{