增加输入成像平面代码
parent
94fd13bac8
commit
84f1ac6a5c
|
|
@ -17,6 +17,10 @@ QSimulationBPImage::QSimulationBPImage(QWidget *parent)
|
|||
QObject::connect(ui->pushButtonImageSelect, SIGNAL(clicked()), this, SLOT(onpushButtonImageSelectClicked()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(onbtnaccepted()));
|
||||
QObject::connect(ui->buttonBox, SIGNAL(rejected()), this, SLOT(onbtnrejected()));
|
||||
QObject::connect(ui->checkBox, SIGNAL(stateChanged(int)), this, SLOT(oncheckboxTrigged(int)));
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +88,13 @@ void QSimulationBPImage::onbtnaccepted()
|
|||
TBPimag.setImageL1(imagL1);
|
||||
long cpucore_num = std::thread::hardware_concurrency();
|
||||
TBPimag.setGPU(true);
|
||||
if (ui->checkBox->isChecked()) {
|
||||
TBPimag.ProcessWithGridNet(cpucore_num,ui->lineEdit->text().trimmed());
|
||||
}
|
||||
else {
|
||||
TBPimag.Process(cpucore_num);
|
||||
}
|
||||
|
||||
QMessageBox::information(this,u8"成像",u8"成像结束");
|
||||
|
||||
}
|
||||
|
|
@ -93,3 +103,28 @@ void QSimulationBPImage::onbtnrejected()
|
|||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
void QSimulationBPImage::oncheckboxTrigged(int)
|
||||
{
|
||||
this->ui->lineEdit->setEnabled(this->ui->checkBox->isChecked());
|
||||
this->ui->GridNetBtn->setEnabled(this->ui->checkBox->isChecked());
|
||||
|
||||
}
|
||||
|
||||
void QSimulationBPImage::onpushButtonGridNetSelectClicked( )
|
||||
{
|
||||
QString fileNames = QFileDialog::getSaveFileName(
|
||||
this, // 父窗口
|
||||
tr(u8"选择影像文件"), // 标题
|
||||
QString(), // 默认路径
|
||||
tr(u8"All Files(*);;dat(*.dat);;tif(*.tif);;tiff(*.tiff)") // 文件过滤器
|
||||
);
|
||||
|
||||
// 如果用户选择了文件
|
||||
if (!fileNames.isEmpty()) {
|
||||
this->ui->lineEdit->setText(fileNames);
|
||||
}
|
||||
else {
|
||||
QMessageBox::information(this, tr(u8"没有选择文件"), tr(u8"没有选择任何文件。"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@ public slots:
|
|||
void onbtnaccepted();
|
||||
void onbtnrejected();
|
||||
|
||||
void oncheckboxTrigged(int);
|
||||
void onpushButtonGridNetSelectClicked( );
|
||||
|
||||
private:
|
||||
Ui::QSimulationBPImageClass* ui;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,6 +65,60 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_3">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkBox">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>图像网格</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="GridNetBtn">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>PushButton</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_2">
|
||||
<property name="frameShape">
|
||||
|
|
|
|||
|
|
@ -215,9 +215,13 @@ ErrorCode TBPImageAlgCls::Process(long num_thread)
|
|||
qDebug() << u8"创建成像平面的XYZ";
|
||||
QString outRasterXYZ = JoinPath(this->L1ds->getoutFolderPath(), this->L0ds->getSimulationTaskName() + "_xyz.bin");
|
||||
CreatePixelXYZ(this->L0ds, outRasterXYZ);
|
||||
this->outRasterXYZPath = outRasterXYZ;
|
||||
return this->ProcessWithGridNet(num_thread, outRasterXYZ);
|
||||
|
||||
}
|
||||
|
||||
ErrorCode TBPImageAlgCls::ProcessWithGridNet(long num_thread,QString xyzRasterPath)
|
||||
{
|
||||
this->outRasterXYZPath = xyzRasterPath;
|
||||
qDebug() << u8"频域回波-> 时域回波";
|
||||
this->TimeEchoDataPath = JoinPath(this->L1ds->getoutFolderPath(), this->L0ds->getSimulationTaskName() + "_Timeecho.bin");
|
||||
this->EchoFreqToTime();
|
||||
|
|
@ -260,8 +264,12 @@ ErrorCode TBPImageAlgCls::Process(long num_thread)
|
|||
return ErrorCode::FAIL;
|
||||
}
|
||||
return ErrorCode::SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
ErrorCode TBPImageAlgCls::ProcessGPU()
|
||||
{
|
||||
// 常用参数
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ public:
|
|||
|
||||
public:
|
||||
ErrorCode Process(long num_thread);
|
||||
ErrorCode ProcessWithGridNet(long num_thread,QString xyzRasterPath);
|
||||
void setGPU(bool flag);
|
||||
bool getGPU( );
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in New Issue