summaryrefslogtreecommitdiffstats
path: root/src/SparseMatrixProjector2D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <wjp@usecode.org>2019-02-19 10:47:45 +0100
committerGitHub <noreply@github.com>2019-02-19 10:47:45 +0100
commit3d07f5b107eeb796573d4a74e46367cf1bfb2abf (patch)
tree63b9edf1c08fdbc50acdb61c737417b56aa7e7d1 /src/SparseMatrixProjector2D.cpp
parent8190865b347cd358966855519bffa64eb33a636f (diff)
parent22342b7a1bd169c474cf323709e36f553ac4aee1 (diff)
downloadastra-3d07f5b107eeb796573d4a74e46367cf1bfb2abf.tar.gz
astra-3d07f5b107eeb796573d4a74e46367cf1bfb2abf.tar.bz2
astra-3d07f5b107eeb796573d4a74e46367cf1bfb2abf.tar.xz
astra-3d07f5b107eeb796573d4a74e46367cf1bfb2abf.zip
Merge pull request #183 from wjp/par2d_dd
Add basic implementation of par2d CPU Distance Driven projector
Diffstat (limited to 'src/SparseMatrixProjector2D.cpp')
-rw-r--r--src/SparseMatrixProjector2D.cpp41
1 files changed, 0 insertions, 41 deletions
diff --git a/src/SparseMatrixProjector2D.cpp b/src/SparseMatrixProjector2D.cpp
index 6fded6a..46302f3 100644
--- a/src/SparseMatrixProjector2D.cpp
+++ b/src/SparseMatrixProjector2D.cpp
@@ -174,44 +174,3 @@ void CSparseMatrixProjector2D::computeSingleRayWeights(int _iProjectionIndex,
_iStoredPixelCount = p.getStoredPixelCount();
}
-//----------------------------------------------------------------------------------------
-// Splat a single point
-std::vector<SDetector2D> CSparseMatrixProjector2D::projectPoint(int _iRow, int _iCol)
-{
- unsigned int iVolumeIndex = _iCol * m_pVolumeGeometry->getGridRowCount() + _iRow;
-
- // NOTE: This is very slow currently because we don't have the
- // sparse matrix stored in an appropriate form for this function.
- std::vector<SDetector2D> ret;
-
- const CSparseMatrix* pMatrix = dynamic_cast<CSparseMatrixProjectionGeometry2D*>(m_pProjectionGeometry)->getMatrix();
-
- for (int iAngle = 0; iAngle < m_pProjectionGeometry->getProjectionAngleCount(); ++iAngle)
- {
- for (int iDetector = 0; iDetector < m_pProjectionGeometry->getDetectorCount(); ++iDetector)
- {
- int iRayIndex = iAngle * m_pProjectionGeometry->getDetectorCount() + iDetector;
- const unsigned int* piColIndices;
- const float32* pfValues;
- unsigned int iSize;
-
- pMatrix->getRowData(iRayIndex, iSize, pfValues, piColIndices);
-
- for (unsigned int i = 0; i < iSize; ++i) {
- if (piColIndices[i] == iVolumeIndex) {
- SDetector2D s;
- s.m_iIndex = iRayIndex;
- s.m_iAngleIndex = iAngle;
- s.m_iDetectorIndex = iDetector;
- ret.push_back(s);
- break;
- } else if (piColIndices[i] > iVolumeIndex) {
- break;
- }
- }
- }
- }
- return ret;
-}
-
-//----------------------------------------------------------------------------------------