summaryrefslogtreecommitdiffstats
path: root/include/astra/ParallelBeamStripKernelProjector2D.inl
diff options
context:
space:
mode:
Diffstat (limited to 'include/astra/ParallelBeamStripKernelProjector2D.inl')
-rw-r--r--include/astra/ParallelBeamStripKernelProjector2D.inl30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/astra/ParallelBeamStripKernelProjector2D.inl b/include/astra/ParallelBeamStripKernelProjector2D.inl
index 31d222a..85faaa3 100644
--- a/include/astra/ParallelBeamStripKernelProjector2D.inl
+++ b/include/astra/ParallelBeamStripKernelProjector2D.inl
@@ -52,13 +52,6 @@ void CParallelBeamStripKernelProjector2D::projectSingleRay(int _iProjection, int
template <typename Policy>
void CParallelBeamStripKernelProjector2D::projectBlock_internal(int _iProjFrom, int _iProjTo, int _iDetFrom, int _iDetTo, Policy& p)
{
- // variables
- float32 detLX, detLY, detRX, detRY, S, T, update_c, update_r, offsetL, offsetR, invTminS;
- float32 inv_pixelLengthX, inv_pixelLengthY, pixelArea, res, fRxOverRy, fRyOverRx;
- int iVolumeIndex, iRayIndex, iAngle, iDetector;
- int row, row_top, row_bottom, col, col_left, col_right, colCount, rowCount, detCount;
- const SParProjection * proj = 0;
-
// get vector geometry
const CParallelVecProjectionGeometry2D* pVecProjectionGeometry;
if (dynamic_cast<CParallelProjectionGeometry2D*>(m_pProjectionGeometry)) {
@@ -68,17 +61,24 @@ void CParallelBeamStripKernelProjector2D::projectBlock_internal(int _iProjFrom,
}
// precomputations
- inv_pixelLengthX = 1.0f / m_pVolumeGeometry->getPixelLengthX();
- inv_pixelLengthY = 1.0f / m_pVolumeGeometry->getPixelLengthY();
- pixelArea = m_pVolumeGeometry->getPixelLengthX() * m_pVolumeGeometry->getPixelLengthY();
- colCount = m_pVolumeGeometry->getGridColCount();
- rowCount = m_pVolumeGeometry->getGridRowCount();
- detCount = pVecProjectionGeometry->getDetectorCount();
+ const float32 inv_pixelLengthX = 1.0f / m_pVolumeGeometry->getPixelLengthX();
+ const float32 inv_pixelLengthY = 1.0f / m_pVolumeGeometry->getPixelLengthY();
+ const float32 pixelArea = m_pVolumeGeometry->getPixelLengthX() * m_pVolumeGeometry->getPixelLengthY();
+ const int colCount = m_pVolumeGeometry->getGridColCount();
+ const int rowCount = m_pVolumeGeometry->getGridRowCount();
+ const int detCount = pVecProjectionGeometry->getDetectorCount();
// loop angles
- for (iAngle = _iProjFrom; iAngle < _iProjTo; ++iAngle) {
+ #pragma omp parallel for
+ for (int iAngle = _iProjFrom; iAngle < _iProjTo; ++iAngle) {
+
+ // variables
+ float32 detLX, detLY, detRX, detRY, S, T, update_c, update_r, offsetL, offsetR, invTminS;
+ float32 res, fRxOverRy, fRyOverRx;
+ int iVolumeIndex, iRayIndex, iDetector;
+ int row, row_top, row_bottom, col, col_left, col_right;
- proj = &pVecProjectionGeometry->getProjectionVectors()[iAngle];
+ const SParProjection * proj = &pVecProjectionGeometry->getProjectionVectors()[iAngle];
bool vertical = fabs(proj->fRayX) < fabs(proj->fRayY);
if (vertical) {