84 lines
3.6 KiB
C++
84 lines
3.6 KiB
C++
#ifndef __TRANS_DETECTION_H__
|
|
#define __TRANS_DETECTION_H__
|
|
#include "Matrix.h"
|
|
namespace Recon {
|
|
struct SearchPosition {
|
|
Aurora::Matrix startSearch;
|
|
Aurora::Matrix endSearch;
|
|
};
|
|
struct TimeWindowResult {
|
|
Aurora::Matrix startSearch;
|
|
Aurora::Matrix AscanBlockProcessed;
|
|
};
|
|
|
|
struct DetectResult {
|
|
Aurora::Matrix tof;
|
|
Aurora::Matrix sosValue;
|
|
Aurora::Matrix att;
|
|
};
|
|
Aurora::Matrix calculateAttenuation(const Aurora::Matrix &ascans,
|
|
const Aurora::Matrix &startPos,
|
|
const Aurora::Matrix &endPos,
|
|
const Aurora::Matrix &ascansRef,
|
|
const Aurora::Matrix &startPosRef,
|
|
const Aurora::Matrix &endPosRef);
|
|
|
|
SearchPosition
|
|
calculateStarEndSearchPosition(const Aurora::Matrix &aVDistBlock,
|
|
float minSpeedOfSound, float maxSpeedOfSound,
|
|
float sampleRate, float maxSample,
|
|
const Aurora::Matrix &aVSosOffsetBlock,
|
|
float startOffset, float segmentLenOffset);
|
|
|
|
TimeWindowResult applyTimeWindowing(
|
|
const Aurora::Matrix &AscanBlock, float sampleRate,
|
|
const Aurora::Matrix &distBlock, float sosWater,
|
|
float startOffset, float segmentLenOffset,
|
|
float minSpeedOfSound, float maxSpeedOfSound, bool gaussWindow);
|
|
|
|
Aurora::Matrix
|
|
detectAttVectorized(const Aurora::Matrix &Ascan, const Aurora::Matrix &AscanRef,
|
|
const Aurora::Matrix &distRef,
|
|
float sosWaterRef,
|
|
const Aurora::Matrix &tof, int aScanReconstructionFrequency,
|
|
float offsetElectronic, int detectionWindowATT);
|
|
|
|
DetectResult
|
|
detectTofVectorized(
|
|
const Aurora::Matrix &AscanBlock, const Aurora::Matrix &AscanRefBlock,
|
|
const Aurora::Matrix &distBlock, const Aurora::Matrix &distBlockRef,
|
|
float aSOSWater, float aSOSWaterRef,
|
|
int useTimeWindowing, int aScanReconstructionFrequency,
|
|
float offsetElectronic, int detectionWindowSOS, float minSpeedOfSound,
|
|
float maxSpeedOfSound, bool gaussWindow);
|
|
|
|
DetectResult
|
|
detectTofAndAtt(
|
|
const Aurora::Matrix &AscanBlock, const Aurora::Matrix &AscanRefBlock,
|
|
const Aurora::Matrix &distBlock, const Aurora::Matrix &distRefBlock,
|
|
int resampleFactor, int nthreads, float aSOSWater, float aSOSWaterRef,
|
|
int useTimeWindowing, int aScanReconstructionFrequency,
|
|
int detectionWindowATT, float offsetElectronic, int detectionWindowSOS,
|
|
float minSpeedOfSound, float maxSpeedOfSound, bool gaussWindow);
|
|
|
|
//remove detectTofAndAttMex function, use detectTofAndAtt function instead of
|
|
//保留函数和函数申明备忘,以防以后再次使用
|
|
// DetectResult
|
|
// detectTofAndAttMex(
|
|
// const Aurora::Matrix &AscanBlock, const Aurora::Matrix &AscanRefBlock,
|
|
// const Aurora::Matrix &distBlock, const Aurora::Matrix &distBlockRef,
|
|
// const Aurora::Matrix &sosWaterBlock, const Aurora::Matrix &sosWaterRefBlock,
|
|
// int resampleFactor, int nthreads, float expectedSOSWater,
|
|
// int useTimeWindowing, int aScanReconstructionFrequency,
|
|
// int detectionWindowATT, float offsetElectronic, int detectionWindowSOS,
|
|
// float minSpeedOfSound, float maxSpeedOfSound, bool gaussWindow);
|
|
|
|
DetectResult
|
|
transmissionDetection(
|
|
const Aurora::CudaMatrix &AscanBlock, const Aurora::CudaMatrix &AscanRefBlock,
|
|
const Aurora::CudaMatrix &distBlock, const Aurora::CudaMatrix &distRefBlock,
|
|
float aSOSWater, float aSOSWaterRef);
|
|
|
|
} // namespace Recon
|
|
|
|
#endif // __DETECTION_H__
|