This commit is contained in:
Paul Leroy
2022-10-27 09:19:52 +02:00
parent 13c391070e
commit bcb3cee2c4
4 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -154,7 +154,7 @@ void q3DMASCPlugin::doClassifyAction()
masc::Tools::NamedClouds clouds;
QString mainCloudLabel;
classifDlg.getClouds(clouds, mainCloudLabel);
classifDlg.getClouds(clouds);
masc::Feature::Set features;
masc::Classifier classifier;
@@ -284,7 +284,7 @@ void q3DMASCPlugin::doTrainAction()
}
s_keepAttributes = classifDlg.keepAttributesCheckBox->isChecked();
classifDlg.getClouds(loadedClouds, mainCloudLabel);
classifDlg.getClouds(loadedClouds);
m_app->dispToConsole("Training cloud: " + mainCloudLabel, ccMainAppInterface::STD_CONSOLE_MESSAGE);
corePoints.origin = loadedClouds[mainCloudLabel];
corePoints.role = mainCloudLabel;
+1 -1
View File
@@ -903,7 +903,7 @@ bool Tools::LoadTrainingFile( QString filename,
if (!cloudsWereProvided)
{
//delete the already loaded clouds (if any)
for (NamedClouds::const_iterator it = loadedClouds.begin(); it != loadedClouds.end(); ++it)
for (NamedClouds::iterator it = loadedClouds.begin(); it != loadedClouds.end(); ++it)
delete it.value();
}
return false;
+7 -4
View File
@@ -161,6 +161,7 @@ void Classify3DMASCDialog::setCloudRoles(const QList<QString>& roles, QString co
{
// cloud2RadioButton->setEnabled(false);
// cloud2RadioButton->setVisible(false);
cloud2ComboBox->setEnabled(false);
cloud2ComboBox->setVisible(false);
cloud2Label->setVisible(false);
}
@@ -168,6 +169,7 @@ void Classify3DMASCDialog::setCloudRoles(const QList<QString>& roles, QString co
{
// cloud3RadioButton->setEnabled(false);
// cloud3RadioButton->setVisible(false);
cloud3ComboBox->setEnabled(false);
cloud3ComboBox->setVisible(false);
cloud3Label->setVisible(false);
}
@@ -175,12 +177,13 @@ void Classify3DMASCDialog::setCloudRoles(const QList<QString>& roles, QString co
{
// cloud4RadioButton->setEnabled(false);
// cloud4RadioButton->setVisible(false);
cloud4ComboBox->setEnabled(false);
cloud4ComboBox->setVisible(false);
cloud4Label->setVisible(false);
}
}
void Classify3DMASCDialog::getClouds(QMap<QString, ccPointCloud*>& clouds, QString& mainCloud) const
void Classify3DMASCDialog::getClouds(QMap<QString, ccPointCloud*>& clouds) const
{
if (!m_app)
{
@@ -198,7 +201,7 @@ void Classify3DMASCDialog::getClouds(QMap<QString, ccPointCloud*>& clouds, QStri
// }
}
// if (cloud2RadioButton->isEnabled())
if (cloud2ComboBox->isVisible())
if (cloud2ComboBox->isEnabled())
{
clouds.insert(cloud2Label->text(), GetCloudFromCombo(cloud2ComboBox, m_app->dbRootObject()));
// if (cloud2RadioButton->isChecked())
@@ -207,7 +210,7 @@ void Classify3DMASCDialog::getClouds(QMap<QString, ccPointCloud*>& clouds, QStri
// }
}
// if (cloud3RadioButton->isEnabled())
if (cloud3ComboBox->isVisible())
if (cloud3ComboBox->isEnabled())
{
clouds.insert(cloud3Label->text(), GetCloudFromCombo(cloud3ComboBox, m_app->dbRootObject()));
// if (cloud3RadioButton->isChecked())
@@ -216,7 +219,7 @@ void Classify3DMASCDialog::getClouds(QMap<QString, ccPointCloud*>& clouds, QStri
// }
}
// if (cloud4RadioButton->isEnabled())
if (cloud4ComboBox->isVisible())
if (cloud4ComboBox->isEnabled())
{
clouds.insert(cloud4Label->text(), GetCloudFromCombo(cloud4ComboBox, m_app->dbRootObject()));
// if (cloud4RadioButton->isChecked())
+1 -1
View File
@@ -39,7 +39,7 @@ public:
void setCloudRoles(const QList<QString>& roles, QString corePointsLabel);
//! Returns the selected point clouds
void getClouds(QMap<QString, ccPointCloud*>& clouds, QString& mainCloud) const;
void getClouds(QMap<QString, ccPointCloud*>& clouds) const;
protected slots: