diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2014-12-02 14:20:46 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2014-12-02 14:22:02 +0100 |
commit | b3e8338a7fa4c7ed9a5954ca02fa3126aefff530 (patch) | |
tree | e68d4cfeb680ad2d491cc92a3efe5f9a4c9210c2 /src/CudaForwardProjectionAlgorithm3D.cpp | |
parent | bdc9cc8c8c06b1bf25d24ae242cad708fc0f9b14 (diff) | |
download | astra-b3e8338a7fa4c7ed9a5954ca02fa3126aefff530.tar.gz astra-b3e8338a7fa4c7ed9a5954ca02fa3126aefff530.tar.bz2 astra-b3e8338a7fa4c7ed9a5954ca02fa3126aefff530.tar.xz astra-b3e8338a7fa4c7ed9a5954ca02fa3126aefff530.zip |
Add ProjectionGeometry3D::projectPoint for par3d and cone.
Par3d_vec and cone_vec to follow.
Diffstat (limited to 'src/CudaForwardProjectionAlgorithm3D.cpp')
-rw-r--r-- | src/CudaForwardProjectionAlgorithm3D.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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(), |