Browse Source

Scan conversion image pixel scale is modified.

Arash Aletayeb 11 months ago
parent
commit
9bbf1cdbaf
  1. 2
      developHw.pro.user
  2. 11
      hdf5Scenario/hdf5Scenario.cpp
  3. 24
      mainwindow.cpp
  4. 587
      mainwindow.ui

2
developHw.pro.user

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2024-04-27T11:45:16. --> <!-- Written by QtCreator 4.10.0, 2024-04-28T14:15:55. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

11
hdf5Scenario/hdf5Scenario.cpp

@ -1071,8 +1071,8 @@ void Hdf5::scanConversionParamsRead(scanConversionParameters &params)
datasetBranch<float_t>("/swScenarioParameters/scanConversionParameters/rxLineDAz", floatArray); datasetBranch<float_t>("/swScenarioParameters/scanConversionParameters/rxLineDAz", floatArray);
params.dx = (floatArray[0]); params.dx = (floatArray[0]);
/*** /swScenarioParameters/scanConversionParameters/rxPointDAx ***/ /*** /frameParameters/rxPointDAx ***/
datasetBranch<float_t>("/swScenarioParameters/scanConversionParameters/rxPointDAx", floatArray); datasetBranch<float_t>("/frameParameters/rxPointDAx", floatArray);
params.dz = (floatArray[0]); params.dz = (floatArray[0]);
/*** /swScenarioParameters/scanConversionParameters/rxLineNo ***/ /*** /swScenarioParameters/scanConversionParameters/rxLineNo ***/
@ -1081,9 +1081,8 @@ void Hdf5::scanConversionParamsRead(scanConversionParameters &params)
//width //width
params.gridX_size = static_cast<quint32>(floatArray[0]); params.gridX_size = static_cast<quint32>(floatArray[0]);
/*** /swScenarioParameters/scanConversionParameters/rxFocusPointNo ***/ /*** /frameParameters/rxFocusPointNo ***/
datasetBranch<float_t>("/swScenarioParameters/scanConversionParameters/rxFocusPointNo", datasetBranch<float_t>("/frameParameters/rxFocusPointNo", floatArray); //input
floatArray); //input
//frame //frame
//depth //depth
params.gridZ_size = static_cast<quint32>(floatArray[0]); params.gridZ_size = static_cast<quint32>(floatArray[0]);
@ -1099,7 +1098,7 @@ void Hdf5::scanConversionParamsRead(scanConversionParameters &params)
params.gridX = gridX; params.gridX = gridX;
/*** /swScenarioParameters/scanConversionParameters/scanAx ***/ /*** /swScenarioParameters/scanConversionParameters/scanAx ***/
datasetBranch<float_t>("/swScenarioParameters/scanConversionParameters/scanAx", floatArray); datasetBranch<float_t>("/swScenarioParameters/scanConversionParameters/scanAxPreResample", floatArray);
QList<float> gridZ; QList<float> gridZ;
for(quint32 j = 0; j < params.gridZ_size; j++) for(quint32 j = 0; j < params.gridZ_size; j++)

24
mainwindow.cpp

@ -2248,13 +2248,21 @@ void MainWindow::show3d()
if(_isScanConvDynamicCont) if(_isScanConvDynamicCont)
{ {
_colorMap->data()->setSize(static_cast<qint32>(scanConversionParams.pixelXNo), //_colorMap->data()->setSize(static_cast<qint32>(scanConversionParams.pixelXNo),
static_cast<qint32>(scanConversionParams.pixelZNo + 1)); //static_cast<qint32>(scanConversionParams.pixelZNo + 1));
_colorMap->data()->setRange(QCPRange(1, //_colorMap->data()->setRange(QCPRange(1,
static_cast<qint32>(scanConversionParams.pixelXNo)), //static_cast<qint32>(scanConversionParams.pixelXNo)),
QCPRange(1, //QCPRange(1,
static_cast<qint32>(scanConversionParams.pixelZNo + //static_cast<qint32>(scanConversionParams.pixelZNo +
1))); //1)));
_colorMap->data()->setSize(903, 552);
_colorMap->data()->setRange(QCPRange(1, 903), QCPRange(1, 552));
quint32 offset = 0;
if(903 > scanConversionParams.pixelXNo)
{
offset = (903 - scanConversionParams.pixelXNo) / 2;
}
for(quint32 ln = 0; ln < scanConversionParams.pixelXNo; ln += 1) for(quint32 ln = 0; ln < scanConversionParams.pixelXNo; ln += 1)
{ {
for(quint32 pnt = 0; pnt < scanConversionParams.pixelZNo + 1; pnt += 1) for(quint32 pnt = 0; pnt < scanConversionParams.pixelZNo + 1; pnt += 1)
@ -2318,7 +2326,7 @@ void MainWindow::show3d()
{ {
scanValue = 255; scanValue = 255;
} }
_colorMap->data()->setCell(static_cast<qint32>(ln), _colorMap->data()->setCell(static_cast<qint32>(ln + offset),
static_cast<qint32>(scanConversionParams.pixelZNo - static_cast<qint32>(scanConversionParams.pixelZNo -
pnt), pnt),
static_cast<double>(scanValue)); static_cast<double>(scanValue));

587
mainwindow.ui

File diff suppressed because it is too large
Loading…
Cancel
Save