diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-09-16 12:01:02 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-09-16 12:01:02 +0200 |
commit | 55cbaa5df6f91594b7cd69754e04c186c7c88c97 (patch) | |
tree | b1456253660a7762df6868d1452a6d9480e25b19 /src/ProjectionGeometry2D.cpp | |
parent | 7584ffbd6748bcca8c3f7ed2dc961be01f2fcfdc (diff) | |
parent | 026aa46c5db24ddd687cec0fa6e056a2ee3790c5 (diff) | |
download | astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.tar.gz astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.tar.bz2 astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.tar.xz astra-55cbaa5df6f91594b7cd69754e04c186c7c88c97.zip |
Merge branch 'master' into volgeom3d
Conflicts:
src/CudaBackProjectionAlgorithm3D.cpp
Diffstat (limited to 'src/ProjectionGeometry2D.cpp')
-rw-r--r-- | src/ProjectionGeometry2D.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/ProjectionGeometry2D.cpp b/src/ProjectionGeometry2D.cpp index 89b5fe0..b89605b 100644 --- a/src/ProjectionGeometry2D.cpp +++ b/src/ProjectionGeometry2D.cpp @@ -124,24 +124,21 @@ bool CProjectionGeometry2D::initialize(const Config& _cfg) } // Required: DetectorWidth - XMLNode* node = _cfg.self->getSingleNode("DetectorWidth"); + XMLNode node = _cfg.self.getSingleNode("DetectorWidth"); ASTRA_CONFIG_CHECK(node, "ProjectionGeometry2D", "No DetectorWidth tag specified."); - m_fDetectorWidth = boost::lexical_cast<float32>(node->getContent()); - ASTRA_DELETE(node); + m_fDetectorWidth = boost::lexical_cast<float32>(node.getContent()); CC.markNodeParsed("DetectorWidth"); // Required: DetectorCount - node = _cfg.self->getSingleNode("DetectorCount"); + node = _cfg.self.getSingleNode("DetectorCount"); ASTRA_CONFIG_CHECK(node, "ProjectionGeometry2D", "No DetectorCount tag specified."); - m_iDetectorCount = boost::lexical_cast<int>(node->getContent()); - ASTRA_DELETE(node); + m_iDetectorCount = boost::lexical_cast<int>(node.getContent()); CC.markNodeParsed("DetectorCount"); // Required: ProjectionAngles - node = _cfg.self->getSingleNode("ProjectionAngles"); + node = _cfg.self.getSingleNode("ProjectionAngles"); ASTRA_CONFIG_CHECK(node, "ProjectionGeometry2D", "No ProjectionAngles tag specified."); - vector<float32> angles = node->getContentNumericalArray(); - delete node; + vector<float32> angles = node.getContentNumericalArray(); m_iProjectionAngleCount = angles.size(); ASTRA_CONFIG_CHECK(m_iProjectionAngleCount > 0, "ProjectionGeometry2D", "Not enough ProjectionAngles specified."); m_pfProjectionAngles = new float32[m_iProjectionAngleCount]; @@ -150,7 +147,7 @@ bool CProjectionGeometry2D::initialize(const Config& _cfg) } CC.markNodeParsed("ProjectionAngles"); - vector<float32> offset = _cfg.self->getOptionNumericalArray("ExtraDetectorOffset"); + vector<float32> offset = _cfg.self.getOptionNumericalArray("ExtraDetectorOffset"); m_pfExtraDetectorOffset = new float32[m_iProjectionAngleCount]; if (offset.size() == (size_t)m_iProjectionAngleCount) { for (int i = 0; i < m_iProjectionAngleCount; i++) { |