summaryrefslogtreecommitdiffstats
path: root/src/ProjectionGeometry2D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ProjectionGeometry2D.cpp')
-rw-r--r--src/ProjectionGeometry2D.cpp17
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++) {