mirror of
https://github.com/dgirardeau/q3DMASC.git
synced 2026-08-29 08:34:48 +08:00
changes following PR #5
This commit is contained in:
@@ -194,7 +194,7 @@ bool ContextBasedFeature::prepare( const CorePoints& corePoints,
|
||||
bool cancelled = false;
|
||||
#ifndef _DEBUG
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for num_threads(omp_get_max_threads())
|
||||
#pragma omp parallel for num_threads(std::max(1, omp_get_max_threads() - 2))
|
||||
#endif
|
||||
#endif
|
||||
for (int i = 0; i < static_cast<int>(pointCount); ++i)
|
||||
|
||||
@@ -75,7 +75,6 @@ namespace masc
|
||||
, kNN(p_kNN)
|
||||
, ctxClassLabel(p_ctxClassLabel)
|
||||
, sf(nullptr)
|
||||
// , sfWasAlreadyExisting(false)
|
||||
{
|
||||
scale = p_scale;
|
||||
}
|
||||
@@ -104,7 +103,5 @@ namespace masc
|
||||
int ctxClassLabel;
|
||||
//! The computed scalar
|
||||
CCCoreLib::ScalarField* sf;
|
||||
//! Whether the SF pre-exists
|
||||
// bool sfWasAlreadyExisting;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -151,8 +151,6 @@ namespace masc
|
||||
: type(p_type)
|
||||
, sf1(nullptr)
|
||||
, sf2(nullptr)
|
||||
// , sf1WasAlreadyExisting(false)
|
||||
// , sf2WasAlreadyExisting(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+1
-4
@@ -418,14 +418,13 @@ static bool ComputeMathOpWithNearestNeighbor( const CorePoints& corePoints,
|
||||
ccLog::Print(logMessage);
|
||||
CCCoreLib::NormalizedProgress nProgress(progressCb, pointCount);
|
||||
|
||||
QMutex mutex;
|
||||
double meanNeighborhoodSize = 0;
|
||||
int tenth = pointCount / 10;
|
||||
error.clear();
|
||||
bool cancelled = false;
|
||||
#ifndef _DEBUG
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for
|
||||
#pragma omp parallel for num_threads(std::max(1, omp_get_max_threads() - 2))
|
||||
#endif
|
||||
#endif
|
||||
for (int i = 0; i < static_cast<int>(pointCount); ++i)
|
||||
@@ -473,9 +472,7 @@ static bool ComputeMathOpWithNearestNeighbor( const CorePoints& corePoints,
|
||||
|
||||
if (progressCb)
|
||||
{
|
||||
mutex.lock();
|
||||
cancelled = !nProgress.oneStep();
|
||||
mutex.unlock();
|
||||
if (cancelled)
|
||||
{
|
||||
//process cancelled by the user
|
||||
|
||||
@@ -148,9 +148,6 @@ namespace masc
|
||||
, field2(nullptr)
|
||||
, statSF1(nullptr)
|
||||
, statSF2(nullptr)
|
||||
// , statSF1WasAlreadyExisting(false)
|
||||
// , statSF2WasAlreadyExisting(false)
|
||||
//, keepStatSF2(false)
|
||||
{
|
||||
//auomatically set the right source for specific features
|
||||
switch (type)
|
||||
|
||||
+2
-2
@@ -32,8 +32,8 @@ QColor getColor(double value, double r1, double g1, double b1)
|
||||
return QColor(r, g, b);
|
||||
}
|
||||
|
||||
ConfusionMatrix::ConfusionMatrix(const std::vector<ScalarType> &actual, const std::vector<ScalarType> &predicted) :
|
||||
ui(new Ui::ConfusionMatrix)
|
||||
ConfusionMatrix::ConfusionMatrix(const std::vector<ScalarType> &actual, const std::vector<ScalarType> &predicted)
|
||||
: ui(new Ui::ConfusionMatrix)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlag(Qt::WindowStaysOnTopHint);
|
||||
|
||||
@@ -211,7 +211,7 @@ bool Classifier::classify( const Feature::Source::Set& featureSources,
|
||||
|
||||
#ifndef _DEBUG
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for
|
||||
#pragma omp parallel for num_threads(omp_get_max_threads() - 2)
|
||||
#endif
|
||||
#endif
|
||||
for (int i = 0; i < static_cast<int>(cloud->size()); ++i)
|
||||
|
||||
+1
-1
@@ -1235,7 +1235,7 @@ bool Tools::PrepareFeatures(const CorePoints& corePoints, Feature::Set& features
|
||||
|
||||
#ifndef _DEBUG
|
||||
#if defined(_OPENMP)
|
||||
#pragma omp parallel for
|
||||
#pragma omp parallel for num_threads(std::max(1, omp_get_max_threads() - 2))
|
||||
#endif
|
||||
#endif
|
||||
for (int i = 0; i < static_cast<int>(pointCount); ++i)
|
||||
|
||||
Reference in New Issue
Block a user