diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2019-04-01 00:09:28 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2019-09-25 14:10:09 +0200 |
commit | 4fba091ff811ac5e6035cf95efdaae6681e6cc46 (patch) | |
tree | 7862ef2c5ffa28724a13eb382eaada82129e9084 /src | |
parent | 027dc56ffe325652314b4f9e5d804b3b20fd0db3 (diff) | |
download | astra-4fba091ff811ac5e6035cf95efdaae6681e6cc46.tar.gz astra-4fba091ff811ac5e6035cf95efdaae6681e6cc46.tar.bz2 astra-4fba091ff811ac5e6035cf95efdaae6681e6cc46.tar.xz astra-4fba091ff811ac5e6035cf95efdaae6681e6cc46.zip |
Add error check for non-parallel FBP
Diffstat (limited to 'src')
-rw-r--r-- | src/FilteredBackProjectionAlgorithm.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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<CParallelProjectionGeometry2D*>(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 |