From b3e8338a7fa4c7ed9a5954ca02fa3126aefff530 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 2 Dec 2014 14:20:46 +0100 Subject: Add ProjectionGeometry3D::projectPoint for par3d and cone. Par3d_vec and cone_vec to follow. --- src/CudaForwardProjectionAlgorithm3D.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/CudaForwardProjectionAlgorithm3D.cpp') diff --git a/src/CudaForwardProjectionAlgorithm3D.cpp b/src/CudaForwardProjectionAlgorithm3D.cpp index f64620f..76b3419 100644 --- a/src/CudaForwardProjectionAlgorithm3D.cpp +++ b/src/CudaForwardProjectionAlgorithm3D.cpp @@ -251,6 +251,25 @@ void CCudaForwardProjectionAlgorithm3D::run(int) projKernel = projector->getProjectionKernel(); } +#if 0 + // Debugging code that gives the coordinates of the corners of the volume + // projected on the detector. + { + float fX[] = { volgeom.getWindowMinX(), volgeom.getWindowMaxX() }; + float fY[] = { volgeom.getWindowMinY(), volgeom.getWindowMaxY() }; + float fZ[] = { volgeom.getWindowMinZ(), volgeom.getWindowMaxZ() }; + + for (int a = 0; a < projgeom->getProjectionCount(); ++a) + for (int i = 0; i < 2; ++i) + for (int j = 0; j < 2; ++j) + for (int k = 0; k < 2; ++k) { + float fU, fV; + projgeom->projectPoint(fX[i], fY[j], fZ[k], a, fU, fV); + fprintf(stderr, "%3d %c1,%c1,%c1 -> %12f %12f\n", a, i ? ' ' : '-', j ? ' ' : '-', k ? ' ' : '-', fU, fV); + } + } +#endif + if (conegeom) { astraCudaConeFP(m_pVolume->getDataConst(), m_pProjections->getData(), volgeom.getGridColCount(), -- cgit v1.2.3