mirror of
https://github.com/truebelief/cc-treeiso-plugin.git
synced 2026-08-30 00:50:29 +08:00
Improving the code syntax and robustness (Coverity scan)
This commit is contained in:
committed by
ZXi
parent
25a9ca397d
commit
a3f596e81a
@@ -61,6 +61,8 @@ namespace CP
|
||||
this->dim = 1;
|
||||
this->nVertex = 1;
|
||||
this->nEdge = 0;
|
||||
this->parameter.reg_strenth = 0;
|
||||
this->parameter.cutoff = 0;
|
||||
this->parameter.flow_steps = 3;
|
||||
this->parameter.kmeans_ite = 5;
|
||||
this->parameter.kmeans_resampling = 3;
|
||||
|
||||
@@ -120,7 +120,7 @@ namespace CP
|
||||
uint32_t nb_comp = static_cast<uint32_t>(this->components.size());
|
||||
// ind_com;
|
||||
//#pragma omp parallel for private(ind_com) //if (nb_comp>=8) schedule(dynamic)
|
||||
uint32_t dim_spat = spatial_part ? this->dim - 0 : dim_spat = this->dim;
|
||||
uint32_t dim_spat = spatial_part ? this->dim - 0 : this->dim;
|
||||
|
||||
#ifdef OPENMP
|
||||
#pragma omp parallel for if (nb_comp >= omp_get_num_threads()) schedule(dynamic)
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace CP
|
||||
, value(dim, 0.)
|
||||
, color(-1)
|
||||
, isBorder(false)
|
||||
, in_component(0)
|
||||
{}
|
||||
|
||||
T weight; //weight of the observation
|
||||
|
||||
+1
-3
@@ -201,7 +201,6 @@ bool TreeIso::Intermediate_seg_pcd(ccPointCloud* pc, const unsigned PR_MIN_NN2,
|
||||
}
|
||||
CCCoreLib::ScalarField* initSF = pc->getScalarField(initSFIndex);
|
||||
|
||||
initSF->size();
|
||||
std::vector<uint32_t> in_component;
|
||||
try
|
||||
{
|
||||
@@ -491,7 +490,7 @@ bool TreeIso::Final_seg_pcd(ccPointCloud* pc, const unsigned PR_MIN_NN3, const f
|
||||
}
|
||||
|
||||
CCCoreLib::ScalarField* initSF = pc->getScalarField(initIdx);
|
||||
initSF->size();
|
||||
|
||||
std::vector<uint32_t> segs_init_ids;
|
||||
segs_init_ids.resize(pointCount);
|
||||
for (unsigned i = 0; i < pointCount; ++i)
|
||||
@@ -506,7 +505,6 @@ bool TreeIso::Final_seg_pcd(ccPointCloud* pc, const unsigned PR_MIN_NN3, const f
|
||||
return false;
|
||||
}
|
||||
|
||||
groupSF->size();
|
||||
std::vector<uint32_t> segs_group_ids;
|
||||
segs_group_ids.resize(pointCount);
|
||||
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ QList<QAction *> qTreeIso::getActions()
|
||||
void qTreeIso::doAction()
|
||||
{
|
||||
Parameters parameters;
|
||||
ccTreeIsoDlg treeisoDlg(m_app->getMainWindow());
|
||||
ccTreeIsoDlg treeisoDlg(m_app ? m_app->getMainWindow() : nullptr);
|
||||
|
||||
connect(treeisoDlg.pushButtonInitSeg, &QPushButton::clicked, [&]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user