From 4fba091ff811ac5e6035cf95efdaae6681e6cc46 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Mon, 1 Apr 2019 00:09:28 +0200 Subject: Add error check for non-parallel FBP --- src/FilteredBackProjectionAlgorithm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/FilteredBackProjectionAlgorithm.cpp b/src/FilteredBackProjectionAlgorithm.cpp index 95bef3c..6b4093d 100644 --- a/src/FilteredBackProjectionAlgorithm.cpp +++ b/src/FilteredBackProjectionAlgorithm.cpp @@ -167,6 +167,11 @@ bool CFilteredBackProjectionAlgorithm::initialize(const Config& _cfg) m_filterConfig = getFilterConfigForAlgorithm(_cfg, this); + const CParallelProjectionGeometry2D* parprojgeom = dynamic_cast(m_pSinogram->getGeometry()); + if (!parprojgeom) { + ASTRA_ERROR("FBP currently only supports parallel projection geometries."); + return false; + } // TODO: check that the angles are linearly spaced between 0 and pi -- cgit v1.2.3