parent
f50634bcec
commit
7bd8cf83c0
|
@ -21,6 +21,36 @@ include_directories(C:/PCL/include/pcl-1.14)
|
|||
# qt5
|
||||
include_directories(C:/Qt/5.15.2/msvc2019_64/include/QtQml)
|
||||
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
|
||||
# boost
|
||||
include_directories(D:/vcpkg/installed/x64-windows/include)
|
||||
|
||||
# pcl
|
||||
include_directories(C:/PCL/3rdParty/FLANN/include)
|
||||
include_directories(C:/PCL/3rdParty/VTK/include/vtk-9.3)
|
||||
include_directories(C:/PCL/include/pcl-1.14)
|
||||
|
||||
# qt5
|
||||
include_directories(C:/Qt/5.15.2/msvc2019_64/include/QtQml)
|
||||
|
||||
# json
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../json)
|
||||
|
||||
# 内部结构
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/SqliteDBProcess/src)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/modelProcess)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/EchoShowProcess)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/OCCViewer)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/PointCloudProcess)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/SharedModuleLib)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/TableProcess)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/TaskXml)
|
||||
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# 链接库
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -35,7 +65,9 @@ link_directories("C:/PCL/lib")
|
|||
# 自动添加include目录
|
||||
#-----------------------------------------------------------------------------
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
|
||||
|
||||
|
||||
|
@ -62,6 +94,11 @@ add_library(PluginMeshDataExchange
|
|||
${_interface}
|
||||
${_header}
|
||||
${_source}
|
||||
Dialogmeshsurfacesampling.cpp
|
||||
Dialogmeshsurfacesampling.h
|
||||
Dialogmeshsurfacesampling.ui
|
||||
../PointCloudOperator/MeshSurfaceSamplingAlg.cpp
|
||||
../PointCloudOperator/MeshSurfaceSamplingAlg.h
|
||||
)
|
||||
|
||||
|
||||
|
@ -102,18 +139,24 @@ list(APPEND _depend_library
|
|||
Common PointCloudOperator PythonModule DataProperty MeshData Material Geometry BCBase ConfigOptions SelfDefObject ModelData ModuleBase PluginManager GeometryCommand GeometryWidgets IO MainWidgets MainWindow)
|
||||
|
||||
|
||||
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
LAMPCAE::CGNS Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml
|
||||
)
|
||||
|
||||
# 添加 点云 pcl
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
|
||||
LAMPCAE::CGNS Qt5::Core Qt5::Gui Qt5::Widgets Qt5::Xml
|
||||
)
|
||||
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
Qt5::Network Qt5::Core Qt5::Gui Qt5::Widgets Qt5::DBus Qt5::Core Qt5::Xml Qt5::OpenGL Qt5::Gui Qt5::Svg Qt5::Widgets Qt5::Qml Qt5::DataVisualization Qt5::Charts Qt5::PrintSupport Qt5::Test
|
||||
)
|
||||
|
||||
list(APPEND _runtimes_libraries
|
||||
OpenCASCADE::TKOpenGl OpenCASCADE::TKOffset OpenCASCADE::TKSTL OpenCASCADE::TKFillet OpenCASCADE::Freetype OpenCASCADE::TKBO OpenCASCADE::TKBRep OpenCASCADE::TKBool OpenCASCADE::TKCAF OpenCASCADE::TKCDF OpenCASCADE::TKG2d OpenCASCADE::TKG3d OpenCASCADE::TKGeomAlgo OpenCASCADE::TKGeomBase OpenCASCADE::TKHLR OpenCASCADE::TKIGES OpenCASCADE::TKLCAF OpenCASCADE::TKMath OpenCASCADE::TKMesh OpenCASCADE::TKPrim OpenCASCADE::TKSTEP OpenCASCADE::TKSTEP209 OpenCASCADE::TKSTEPAttr OpenCASCADE::TKSTEPBase OpenCASCADE::TKService OpenCASCADE::TKShHealing OpenCASCADE::TKTopAlgo OpenCASCADE::TKV3d OpenCASCADE::TKVCAF OpenCASCADE::TKXCAF OpenCASCADE::TKXDEIGES OpenCASCADE::TKXSBase OpenCASCADE::TKernel Qt5::Widgets Qt5::Xml VTK::CommonColor VTK::CommonComputationalGeometry VTK::CommonCore VTK::CommonDataModel VTK::CommonExecutionModel VTK::CommonMath VTK::CommonMisc VTK::CommonSystem VTK::CommonTransforms VTK::FiltersCore VTK::FiltersExtraction VTK::FiltersGeneral VTK::FiltersGeometry VTK::FiltersSources VTK::FiltersStatistics VTK::IOCore VTK::IOLegacy VTK::IOXML VTK::IOXMLParser VTK::ImagingCore VTK::ImagingFourier VTK::ImagingMath VTK::InteractionStyle VTK::ParallelCore VTK::ParallelDIY VTK::RenderingCore VTK::RenderingFreeType VTK::RenderingOpenGL2 VTK::RenderingUI VTK::RenderingVolume VTK::RenderingVolumeOpenGL2 VTK::doubleconversion VTK::expat VTK::freetype VTK::glew VTK::lz4 VTK::lzma VTK::sys VTK::zlib VTK::IOGeometry
|
||||
)
|
||||
|
||||
# 添加 VTK
|
||||
list(APPEND _runtimes_libraries
|
||||
VTK::CommonColor VTK::CommonComputationalGeometry VTK::CommonCore VTK::CommonDataModel VTK::CommonExecutionModel VTK::CommonMath VTK::CommonMisc VTK::CommonSystem VTK::CommonTransforms VTK::DICOMParser VTK::FiltersCore VTK::FiltersGeneral VTK::FiltersGeometry VTK::FiltersHybrid VTK::FiltersModeling VTK::FiltersSources VTK::IOCore VTK::IOChemistry VTK::IOGeometry VTK::IOImage VTK::IOLegacy VTK::ImagingCore VTK::ImagingSources VTK::RenderingCore VTK::RenderingLOD VTK::doubleconversion VTK::jpeg VTK::jsoncpp VTK::lz4 VTK::lzma VTK::metaio VTK::png VTK::pugixml VTK::sys VTK::tiff VTK::zlib
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
/**
|
||||
* @file dialogmeshsurfacesampling.cpp
|
||||
* @brief None
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-5-15
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
// You may need to build the project (run Qt uic code generator) to get
|
||||
// "ui_DialogMeshSurfaceSampling.h" resolved
|
||||
|
||||
#include "Dialogmeshsurfacesampling.h"
|
||||
#include "ui_DialogMeshSurfaceSampling.h"
|
||||
|
||||
namespace MainWidget {
|
||||
|
||||
|
||||
// DialogMeshSurfaceSampling::DialogMeshSurfaceSampling(GUI::MainWindow* parent) : QFDialog(parent),
|
||||
// _ui(new Ui::DialogMeshSurfaceSampling), _mw(parent), _selectdlg(new DialogSelectComponents(parent)) {
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
// DialogMeshSurfaceSampling::~DialogMeshSurfaceSampling()
|
||||
// {
|
||||
// delete _ui;
|
||||
// _ui = NULL;
|
||||
// delete _selectdlg;
|
||||
// _selectdlg = NULL;
|
||||
// }
|
||||
//
|
||||
// void DialogMeshSurfaceSampling::removeCurrentItem(QListWidgetItem* curItem) {}
|
||||
// void DialogMeshSurfaceSampling::accept()
|
||||
// {
|
||||
// QDialog::accept();
|
||||
// }
|
||||
// void DialogMeshSurfaceSampling::selectedComponentsSlot(QList<MeshData::MeshSet*> components) {}
|
||||
// void DialogMeshSurfaceSampling::customContextMenuRequestedSlot(const QPoint& point) {}
|
||||
} // namespace MeshSurfaceSampling
|
|
@ -0,0 +1,66 @@
|
|||
/**
|
||||
* @file dialogmeshsurfacesampling.h
|
||||
* @brief None
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-5-15
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef LAMPCAE_DIALOGMESHSURFACESAMPLING_H
|
||||
#define LAMPCAE_DIALOGMESHSURFACESAMPLING_H
|
||||
#include "meshDataExchangePluginAPI.h"
|
||||
#include "SelfDefObject/QFDialog.h"
|
||||
#include "MeshData/meshSet.h"
|
||||
#include <QDialog>
|
||||
#include <QListWidgetItem>
|
||||
|
||||
namespace Ui {
|
||||
class DialogMeshSurfaceSampling;
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace MainWidget {
|
||||
// class DialogSelectComponents;
|
||||
//
|
||||
//
|
||||
// class MESHDATAEXCHANGEPLUGINAPI DialogMeshSurfaceSampling : public QFDialog {
|
||||
// Q_OBJECT
|
||||
//
|
||||
// public:
|
||||
// DialogMeshSurfaceSampling(GUI::MainWindow* parent);
|
||||
// ~DialogMeshSurfaceSampling() ;
|
||||
// private:
|
||||
// void removeCurrentItem(QListWidgetItem* curItem);
|
||||
// signals: // 这里采用信号来直接与 主界面通信,避免参数浪费
|
||||
// private slots:
|
||||
//
|
||||
// virtual void accept();
|
||||
// void selectedComponentsSlot(QList<MeshData::MeshSet*> components);
|
||||
// void customContextMenuRequestedSlot(const QPoint& point);
|
||||
//
|
||||
// private:
|
||||
// GUI::MainWindow* _mw;
|
||||
// DialogSelectComponents* _selectdlg;
|
||||
// QList<MeshData::MeshSet*> _components;
|
||||
//
|
||||
// private:
|
||||
// Ui::DialogMeshSurfaceSampling* _ui;
|
||||
// };
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace MeshSurfaceSampling
|
||||
|
||||
#endif // LAMPCAE_DIALOGMESHSURFACESAMPLING_H
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MeshSurfaceSampling::DialogMeshSurfaceSampling</class>
|
||||
<widget class="QDialog" name="MeshSurfaceSampling::DialogMeshSurfaceSampling">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>DialogMeshSurfaceSampling</string>
|
||||
</property>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -254,7 +254,7 @@ namespace MeshData
|
|||
}
|
||||
cellToPointFilter->Update();
|
||||
// ungird->CopyStructure(filter->GetOutput());
|
||||
//
|
||||
|
||||
// qDebug()<<"ungird , cell Count : "+QString::number(ungird->GetNumberOfCells());
|
||||
vtkSmartPointer<vtkPolyData> inpolyData=vtkSmartPointer<vtkPolyData>::New();
|
||||
inpolyData = cellToPointFilter->GetOutput();
|
||||
|
|
|
@ -16,7 +16,8 @@
|
|||
#include "VTKdataExchange.h"
|
||||
#include "FoamDataExchange.h"
|
||||
#include "PointClouddataExchange.h"
|
||||
|
||||
#include "Dialogmeshsurfacesampling.h"
|
||||
#include "Common/DebugLogger.h"
|
||||
#include <QFileInfo>
|
||||
|
||||
GUI::MainWindow* MeshData::MeshDataExchangePlugin::_mainwindow = nullptr;
|
||||
|
@ -62,7 +63,6 @@ namespace MeshData {
|
|||
IO::IOConfigure::RegisterPclExporter("Point Cloud Data(*.pcd)",PCDexportPCL);
|
||||
IO::IOConfigure::RegisterPclExporter("vtk polygon Data(*.ply)",PLYexportPCL);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -107,12 +107,58 @@ namespace MeshData {
|
|||
{
|
||||
return _mainwindow;
|
||||
}
|
||||
} // namespace MeshData
|
||||
|
||||
}
|
||||
|
||||
|
||||
//namespace MeshSurfaceSampling
|
||||
//{
|
||||
// MeshSurfaceSamplingPlugin::MeshSurfaceSamplingPlugin(GUI::MainWindow* m) {
|
||||
//
|
||||
//
|
||||
// }
|
||||
// bool MeshSurfaceSamplingPlugin::install()
|
||||
// {
|
||||
// if(_mainwindow == nullptr)
|
||||
// return false;
|
||||
// PluginBase::install();
|
||||
// DebugInfo("MeshSurfaceSamplingPlugin has install\n ");
|
||||
// return true;
|
||||
// }
|
||||
// bool MeshSurfaceSamplingPlugin::uninstall()
|
||||
// {
|
||||
// PluginBase::uninstall();
|
||||
// return true;
|
||||
// }
|
||||
// void MeshSurfaceSamplingPlugin::reTranslate(QString)
|
||||
// {
|
||||
//
|
||||
// }
|
||||
// GUI::MainWindow* MeshSurfaceSamplingPlugin::getMWpt()
|
||||
// {
|
||||
// return _mainwindow;
|
||||
// }
|
||||
//} // MeshSurfaceSampling MeshData
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 模型注册
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void Register(GUI::MainWindow* m, QList<Plugins::PluginBase*>* ps)
|
||||
{
|
||||
Plugins::PluginBase* p = new MeshData::MeshDataExchangePlugin(m);
|
||||
ps->append(p);
|
||||
Plugins::PluginBase* p_meshdataExchangeplugin = new MeshData::MeshDataExchangePlugin(m);
|
||||
ps->append(p_meshdataExchangeplugin);
|
||||
|
||||
// Plugins::PluginBase* p_meshSurfaceSample = new MeshSurfaceSampling::MeshSurfaceSamplingPlugin(m);
|
||||
// ps->append(p_meshSurfaceSample);
|
||||
|
||||
}
|
||||
|
||||
bool CGNSimportMesh(QString AbFileName, int modelId)
|
||||
|
|
|
@ -4,31 +4,45 @@
|
|||
#include "meshDataExchangePluginAPI.h"
|
||||
#include "PluginManager/pluginBase.h"
|
||||
|
||||
namespace MeshData
|
||||
{
|
||||
enum MeshOperation
|
||||
{
|
||||
MESH_NONE,
|
||||
MESH_READ,
|
||||
MESH_WRITE
|
||||
};
|
||||
namespace MeshData {
|
||||
enum MeshOperation { MESH_NONE, MESH_READ, MESH_WRITE };
|
||||
|
||||
class MESHDATAEXCHANGEPLUGINAPI MeshDataExchangePlugin : public Plugins::PluginBase
|
||||
{
|
||||
public:
|
||||
MeshDataExchangePlugin(GUI::MainWindow* m);
|
||||
~MeshDataExchangePlugin() = default;
|
||||
class MESHDATAEXCHANGEPLUGINAPI MeshDataExchangePlugin : public Plugins::PluginBase {
|
||||
public:
|
||||
MeshDataExchangePlugin(GUI::MainWindow* m);
|
||||
~MeshDataExchangePlugin() = default;
|
||||
|
||||
bool install();
|
||||
bool uninstall();
|
||||
void reTranslate(QString);
|
||||
static GUI::MainWindow* getMWpt();
|
||||
bool install();
|
||||
bool uninstall();
|
||||
void reTranslate(QString);
|
||||
static GUI::MainWindow* getMWpt();
|
||||
|
||||
private:
|
||||
static GUI::MainWindow* _mainwindow;
|
||||
private:
|
||||
static GUI::MainWindow* _mainwindow;
|
||||
};
|
||||
}
|
||||
|
||||
//
|
||||
//namespace MeshSurfaceSampling
|
||||
//{
|
||||
// class MESHDATAEXCHANGEPLUGINAPI MeshSurfaceSamplingPlugin: public Plugins::PluginBase
|
||||
// {
|
||||
// public:
|
||||
// MeshSurfaceSamplingPlugin(GUI::MainWindow* m);
|
||||
// ~MeshSurfaceSamplingPlugin() = default;
|
||||
//
|
||||
// bool install();
|
||||
// bool uninstall();
|
||||
// void reTranslate(QString);
|
||||
// static GUI::MainWindow* getMWpt();
|
||||
//
|
||||
// private:
|
||||
// static GUI::MainWindow* _mainwindow;
|
||||
// };
|
||||
//
|
||||
//
|
||||
//}
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void MESHDATAEXCHANGEPLUGINAPI Register(GUI::MainWindow* m, QList<Plugins::PluginBase*>* plugs);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ShowAllFiles>false</ShowAllFiles>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LocalDebuggerAttach>false</LocalDebuggerAttach>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LocalDebuggerAttach>false</LocalDebuggerAttach>
|
||||
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<QtLastBackgroundBuild>2024-03-11T14:28:13.8563547Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2024-03-11T14:28:13.5842400Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<QtLastBackgroundBuild>2024-03-11T14:28:14.4305103Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="QtSettings">
|
||||
<QtLastBackgroundBuild>2024-03-11T14:28:14.3381603Z</QtLastBackgroundBuild>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -92,6 +92,8 @@ add_library(PointCloudOperator
|
|||
${_interface}
|
||||
${_header}
|
||||
${_source}
|
||||
MeshOpearatorCommon.cpp
|
||||
MeshOpearatorCommon.h
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* @file MeshOpearatorCommon.cpp
|
||||
* @brief None
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-5-15
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
#include "MeshOpearatorCommon.h"
|
||||
|
||||
namespace MeshOpearator {
|
||||
|
||||
MeshOpearatorCommon::MeshOpearatorCommon(QObject* parent): QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace MeshOpearator
|
|
@ -0,0 +1,133 @@
|
|||
/**
|
||||
* @file MeshOpearatorCommon.h
|
||||
* @brief None
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-5-15
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef LAMPCAE_MESHOPEARATORCOMMON_H
|
||||
#define LAMPCAE_MESHOPEARATORCOMMON_H
|
||||
#include "PointCloudOperatorAPI.h"
|
||||
// qt 相关头文件
|
||||
#include <QObject>
|
||||
|
||||
// 常用pcl 头文件库
|
||||
#include <pcl/io/ply_io.h>
|
||||
#include <pcl/kdtree/kdtree_flann.h>
|
||||
#include <pcl/point_cloud.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <pcl/visualization/cloud_viewer.h>
|
||||
#include <pcl/visualization/pcl_visualizer.h>
|
||||
|
||||
#include <boost/random.hpp> //随机数
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <iostream>
|
||||
#include <pcl/console/time.h> // TicToc
|
||||
#include <pcl/features/normal_3d.h>
|
||||
#include <pcl/filters/bilateral.h>
|
||||
#include <pcl/filters/extract_indices.h>
|
||||
#include <pcl/filters/fast_bilateral.h>
|
||||
#include <pcl/filters/fast_bilateral_omp.h>
|
||||
#include <pcl/filters/passthrough.h>
|
||||
#include <pcl/filters/voxel_grid.h>
|
||||
#include <pcl/io/pcd_io.h>
|
||||
#include <pcl/io/ply_io.h>
|
||||
#include <pcl/kdtree/kdtree.h>
|
||||
#include <pcl/kdtree/kdtree_flann.h>
|
||||
#include <pcl/point_cloud.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <pcl/registration/ia_fpcs.h> // 4PCS算法
|
||||
#include <pcl/registration/ia_kfpcs.h> //K4PCS算法头文件
|
||||
#include <pcl/registration/icp.h>
|
||||
#include <pcl/registration/registration.h>
|
||||
#include <pcl/search/flann_search.h>
|
||||
#include <pcl/surface/concave_hull.h>
|
||||
#include <pcl/surface/gp3.h> //贪婪投影三角化算法类定义的头文件
|
||||
#include <pcl/surface/marching_cubes_hoppe.h> //移动立方体
|
||||
#include <pcl/surface/marching_cubes_rbf.h>
|
||||
#include <pcl/surface/mls.h> //MLS
|
||||
#include <pcl/surface/poisson.h> //泊松重建
|
||||
#include <pcl/visualization/cloud_viewer.h>
|
||||
#include <pcl/visualization/pcl_visualizer.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <vtkOutputWindow.h>
|
||||
|
||||
#include <pcl/console/time.h> // TicToc
|
||||
#include <pcl/filters/approximate_voxel_grid.h> // 体素滤波
|
||||
#include <pcl/filters/voxel_grid.h> // 体素滤波
|
||||
#include <vtkOutputWindow.h>
|
||||
|
||||
#include <boost/thread/thread.hpp>
|
||||
#include <pcl/ModelCoefficients.h>
|
||||
#include <pcl/filters/extract_indices.h>
|
||||
#include <pcl/io/pcd_io.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <pcl/sample_consensus/method_types.h> //随机参数估计方法
|
||||
#include <pcl/sample_consensus/model_types.h> //模型定义
|
||||
#include <pcl/segmentation/sac_segmentation.h> //RANSAC分割
|
||||
#include <pcl/visualization/pcl_visualizer.h>
|
||||
#include <sstream>
|
||||
#include <stdlib.h> //rand()头文件
|
||||
#include <vtkMassProperties.h>
|
||||
#include <vtkPLYReader.h>
|
||||
#include <vtkSmartPointer.h>
|
||||
#include <vtkTriangleFilter.h>
|
||||
|
||||
#include <Eigen/Core>
|
||||
#include <iostream>
|
||||
#include <pcl/common/common.h>
|
||||
#include <pcl/common/transforms.h>
|
||||
#include <pcl/features/moment_of_inertia_estimation.h>
|
||||
#include <pcl/filters/voxel_grid.h>
|
||||
#include <pcl/io/io.h>
|
||||
#include <pcl/io/pcd_io.h>
|
||||
#include <pcl/io/vtk_io.h>
|
||||
#include <pcl/io/vtk_lib_io.h>
|
||||
#include <pcl/point_cloud.h>
|
||||
#include <pcl/point_types.h>
|
||||
#include <pcl/visualization/cloud_viewer.h>
|
||||
#include <pcl/visualization/pcl_visualizer.h>
|
||||
#include <string>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <vtkAutoInit.h>
|
||||
//可视化相关头文件
|
||||
#include <vtkActor.h>
|
||||
#include <vtkAutoInit.h>
|
||||
#include <vtkInteractorStyleTrackballCamera.h>
|
||||
#include <vtkPolyDataMapper.h>
|
||||
#include <vtkProperty.h>
|
||||
#include <vtkRenderWindow.h>
|
||||
#include <vtkRenderWindowInteractor.h>
|
||||
#include <vtkRenderer.h>
|
||||
// Boost
|
||||
#include <boost/math/special_functions/round.hpp>
|
||||
|
||||
// Visualization Toolkit (VTK)
|
||||
#include <vtkRenderWindow.h>
|
||||
#include "MeshData/meshSet.h"
|
||||
#include "Meshdata/meshKernal.h"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace MeshOpearator {
|
||||
|
||||
class POINTCLOUDOPERATORAPI MeshOpearatorCommon:public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MeshOpearatorCommon(QObject* parent=nullptr);
|
||||
~MeshOpearatorCommon()=default;
|
||||
public:
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace MeshOpearator
|
||||
|
||||
#endif // LAMPCAE_MESHOPEARATORCOMMON_H
|
|
@ -0,0 +1,39 @@
|
|||
/**
|
||||
* @file MeshSurfaceSamplingAlg.cpp
|
||||
* @brief None
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-5-15
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
#include <vtkStructuredPointsReader.h>
|
||||
#include <vtkSurfaceReconstructionFilter.h>
|
||||
#include <vtkDataSetSurfaceFilter.h>
|
||||
#include <vtkXMLPolyDataWriter.h>
|
||||
#include <QDebug>
|
||||
|
||||
namespace MeshSurfaceSampling {
|
||||
vtkSmartPointer<vtkPolyData> MeshSurfaceSampling(vtkSmartPointer<vtkPolyData> Inpoints) {
|
||||
// 读取三维数据
|
||||
vtkSmartPointer<vtkStructuredPointsReader> reader = vtkSmartPointer<vtkStructuredPointsReader>::New();
|
||||
reader->SetFileName("input.vtk");
|
||||
reader->Update();
|
||||
|
||||
// 创建表面重建滤波器
|
||||
vtkSmartPointer<vtkSurfaceReconstructionFilter> surfaceFilter = vtkSmartPointer<vtkSurfaceReconstructionFilter>::New();
|
||||
surfaceFilter->SetInputData(Inpoints);
|
||||
surfaceFilter->Update();
|
||||
|
||||
// 将结果转换为多边形数据
|
||||
vtkSmartPointer<vtkDataSetSurfaceFilter> surface = vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
|
||||
surface->SetInputConnection(surfaceFilter->GetOutputPort());
|
||||
surface->Update();
|
||||
|
||||
// 返回结果
|
||||
vtkSmartPointer<vtkPolyData> Outresurface =surface->GetOutput();
|
||||
qDebug()<<"MeshSurfaceSampling has finish,now return vtk ptr!!!";
|
||||
return Outresurface;
|
||||
|
||||
}
|
||||
} // namespace MeshSurfaceSampling
|
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* @file MeshSurfaceSamplingAlg.h
|
||||
* @brief 表面重采样
|
||||
* @author 陈增辉 (3045316072@qq.com)
|
||||
* @version 2.5.0
|
||||
* @date 24-5-15
|
||||
* @copyright Copyright (c) Since 2024 中科卫星应用研究院 All rights reserved.
|
||||
*/
|
||||
|
||||
#ifndef LAMPCAE_MESHSURFACESAMPLINGALG_H
|
||||
#define LAMPCAE_MESHSURFACESAMPLINGALG_H
|
||||
#include <vtkPolyData.h>
|
||||
#include "PointCloudOperatorAPI.h"
|
||||
|
||||
|
||||
|
||||
namespace MeshSurfaceSampling {
|
||||
|
||||
vtkSmartPointer<vtkPolyData> POINTCLOUDOPERATORAPI MeshSurfaceSampling(vtkSmartPointer<vtkPolyData> Inpoints);
|
||||
|
||||
|
||||
|
||||
} // namespace MeshSurfaceSampling
|
||||
|
||||
#endif // LAMPCAE_MESHSURFACESAMPLINGALG_H
|
|
@ -131,6 +131,7 @@ namespace PointCloudOperator {
|
|||
static int PointCloudCommon::mesh2vtk (const pcl::PolygonMesh& mesh,vtkPolyData* poly_data);
|
||||
|
||||
static vtkPolyData* meshSetToVtkDataset(MeshData::MeshSet* in_set);
|
||||
|
||||
};
|
||||
|
||||
} // namespace PointCloudOperator
|
||||
|
|
Loading…
Reference in New Issue