Improve filterTransmission performance.

This commit is contained in:
kradchen
2023-05-30 17:15:14 +08:00
parent 7c80f0ff8d
commit a82b89966a

View File

@@ -36,6 +36,7 @@ namespace Recon {
size.getData()[3] = aMSensData.size();
auto idx = sub2ind(size, {aVrnBlock, aVrlBlock, aVsnBlock, aVslBlock});
auto transData = zeros(idx.getDataSize(), 1, 1);
#pragma omp parallel for
for (size_t i = 0; i < idx.getDataSize(); i++) {
auto index = (size_t)(idx.getData()[i] - 1);
auto sliceIndex = index / aMSensData0.getDataSize();
@@ -57,6 +58,7 @@ namespace Recon {
auto inbetweenAngle = acosd(dot(aMSenderNormalBlock, aMReceiverNormalBlock) /
(vecnorm(aMSenderNormalBlock, Norm2, 1) *
vecnorm(aMReceiverNormalBlock, Norm2, 1)));
#pragma omp parallel for
for (size_t i = 0; i < transData.getDataSize(); i++)
{
transData.getData()[i] = (inbetweenAngle.getData()[i]<aAngleLowerLimit || inbetweenAngle.getData()[i] > aAngleUpperLimit)?0.0:1.0;