disclaimer
This commit is contained in:
+56
-1
@@ -10,7 +10,9 @@ if ( PLUGIN_G3POINT )
|
||||
project( G3PointPlugin )
|
||||
|
||||
AddPlugin( NAME ${PROJECT_NAME} )
|
||||
|
||||
|
||||
set(QG3POINT_PLUGIN_VERSION "0.1")
|
||||
|
||||
add_subdirectory( include )
|
||||
add_subdirectory( src )
|
||||
add_subdirectory( ui )
|
||||
@@ -31,4 +33,57 @@ if ( PLUGIN_G3POINT )
|
||||
set( OPENCV_DEP_DLL_FILES ${Open3D_DIR}/../bin/Open3D.dll )
|
||||
copy_files( "${OPENCV_DEP_DLL_FILES}" "${CLOUDCOMPARE_DEST_FOLDER}" ) #mind the quotes!
|
||||
|
||||
#================
|
||||
# git commit hash
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH_G3POINT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Get the latest commit hash
|
||||
execute_process(
|
||||
COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH_G3POINT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Get the latest commit hash
|
||||
execute_process(
|
||||
COMMAND git describe
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_TAG_G3POINT
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Get the current working branch
|
||||
execute_process(
|
||||
COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_BRANCH_CC
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Get the latest commit hash
|
||||
execute_process(
|
||||
COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE GIT_COMMIT_HASH_CC
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
message(${PROJECT_NAME} " " GIT_BRANCH_G3POINT " " ${GIT_BRANCH_G3POINT})
|
||||
message(${PROJECT_NAME} " " GIT_COMMIT_HASH_G3POINT " " ${GIT_COMMIT_HASH_G3POINT})
|
||||
message(${PROJECT_NAME} " " GIT_TAG_G3POINT " " ${GIT_TAG_G3POINT})
|
||||
message(${PROJECT_NAME} " " GIT_BRANCH_CC " " ${GIT_BRANCH_CC})
|
||||
message(${PROJECT_NAME} " " GIT_COMMIT_HASH_CC " " ${GIT_COMMIT_HASH_CC})
|
||||
message(${PROJECT_NAME} " " QG3POINT_VERSION " " ${QG3POINT_PLUGIN_VERSION})
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
GIT_BRANCH_CC="${GIT_BRANCH_CC}"
|
||||
GIT_COMMMIT_HASH_CC="${GIT_COMMIT_HASH_CC}"
|
||||
PUBLIC GIT_BRANCH_G3POINT="${GIT_BRANCH_G3POINT}"
|
||||
GIT_COMMMIT_HASH_G3POINT="${GIT_COMMIT_HASH_G3POINT}"
|
||||
GIT_TAG_G3POINT="${GIT_TAG_G3POINT}"
|
||||
G3POINT_VERSION="${QG3POINT_PLUGIN_VERSION}"
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -5,6 +5,7 @@ target_sources( ${PROJECT_NAME}
|
||||
${CMAKE_CURRENT_LIST_DIR}/G3Point.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/G3PointDialog.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/GrainsAsEllipsoids.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/qG3PointDisclaimer.h
|
||||
)
|
||||
|
||||
target_include_directories( ${PROJECT_NAME}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#ifndef QG3POINTDISCLAIMER_H
|
||||
#define QG3POINTDISCLAIMER_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
class ccMainAppInterface;
|
||||
|
||||
namespace Ui {
|
||||
class G3PointDisclaimer;
|
||||
}
|
||||
|
||||
class qG3PointDisclaimer : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit qG3PointDisclaimer(QWidget *parent = nullptr);
|
||||
~qG3PointDisclaimer();
|
||||
|
||||
static bool show(ccMainAppInterface* app);
|
||||
|
||||
private:
|
||||
//whether disclaimer has already been displayed (and accepted) or not
|
||||
static bool s_disclaimerAccepted;
|
||||
|
||||
Ui::G3PointDisclaimer *ui;
|
||||
};
|
||||
|
||||
#endif // QG3POINTDISCLAIMER_H
|
||||
@@ -37,6 +37,8 @@
|
||||
|
||||
#include <ccPointCloud.h>
|
||||
|
||||
#include <qG3PointDisclaimer.h>
|
||||
|
||||
namespace G3Point
|
||||
{
|
||||
G3PointAction* G3PointAction::s_g3PointAction = nullptr;
|
||||
@@ -61,6 +63,10 @@ G3PointAction::~G3PointAction()
|
||||
|
||||
void G3PointAction::GetG3PointAction(ccPointCloud *cloud, ccMainAppInterface *app)
|
||||
{
|
||||
//disclaimer accepted?
|
||||
if (!qG3PointDisclaimer::show(app))
|
||||
return;
|
||||
|
||||
if (!s_g3PointAction) // create the singleton if needed
|
||||
{
|
||||
s_g3PointAction = new G3PointAction(cloud, app);
|
||||
|
||||
@@ -5,4 +5,5 @@ target_sources( ${PROJECT_NAME}
|
||||
${CMAKE_CURRENT_LIST_DIR}/G3Point.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/G3PointDialog.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/GrainsAsEllipsoids.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/qG3PointDisclaimer.cpp
|
||||
)
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
#include "qG3PointDisclaimer.h"
|
||||
#include "ui_qG3PointDisclaimer.h"
|
||||
|
||||
//qCC_plugins
|
||||
#include <ccMainAppInterface.h>
|
||||
|
||||
//Qt
|
||||
#include <QMainWindow>
|
||||
|
||||
bool qG3PointDisclaimer::s_disclaimerAccepted = false;
|
||||
|
||||
qG3PointDisclaimer::qG3PointDisclaimer(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::G3PointDisclaimer)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QString compilationInfo;
|
||||
compilationInfo += "Version " + QString(G3POINT_VERSION);
|
||||
compilationInfo += QStringLiteral("<br><i>Compiled with");
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
compilationInfo += QStringLiteral(" MSVC %1 and").arg(_MSC_VER);
|
||||
#endif
|
||||
|
||||
compilationInfo += QStringLiteral(" Qt %1").arg(QT_VERSION_STR);
|
||||
compilationInfo += QStringLiteral("</i>");
|
||||
compilationInfo += " [cc " + QString(GIT_BRANCH_CC) + "/" + QString(GIT_COMMMIT_HASH_CC) + "]";
|
||||
compilationInfo += " [g3point " +
|
||||
QString(GIT_TAG_G3POINT) + " " +
|
||||
QString(GIT_BRANCH_G3POINT) + "/" +
|
||||
QString(GIT_COMMMIT_HASH_G3POINT) + "]";
|
||||
|
||||
ui->labelCompilationInformation->setText(compilationInfo);
|
||||
}
|
||||
|
||||
qG3PointDisclaimer::~qG3PointDisclaimer()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool qG3PointDisclaimer::show(ccMainAppInterface *app)
|
||||
{
|
||||
if ( !s_disclaimerAccepted )
|
||||
{
|
||||
//if the user "cancels" it, then he refuses the disclaimer
|
||||
s_disclaimerAccepted = qG3PointDisclaimer(app ? app->getMainWindow() : 0).exec();
|
||||
}
|
||||
|
||||
return s_disclaimerAccepted;
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
target_sources( ${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_LIST_DIR}/qG3PointDialog.ui
|
||||
${CMAKE_CURRENT_LIST_DIR}/qG3PointDisclaimer.ui
|
||||
)
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>G3PointDisclaimer</class>
|
||||
<widget class="QDialog" name="G3PointDisclaimer">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1086</width>
|
||||
<height>263</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit">
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
hr { height: 1px; border-width: 0; }
|
||||
li.unchecked::marker { content: "\2610"; }
|
||||
li.checked::marker { content: "\2612"; }
|
||||
</style></head><body style=" font-family:'Segoe UI'; font-size:9pt; font-weight:400; font-style:normal;">
|
||||
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Calibri,sans-serif'; font-size:12pt; font-weight:700; color:#1f497d;">G3Point: grain segmentation algorithm</span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'Slack-Lato','appleLogo','sans-serif'; font-size:10pt; font-weight:600; color:#1f497d;">Code </span><span style=" font-family:'Slack-Lato','appleLogo','sans-serif'; font-size:10pt; color:#1f497d;">P. Leroy</span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'Slack-Lato','appleLogo','sans-serif'; font-size:6pt; color:#1f497d; background-color:#ffffff;"> </span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'Slack-Lato','appleLogo','sans-serif'; font-size:10pt; font-weight:700; color:#1f497d; background-color:#ffffff;">Article</span><span style=" font-family:'Slack-Lato','appleLogo','sans-serif'; font-size:10pt; color:#1f497d; background-color:#ffffff;"> Steer, P., Guerit, L., Lague, D., Crave, A., and Gourdon, A.</span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'Slack-Lato','appleLogo','sans-serif'; font-size:10pt; font-style:italic; color:#1f497d; background-color:#ffffff;">Size, shape and orientation matter: fast and semi-automatic measurement of grain geometries from 3D point clouds</span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'Slack-Lato','appleLogo','sans-serif'; font-size:10pt; color:#1f497d; background-color:#ffffff;">Earth Surf. Dynam., 10, 1211–1232, https://doi.org/10.5194/esurf-10-1211-2022, 2022.</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Calibri,sans-serif'; font-size:6pt; color:#1f497d;"> </span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700; color:#ff0000;">Comments / remarks =&gt; Section G3Point of the forum https://www.cloudcompare.org/forum/</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:6pt;"> </span><span style=" font-family:'Calibri,sans-serif'; font-size:6pt; color:#1f497d; background-color:#ffffff;"> </span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'Calibri,sans-serif'; font-size:10pt; color:#1f497d; background-color:#ffffff;">Observatoire des Sciences de l'Univers de Rennes - Géosciences Rennes</span></p>
|
||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; background-color:#ffffff;"><span style=" font-family:'Calibri,sans-serif'; font-size:10pt; color:#1f497d; background-color:#ffffff;">Université de Rennes - Centre National de la Recherche Scientifique</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="labelCompilationInformation">
|
||||
<property name="text">
|
||||
<string>Compilation information: -</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>G3PointDisclaimer</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>G3PointDisclaimer</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user