Files
UR/src/transmissionReconstruction/detection/detection.h

84 lines
3.7 KiB
C
Raw Normal View History

2023-05-19 13:43:12 +08:00
#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;
};
2023-05-23 09:39:21 +08:00
struct DetectResult {
2023-05-19 13:43:12 +08:00
Aurora::Matrix tof;
Aurora::Matrix sosValue;
2023-05-23 09:39:21 +08:00
Aurora::Matrix att;
2023-05-19 13:43:12 +08:00
};
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,
double minSpeedOfSound, double maxSpeedOfSound,
double sampleRate, double maxSample,
const Aurora::Matrix &aVSosOffsetBlock,
double startOffset, double segmentLenOffset);
TimeWindowResult applyTimeWindowing(
const Aurora::Matrix &AscanBlock, double sampleRate,
const Aurora::Matrix &distBlock, const Aurora::Matrix &sosBlock,
double expectedSOSWater, double startOffset, double segmentLenOffset,
double minSpeedOfSound, double maxSpeedOfSound, bool gaussWindow);
2023-05-23 09:39:21 +08:00
Aurora::Matrix
detectAttVectorized(const Aurora::Matrix &Ascan, const Aurora::Matrix &AscanRef,
const Aurora::Matrix &distRef,
const Aurora::Matrix &sosWaterRef,
const Aurora::Matrix &tof, int aScanReconstructionFrequency,
double offsetElectronic, int detectionWindowATT);
2023-05-19 15:53:58 +08:00
2023-05-23 09:39:21 +08:00
DetectResult
detectTofVectorized(
2023-05-19 15:53:58 +08:00
const Aurora::Matrix &AscanBlock, const Aurora::Matrix &AscanRefBlock,
const Aurora::Matrix &distBlock, const Aurora::Matrix &distBlockRef,
const Aurora::Matrix &sosWaterBlock,
const Aurora::Matrix &sosWaterRefBlock, double expectedSOSWater,
int useTimeWindowing, int aScanReconstructionFrequency,
double offsetElectronic, int detectionWindowSOS, double minSpeedOfSound,
2023-05-23 09:39:21 +08:00
double maxSpeedOfSound, bool gaussWindow);
DetectResult
detectTofAndAtt(
const Aurora::Matrix &AscanBlock, const Aurora::Matrix &AscanRefBlock,
const Aurora::Matrix &distBlock, const Aurora::Matrix &distRefBlock,
const Aurora::Matrix &sosWaterBlock, const Aurora::Matrix &sosWaterRefBlock,
int resampleFactor, int nthreads, double expectedSOSWater,
int useTimeWindowing, int aScanReconstructionFrequency,
int detectionWindowATT, double offsetElectronic, int detectionWindowSOS,
double minSpeedOfSound, double maxSpeedOfSound, bool gaussWindow);
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, double expectedSOSWater,
int useTimeWindowing, int aScanReconstructionFrequency,
int detectionWindowATT, double offsetElectronic, int detectionWindowSOS,
double minSpeedOfSound, double maxSpeedOfSound, bool gaussWindow);
DetectResult
transmissionDetection(
const Aurora::Matrix &AscanBlock, const Aurora::Matrix &AscanRefBlock,
const Aurora::Matrix &distBlock, const Aurora::Matrix &distRefBlock,
const Aurora::Matrix &sosWaterBlock, const Aurora::Matrix &sosWaterRefBlock, double expectedSOSWater);
2023-05-19 13:43:12 +08:00
} // namespace Recon
#endif // __DETECTION_H__