Commit c38980eb authored by Andreas Schwarzkopf's avatar Andreas Schwarzkopf

[FIX #371] Repaired the multithreading setting

 * Previously application crashed every time on processing data using Lari/Habib (2014) surface detection
 *
 * In method WMSurfaceDetectionByLari::properties():
 * WPropInt m_cpuThreadCount = m_properties->addProperty( "CPU threads: ", "", 8, m_propCondition );
 *
 * Yes, m_cpuThreadCount is a member variable of the class. Putting "WPropInt" here is
 * definitely not a good idea.
parent a2f5bce4
......@@ -52,7 +52,6 @@ namespace laslibb
}
WLasReader::~WLasReader()
{
// TODO(schwarzkopf): Auto-generated destructor stub
}
void WLasReader::setProgressSettings( size_t steps )
......
......@@ -89,7 +89,6 @@ void WMReadLAS::connectors()
void WMReadLAS::properties()
{
// ---> Put the code for your properties here. See "src/modules/template/" for an extensively documented example.
m_lasFile = m_properties->addProperty( "LiDAR file", "", WPathHelper::getAppPath() );
WPropertyHelper::PC_PATHEXISTS::addTo( m_lasFile );
......@@ -137,8 +136,6 @@ void WMReadLAS::requirements()
void WMReadLAS::moduleMain()
{
infoLog() << "Thrsholding example main routine started";
// get notified about data changes
m_moduleState.setResetable( true, true );
m_moduleState.add( m_propCondition );
......
......@@ -128,9 +128,9 @@ void WMSurfaceDetectionByLari::properties()
m_squareWidth = m_properties->addProperty( "Plane outline size: ", "", 0.2, m_propCondition );
//TODO(aschwarzkopf): Resolve changing the thread count during execution.
//WPropInt m_cpuThreadCount = m_properties->addProperty( "CPU threads: ", "", 8, m_propCondition );
//m_cpuThreadCount->setMin( 4 );
//m_cpuThreadCount->setMax( 24 );
m_cpuThreadCount = m_properties->addProperty( "CPU threads: ", "", 8, m_propCondition );
m_cpuThreadCount->setMin( 4 );
m_cpuThreadCount->setMax( 24 );
m_planarGroup = m_properties->addPropertyGroup( "Planar feature properties",
"All conditions must be met to detect as a surface." );
......@@ -245,7 +245,7 @@ void WMSurfaceDetectionByLari::moduleMain()
WLariPointClassifier* classifier = new WLariPointClassifier();
classifier->setNumberPointsK( m_numberPointsK->get() );
classifier->setMaxPointDistanceR( m_maxPointDistanceR->get() );
//classifier->setCpuThreadCount( m_cpuThreadCount->get() );
classifier->setCpuThreadCount( m_cpuThreadCount->get() );
classifier->setPlanarNLambdaRange( 0, m_surfaceNLambda1Min->get(), m_surfaceNLambda1Max->get() );
classifier->setPlanarNLambdaRange( 1, m_surfaceNLambda2Min->get(), m_surfaceNLambda2Max->get() );
classifier->setPlanarNLambdaRange( 2, m_surfaceNLambda3Min->get(), m_surfaceNLambda3Max->get() );
......@@ -256,7 +256,7 @@ void WMSurfaceDetectionByLari::moduleMain()
WLariBruteforceClustering* clustering = new WLariBruteforceClustering( classifier );
clustering->setSegmentationSettings( m_segmentationMaxAngleDegrees->get(), m_segmentationPlaneDistance->get() );
//clustering.setCpuThreadCount( m_cpuThreadCount->get() );
clustering->setCpuThreadCount( m_cpuThreadCount->get() );
clustering->detectClustersByBruteForce();
WLariBoundaryDetector* boundaryDetector = new WLariBoundaryDetector();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment