diff options
author | Wim van Aarle <wimvanaarle@gmail.com> | 2015-05-26 15:43:08 +0200 |
---|---|---|
committer | Wim van Aarle <wimvanaarle@gmail.com> | 2015-05-26 15:43:08 +0200 |
commit | 3117c7a61a83ca28ba00211d1eb65eaf13a7307a (patch) | |
tree | 4851ae878cf499deb2ae2f77575b3c48ecaf5d04 /include/astra/ParallelBeamLinearKernelProjector2D.inl | |
parent | 9e884e760b71be354c08892f6bce2efe723917b3 (diff) | |
parent | 57668bcdd086145eb14598e32fd5d0dca711865c (diff) | |
download | astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.gz astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.bz2 astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.xz astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.zip |
Merge remote-tracking branch 'upstream/master' into parallel_vec
Conflicts:
astra_vc11.vcxproj.filters
python/astra/functions.py
src/ParallelBeamBlobKernelProjector2D.cpp
src/ProjectionGeometry2D.cpp
Diffstat (limited to 'include/astra/ParallelBeamLinearKernelProjector2D.inl')
-rw-r--r-- | include/astra/ParallelBeamLinearKernelProjector2D.inl | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/astra/ParallelBeamLinearKernelProjector2D.inl b/include/astra/ParallelBeamLinearKernelProjector2D.inl index 9f898ce..79b82d4 100644 --- a/include/astra/ParallelBeamLinearKernelProjector2D.inl +++ b/include/astra/ParallelBeamLinearKernelProjector2D.inl @@ -54,12 +54,6 @@ void CParallelBeamLinearKernelProjector2D::projectSingleRay(int _iProjection, in template <typename Policy> void CParallelBeamLinearKernelProjector2D::projectBlock_internal(int _iProjFrom, int _iProjTo, int _iDetFrom, int _iDetTo, Policy& p) { - // variables - float32 detX, detY, x, y, c, r, update_c, update_r, offset; - float32 lengthPerRow, lengthPerCol, inv_pixelLengthX, inv_pixelLengthY; - int iVolumeIndex, iRayIndex, row, col, iAngle, iDetector, colCount, rowCount, detCount; - const SParProjection * proj = 0; - // get vector geometry const CParallelVecProjectionGeometry2D* pVecProjectionGeometry; if (dynamic_cast<CParallelProjectionGeometry2D*>(m_pProjectionGeometry)) { @@ -69,16 +63,22 @@ void CParallelBeamLinearKernelProjector2D::projectBlock_internal(int _iProjFrom, } // precomputations - inv_pixelLengthX = 1.0f / m_pVolumeGeometry->getPixelLengthX(); - inv_pixelLengthY = 1.0f / 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 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 detX, detY, x, y, c, r, update_c, update_r, offset; + float32 lengthPerRow, lengthPerCol; + int iVolumeIndex, iRayIndex, row, col, iDetector; - proj = &pVecProjectionGeometry->getProjectionVectors()[iAngle]; + const SParProjection * proj = &pVecProjectionGeometry->getProjectionVectors()[iAngle]; bool vertical = fabs(proj->fRayX) < fabs(proj->fRayY); if (vertical) { |