Code cleaning

This commit is contained in:
Paul Leroy
2023-01-20 17:49:29 +01:00
parent f104fd5b17
commit 7a408117f0
6 changed files with 73 additions and 12 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ if (INSTALL_Q3DMASC_PLUGIN)
)
target_link_libraries( ${PROJECT_NAME} ${OpenCV_LIBS} )
set( OPENCV_DEP_DLL_FILES ${OpenCV_DIR}/x64/vc15/bin/opencv_world460.dll )
set( OPENCV_DEP_DLL_FILES ${OpenCV_DIR}/x64/vc15/bin/opencv_world340.dll )
copy_files("${OPENCV_DEP_DLL_FILES}" "${CLOUDCOMPARE_DEST_FOLDER}") #mind the quotes!
+67 -4
View File
@@ -6,15 +6,15 @@
<rect>
<x>0</x>
<y>0</y>
<width>575</width>
<height>260</height>
<width>620</width>
<height>327</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="0,1">
<item row="0" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout" rowminimumheight="1,0">
<item row="0" column="0" colspan="7">
<widget class="QTableWidget" name="tableWidget">
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
@@ -55,6 +55,69 @@
</property>
</widget>
</item>
<item row="1" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>394</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_2">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Session</string>
</property>
</widget>
</item>
<item row="1" column="4">
<widget class="QLabel" name="label_session">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QLabel" name="label_3">
<property name="enabled">
<bool>false</bool>
</property>
<property name="font">
<font>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Run</string>
</property>
</widget>
</item>
<item row="1" column="6">
<widget class="QLabel" name="label_run">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>-</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
-2
View File
@@ -310,8 +310,6 @@ void q3DMASCPlugin::doTrainAction()
mainCloudLabel = corePoints.role;
}
if (!masc::Tools::GetClassificationSF(corePoints.origin))
{
m_app->dispToConsole("Missing 'Classification' field on core points cloud", ccMainAppInterface::ERR_CONSOLE_MESSAGE);
+1 -1
View File
@@ -442,7 +442,7 @@ bool Classifier::evaluate(const Feature::Source::Set& featureSources,
}
std::unique_ptr<ConfusionMatrix> confusionMatrix(new ConfusionMatrix(actualClass, predictectedClass));
train3DMASCDialog.deleteLaterConfusionMatrix(confusionMatrix);
train3DMASCDialog.addConfusionMatrix(confusionMatrix);
return true;
}
+2 -2
View File
@@ -187,7 +187,7 @@ void Train3DMASCDialog::onExportResults()
}
}
void Train3DMASCDialog::deleteLaterConfusionMatrix(std::unique_ptr<ConfusionMatrix>& ptr)
void Train3DMASCDialog::addConfusionMatrix(std::unique_ptr<ConfusionMatrix>& ptr)
{
m_confusionMatrixToDeleteLater.push_back(std::move(ptr));
m_confusionMatrices.push_back(std::move(ptr));
}
+2 -2
View File
@@ -53,7 +53,7 @@ public:
inline bool shouldSaveClassifier() const { return saveRequested; }
void deleteLaterConfusionMatrix(std::unique_ptr<ConfusionMatrix>& ptr);
void addConfusionMatrix(std::unique_ptr<ConfusionMatrix>& ptr);
protected slots:
@@ -65,5 +65,5 @@ protected: //members
bool classifierSaved;
bool saveRequested;
std::vector<std::unique_ptr<ConfusionMatrix>> m_confusionMatrixToDeleteLater;
std::vector<std::unique_ptr<ConfusionMatrix>> m_confusionMatrices;
};