diff --git a/Classify3DMASCDialog.ui b/Classify3DMASCDialog.ui
index 846e316..ac5f726 100644
--- a/Classify3DMASCDialog.ui
+++ b/Classify3DMASCDialog.ui
@@ -110,13 +110,6 @@
- -
-
-
- TEST on (optional)
-
-
-
-
@@ -198,6 +191,13 @@
+ -
+
+
+ TEST on (optional)
+
+
+
diff --git a/Train3DMASCDialog.ui b/Train3DMASCDialog.ui
index 7678cb4..3d32dd7 100644
--- a/Train3DMASCDialog.ui
+++ b/Train3DMASCDialog.ui
@@ -6,8 +6,8 @@
0
0
- 400
- 550
+ 834
+ 795
@@ -185,15 +185,15 @@
Results
-
- -
+
+
-
correct = 0/0 - accuracy = 0.0
- -
+
-
Qt::ScrollBarAlwaysOn
@@ -228,7 +228,29 @@
- -
+
-
+
+
+
+ Scales
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 190
+
+
+
+
+ -
export
diff --git a/q3DMASC.cpp b/q3DMASC.cpp
index 90dd820..12a6239 100644
--- a/q3DMASC.cpp
+++ b/q3DMASC.cpp
@@ -444,7 +444,7 @@ void q3DMASCPlugin::doTrainAction()
float previousTestSubsetRatio = -1.0f;
SFCollector generatedScalarFields, generatedScalarFieldsTest;
- //we will train + evaluate the classifier, then display the reuslts
+ //we will train + evaluate the classifier, then display the results
//then let the user change parameters and (potentially) start again
for (int iteration = 0; ; ++iteration)
{
diff --git a/q3DMASCTools.cpp b/q3DMASCTools.cpp
index 11c8c02..d549275 100644
--- a/q3DMASCTools.cpp
+++ b/q3DMASCTools.cpp
@@ -700,11 +700,12 @@ bool Tools::LoadFile( const QString& filename,
bool badFeatures = false;
for (int lineNumber = 1; ; ++lineNumber)
{
+ if (stream.atEnd())
+ break;
QString line = stream.readLine();
if (line.isNull())
{
- //eof
- break;
+ continue;
}
if (line.startsWith("#"))
diff --git a/qClassify3DMASCDialog.cpp b/qClassify3DMASCDialog.cpp
index 5c93b84..3bce0df 100644
--- a/qClassify3DMASCDialog.cpp
+++ b/qClassify3DMASCDialog.cpp
@@ -111,6 +111,7 @@ Classify3DMASCDialog::Classify3DMASCDialog(ccMainAppInterface* app, bool trainMo
{
label->setText(tr("Trainer file"));
warningLabel->setVisible(false);
+ warningLabel->setText("Assign each role to the right cloud, and select the cloud on which to train the classifier");
}
onCloudChanged(0);
diff --git a/qTrain3DMASCDialog.cpp b/qTrain3DMASCDialog.cpp
index 7381248..78f6925 100644
--- a/qTrain3DMASCDialog.cpp
+++ b/qTrain3DMASCDialog.cpp
@@ -63,6 +63,18 @@ int Train3DMASCDialog::addFeature(QString name, float importance, bool isChecked
return index;
}
+int Train3DMASCDialog::addScale(double scale, bool isChecked/*=true*/)
+{
+ int index = tableWidget->rowCount();
+ tableWidget->setRowCount(index + 1);
+
+ QTableWidgetItem* nameItem = new QTableWidgetItem(QString::number(scale));
+ nameItem->setCheckState(isChecked ? Qt::Checked : Qt::Unchecked);
+ tableWidget->setItem(index, 0, nameItem);
+
+ return index;
+}
+
void Train3DMASCDialog::setResultText(QString text)
{
resultLabel->setText(text);
@@ -153,4 +165,4 @@ void Train3DMASCDialog::onExportResults()
QString importance = tableWidget->item(index, FeatureImportanceColumn)->text();
stream << featureName << ";" << importance << endl;
}
-}
\ No newline at end of file
+}
diff --git a/qTrain3DMASCDialog.h b/qTrain3DMASCDialog.h
index c777890..153eb3b 100644
--- a/qTrain3DMASCDialog.h
+++ b/qTrain3DMASCDialog.h
@@ -38,7 +38,7 @@ public:
/** \return the row index
**/
int addFeature(QString name, float importance, bool isChecked = true);
-
+ int addScale(double scale, bool isChecked = true);
void setResultText(QString text);
void setFirstRunDone();
inline void setClassifierSaved() { classifierSaved = true; saveRequested = false; }