From e1a3f0ba1fe7455d0c9183ad07f106aebc1c821f Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 20 Sep 2017 16:45:41 +0200 Subject: Fix non-square window for CPU projectors --- include/astra/FanFlatBeamLineKernelProjector2D.inl | 2 +- include/astra/ParallelBeamBlobKernelProjector2D.inl | 2 +- include/astra/ParallelBeamLineKernelProjector2D.inl | 2 +- include/astra/ParallelBeamLinearKernelProjector2D.inl | 2 +- include/astra/ParallelBeamStripKernelProjector2D.inl | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/astra/FanFlatBeamLineKernelProjector2D.inl b/include/astra/FanFlatBeamLineKernelProjector2D.inl index 07d61b5..01f031c 100644 --- a/include/astra/FanFlatBeamLineKernelProjector2D.inl +++ b/include/astra/FanFlatBeamLineKernelProjector2D.inl @@ -69,7 +69,7 @@ void CFanFlatBeamLineKernelProjector2D::projectBlock_internal(int _iProjFrom, in const int colCount = m_pVolumeGeometry->getGridColCount(); const int rowCount = m_pVolumeGeometry->getGridRowCount(); const int detCount = pVecProjectionGeometry->getDetectorCount(); - const float32 Ex = m_pVolumeGeometry->getWindowMinY() + pixelLengthX*0.5f; + const float32 Ex = m_pVolumeGeometry->getWindowMinX() + pixelLengthX*0.5f; const float32 Ey = m_pVolumeGeometry->getWindowMaxY() - pixelLengthY*0.5f; // loop angles diff --git a/include/astra/ParallelBeamBlobKernelProjector2D.inl b/include/astra/ParallelBeamBlobKernelProjector2D.inl index a4045dc..67662ad 100644 --- a/include/astra/ParallelBeamBlobKernelProjector2D.inl +++ b/include/astra/ParallelBeamBlobKernelProjector2D.inl @@ -147,7 +147,7 @@ void CParallelBeamBlobKernelProjector2D::projectBlock_internal(int _iProjFrom, i invBlobExtent = m_pVolumeGeometry->getPixelLengthX() / abs(m_fBlobSize * sqrt(proj->fRayY*proj->fRayY + proj->fRayX*proj->fRayX) / proj->fRayX); } - Ex = m_pVolumeGeometry->getWindowMinY() + pixelLengthX*0.5f; + Ex = m_pVolumeGeometry->getWindowMinX() + pixelLengthX*0.5f; Ey = m_pVolumeGeometry->getWindowMaxY() - pixelLengthY*0.5f; // loop detectors diff --git a/include/astra/ParallelBeamLineKernelProjector2D.inl b/include/astra/ParallelBeamLineKernelProjector2D.inl index 773077d..d88d1cb 100644 --- a/include/astra/ParallelBeamLineKernelProjector2D.inl +++ b/include/astra/ParallelBeamLineKernelProjector2D.inl @@ -184,7 +184,7 @@ void CParallelBeamLineKernelProjector2D::projectBlock_internal(int _iProjFrom, i invTminSTimesLengthPerCol = lengthPerCol / (T - S); } - Ex = m_pVolumeGeometry->getWindowMinY() + pixelLengthX*0.5f; + Ex = m_pVolumeGeometry->getWindowMinX() + pixelLengthX*0.5f; Ey = m_pVolumeGeometry->getWindowMaxY() - pixelLengthY*0.5f; // loop detectors diff --git a/include/astra/ParallelBeamLinearKernelProjector2D.inl b/include/astra/ParallelBeamLinearKernelProjector2D.inl index 6206d80..ccb8cda 100644 --- a/include/astra/ParallelBeamLinearKernelProjector2D.inl +++ b/include/astra/ParallelBeamLinearKernelProjector2D.inl @@ -166,7 +166,7 @@ void CParallelBeamLinearKernelProjector2D::projectBlock_internal(int _iProjFrom, deltar = -pixelLengthX * RyOverRx * inv_pixelLengthY; } - Ex = m_pVolumeGeometry->getWindowMinY() + pixelLengthX*0.5f; + Ex = m_pVolumeGeometry->getWindowMinX() + pixelLengthX*0.5f; Ey = m_pVolumeGeometry->getWindowMaxY() - pixelLengthY*0.5f; // loop detectors diff --git a/include/astra/ParallelBeamStripKernelProjector2D.inl b/include/astra/ParallelBeamStripKernelProjector2D.inl index 040ea11..4f828f0 100644 --- a/include/astra/ParallelBeamStripKernelProjector2D.inl +++ b/include/astra/ParallelBeamStripKernelProjector2D.inl @@ -157,7 +157,7 @@ void CParallelBeamStripKernelProjector2D::projectBlock_internal(int _iProjFrom, invTminS = 1.0f / (T-S); } - Ex = m_pVolumeGeometry->getWindowMinY() + pixelLengthX*0.5f; + Ex = m_pVolumeGeometry->getWindowMinX() + pixelLengthX*0.5f; Ey = m_pVolumeGeometry->getWindowMaxY() - pixelLengthY*0.5f; // loop detectors -- cgit v1.2.3