summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_ParallelBeamLinearKernelProjector2D.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_ParallelBeamLinearKernelProjector2D.cpp b/tests/test_ParallelBeamLinearKernelProjector2D.cpp
index f1fa311..c62f670 100644
--- a/tests/test_ParallelBeamLinearKernelProjector2D.cpp
+++ b/tests/test_ParallelBeamLinearKernelProjector2D.cpp
@@ -85,10 +85,10 @@ float32 compute_linear_kernel(const astra::CProjectionGeometry2D& projgeom, cons
if (fabs(cos(fAngle)) > fabs(sin(fAngle))) {
fDetStep = volgeom.getPixelLengthY() * fabs(cos(fAngle));
- fWeight = volgeom.getPixelLengthX() * 1.0f / fabs(cos(fAngle));
+ fWeight = projgeom.getDetectorWidth() * volgeom.getPixelLengthX() * 1.0f / fabs(cos(fAngle));
} else {
fDetStep = volgeom.getPixelLengthX() * fabs(sin(fAngle));
- fWeight = volgeom.getPixelLengthY() * 1.0f / fabs(sin(fAngle));
+ fWeight = projgeom.getDetectorWidth() * volgeom.getPixelLengthY() * 1.0f / fabs(sin(fAngle));
}
// printf("step: %f\n weight: %f\n", fDetStep, fWeight);
@@ -155,7 +155,7 @@ BOOST_AUTO_TEST_CASE( testParallelBeamLinearKernelProjector2D_Rectangles )
pPix[i].m_iIndex / volGeom.getGridColCount(),
iDet,
projGeom.getProjectionAngle(0));
- BOOST_CHECK_SMALL( pPix[i].m_fWeight - fTest, 0.00037f);
+ BOOST_CHECK_SMALL( pPix[i].m_fWeight - fTest, 0.0004f);
fW += pPix[i].m_fWeight;
}