From e2d5375ecc5c8fc45b796e0bd9d948cd729abcc9 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Thu, 24 Jan 2019 13:48:49 +0100 Subject: Remove largely unimplemented CProjector2D::projectPoint method This includes the astra_mex_projector('splat') matlab function. --- src/FanFlatBeamStripKernelProjector2D.cpp | 63 ------------------------------- 1 file changed, 63 deletions(-) (limited to 'src/FanFlatBeamStripKernelProjector2D.cpp') diff --git a/src/FanFlatBeamStripKernelProjector2D.cpp b/src/FanFlatBeamStripKernelProjector2D.cpp index 7d25a55..c974b82 100644 --- a/src/FanFlatBeamStripKernelProjector2D.cpp +++ b/src/FanFlatBeamStripKernelProjector2D.cpp @@ -157,66 +157,3 @@ void CFanFlatBeamStripKernelProjector2D::computeSingleRayWeights(int _iProjectio projectSingleRay(_iProjectionIndex, _iDetectorIndex, p); _iStoredPixelCount = p.getStoredPixelCount(); } - -//---------------------------------------------------------------------------------------- -// Splat a single point -std::vector CFanFlatBeamStripKernelProjector2D::projectPoint(int _iRow, int _iCol) -{ - //float32 xUL = m_pVolumeGeometry->pixelColToCenterX(_iCol) - m_pVolumeGeometry->getPixelLengthX() * 0.5f; - //float32 yUL = m_pVolumeGeometry->pixelRowToCenterY(_iRow) - m_pVolumeGeometry->getPixelLengthY() * 0.5f; - //float32 xUR = m_pVolumeGeometry->pixelColToCenterX(_iCol) + m_pVolumeGeometry->getPixelLengthX() * 0.5f; - //float32 yUR = m_pVolumeGeometry->pixelRowToCenterY(_iRow) - m_pVolumeGeometry->getPixelLengthY() * 0.5f; - //float32 xLL = m_pVolumeGeometry->pixelColToCenterX(_iCol) - m_pVolumeGeometry->getPixelLengthX() * 0.5f; - //float32 yLL = m_pVolumeGeometry->pixelRowToCenterY(_iRow) + m_pVolumeGeometry->getPixelLengthY() * 0.5f; - //float32 xLR = m_pVolumeGeometry->pixelColToCenterX(_iCol) + m_pVolumeGeometry->getPixelLengthX() * 0.5f; - //float32 yLR = m_pVolumeGeometry->pixelRowToCenterY(_iRow) + m_pVolumeGeometry->getPixelLengthY() * 0.5f; - - std::vector res; - //// loop projectors and detectors - //for (int iProjection = 0; iProjection < m_pProjectionGeometry->getProjectionAngleCount(); ++iProjection) { - - // // get projection angle - // float32 theta = m_pProjectionGeometry->getProjectionAngle(iProjection); - // if (theta >= 7*PIdiv4) theta -= 2*PI; - // bool inverse = false; - // if (theta >= 3*PIdiv4) { - // theta -= PI; - // inverse = true; - // } - - // // calculate distance from the center of the voxel to the ray though the origin - // float32 tUL = xUL * cos(theta) + yUL * sin(theta); - // float32 tUR = xUR * cos(theta) + yUR * sin(theta); - // float32 tLL = xLL * cos(theta) + yLL * sin(theta); - // float32 tLR = xLR * cos(theta) + yLR * sin(theta); - // if (inverse) { - // tUL *= -1.0f; - // tUR *= -1.0f; - // tLL *= -1.0f; - // tLR *= -1.0f; - // } - // float32 tMin = min(tUL, min(tUR, min(tLL,tLR))); - // float32 tMax = max(tUL, max(tUR, max(tLL,tLR))); - - // // calculate the offset on the detectorarray (in indices) - // int dmin = (int)floor(m_pProjectionGeometry->detectorOffsetToIndexFloat(tMin)); - // int dmax = (int)ceil(m_pProjectionGeometry->detectorOffsetToIndexFloat(tMax)); - - // // add affected detectors to the list - // for (int i = dmin; i <= dmax; ++i) { - // if (i >= 0 && i < m_pProjectionGeometry->getDetectorCount()) { - // SDetector2D det; - // det.m_iAngleIndex = iProjection; - // det.m_iDetectorIndex = i; - // det.m_iIndex = iProjection * getProjectionGeometry()->getDetectorCount() + i; - // res.push_back(det); - // } - // } - //} - - //// return result vector - return res; - -} - -//---------------------------------------------------------------------------------------- -- cgit v1.2.3