Add Reflection dataFilter
This commit is contained in:
@@ -4,8 +4,11 @@
|
||||
#include "Function1D.h"
|
||||
#include "MatlabReader.h"
|
||||
#include "Matrix.h"
|
||||
#include "reflectionReconstruction/dataFilter.h"
|
||||
#include "transmissionReconstruction/dataFilter/dataFilter.h"
|
||||
|
||||
|
||||
|
||||
inline double fourDecimalRound(double src){
|
||||
return round(src*10000.0)/10000.0;
|
||||
}
|
||||
@@ -114,4 +117,17 @@ TEST_F(DataFilter_Test, findDefectTransmissionData) {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(DataFilter_Test, filterReflectionData) {
|
||||
auto receiverPositionBlock = Aurora::transpose(Aurora::Matrix::fromRawData(new double[9]{-0.12,-0.12,-0.12,-0.01,-0.01,-0.01,0.03,0.03,0.04}, 3, 3));
|
||||
auto senderPositionBlock = Aurora::transpose(Aurora::Matrix::fromRawData(new double[9]{-0.12,-0.12,-0.12,-0.01,-0.01,-0.01,0.03,0.03,0.03}, 3, 3));
|
||||
auto senderNormalBlock = Aurora::transpose(Aurora::Matrix::fromRawData(new double[9]{0.99,0.99,0.99,0.10,0.10,0.10,0,0,0}, 3, 3));
|
||||
int constrictReflectionAngles = 1;
|
||||
double lowerAngle = 45;
|
||||
double upperAngle = 360;
|
||||
auto result = Recon::filterReflectionData(receiverPositionBlock, senderPositionBlock, senderNormalBlock, constrictReflectionAngles, lowerAngle, upperAngle);
|
||||
EXPECT_EQ(3, result.getDataSize());
|
||||
EXPECT_DOUBLE_AE(result[0],1);
|
||||
EXPECT_DOUBLE_AE(result[1],1);
|
||||
EXPECT_DOUBLE_AE(result[2],1);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user