优化了 选择对象时,系统速度较慢的问题
parent
d4123c36a8
commit
6b1c5f6960
|
@ -254,7 +254,9 @@ find_package(GDAL CONFIG REQUIRED)
|
|||
# sqlite3
|
||||
find_package(unofficial-sqlite3 CONFIG REQUIRED)
|
||||
|
||||
|
||||
# opencv
|
||||
set(OpenCV_DIR "${VCPKG_INSTALLED_DIR}/x64-windows/share/opencv4")
|
||||
find_package(OpenCV REQUIRED) # 找到opencv库
|
||||
|
||||
# QGIS 库 作为遥感数据操作,这个是插件库,如果不编译插件库,可以不用考虑这个库,注意这个库是由源代码构建,建议不要动
|
||||
#find_package(QGIS REQUIRED)
|
||||
|
|
|
@ -33,7 +33,7 @@ list(APPEND LAMPCAE_Runtimes_Libraries Qt5::Qml Qt5::Network )
|
|||
list(APPEND LAMPCAE_Runtimes_Libraries
|
||||
OpenCASCADE::TKOpenGl OpenCASCADE::TKOffset OpenCASCADE::TKSTL 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::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
|
||||
|
||||
${OpenCV_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -18,10 +18,12 @@
|
|||
#include <vtkExtractSelection.h>
|
||||
#include <vtkDoubleArray.h>
|
||||
#include <QThread>
|
||||
#include <QDebug>
|
||||
#include <set>
|
||||
#include <QDateTime>
|
||||
#ifdef LAMPCAE_HAS_OPENMP
|
||||
#include <omp.h>
|
||||
#endif
|
||||
#include <QDebug>
|
||||
|
||||
namespace MainWidget
|
||||
{
|
||||
|
@ -85,28 +87,36 @@ namespace MainWidget
|
|||
pointColor->FillComponent(2, col[2]);
|
||||
}
|
||||
|
||||
void MeshKernalViewObj::setPointDisplayColor(QList<int> &indexs, const QColor &color)
|
||||
void MeshKernalViewObj::setPointDisplayColor(QList<int> &indexs, const QColor &color,bool isModitfy)
|
||||
{
|
||||
//qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshKernalViewObj::setPointDisplayColor start ";
|
||||
std::set<int> indexSet(indexs.begin(), indexs.end()); // 转换为 set-- std 实现是B+树
|
||||
//qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshKernalViewObj::setPointDisplayColor create set ";
|
||||
vtkDataArray *colorArray = _displayData->GetPointData()->GetScalars();
|
||||
vtkDataArray *indexArray = _displayData->GetPointData()->GetArray("IDS");
|
||||
vtkDataArray *indexArray = _displayData->GetPointData()->GetArray("IDS"); // display data , kernel idx, point idx
|
||||
//vtkDataArray *selectArray = _displayData->GetPointData()->GetArray("SELECT"); // select state array
|
||||
if (nullptr == colorArray || nullptr == indexArray)
|
||||
return;
|
||||
double col[3]{color.red()*1.0, color.green()*1.0, color.blue()*1.0};
|
||||
const int nPoint = indexArray->GetNumberOfTuples();
|
||||
for (int i = 0; i < nPoint; ++i)
|
||||
double col[3]{color.red()*1.0, color.green()*1.0, color.blue()*1.0}; // color
|
||||
const int nPoint = indexArray->GetNumberOfTuples(); // 所有显示 点的数量
|
||||
for (int i = 0; i < nPoint; ++i) // 遍历所有的显示点
|
||||
{
|
||||
if (indexs.isEmpty())
|
||||
break;
|
||||
int pointindex = indexArray->GetComponent(i, 1);
|
||||
if (indexs.contains(pointindex))
|
||||
if (indexSet.find(pointindex)!=indexSet.end()) // 选择点是否在 渲染 点集中, 选中 && 渲染 修改
|
||||
{
|
||||
colorArray->SetComponent(i, 0, col[0]);
|
||||
colorArray->SetComponent(i, 1, col[1]);
|
||||
colorArray->SetComponent(i, 2, col[2]);
|
||||
indexs.removeOne(pointindex);
|
||||
//indexs.removeOne(pointindex);
|
||||
}
|
||||
}
|
||||
_displayData->Modified();
|
||||
if(isModitfy) {
|
||||
_displayData->Modified();
|
||||
}
|
||||
|
||||
//qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshKernalViewObj::setPointDisplayColor finish ";
|
||||
}
|
||||
|
||||
void MeshKernalViewObj::setCellColor(const QColor &c, bool disOnly)
|
||||
|
@ -142,16 +152,19 @@ namespace MainWidget
|
|||
cellcolor->FillComponent(2, col[2]);
|
||||
}
|
||||
|
||||
void MeshKernalViewObj::setCellDisplayColor(QList<int> &indexs, const QColor &color)
|
||||
void MeshKernalViewObj::setCellDisplayColor(QList<int> &indexs, const QColor &color,bool isModitfy)
|
||||
{
|
||||
//qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshKernalViewObj::setCellDisplayColor start ";
|
||||
std::set<int> indexSet(indexs.begin(), indexs.end()); // 转换为 set-- std 实现是B+树
|
||||
//qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshKernalViewObj::setPointDisplayColor create set ";
|
||||
vtkDataArray *colorArray = _displayData->GetCellData()->GetScalars();
|
||||
vtkDataArray *indexArray = _displayData->GetCellData()->GetArray("IDS");
|
||||
vtkDataArray *indexArray = _displayData->GetCellData()->GetArray("IDS"); // display data , kernel idx, cell idx
|
||||
double col[3]{color.red()*1.0, color.green()*1.0, color.blue()*1.0};
|
||||
if (nullptr == colorArray || nullptr == indexArray)
|
||||
return;
|
||||
const int nCell = indexArray->GetNumberOfTuples();
|
||||
|
||||
int nprocess = 1;
|
||||
int nprocess = 4;
|
||||
#ifdef LAMPCAE_HAS_OPENMP
|
||||
int ncore = QThread::idealThreadCount();
|
||||
nprocess = ncore - 1 > 0 ? ncore - 1 : ncore;
|
||||
|
@ -173,7 +186,8 @@ namespace MainWidget
|
|||
for (int i = beg; i <= end; ++i)
|
||||
{
|
||||
int cellid = indexArray->GetComponent(i, 1);
|
||||
if (indexs.contains(cellid))
|
||||
// if(indexs.contains(cellid))
|
||||
if ( indexSet.find(cellid)!=indexSet.end()) // 判断是否在显示对象中
|
||||
{
|
||||
colorArray->SetComponent(i, 0, col[0]);
|
||||
colorArray->SetComponent(i, 1, col[1]);
|
||||
|
@ -191,7 +205,11 @@ namespace MainWidget
|
|||
serial(beg, end);
|
||||
}
|
||||
|
||||
_displayData->Modified();
|
||||
if(isModitfy) {
|
||||
_displayData->Modified();
|
||||
}
|
||||
|
||||
// qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshKernalViewObj::setCellDisplayColor finish ";
|
||||
}
|
||||
|
||||
void MeshKernalViewObj::setPointDisplayColorByDisplayIndex(QList<int> &indexs, const QColor &color)
|
||||
|
@ -280,7 +298,7 @@ namespace MainWidget
|
|||
void MeshKernalViewObj::generateIDProp()
|
||||
{
|
||||
auto dataset = _kernal->getMeshData();
|
||||
const int id = _kernal->getID();
|
||||
const int id = _kernal->getID(); // IDS (kernalid,pointId)
|
||||
// cell ID与显示隐藏状态
|
||||
vtkSmartPointer<vtkUnsignedIntArray> kcellid_index = vtkSmartPointer<vtkUnsignedIntArray>::New();
|
||||
kcellid_index->SetNumberOfComponents(2); // 设置 dimension
|
||||
|
@ -296,6 +314,13 @@ namespace MainWidget
|
|||
cstatesArray->Fill(1);
|
||||
dataset->GetCellData()->AddArray(cstatesArray);
|
||||
|
||||
// vtkSmartPointer<vtkUnsignedCharArray> selectSateArray = vtkSmartPointer<vtkUnsignedCharArray>::New();
|
||||
// selectSateArray->SetName("SELECT");
|
||||
// selectSateArray->SetNumberOfValues(ncell);
|
||||
// selectSateArray->Fill(0);
|
||||
// dataset->GetCellData()->AddArray(selectSateArray); // select
|
||||
|
||||
|
||||
// point ID与显示隐藏状态
|
||||
vtkSmartPointer<vtkUnsignedIntArray> kpointid_index = vtkSmartPointer<vtkUnsignedIntArray>::New();
|
||||
kpointid_index->SetNumberOfComponents(2);
|
||||
|
@ -310,14 +335,23 @@ namespace MainWidget
|
|||
pstatesArray->SetNumberOfValues(npoint);
|
||||
pstatesArray->Fill(1);
|
||||
dataset->GetPointData()->AddArray(pstatesArray);
|
||||
|
||||
// vtkSmartPointer<vtkUnsignedCharArray> pselectSateArray = vtkSmartPointer<vtkUnsignedCharArray>::New();
|
||||
// pselectSateArray->SetName("SELECT");
|
||||
// pselectSateArray->SetNumberOfValues(ncell);
|
||||
// pselectSateArray->Fill(0);
|
||||
// dataset->GetPointData()->AddArray(pselectSateArray); // select
|
||||
}
|
||||
|
||||
void MeshKernalViewObj::init()
|
||||
{
|
||||
|
||||
|
||||
|
||||
vtkSmartPointer<vtkAppendFilter> filter = vtkSmartPointer<vtkAppendFilter>::New();
|
||||
filter->AddInputData(_kernal->getMeshData());
|
||||
filter->Update();
|
||||
_displayData->DeepCopy(filter->GetOutput());
|
||||
_displayData->DeepCopy(filter->GetOutput()); // 深拷贝
|
||||
|
||||
auto gp = Setting::BusAPI::instance()->getGraphOption();
|
||||
|
||||
|
@ -373,5 +407,9 @@ namespace MainWidget
|
|||
_displayData->DeepCopy(extractionSelection->GetOutput());
|
||||
_displayData->Modified();
|
||||
}
|
||||
void MeshKernalViewObj::modifyPointDisplay() {
|
||||
_displayData->Modified();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -94,13 +94,13 @@ namespace MainWidget
|
|||
* @param indexs 点的在Kernal的索引
|
||||
* @param color 要着色的颜色
|
||||
*/
|
||||
void setPointDisplayColor(QList<int>& indexs, const QColor& color);
|
||||
void setPointDisplayColor(QList<int>& indexs, const QColor& color,bool isModitfy=true);
|
||||
/**
|
||||
* @brief 设置单元颜色
|
||||
* @param indexs 单元在Kernal的索引
|
||||
* @param color 要着色的颜色
|
||||
*/
|
||||
void setCellDisplayColor(QList<int>& indexs, const QColor& color);
|
||||
void setCellDisplayColor(QList<int>& indexs, const QColor& color,bool isModitfy=true);
|
||||
/**
|
||||
* @brief 根据显示对象设置点的颜色
|
||||
* @param indexs 点在显示对象中的索引
|
||||
|
@ -119,7 +119,10 @@ namespace MainWidget
|
|||
* @param show 是否显示
|
||||
*/
|
||||
void showCells(const QList<int>& index, bool show);
|
||||
|
||||
/**
|
||||
* @brief 强制刷新显示对象
|
||||
*/
|
||||
void modifyPointDisplay();
|
||||
private:
|
||||
/**
|
||||
* @brief 为DataSet生成ID属性
|
||||
|
|
|
@ -28,16 +28,12 @@ namespace MainWidget
|
|||
//SLOT(highLightActorDispalyPoint(bool)));
|
||||
connect(_preWindow, SIGNAL(clearMeshSetHighLight()), this, SLOT(clearHighLight()));
|
||||
connect(_preWindow, SIGNAL(clearAllHighLight()), this, SLOT(clearHighLight()));
|
||||
connect(_preWindow, SIGNAL(highLighMeshSet(MeshData::MeshSet*)), this,
|
||||
SLOT(highLighMeshSet(MeshData::MeshSet*)));
|
||||
connect(_preWindow, SIGNAL(highLighKernel(MeshData::MeshKernal*)), this,
|
||||
SLOT(highLighKernel(MeshData::MeshKernal*)));
|
||||
connect(_preWindow, SIGNAL(highLighMeshSet(MeshData::MeshSet*)), this,SLOT(highLighMeshSet(MeshData::MeshSet*)));
|
||||
connect(_preWindow, SIGNAL(highLighKernel(MeshData::MeshKernal*)), this,SLOT(highLighKernel(MeshData::MeshKernal*)));
|
||||
// connect(_preWindow, SIGNAL(highLighDataSet(vtkDataSet*)), this,
|
||||
//SLOT(highLighDataSet(vtkDataSet*)));
|
||||
connect(_mainWindow, SIGNAL(updateMeshSetVisibleSig(MeshData::MeshSet*)), this,
|
||||
SLOT(updateMeshSetVisibily(MeshData::MeshSet*)));
|
||||
connect(_mainWindow, SIGNAL(updateMeshSetColorSig(int)), this,
|
||||
SLOT(updateMeshSetColor(int)));
|
||||
connect(_mainWindow, SIGNAL(updateMeshSetVisibleSig(MeshData::MeshSet*)), this,SLOT(updateMeshSetVisibily(MeshData::MeshSet*)));
|
||||
connect(_mainWindow, SIGNAL(updateMeshSetColorSig(int)), this,SLOT(updateMeshSetColor(int)));
|
||||
}
|
||||
|
||||
MeshViewProvider::~MeshViewProvider()
|
||||
|
@ -55,7 +51,7 @@ namespace MainWidget
|
|||
auto Kernal = _meshData->getKernalAt(i);
|
||||
if (!_viewObjects.contains(Kernal))
|
||||
{
|
||||
auto vobj = new MeshKernalViewObj(Kernal);
|
||||
auto vobj = new MeshKernalViewObj(Kernal); // 创建一个新的视图
|
||||
_viewObjects.insert(Kernal, vobj);
|
||||
updateDisplayModel(Kernal);
|
||||
updateGraphOption(Kernal);
|
||||
|
@ -367,24 +363,34 @@ namespace MainWidget
|
|||
|
||||
void MeshViewProvider::highLighSelectItem(QMultiHash<int, int> *items)
|
||||
{
|
||||
qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshViewProvider::highLighSelectItem start ";
|
||||
if (items->isEmpty())
|
||||
return;
|
||||
_highLightSelectItems = *items;
|
||||
QColor c = Setting::BusAPI::instance()->getGraphOption()->getHighLightColor();
|
||||
QList<int> datasetList = items->uniqueKeys();
|
||||
QList<int> datasetList = items->uniqueKeys(); // 获取所有的key
|
||||
qDebug()<<QString("kernel size: %1").arg(datasetList.size());
|
||||
for (auto dataset : datasetList)
|
||||
{
|
||||
auto k = _meshData->getKernalByID(dataset);
|
||||
auto vObjs = _viewObjects.value(k);
|
||||
QList<int> members = items->values();
|
||||
auto k = _meshData->getKernalByID(dataset); // 获取对应的kernal
|
||||
auto vObjs = _viewObjects.value(k); // 获取对应的view对象
|
||||
QList<int> members = items->values(); //
|
||||
if (vObjs == nullptr)
|
||||
continue;
|
||||
if (_selectModel == ModuleBase::BoxMeshNode || _selectModel == ModuleBase::MeshNode)
|
||||
vObjs->setPointDisplayColor(members, c);
|
||||
else if (_selectModel == ModuleBase::BoxMeshCell || _selectModel == ModuleBase::MeshCell)
|
||||
vObjs->setCellDisplayColor(members, c);
|
||||
if(members.isEmpty()){
|
||||
continue;
|
||||
}
|
||||
if(_selectModel == ModuleBase::BoxMeshNode || _selectModel == ModuleBase::MeshNode) { // 绘制 points
|
||||
vObjs->setPointDisplayColor(members, c,true);
|
||||
|
||||
} else if(_selectModel == ModuleBase::BoxMeshCell || _selectModel == ModuleBase::MeshCell) { // 绘制cell
|
||||
vObjs->setCellDisplayColor(members, c,true);
|
||||
|
||||
}
|
||||
vObjs->modifyPointDisplay();
|
||||
}
|
||||
_preWindow->reRender();
|
||||
qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshViewProvider::highLighSelectItem finish ";
|
||||
}
|
||||
|
||||
QMultiHash<int, int> *MeshViewProvider::getSelectItem()
|
||||
|
|
|
@ -168,7 +168,7 @@ namespace GUI {
|
|||
}
|
||||
// 控制菜单,这些功能后期开发仿真算法之后,再开放功能
|
||||
{
|
||||
qDebug()<< " V1.2";
|
||||
qDebug() << " V1.2";
|
||||
_ui->postEditorTtoolBar->hide();
|
||||
_ui->postToolBar->hide();
|
||||
_ui->postViewerToolBar->hide();
|
||||
|
@ -176,7 +176,7 @@ namespace GUI {
|
|||
_controlPanel->setphysicsTab(false);
|
||||
_controlPanel->setpostTab(false);
|
||||
_controlPanel->setplotTab(false);
|
||||
qDebug()<<"_controlPaneld has tab : "+QString::number(_controlPanel->getTabCount());
|
||||
qDebug() << "_controlPaneld has tab : " + QString::number(_controlPanel->getTabCount());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -266,23 +266,28 @@ namespace GUI {
|
|||
connect(_ui->actionVTKTranslation, SIGNAL(triggered()), this, SLOT(on_VTKTranslation()));
|
||||
|
||||
// 点云
|
||||
connect(_ui->actionPCLStatisticalRemoveFilter,SIGNAL(triggered()),this,SLOT(on_pclStatisticalRemoveFilter()));
|
||||
connect(_ui->actionPCLRadiusOutlierRemoval,SIGNAL(triggered()),this,SLOT(on_pclRadiusOutlierRemoval()));
|
||||
connect(_ui->actionPCLGuassFilter,SIGNAL(triggered()),this,SLOT(on_pclGuassFilter()));
|
||||
connect(_ui->actionPCLBilateralFilter,SIGNAL(triggered()),this,SLOT(on_pclBilateralFilter()));
|
||||
connect(_ui->actionPCLGPMesh,SIGNAL(triggered()),this,SLOT(on_pclGPMesh()));
|
||||
|
||||
connect(_ui->actionPCLPoissonMesh,SIGNAL(triggered()),this,SLOT(on_pclPoissonMesh()));
|
||||
connect(_ui->actionPCLStatisticalRemoveFilter, SIGNAL(triggered()), this,
|
||||
SLOT(on_pclStatisticalRemoveFilter()));
|
||||
connect(_ui->actionPCLRadiusOutlierRemoval, SIGNAL(triggered()), this,
|
||||
SLOT(on_pclRadiusOutlierRemoval()));
|
||||
connect(_ui->actionPCLGuassFilter, SIGNAL(triggered()), this, SLOT(on_pclGuassFilter()));
|
||||
connect(_ui->actionPCLBilateralFilter, SIGNAL(triggered()), this,
|
||||
SLOT(on_pclBilateralFilter()));
|
||||
connect(_ui->actionPCLGPMesh, SIGNAL(triggered()), this, SLOT(on_pclGPMesh()));
|
||||
// connect(_ui->actionLoadPointCloudText,SIGNAL(triggered()),this,SLOT(on_actionLoadPointCloudText()));
|
||||
connect(_ui->actionPCLPoissonMesh, SIGNAL(triggered()), this, SLOT(on_pclPoissonMesh()));
|
||||
// feko 参数
|
||||
connect(_ui->actionImageSetting,SIGNAL(triggered()),this,SLOT(on_actionImageSetting()));
|
||||
connect(_ui->actionFEKO2csv,SIGNAL(triggered()),this,SLOT(on_actionFEKO2csv()));
|
||||
connect(_ui->actionScatterExport,SIGNAL(triggered()),this,SLOT(on_actionScatterExport()));
|
||||
connect(_ui->actionFEKOImage,SIGNAL(triggered()),this,SLOT(on_actionFEKOImage()));
|
||||
connect(_ui->actionantScatteringFEKOSetting,SIGNAL(triggered()),this,SLOT(on_actionantScatteringFEKOSetting()));
|
||||
|
||||
// 属性表
|
||||
connect(_ui->actionAttriutionDBShow,SIGNAL(triggered()),this,SLOT(on_AttriutionDBShow()));
|
||||
connect(_ui->actionImageSetting, SIGNAL(triggered()), this, SLOT(on_actionImageSetting()));
|
||||
connect(_ui->actionFEKO2csv, SIGNAL(triggered()), this, SLOT(on_actionFEKO2csv()));
|
||||
connect(_ui->actionScatterExport, SIGNAL(triggered()), this,
|
||||
SLOT(on_actionScatterExport()));
|
||||
connect(_ui->actionFEKOImage, SIGNAL(triggered()), this, SLOT(on_actionFEKOImage()));
|
||||
connect(_ui->actionantScatteringFEKOSetting, SIGNAL(triggered()), this,
|
||||
SLOT(on_actionantScatteringFEKOSetting()));
|
||||
|
||||
// 属性表
|
||||
connect(_ui->actionAttriutionDBShow, SIGNAL(triggered()), this,
|
||||
SLOT(on_AttriutionDBShow()));
|
||||
|
||||
// 设置视角
|
||||
_viewSignalMapper = new QSignalMapper(this);
|
||||
|
@ -325,8 +330,11 @@ namespace GUI {
|
|||
_selectSignalMapper->setMapping(_ui->actionBoxMeshCell,
|
||||
(int)ModuleBase::SelectModel::BoxMeshCell);
|
||||
|
||||
connect(_selectSignalMapper, SIGNAL(mapped(int)), this, SIGNAL(selectModelChangedSig(int))); // 选择模式更改信号
|
||||
connect(_selectSignalMapper, SIGNAL(mapped(int)), this, SLOT(selectModelChanged(int))); // 选择模型更改为
|
||||
connect(_selectSignalMapper, SIGNAL(mapped(int)), this,
|
||||
SIGNAL(selectModelChangedSig(int))); // 选择模式更改信号
|
||||
connect(_selectSignalMapper, SIGNAL(mapped(int)), this,
|
||||
SLOT(selectModelChanged(int))); // 选择模型更改为
|
||||
|
||||
// 网格显示模式
|
||||
// _displayModeSignalMapper = new QSignalMapper(this);
|
||||
connect(_ui->actionDisplayNode, SIGNAL(triggered()), this, SLOT(setMeshDisplay()));
|
||||
|
@ -381,17 +389,22 @@ namespace GUI {
|
|||
connect(this, SIGNAL(openPlot()), _signalHandler, SLOT(openPlotFile()));
|
||||
|
||||
// 点云模块
|
||||
connect(this, SIGNAL(importMeshSIGN(QString ,QString ,int )),this, SLOT(importMesh(QString ,QString ,int )));
|
||||
connect(this, SIGNAL(importMeshSIGN(QString, QString, int)), this,
|
||||
SLOT(importMesh(QString, QString, int)));
|
||||
// 导入点云
|
||||
connect(this, SIGNAL(importPclSIGN(QString ,QString ,int )),this, SLOT(importPcl(QString ,QString ,int )));
|
||||
connect(this, SIGNAL(importPclSIGN(QString, QString, int)), this,
|
||||
SLOT(importPcl(QString, QString, int)));
|
||||
// 绑定 vtk 中世界坐标系
|
||||
connect(this, SIGNAL(showStateToolbarPositionSIGNGAL(double, double, double)),this,SLOT(showStateToolbarPosition(double, double, double)));
|
||||
connect(this, SIGNAL(showStateToolbarPositionSIGNGAL(double, double, double)), this,
|
||||
SLOT(showStateToolbarPosition(double, double, double)));
|
||||
|
||||
// 采样相关事件
|
||||
connect(_ui->actionvtkPointSamplor,SIGNAL(triggered()),this,SLOT(on_actionvtkPointSamplor()));
|
||||
connect(_ui->actionvtkPointSamplor, SIGNAL(triggered()), this,
|
||||
SLOT(on_actionvtkPointSamplor()));
|
||||
|
||||
connect(_ui->actionImageShowTool,SIGNAL(triggered()),this,SLOT(on_actionImageShowTool()));
|
||||
connect(_ui->actionRCShowTool,SIGNAL(triggered()),this,SLOT(on_actionRCShowTool()));
|
||||
connect(_ui->actionImageShowTool, SIGNAL(triggered()), this,
|
||||
SLOT(on_actionImageShowTool()));
|
||||
connect(_ui->actionRCShowTool, SIGNAL(triggered()), this, SLOT(on_actionRCShowTool()));
|
||||
}
|
||||
|
||||
void MainWindow::registerMoudel()
|
||||
|
@ -638,7 +651,8 @@ namespace GUI {
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::importMesh(QString fileName,QString aSuffix,int modelID){
|
||||
void MainWindow::importMesh(QString fileName, QString aSuffix, int modelID)
|
||||
{
|
||||
if(fileName.isEmpty())
|
||||
return;
|
||||
QString pyCode = QString("MainWindow.importMesh(\"%1\",\"%2\",%3)")
|
||||
|
@ -648,7 +662,8 @@ namespace GUI {
|
|||
Py::PythonAgent::getInstance()->submit(pyCode);
|
||||
}
|
||||
|
||||
void MainWindow::importPcl(QString fileName,QString aSuffix,int modelID){
|
||||
void MainWindow::importPcl(QString fileName, QString aSuffix, int modelID)
|
||||
{
|
||||
if(fileName.isEmpty())
|
||||
return;
|
||||
QString pyCode = QString("MainWindow.importPcl(\"%1\",\"%2\",%3)")
|
||||
|
@ -787,8 +802,6 @@ namespace GUI {
|
|||
|
||||
void MainWindow::on_exportMesh()
|
||||
{
|
||||
|
||||
|
||||
if(MeshData::MeshData::getInstance()->getKernalCount() == 0) {
|
||||
QMessageBox::warning(this, tr("Warning"), tr("No one has any grid!"));
|
||||
return;
|
||||
|
@ -1351,6 +1364,10 @@ namespace GUI {
|
|||
|
||||
void MainWindow::printMessage(Common::Message type, QString m)
|
||||
{
|
||||
// 比较长的 提示 做截断
|
||||
if(m.size() > 100) {
|
||||
m = m.left(100) + "...";
|
||||
}
|
||||
ModuleBase::Message s(type, m);
|
||||
emit printMessageToMessageWindow(s);
|
||||
}
|
||||
|
@ -1565,63 +1582,74 @@ namespace GUI {
|
|||
}
|
||||
|
||||
// FEKO
|
||||
void MainWindow::on_actionImageSetting() {
|
||||
void MainWindow::on_actionImageSetting()
|
||||
{
|
||||
DebugInfo("on_actionImageSetting\n");
|
||||
emit this->on_actionImageSetting(this);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionFEKO2csv() {
|
||||
void MainWindow::on_actionFEKO2csv()
|
||||
{
|
||||
DebugInfo("on_actionFEKO2csv\n");
|
||||
emit this->on_actionFEKO2csv(this);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionScatterExport() {
|
||||
void MainWindow::on_actionScatterExport()
|
||||
{
|
||||
DebugInfo("on_actionScatterExport\n");
|
||||
emit this->on_actionScatterExport(this);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionFEKOImage() {
|
||||
void MainWindow::on_actionFEKOImage()
|
||||
{
|
||||
DebugInfo("on_actionFEKOImage\n");
|
||||
emit this->on_actionFEKOImage(this);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionantScatteringFEKOSetting() {
|
||||
void MainWindow::on_actionantScatteringFEKOSetting()
|
||||
{
|
||||
DebugInfo("on_actionantScatteringFEKOSetting\n");
|
||||
emit this->on_actionantScatteringFEKOSetting(this);
|
||||
}
|
||||
void MainWindow::on_AttriutionDBShow() {
|
||||
void MainWindow::on_AttriutionDBShow()
|
||||
{
|
||||
DebugInfo("on_AttriutionDBShow\n");
|
||||
emit this->on_actionAttriutionDBShow(this);
|
||||
|
||||
}
|
||||
void MainWindow::showStateToolbarPosition(double x, double y, double z) {
|
||||
void MainWindow::showStateToolbarPosition(double x, double y, double z)
|
||||
{
|
||||
if(_vtkworldPostion == nullptr) {
|
||||
_vtkworldPostion = new QLabel(this);
|
||||
_ui->statusbar->addPermanentWidget(_vtkworldPostion);
|
||||
}
|
||||
|
||||
QString text= QString(tr("model world position : %2m, %3m, %4m ")).arg(x).arg(y).arg(z);
|
||||
QString text = QString(tr("model world position : %2m, %3m, %4m ")).arg(x).arg(y).arg(z);
|
||||
_vtkworldPostion->setText(text);
|
||||
}
|
||||
void MainWindow::on_actionvtkPointSamplor() {
|
||||
void MainWindow::on_actionvtkPointSamplor()
|
||||
{
|
||||
DebugInfo("on_actionvtkPointSamplor\n");
|
||||
emit this->on_actionvtkPointSamplorTriggleSIGNAL(this);
|
||||
|
||||
}
|
||||
void MainWindow::on_actionImageShowTool() {
|
||||
void MainWindow::on_actionImageShowTool()
|
||||
{
|
||||
DebugInfo("on_actionImageShowTool\n");
|
||||
emit this->on_actionImageShowToolTriggleSIGNAL(this);
|
||||
|
||||
}
|
||||
void MainWindow::on_actionRCShowTool() {
|
||||
void MainWindow::on_actionRCShowTool()
|
||||
{
|
||||
DebugInfo("on_actionRCShowTool\n");
|
||||
emit this->on_actionRCShowToolSIGNAL(this);
|
||||
|
||||
}
|
||||
void MainWindow::on_pclPoissonMesh() {
|
||||
void MainWindow::on_pclPoissonMesh()
|
||||
{
|
||||
DebugInfo("on_pclPoissonMesh\n");
|
||||
emit this->on_pclPoissonMesh(this);
|
||||
|
||||
}
|
||||
void MainWindow::on_actionLoadPointCloudText()
|
||||
{
|
||||
DebugInfo("on_actionLoadPointCloudText\n");
|
||||
// emit this->actionLoadPointCloudText(this);
|
||||
}
|
||||
|
||||
} // namespace GUI
|
||||
|
|
|
@ -301,6 +301,7 @@ namespace GUI {
|
|||
|
||||
|
||||
// 点云处理信号
|
||||
void on_actionLoadPointCloudText(GUI::MainWindow* m);
|
||||
// 统计滤波
|
||||
void on_pclStatisticalRemoveFilter(GUI::MainWindow* m);
|
||||
// 半径滤波
|
||||
|
@ -372,7 +373,7 @@ namespace GUI {
|
|||
void exportGeometry(QString f);
|
||||
// 更新工具栏信息
|
||||
// void updateActionsStates();
|
||||
|
||||
void on_actionLoadPointCloudText();
|
||||
// 统计滤波
|
||||
void on_pclStatisticalRemoveFilter();
|
||||
// 半径滤波
|
||||
|
@ -503,7 +504,6 @@ namespace GUI {
|
|||
//
|
||||
void setPostAnimationToolBar(bool ribbon);
|
||||
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief ui
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -118,7 +118,7 @@ void MaterialSingleton::appendToMaterialLib(const int id)
|
|||
if (m == nullptr) return;
|
||||
|
||||
QHash<QString, Material*> mahash = this->loadMaterilLib();
|
||||
qDebug() << mahash.keys();
|
||||
//qDebug() << mahash.keys();
|
||||
qDebug() << m->getName();
|
||||
if (mahash.contains(m->getName()))
|
||||
{
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace MeshData
|
|||
///添加子set
|
||||
void appendDataSet(vtkDataSet* set);
|
||||
|
||||
// 构建显示数据集合
|
||||
void generateDisplayDataSet() override;
|
||||
|
||||
virtual QDomElement& writeToProjectFile(QDomDocument* doc, QDomElement* parent) override;
|
||||
|
|
|
@ -83,7 +83,7 @@ namespace MeshData
|
|||
QString _path{};
|
||||
int _pointIDOffset{ -1 }; //起始ID,终止ID=起始ID+mesh.pointnum-1
|
||||
int _cellIDOffset{ -1 };
|
||||
vtkSmartPointer<vtkDataSet> _mesh{};
|
||||
vtkSmartPointer<vtkDataSet> _mesh{}; // 网格颜色
|
||||
int _dimension{ 3 };
|
||||
QPair<bool, QColor> _specificColor;
|
||||
DataProperty::DataBase* _gmshSetting{};//gmsh网格划分的属性
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include <vtkExtractSelection.h>
|
||||
#include <vtkAppendFilter.h>
|
||||
#include <QDebug>
|
||||
#include <QDateTime>
|
||||
|
||||
|
||||
namespace MeshData
|
||||
{
|
||||
|
@ -188,6 +190,8 @@ void MeshSet::readDataFromProjectFile(QDomElement* setEle)
|
|||
|
||||
void MeshSet::generateDisplayDataSet()
|
||||
{
|
||||
|
||||
qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshSet::generateDisplayDataSet() start ";
|
||||
if (_displayDataSet != nullptr) return;
|
||||
if (_members.isEmpty()) return;
|
||||
appendProperty("Count", _members.values().size());
|
||||
|
@ -232,7 +236,9 @@ void MeshSet::generateDisplayDataSet()
|
|||
appendFliter->Update();
|
||||
|
||||
_displayDataSet = vtkUnstructuredGrid::New();
|
||||
_displayDataSet->DeepCopy(appendFliter->GetOutput());
|
||||
_displayDataSet=appendFliter->GetOutput(); // 深拷贝修改为 浅拷贝
|
||||
// _displayDataSet->DeepCopy(appendFliter->GetOutput()); // 为什么要深拷贝???
|
||||
qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<" MeshSet::generateDisplayDataSet() finish ";
|
||||
}
|
||||
|
||||
vtkDataSet* MeshSet::getDisplayDataSet()
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace MeshData
|
|||
SetType _type{ None };
|
||||
bool _visible{ true };
|
||||
|
||||
QMultiHash<int, int> _members{}; //keneralID - node/elementID
|
||||
QMultiHash<int, int> _members{}; // keneralID - node/elementID
|
||||
|
||||
QList<int> _tempMemberID{};
|
||||
|
||||
|
|
|
@ -81,8 +81,8 @@ namespace MeshData
|
|||
|
||||
private:
|
||||
static MeshData* _instance;
|
||||
QList<MeshKernal*> _meshList{};
|
||||
QList<MeshSet*> _setList{};
|
||||
QList<MeshKernal*> _meshList{}; // kernel 列表 单个mesh对象
|
||||
QList<MeshSet*> _setList{}; // 面片集合 -- 多个网格对象
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -450,7 +450,7 @@ namespace ModuleBase
|
|||
|
||||
this->selectMesh(dataset, range);
|
||||
}
|
||||
emit highLight(&_selectItems);
|
||||
emit highLight(&_selectItems); // 绑定高亮事件
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -484,12 +484,28 @@ namespace ModuleBase
|
|||
*/
|
||||
void PropPickerInteractionStyle::selectMesh(vtkDataSet *dataSet, int *range)
|
||||
{
|
||||
|
||||
qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<"PropPickerInteractionStyle::selectMesh start ";
|
||||
vtkRenderer *render = this->GetInteractor()->GetRenderWindow()->GetRenderers()->GetFirstRenderer();
|
||||
vtkSmartPointer<vtkCoordinate> coordinate = vtkSmartPointer<vtkCoordinate>::New();
|
||||
coordinate->SetCoordinateSystemToWorld();
|
||||
/*int* va = */ coordinate->GetComputedDisplayValue(render);
|
||||
|
||||
// // 清理选择状态
|
||||
// // point
|
||||
// vtkDataArray* pselectids = dataSet->GetPointData()->GetArray("SELECT");
|
||||
// const int npoint = dataSet->GetNumberOfPoints();
|
||||
// for (int i = 0; i < npoint; ++i) {
|
||||
// pselectids->SetTuple1(i, 0);
|
||||
// }
|
||||
//
|
||||
// // cell
|
||||
// vtkDataArray* cselectids = dataSet->GetCellData()->GetArray("SELECT");
|
||||
// const int ncell = dataSet->GetNumberOfCells();
|
||||
// for (int i = 0; i < ncell; ++i) {
|
||||
// cselectids->SetTuple1(i, 0);
|
||||
// }
|
||||
|
||||
|
||||
if (_selectModel == BoxMeshNode)
|
||||
{
|
||||
vtkDataArray *ids = dataSet->GetPointData()->GetArray("IDS");
|
||||
|
@ -503,7 +519,8 @@ namespace ModuleBase
|
|||
if (isPointInRange(va, range))
|
||||
{
|
||||
double *k_id = ids->GetTuple2(i);
|
||||
_selectItems.insert(k_id[0], k_id[1]);
|
||||
_selectItems.insert(k_id[0], k_id[1]); // kernelid pid
|
||||
//pselectids->SetTuple1(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -527,9 +544,12 @@ namespace ModuleBase
|
|||
{
|
||||
double *k_id = ids->GetTuple2(i);
|
||||
_selectItems.insert(k_id[0], k_id[1]);
|
||||
// cselectids->SetTuple1(i, 1); // 更新选择状态
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
qDebug()<<QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")<<"PropPickerInteractionStyle::selectMesh finish,size: "+QString::number(_selectItems.size());
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "PointCloudOperator/PointCloudCommon.h"
|
||||
|
||||
#include "Common/DebugLogger.h"
|
||||
|
||||
#include "AsciiOpenDialog.h"
|
||||
|
||||
namespace MeshData {
|
||||
PointClouddataExchange::PointClouddataExchange(const QString& fileName, MeshOperation operation,
|
||||
|
@ -89,7 +89,8 @@ namespace MeshData {
|
|||
{
|
||||
dataset = readXYZ();
|
||||
}
|
||||
if (dataset != nullptr)
|
||||
|
||||
if (nullptr!=dataset )
|
||||
{
|
||||
MeshKernal *k = new MeshKernal;
|
||||
k->setName(name);
|
||||
|
@ -183,49 +184,8 @@ namespace MeshData {
|
|||
{
|
||||
if (!_threadRuning)
|
||||
return nullptr;
|
||||
// 1. 打开文件
|
||||
QString filePathWithName = _fileName;
|
||||
QFile file(filePathWithName);
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// 2. 读取文件内容
|
||||
QTextStream in(&file);
|
||||
int pointcount = 0;
|
||||
QStringList templist;
|
||||
pcl::PointCloud<pcl::PointXYZRGBA>::Ptr cloud_with_rgba(new pcl::PointCloud<pcl::PointXYZRGBA>);
|
||||
// 3. 处理每一行数据
|
||||
while (!in.atEnd()) {
|
||||
QString line = in.readLine();
|
||||
templist = line.split(' ');
|
||||
|
||||
// 4. 处理分割得到的数据
|
||||
if (templist.size() >= 3) {
|
||||
// 开始相关的点云存储设置
|
||||
double x = templist[0].toDouble() / 100.0;
|
||||
double y = templist[1].toDouble() / 100.0;
|
||||
double z = templist[2].toDouble() / 100.0;
|
||||
|
||||
pcl::PointXYZRGBA p;
|
||||
p.x = templist[0].toDouble() / 100.0;
|
||||
p.y = templist[1].toDouble() / 100.0;
|
||||
p.z = templist[2].toDouble() / 100.0;//坐标
|
||||
cloud_with_rgba->points.push_back(p);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 5. 关闭文件
|
||||
file.close();
|
||||
cloud_with_rgba->is_dense = false;
|
||||
vtkPolyData* polydata=nullptr;
|
||||
polydata=vtkPolyData::New(); // 创建新的指针,智能指针会释放
|
||||
pcl::io::pointCloudTovtkPolyData(*cloud_with_rgba,polydata);
|
||||
vtkDataSet* tempvtkdataset= vtkDataSet::SafeDownCast(polydata); // 默认完成 vtkpolydata --> vtkdataset
|
||||
size_t test = tempvtkdataset->GetNumberOfPoints();
|
||||
return tempvtkdataset; // 默认完成 vtkpolydata --> vtkdataset
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
bool PointClouddataExchange::writePCD()
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include "PointClouddataExchange.h"
|
||||
#include "Dialogmeshsurfacesampling.h"
|
||||
#include "Common/DebugLogger.h"
|
||||
#include "AsciiOpenDialog.h"
|
||||
#include <QFileInfo>
|
||||
|
||||
GUI::MainWindow* MeshData::MeshDataExchangePlugin::_mainwindow = nullptr;
|
||||
|
@ -28,6 +29,8 @@ namespace MeshData {
|
|||
_mainwindow = m;
|
||||
|
||||
connect(_mainwindow, SIGNAL(on_actionvtkPointSamplorTriggleSIGNAL(GUI::MainWindow*)),this,SLOT(vtkPointSamplerDialog(GUI::MainWindow*)));
|
||||
// connect(_mainwindow, SIGNAL(on_actionLoadPointCloudText(GUI::MainWindow*)),this,SLOT(on_actionLoadPointCloudText(GUI::MainWindow*)));
|
||||
|
||||
}
|
||||
|
||||
bool MeshDataExchangePlugin::install()
|
||||
|
@ -359,10 +362,12 @@ bool MESHDATAEXCHANGEPLUGINAPI FOAMexportMesh(QString AbFileName, int id)
|
|||
|
||||
bool MESHDATAEXCHANGEPLUGINAPI XYZimportPCL(QString AbFileName, int id)
|
||||
{
|
||||
auto xyzReader = new MeshData::PointClouddataExchange(
|
||||
AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
||||
ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
||||
emit tc->threadStart(); // emit MSHwriter->start();
|
||||
|
||||
MeshData::loadXYZImportPCL(AbFileName, MeshData::MeshDataExchangePlugin::getMWpt());
|
||||
// auto xyzReader = new MeshData::PointClouddataExchange(
|
||||
// AbFileName, MeshData::MESH_READ, MeshData::MeshDataExchangePlugin::getMWpt(), id);
|
||||
// ModuleBase::ThreadControl* tc = new ModuleBase::ThreadControl(xyzReader);
|
||||
// emit tc->threadStart(); // emit MSHwriter->start();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace MeshData {
|
|||
static GUI::MainWindow* getMWpt();
|
||||
public slots:
|
||||
void vtkPointSamplerDialog(GUI::MainWindow* m);
|
||||
// void on_actionLoadPointCloudText(GUI::MainWindow* m);
|
||||
private:
|
||||
static GUI::MainWindow* _mainwindow;
|
||||
};
|
||||
|
|
|
@ -84,6 +84,7 @@ qt5_add_resources(_resource ${_qrc} ${_lang})
|
|||
file(GLOB _ui "*.ui")
|
||||
file(GLOB _header "*.h")
|
||||
file(GLOB _source "*.cpp")
|
||||
file(GLOB _templetasource "*.inl")
|
||||
qt5_wrap_ui(_interface ${_ui})
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -94,8 +95,8 @@ add_library(PluginRasterTool
|
|||
${_interface}
|
||||
${_header}
|
||||
${_source}
|
||||
RasterDataClass.cpp
|
||||
RasterDataClass.h
|
||||
${_templetasource}
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ int CMDExcuteApp::excuteCmd(QString cmdText)
|
|||
this->ui->textEdit->append(QString::QString(cmdText));
|
||||
this->ui->textEdit->append("\n");
|
||||
this->cmd->write(cmdText.toUtf8().constData());
|
||||
|
||||
this->cmd->close();
|
||||
this->waitExcutedFinish();
|
||||
return 0;
|
||||
|
@ -49,11 +48,16 @@ int CMDExcuteApp::excuteCmd(QString exePath, QString params)
|
|||
QString program = QString::QString(exePath);
|
||||
QStringList prams_txt;
|
||||
prams_txt.append(QString::QString(params));
|
||||
this->cmd->start(program, prams_txt);
|
||||
// this->cmd->start(program, prams_txt);
|
||||
//this->cmd->waitForFinished();
|
||||
this->show();
|
||||
this->ui->textEdit->append(QString(u8"converting.... \ncommand line:\t").append(prams_txt.join(" ")));
|
||||
this->waitExcutedFinish();
|
||||
this->cmd->execute(exePath,prams_txt);
|
||||
this->on_readerror();
|
||||
this->on_readoutput();
|
||||
emit this->callbackExcuteResult();
|
||||
|
||||
//this->waitExcutedFinish();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,8 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qcustomplot)
|
|||
|
||||
# qhexedit
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../qhexedit)
|
||||
|
||||
# opencv
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
|
||||
# 内部结构
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/SqliteDBProcess/src)
|
||||
|
@ -100,6 +101,9 @@ add_library(PluginWBFZExchangePlugin
|
|||
${_header}
|
||||
${_source}
|
||||
${SOURCES}
|
||||
dialogimportmodeldataset.cpp
|
||||
dialogimportmodeldataset.h
|
||||
dialogimportmodeldataset.ui
|
||||
)
|
||||
|
||||
|
||||
|
@ -180,7 +184,7 @@ 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
|
||||
)
|
||||
|
||||
|
||||
message("OpenCV_LIBRARIES ${OpenCV_LIBRARIES}")
|
||||
|
||||
target_include_directories(PluginWBFZExchangePlugin PRIVATE ${Qwt_INCLUDE_DIRS})
|
||||
#-----------------------------------------------------------------------------
|
||||
|
@ -190,6 +194,9 @@ target_link_libraries(PluginWBFZExchangePlugin PRIVATE
|
|||
${_runtimes_libraries}
|
||||
${_depend_library}
|
||||
${PCL_LIBRARIES}
|
||||
${OpenCV_LIBRARIES}
|
||||
${OpenCV_LIBS}
|
||||
|
||||
unofficial::sqlite3::sqlite3
|
||||
GDAL::GDAL
|
||||
FFTW3::fftw3
|
||||
|
|
|
@ -91,6 +91,7 @@ namespace Py {
|
|||
|
||||
void PythonAgent::submit(QString code, bool s)
|
||||
{
|
||||
|
||||
emit printInfo(Common::Message::Python, code);
|
||||
// lock();
|
||||
int ok = _interpreter->execCode(code, s);
|
||||
|
|
|
@ -189,21 +189,27 @@ QToolBar, QMenuBar{
|
|||
|
||||
QMenuBar {
|
||||
border-top: 1px solid #ffffff;
|
||||
font-size: 14px; /* 设置菜单的字体大小为14像素 */
|
||||
}
|
||||
QMenuBar::item {
|
||||
font-size: 14px; /* 设置菜单的字体大小为14像素 */
|
||||
}
|
||||
|
||||
QWidget::title{
|
||||
font-size: 14px; /* 设置菜单的字体大小为14像素 */
|
||||
}
|
||||
|
||||
QToolBar {
|
||||
/*border: 1px solid #c5c5c5;*/
|
||||
}
|
||||
|
||||
/*
|
||||
QMenu::item {
|
||||
padding: 6px 50px 6px 40px;
|
||||
}
|
||||
|
||||
QMenu::icon{
|
||||
padding: 6px 0px 6px 40px;
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
/*QMenuBar {
|
||||
|
@ -214,6 +220,7 @@ QMenu::icon{
|
|||
QMenuBar::item {
|
||||
padding: 10px 10px 10px 30px;
|
||||
background: transparent;
|
||||
|
||||
}
|
||||
QMenuBar::item:enabled {
|
||||
color: gray;
|
||||
|
@ -221,14 +228,28 @@ QMenuBar::item:enabled {
|
|||
QMenuBar::item:!enabled {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
QMenuBar::item:enabled:selected {
|
||||
background: rgba(255, 255, 255, 40);
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
|
||||
QMenu {
|
||||
font-size: 14px; /* 设置菜单的字体大小为14像素 */
|
||||
}
|
||||
|
||||
QMenu::item {
|
||||
font-size: 14px; /* 设置菜单项的字体大小为14像素 */
|
||||
}
|
||||
|
||||
QAction {
|
||||
font-size: 14px; /* 设置action的字体大小为14像素 */
|
||||
}
|
||||
|
||||
QToolBar{
|
||||
background-image: url(:/Beauty/QUI/beauty/toolbar_bk.png);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Nice to have the background color change when hovered. */
|
||||
QRadioButton:hover /*, QCheckBox:hover*/ {
|
||||
|
|
Loading…
Reference in New Issue