Browse Source

更新多点校正数据的保存和加载的流程,当前需要在保存时输入编号和积分时间,加载时也需要输入

master
zara 1 year ago
parent
commit
8151ad629a
  1. 5
      CMakeLists.txt
  2. 20
      CMakeLists.txt.user
  3. 20
      idpath.cpp
  4. 29
      idpath.h
  5. 84
      idpath.ui
  6. 19
      menu5.cpp
  7. 1
      menu5.h
  8. 10
      multipoint.cpp

5
CMakeLists.txt

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
set(PROJECT_VERSION 1.4.2.1)
set(PROJECT_VERSION 1.4.2.2)
add_definitions(-DProjectVersion=\"${PROJECT_VERSION}\")
project(zxrcClient VERSION ${PROJECT_VERSION} LANGUAGES CXX)
@ -130,6 +130,9 @@ set(LOCALALGO @@ -130,6 +130,9 @@ set(LOCALALGO
sagauss.h
twopoint.cpp
twopoint.h
idpath.cpp
idpath.h
idpath.ui
)
add_executable (zxrcClientPC WIN32 ${LOCALALGO} ${PROJECT_SOURCES})

20
CMakeLists.txt.user

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 11.0.1, 2024-06-13T18:16:45. -->
<!-- Written by QtCreator 11.0.1, 2024-06-19T18:09:29. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
@ -400,22 +400,6 @@ @@ -400,22 +400,6 @@
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
<valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">zxrcClient</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">CMakeProjectManager.CMakeRunConfiguration.zxrcClient</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">zxrcClient</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/WorkSpace/zxrcClientNew/build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.1">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
@ -431,7 +415,7 @@ @@ -431,7 +415,7 @@
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">D:/WorkSpace/zxrcClientNew/build-zxrcClient-Desktop_Qt_5_15_2_MSVC2019_64bit-Release</value>
</valuemap>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">2</value>
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
</data>
<data>

20
idpath.cpp

@ -0,0 +1,20 @@ @@ -0,0 +1,20 @@
#include "idpath.h"
#include "ui_idpath.h"
idpath::idpath(QWidget *parent) :
QDialog(parent),
ui(new Ui::idpath)
{
ui->setupUi(this);
}
idpath::~idpath()
{
delete ui;
}
void idpath::on_buttonBox_accepted()
{
emit signalIDpath(ui->lineEdit->text()+"-"+ui->doubleSpinBox->text());
}

29
idpath.h

@ -0,0 +1,29 @@ @@ -0,0 +1,29 @@
#ifndef IDPATH_H
#define IDPATH_H
#include <QDialog>
namespace Ui {
class idpath;
}
class idpath : public QDialog
{
Q_OBJECT
public:
explicit idpath(QWidget *parent = nullptr);
~idpath();
signals:
void signalIDpath(QString);
private slots:
void on_buttonBox_accepted();
private:
Ui::idpath *ui;
};
#endif // IDPATH_H

84
idpath.ui

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>idpath</class>
<widget class="QDialog" name="idpath">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>318</width>
<height>78</height>
</rect>
</property>
<property name="windowTitle">
<string>输入编号等信息</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>机芯编号</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEdit"/>
</item>
<item row="0" column="2" rowspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>积分时间</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox"/>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>idpath</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>idpath</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>

19
menu5.cpp

@ -83,17 +83,26 @@ void menu5::on_pushButton_2_clicked() @@ -83,17 +83,26 @@ void menu5::on_pushButton_2_clicked()
void menu5::on_pushButton_3_clicked()
{
QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./"));
emit signalsavedata(path);
// QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./"));
idpath* p = new idpath;
p->show();
connect(p,&idpath::signalIDpath,[=](QString path){
emit signalsavedata(path);
p->deleteLater();
});
}
void menu5::on_pushButton_4_clicked()
{
// emit signalloaddata();
QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./"));
emit signalloaddata(path);
// QString path = QFileDialog::getExistingDirectory(nullptr,QString::fromLocal8Bit("选择数据保存路径"),QString("./"));
idpath* p = new idpath;
p->show();
connect(p,&idpath::signalIDpath,[=](QString path){
emit signalloaddata(path);
p->deleteLater();
});
}

1
menu5.h

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
#include <QWidget>
#include <QVector>
#include "idpath.h"
namespace Ui {
class menu5;
}

10
multipoint.cpp

@ -79,7 +79,7 @@ void MultiPoint::calcData(QVector<double> vct) @@ -79,7 +79,7 @@ void MultiPoint::calcData(QVector<double> vct)
double* ss = stages+(k-1)*512*640;
double* ks = kstages+k*512*640;
// *(bstages+k) = vs;
*(bstages+k) = vs;
double* bs = bstages+k*512*640;
@ -94,7 +94,7 @@ void MultiPoint::calcData(QVector<double> vct) @@ -94,7 +94,7 @@ void MultiPoint::calcData(QVector<double> vct)
for(int j = 0;j< ms.cols;j++){
*(ss+i*ms.cols+j) = ms.at<float>(i,j);
*(ks+i*ms.cols+j) = (ve-vs)/(me.at<float>(i,j) - ms.at<float>(i,j));
*(bs+i*ms.cols+j) = vs ;
// *(bs+i*ms.cols+j) = vs ;
//- k*ms.at<float>(i,j);
}
}
@ -107,7 +107,7 @@ void MultiPoint::calcData(QVector<double> vct) @@ -107,7 +107,7 @@ void MultiPoint::calcData(QVector<double> vct)
double* ss = stages+(k-1)*512*640;
double* ks = kstages+k*512*640;
double* bs = bstages+k;
// *(bs) = 65535;
*(bs) = 65535;
// cv::Mat ms = end.value();
@ -117,7 +117,7 @@ void MultiPoint::calcData(QVector<double> vct) @@ -117,7 +117,7 @@ void MultiPoint::calcData(QVector<double> vct)
for(int j = 0;j<640;j++){
*(ss+i*640+j) = ms.at<float>(i,j);
*(ks+i*640+j) = 0;
*(bs+i*640+j) = 65535;
// *(bs+i*640+j) = 65535;
}
}
@ -196,6 +196,8 @@ void MultiPoint::savedata(QString path) @@ -196,6 +196,8 @@ void MultiPoint::savedata(QString path)
// cv::imwrite(QString::number(k).toStdString()+ ".tiff",iter.value());
// k+=1;
// }
QDir d;
d.mkdir(path);
QFile fs(path+ "/s.bin");
fs.open(QIODevice::ReadWrite);

Loading…
Cancel
Save