feat: Remove redudent TransDetection lib
This commit is contained in:
@@ -38,45 +38,6 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
TEST_F(Detection_Test, detectTofAndAttMex) {
|
||||
|
||||
MatlabReader m("/home/sun/testData/transmissionDetection.mat");
|
||||
|
||||
auto AscanBlock = m.read("AscanBlock");
|
||||
auto AscanRefBlock = m.read("AscanRefBlock");
|
||||
auto distBlock = m.read("dists");
|
||||
auto distBlockRef = m.read("distRefBlock");
|
||||
auto sosWaterBlock = Recon::temperatureToSoundSpeed(m.read("waterTempBlock"),"marczak");
|
||||
auto sosWaterRefBlock = Recon::temperatureToSoundSpeed(m.read("waterTempRefBlock"),"marczak");
|
||||
float expectedSOSWater = 1.512677498767504e+03;
|
||||
|
||||
auto result = Recon::detectTofAndAttMex(
|
||||
AscanBlock, AscanRefBlock, distBlock, distBlockRef, sosWaterBlock,
|
||||
sosWaterRefBlock, Recon::transParams::resampleFactor,
|
||||
Recon::transParams::nThreads, expectedSOSWater,
|
||||
Recon::transParams::useTimeWindowing,
|
||||
Recon::transParams::aScanReconstructionFrequency,
|
||||
Recon::transParams::detectionWindowATT,Recon::transParams::offsetElectronic,
|
||||
Recon::transParams::detectionWindowSOS,
|
||||
Recon::transParams::minSpeedOfSound,
|
||||
Recon::transParams::maxSpeedOfSound, Recon::transParams::gaussWindow);
|
||||
|
||||
MatlabReader m3("/home/krad/TestData/sosResult.mat");
|
||||
auto sosvalue = m3.read("sosValue");
|
||||
auto tof = m3.read("tofRel");
|
||||
ASSERT_EQ(sosvalue.getDataSize(), result.tof.getDataSize());
|
||||
ASSERT_EQ(sosvalue.getDataSize(), result.sosValue.getDataSize());
|
||||
ASSERT_EQ(sosvalue.getDataSize(), result.att.getDataSize());
|
||||
#pragma omp parallel for
|
||||
for (size_t i = 0; i < result.tof.getDataSize(); i++)
|
||||
{
|
||||
EXPECT_DOUBLE_AE(tof[i],result.tof[i])<<",index:"<<i;
|
||||
EXPECT_DOUBLE_AE(sosvalue[i],result.sosValue[i])<<",index:"<<i;
|
||||
// EXPECT_TRUE(result.att[i]==0)<<",index:"<<i;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TEST_F(Detection_Test, detectTofAndAtt) {
|
||||
|
||||
MatlabReader m("/home/sun/testData/transmissionDetection.mat");
|
||||
|
||||
Reference in New Issue
Block a user