Add transmissionReconstruction.
This commit is contained in:
49
src/common/precalculateChannelList.cpp
Normal file
49
src/common/precalculateChannelList.cpp
Normal file
@@ -0,0 +1,49 @@
|
||||
#include "precalculateChannelList.h"
|
||||
#include "Function.h"
|
||||
#include "Matrix.h"
|
||||
|
||||
using namespace Aurora;
|
||||
using namespace Recon;
|
||||
|
||||
namespace
|
||||
{
|
||||
double USCTTAS2DAQChannels(double aRl, double aRn, const MeasurementInfo& aExpInfo, const PreComputes& aPreComputes)
|
||||
{
|
||||
size_t size = aPreComputes.measuredCE_receiverIndices.getDataSize();
|
||||
if(aExpInfo.Hardware == "USCT3dv2")
|
||||
{
|
||||
//暂不实现
|
||||
}
|
||||
else if(aExpInfo.Hardware == "USCT3dv3")
|
||||
{
|
||||
if (aPreComputes.measuredCEUsed == 1)
|
||||
{
|
||||
for(int i=0; i<size; ++i)
|
||||
{
|
||||
if(aPreComputes.measuredCE_TASIndices[i] == aRl && aPreComputes.measuredCE_receiverIndices[i] == aRn)
|
||||
{
|
||||
return i+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
Aurora::Matrix Recon::precalculateChannelList(const Aurora::Matrix& aRlList, const Aurora::Matrix& aRnList,
|
||||
const MeasurementInfo& aExpInfo, const PreComputes& aPreComputes)
|
||||
{
|
||||
int rows = aRlList.getDataSize();
|
||||
int columns = aRnList.getDataSize();
|
||||
double* resultData = Aurora::malloc(rows * columns);
|
||||
for(int i=0; i<columns; ++i)
|
||||
{
|
||||
for(int j=0; j<rows; ++j)
|
||||
{
|
||||
resultData[i*rows + j] = USCTTAS2DAQChannels(aRlList[j], aRnList[i], aExpInfo, aPreComputes);
|
||||
}
|
||||
}
|
||||
|
||||
return Matrix::New(resultData, rows, columns);
|
||||
}
|
||||
Reference in New Issue
Block a user