mirror of
https://github.com/dgirardeau/q3DMASC.git
synced 2026-08-29 08:34:48 +08:00
Compilation with Qt6 and Visual Studio 2022
This commit is contained in:
+8
-8
@@ -56,8 +56,8 @@ if (PLUGIN_STANDARD_3DMASC)
|
||||
${CloudCompare_SOURCE_DIR}/../common)
|
||||
|
||||
target_link_libraries( ${PROJECT_NAME} ${OpenCV_LIBS} )
|
||||
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!
|
||||
set( OpenCV_WORLD_DLL "" CACHE FILEPATH "Opencv 'World' DLL file path" )
|
||||
copy_files("${OpenCV_WORLD_DLL}" "${CLOUDCOMPARE_DEST_FOLDER}" 1) #mind the quotes!
|
||||
|
||||
#================
|
||||
# git commit hash
|
||||
@@ -96,12 +96,12 @@ if (PLUGIN_STANDARD_3DMASC)
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH_CC
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
message(${PROJECT_NAME} " " GIT_BRANCH_3DMASC " " ${GIT_BRANCH_3DMASC})
|
||||
message(${PROJECT_NAME} " " GIT_COMMIT_HASH_3DMASC " " ${GIT_COMMIT_HASH_3DMASC})
|
||||
message(${PROJECT_NAME} " " GIT_TAG_3DMASC " " ${GIT_TAG_3DMASC})
|
||||
message(${PROJECT_NAME} " " GIT_BRANCH_CC " " ${GIT_BRANCH_CC})
|
||||
message(${PROJECT_NAME} " " GIT_COMMIT_HASH_CC " " ${GIT_COMMIT_HASH_CC})
|
||||
message(${PROJECT_NAME} " " Q3DMASC_VERSION " " ${Q3DMASC_PLUGIN_VERSION})
|
||||
message(VERBOSE ${PROJECT_NAME} " " GIT_BRANCH_3DMASC " " ${GIT_BRANCH_3DMASC})
|
||||
message(VERBOSE ${PROJECT_NAME} " " GIT_COMMIT_HASH_3DMASC " " ${GIT_COMMIT_HASH_3DMASC})
|
||||
message(VERBOSE ${PROJECT_NAME} " " GIT_TAG_3DMASC " " ${GIT_TAG_3DMASC})
|
||||
message(VERBOSE ${PROJECT_NAME} " " GIT_BRANCH_CC " " ${GIT_BRANCH_CC})
|
||||
message(VERBOSE ${PROJECT_NAME} " " GIT_COMMIT_HASH_CC " " ${GIT_COMMIT_HASH_CC})
|
||||
message(VERBOSE ${PROJECT_NAME} " " Q3DMASC_VERSION " " ${Q3DMASC_PLUGIN_VERSION})
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
GIT_BRANCH_CC="${GIT_BRANCH_CC}"
|
||||
|
||||
@@ -160,10 +160,10 @@ bool Feature::SaveSources(const Source::Set& sources, QString filename)
|
||||
}
|
||||
|
||||
QTextStream stream(&file);
|
||||
stream << "#Features_SF" << endl;
|
||||
stream << "#Features_SF" << Qt::endl;
|
||||
for (const Source& s : sources)
|
||||
{
|
||||
stream << s.type << ":" << s.name << endl;
|
||||
stream << s.type << ":" << s.name << Qt::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
+2
-2
@@ -721,12 +721,12 @@ void q3DMASCPlugin::doTrainAction()
|
||||
ccLog::Warning(QString("Can't open file '%1' for writing").arg(filename));
|
||||
}
|
||||
QTextStream stream(&file);
|
||||
stream << "# feature importance" << endl;
|
||||
stream << "# feature importance" << Qt::endl;
|
||||
for (size_t i = 0; i < originalFeatures.size(); ++i)
|
||||
{
|
||||
if (originalFeatures[i].selected)
|
||||
{
|
||||
stream << originalFeatures[i].feature->toString() << " " << originalFeatures[i].importance << endl;
|
||||
stream << originalFeatures[i].feature->toString() << " " << originalFeatures[i].importance << Qt::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,10 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(CC_WINDOWS)
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
using namespace masc;
|
||||
|
||||
Classifier::Classifier()
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ struct Command3DMASCClassif : public ccCommandLineInterface::Command
|
||||
cmd.arguments().pop_front();
|
||||
|
||||
//process the cloud roles description
|
||||
QStringList tokens = cloudRolesStr.simplified().split(QChar(' '), QString::SkipEmptyParts);
|
||||
QStringList tokens = cloudRolesStr.simplified().split(QChar(' '), Qt::SkipEmptyParts);
|
||||
|
||||
masc::Tools::NamedClouds cloudPerRole;
|
||||
QString mainCloudRole;
|
||||
|
||||
+8
-8
@@ -74,8 +74,8 @@ bool Tools::SaveClassifier( QString filename,
|
||||
|
||||
QTextStream stream(&file);
|
||||
|
||||
stream << "# 3DMASC classifier file" << endl;
|
||||
stream << "classifier: " << yamlFilename << endl;
|
||||
stream << "# 3DMASC classifier file" << Qt::endl;
|
||||
stream << "classifier: " << yamlFilename << Qt::endl;
|
||||
|
||||
//look for all clouds (labels)
|
||||
QList<QString> cloudLabels;
|
||||
@@ -91,22 +91,22 @@ bool Tools::SaveClassifier( QString filename,
|
||||
cloudLabels.push_back(corePointsRole);
|
||||
}
|
||||
|
||||
stream << "# Clouds (roles)" << endl;
|
||||
stream << "# Clouds (roles)" << Qt::endl;
|
||||
for (const QString& label : cloudLabels)
|
||||
{
|
||||
stream << "cloud: " << label << endl;
|
||||
stream << "cloud: " << label << Qt::endl;
|
||||
}
|
||||
|
||||
if (!corePointsRole.isEmpty())
|
||||
{
|
||||
stream << "# Core points (classified role)" << endl;
|
||||
stream << "core_points: " << corePointsRole << endl;
|
||||
stream << "# Core points (classified role)" << Qt::endl;
|
||||
stream << "core_points: " << corePointsRole << Qt::endl;
|
||||
}
|
||||
|
||||
stream << "# Features" << endl;
|
||||
stream << "# Features" << Qt::endl;
|
||||
for (Feature::Shared f : features)
|
||||
{
|
||||
stream << "feature: " << f->toString() << endl;
|
||||
stream << "feature: " << f->toString() << Qt::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -253,7 +253,7 @@ bool Train3DMASCDialog::openTraceFile()
|
||||
QDir parameterDir = QDir(info.path());
|
||||
|
||||
QFileDialog dialog(this);
|
||||
dialog.setFileMode(QFileDialog::DirectoryOnly);
|
||||
dialog.setFileMode(QFileDialog::Directory);
|
||||
dialog.setWindowTitle("Choose a valid directory for the traces");
|
||||
dialog.setDirectory(QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation).at(0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user