diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2014-06-26 12:29:33 +0000 |
---|---|---|
committer | wpalenst <Willem.Jan.Palenstijn@cwi.nl> | 2014-06-26 12:29:33 +0000 |
commit | 9b9f3a23bb27434c8112ccc454d012384cec0a8e (patch) | |
tree | 674c31eb08235ff99436f5dc3b22a20c224e9580 /src/CudaReconstructionAlgorithm2D.cpp | |
parent | a2a6cb08a3435f0a39c315afaf8fae66bde22a33 (diff) | |
download | astra-9b9f3a23bb27434c8112ccc454d012384cec0a8e.tar.gz astra-9b9f3a23bb27434c8112ccc454d012384cec0a8e.tar.bz2 astra-9b9f3a23bb27434c8112ccc454d012384cec0a8e.tar.xz astra-9b9f3a23bb27434c8112ccc454d012384cec0a8e.zip |
Check for valid sinogram and volume masks in ReconstructionAlgorithm
Diffstat (limited to 'src/CudaReconstructionAlgorithm2D.cpp')
-rw-r--r-- | src/CudaReconstructionAlgorithm2D.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CudaReconstructionAlgorithm2D.cpp b/src/CudaReconstructionAlgorithm2D.cpp index 385cef1..0443303 100644 --- a/src/CudaReconstructionAlgorithm2D.cpp +++ b/src/CudaReconstructionAlgorithm2D.cpp @@ -114,6 +114,7 @@ bool CCudaReconstructionAlgorithm2D::initialize(const Config& _cfg) m_bUseReconstructionMask = true; id = boost::lexical_cast<int>(_cfg.self->getOption("ReconstructionMaskId")); m_pReconstructionMask = dynamic_cast<CFloat32VolumeData2D*>(CData2DManager::getSingleton().get(id)); + ASTRA_CONFIG_CHECK(m_pReconstructionMask, "CudaReconstruction2D", "Invalid ReconstructionMaskId."); } CC.markOptionParsed("ReconstructionMaskId"); // fixed mask @@ -121,6 +122,7 @@ bool CCudaReconstructionAlgorithm2D::initialize(const Config& _cfg) m_bUseSinogramMask = true; id = boost::lexical_cast<int>(_cfg.self->getOption("SinogramMaskId")); m_pSinogramMask = dynamic_cast<CFloat32ProjectionData2D*>(CData2DManager::getSingleton().get(id)); + ASTRA_CONFIG_CHECK(m_pSinogramMask, "CudaReconstruction2D", "Invalid SinogramMaskId."); } CC.markOptionParsed("SinogramMaskId"); @@ -174,7 +176,7 @@ bool CCudaReconstructionAlgorithm2D::initialize(const Config& _cfg) id = boost::lexical_cast<int>(node->getContent()); CProjector2D *projector = CProjector2DManager::getSingleton().get(id); if (!dynamic_cast<CCudaProjector2D*>(projector)) { - cout << "Warning: non-CUDA Projector2D passed to FP_CUDA" << std::endl; + cout << "Warning: non-CUDA Projector2D passed" << std::endl; } delete node; } |