summaryrefslogtreecommitdiffstats
path: root/src/ParallelBeamStripKernelProjector2D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2019-03-13 12:30:53 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2019-03-13 12:30:53 +0100
commitbf943fb8b7aea8790589affca19bbcfa8e71090d (patch)
tree21e90c5eb086f12f4a7136492199797e295c88b1 /src/ParallelBeamStripKernelProjector2D.cpp
parent91f8e20d164be682059346718828e274d9438b5c (diff)
downloadastra-bf943fb8b7aea8790589affca19bbcfa8e71090d.tar.gz
astra-bf943fb8b7aea8790589affca19bbcfa8e71090d.tar.bz2
astra-bf943fb8b7aea8790589affca19bbcfa8e71090d.tar.xz
astra-bf943fb8b7aea8790589affca19bbcfa8e71090d.zip
Make ParStripProjector2D::getProjectionWeightsCount safer for very thin strips
Diffstat (limited to 'src/ParallelBeamStripKernelProjector2D.cpp')
-rw-r--r--src/ParallelBeamStripKernelProjector2D.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ParallelBeamStripKernelProjector2D.cpp b/src/ParallelBeamStripKernelProjector2D.cpp
index 45cfa83..d2086da 100644
--- a/src/ParallelBeamStripKernelProjector2D.cpp
+++ b/src/ParallelBeamStripKernelProjector2D.cpp
@@ -141,7 +141,7 @@ bool CParallelBeamStripKernelProjector2D::initialize(CParallelProjectionGeometry
int CParallelBeamStripKernelProjector2D::getProjectionWeightsCount(int _iProjectionIndex)
{
int maxDim = max(m_pVolumeGeometry->getGridRowCount(), m_pVolumeGeometry->getGridColCount());
- double scale = m_pProjectionGeometry->getDetectorWidth() / min(m_pVolumeGeometry->getPixelLengthX(), m_pVolumeGeometry->getPixelLengthY());
+ double scale = max(m_pProjectionGeometry->getDetectorWidth() / min(m_pVolumeGeometry->getPixelLengthX(), m_pVolumeGeometry->getPixelLengthY()), 1.0f);
return int(maxDim * scale * 10) + 1;
}