summaryrefslogtreecommitdiffstats
path: root/src/ReconstructionAlgorithm2D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2014-06-26 12:29:33 +0000
committerwpalenst <Willem.Jan.Palenstijn@cwi.nl>2014-06-26 12:29:33 +0000
commit9b9f3a23bb27434c8112ccc454d012384cec0a8e (patch)
tree674c31eb08235ff99436f5dc3b22a20c224e9580 /src/ReconstructionAlgorithm2D.cpp
parenta2a6cb08a3435f0a39c315afaf8fae66bde22a33 (diff)
downloadastra-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/ReconstructionAlgorithm2D.cpp')
-rw-r--r--src/ReconstructionAlgorithm2D.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ReconstructionAlgorithm2D.cpp b/src/ReconstructionAlgorithm2D.cpp
index ea693e3..2e7b8c4 100644
--- a/src/ReconstructionAlgorithm2D.cpp
+++ b/src/ReconstructionAlgorithm2D.cpp
@@ -112,6 +112,7 @@ bool CReconstructionAlgorithm2D::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, "Reconstruction2D", "Invalid ReconstructionMaskId.");
}
CC.markOptionParsed("ReconstructionMaskId");
@@ -120,6 +121,7 @@ bool CReconstructionAlgorithm2D::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, "Reconstruction2D", "Invalid SinogramMaskId.");
}
CC.markOptionParsed("SinogramMaskId");