Files
UR/src/transmissionReconstruction/detection/detection.cuh
2023-12-22 11:17:18 +08:00

53 lines
2.6 KiB
Plaintext

#ifndef __DETECTION_CUH__
#define __DETECTION_CUH__
#include "CudaMatrix.h"
using namespace Aurora;
namespace Recon {
struct SearchPositionC {
Aurora::CudaMatrix startSearch;
Aurora::CudaMatrix endSearch;
};
struct DetectResultC {
Aurora::CudaMatrix tof;
Aurora::CudaMatrix sosValue;
Aurora::CudaMatrix att;
};
struct TimeWindowResultC {
Aurora::CudaMatrix startSearch;
Aurora::CudaMatrix AscanBlockProcessed;
};
CudaMatrix calculateAttenuationCuda(const CudaMatrix &ascans,
const CudaMatrix &startPos,
const CudaMatrix &endPos,
const CudaMatrix &ascansRef,
const CudaMatrix &startPosRef,
const CudaMatrix &endPosRef);
CudaMatrix
detectAttVectorizedCuda(const CudaMatrix &Ascan, const CudaMatrix &AscanRef,
const CudaMatrix &distRef,
const CudaMatrix &sosWaterRef,
const CudaMatrix &tof, int aScanReconstructionFrequency,
float offsetElectronic, int detectionWindowATT);
TimeWindowResultC applyTimeWindowing(const Aurora::CudaMatrix &AscanBlock, float sampleRate,
const Aurora::CudaMatrix &distBlock, const Aurora::CudaMatrix &sosBlock,
float expectedSOSWater, float startOffset, float segmentLenOffset,
float minSpeedOfSound, float maxSpeedOfSound, bool gaussWindow);
SearchPositionC calculateStarEndSearchPosition(const CudaMatrix &aVDistBlock,
float minSpeedOfSound, float maxSpeedOfSound,
float sampleRate, float maxSample,
const CudaMatrix &aVSosOffsetBlock,
float startOffset, float segmentLenOffset);
CudaMatrix calculateSOSOffset(const CudaMatrix &sosBlock, float referenceSOS, const CudaMatrix &distBlock, float sampleRate);
DetectResultC detectTofAndAtt(
const Aurora::CudaMatrix &AscanBlock, const Aurora::CudaMatrix &AscanRefBlock,
const Aurora::CudaMatrix &distBlock, const Aurora::CudaMatrix &distRefBlock,
const Aurora::CudaMatrix &sosWaterBlock,
const Aurora::CudaMatrix &sosWaterRefBlock,
int resampleFactor,int nthreads, float expectedSOSWater,
int useTimeWindowing, int aScanReconstructionFrequency,int detectionWindowATT,
float offsetElectronic, int detectionWindowSOS, float minSpeedOfSound,
float maxSpeedOfSound, bool gaussWindow);
};
#endif // __DETECTION_H__