summaryrefslogtreecommitdiffstats
path: root/src/ConeProjectionGeometry3D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ConeProjectionGeometry3D.cpp')
-rw-r--r--src/ConeProjectionGeometry3D.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/ConeProjectionGeometry3D.cpp b/src/ConeProjectionGeometry3D.cpp
index 1976901..dd22eba 100644
--- a/src/ConeProjectionGeometry3D.cpp
+++ b/src/ConeProjectionGeometry3D.cpp
@@ -87,17 +87,15 @@ bool CConeProjectionGeometry3D::initialize(const Config& _cfg)
CProjectionGeometry3D::initialize(_cfg);
// Required: DistanceOriginDetector
- XMLNode* node = _cfg.self->getSingleNode("DistanceOriginDetector");
+ XMLNode node = _cfg.self.getSingleNode("DistanceOriginDetector");
ASTRA_CONFIG_CHECK(node, "ConeProjectionGeometry3D", "No DistanceOriginDetector tag specified.");
- m_fOriginDetectorDistance = boost::lexical_cast<float32>(node->getContent());
- ASTRA_DELETE(node);
+ m_fOriginDetectorDistance = boost::lexical_cast<float32>(node.getContent());
CC.markNodeParsed("DistanceOriginDetector");
// Required: DetectorOriginSource
- node = _cfg.self->getSingleNode("DistanceOriginSource");
+ node = _cfg.self.getSingleNode("DistanceOriginSource");
ASTRA_CONFIG_CHECK(node, "ConeProjectionGeometry3D", "No DistanceOriginSource tag specified.");
- m_fOriginSourceDistance = boost::lexical_cast<float32>(node->getContent());
- ASTRA_DELETE(node);
+ m_fOriginSourceDistance = boost::lexical_cast<float32>(node.getContent());
CC.markNodeParsed("DistanceOriginSource");
// success
@@ -193,14 +191,14 @@ Config* CConeProjectionGeometry3D::getConfiguration() const
{
Config* cfg = new Config();
cfg->initialize("ProjectionGeometry3D");
- cfg->self->addAttribute("type", "cone");
- cfg->self->addChildNode("DetectorSpacingX", m_fDetectorSpacingX);
- cfg->self->addChildNode("DetectorSpacingY", m_fDetectorSpacingY);
- cfg->self->addChildNode("DetectorRowCount", m_iDetectorRowCount);
- cfg->self->addChildNode("DetectorColCount", m_iDetectorColCount);
- cfg->self->addChildNode("DistanceOriginDetector", m_fOriginDetectorDistance);
- cfg->self->addChildNode("DistanceOriginSource", m_fOriginSourceDistance);
- cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount);
+ cfg->self.addAttribute("type", "cone");
+ cfg->self.addChildNode("DetectorSpacingX", m_fDetectorSpacingX);
+ cfg->self.addChildNode("DetectorSpacingY", m_fDetectorSpacingY);
+ cfg->self.addChildNode("DetectorRowCount", m_iDetectorRowCount);
+ cfg->self.addChildNode("DetectorColCount", m_iDetectorColCount);
+ cfg->self.addChildNode("DistanceOriginDetector", m_fOriginDetectorDistance);
+ cfg->self.addChildNode("DistanceOriginSource", m_fOriginSourceDistance);
+ cfg->self.addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount);
return cfg;
}