diff options
Diffstat (limited to 'src/ParallelVecProjectionGeometry3D.cpp')
-rw-r--r-- | src/ParallelVecProjectionGeometry3D.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ParallelVecProjectionGeometry3D.cpp b/src/ParallelVecProjectionGeometry3D.cpp index 7c2d2cd..56597fc 100644 --- a/src/ParallelVecProjectionGeometry3D.cpp +++ b/src/ParallelVecProjectionGeometry3D.cpp @@ -222,9 +222,19 @@ void CParallelVecProjectionGeometry3D::projectPoint(float32 fX, float32 fY, floa int iAngleIndex, float32 &fU, float32 &fV) const { -#warning implementme - fU = 0.0f/0.0f; - fV = 0.0f/0.0f; + ASTRA_ASSERT(iAngleIndex >= 0); + ASTRA_ASSERT(iAngleIndex < m_iProjectionAngleCount); + + double fUX, fUY, fUZ, fUC; + double fVX, fVY, fVZ, fVC; + + computeBP_UV_Coeffs(m_pProjectionAngles[iAngleIndex], + fUX, fUY, fUZ, fUC, fVX, fVY, fVZ, fVC); + + // The -0.5f shifts from corner to center of detector pixels + fU = (fUX*fX + fUY*fY + fUZ*fZ + fUC) - 0.5f; + fV = (fVX*fX + fVY*fY + fVZ*fZ + fVC) - 0.5f; + } //---------------------------------------------------------------------------------------- |