Add Bresengam and DGradient(and test).
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "Function1D.h"
|
||||
#include "MatlabReader.h"
|
||||
#include "Matrix.h"
|
||||
#include "transmissionReconstruction/reconstruction/buildMatrix/DGradient.h"
|
||||
#include "transmissionReconstruction/reconstruction/reconstruction.h"
|
||||
|
||||
|
||||
@@ -71,3 +72,16 @@ TEST_F(Reconstruction_Test, discretizePositions) {
|
||||
EXPECT_DOUBLE_AE(1,result.senderCoordList[1]);
|
||||
}
|
||||
|
||||
TEST_F(Reconstruction_Test, DGradient) {
|
||||
MatlabReader m("/home/krad/TestData/DGradient.mat");
|
||||
|
||||
auto x = m.read("x");
|
||||
auto y = m.read("y");
|
||||
// x.forceReshape(x.getDataSize(), 1, 1);
|
||||
auto result = Recon::DGradient(x,1,2);
|
||||
for (size_t i = 0; i < result.getDataSize(); i++)
|
||||
{
|
||||
EXPECT_DOUBLE_AE(result.getData()[i],y.getData()[i])<<"index:"<<i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user