Add calculateMinimalMaximalTransducerPositions to
Transmission reconstruction.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#include "reconstruction.h"
|
||||
#include "Function.h"
|
||||
#include "Function1D.h"
|
||||
#include "Function2D.h"
|
||||
#include "Matrix.h"
|
||||
using namespace Aurora;
|
||||
namespace Recon {
|
||||
Aurora::Matrix calculateMinimalMaximalTransducerPositions(
|
||||
const Aurora::Matrix &aMSenderList, const Aurora::Matrix &aMReceiverList) {
|
||||
|
||||
auto minEmitter = min(aMSenderList, Row);
|
||||
auto maxEmitter = max(aMSenderList, Row);
|
||||
|
||||
auto minReceiver = min(aMReceiverList, Row);
|
||||
auto maxReceiver = max(aMReceiverList, Row);
|
||||
|
||||
auto data1 = Aurora::malloc(minEmitter.getDataSize() * 2);
|
||||
auto data2 = Aurora::malloc(minEmitter.getDataSize() * 2);
|
||||
|
||||
auto minM = Matrix::New(data1,minEmitter.getDimSize(0),2);
|
||||
auto maxM = Matrix::New(data2,minEmitter.getDimSize(0),2);
|
||||
minM($,0) = minEmitter;
|
||||
minM($,1) = minReceiver;
|
||||
maxM($,0) = maxEmitter;
|
||||
maxM($,1) = maxReceiver;
|
||||
minM = min(minM,Row);
|
||||
maxM = max(maxM,Row);
|
||||
auto data3 = Aurora::malloc(minM.getDataSize() * 2);
|
||||
auto ddims = Matrix::New(data3,minM.getDimSize(0),2);
|
||||
ddims($,0) = minM;
|
||||
ddims($,1) = maxM;
|
||||
ddims.forceReshape(1, ddims.getDataSize(), 1);
|
||||
return ddims;
|
||||
}
|
||||
} // namespace Recon
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef _TRANS_RECONSTRUCTION_H__
|
||||
#define _TRANS_RECONSTRUCTION_H__
|
||||
#include "Matrix.h"
|
||||
namespace Recon {
|
||||
Aurora::Matrix calculateMinimalMaximalTransducerPositions(
|
||||
const Aurora::Matrix &aMSenderList, const Aurora::Matrix &aMReceiverList);
|
||||
}
|
||||
#endif // __RECONSTRUCTION_H__
|
||||
Reference in New Issue
Block a user