summaryrefslogtreecommitdiffstats
path: root/src/FanFlatProjectionGeometry2D.cpp
diff options
context:
space:
mode:
authorWim van Aarle <wimvanaarle@gmail.com>2015-05-26 15:43:08 +0200
committerWim van Aarle <wimvanaarle@gmail.com>2015-05-26 15:43:08 +0200
commit3117c7a61a83ca28ba00211d1eb65eaf13a7307a (patch)
tree4851ae878cf499deb2ae2f77575b3c48ecaf5d04 /src/FanFlatProjectionGeometry2D.cpp
parent9e884e760b71be354c08892f6bce2efe723917b3 (diff)
parent57668bcdd086145eb14598e32fd5d0dca711865c (diff)
downloadastra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.gz
astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.bz2
astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.tar.xz
astra-3117c7a61a83ca28ba00211d1eb65eaf13a7307a.zip
Merge remote-tracking branch 'upstream/master' into parallel_vec
Conflicts: astra_vc11.vcxproj.filters python/astra/functions.py src/ParallelBeamBlobKernelProjector2D.cpp src/ProjectionGeometry2D.cpp
Diffstat (limited to 'src/FanFlatProjectionGeometry2D.cpp')
-rw-r--r--src/FanFlatProjectionGeometry2D.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/FanFlatProjectionGeometry2D.cpp b/src/FanFlatProjectionGeometry2D.cpp
index 9851d40..91b9578 100644
--- a/src/FanFlatProjectionGeometry2D.cpp
+++ b/src/FanFlatProjectionGeometry2D.cpp
@@ -134,17 +134,15 @@ bool CFanFlatProjectionGeometry2D::initialize(const Config& _cfg)
CProjectionGeometry2D::initialize(_cfg);
// Required: DistanceOriginDetector
- XMLNode* node = _cfg.self->getSingleNode("DistanceOriginDetector");
+ XMLNode node = _cfg.self.getSingleNode("DistanceOriginDetector");
ASTRA_CONFIG_CHECK(node, "FanFlatProjectionGeometry2D", "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, "FanFlatProjectionGeometry2D", "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
@@ -209,12 +207,12 @@ Config* CFanFlatProjectionGeometry2D::getConfiguration() const
{
Config* cfg = new Config();
cfg->initialize("ProjectionGeometry2D");
- cfg->self->addAttribute("type", "fanflat");
- cfg->self->addChildNode("DetectorCount", getDetectorCount());
- cfg->self->addChildNode("DetectorWidth", getDetectorWidth());
- cfg->self->addChildNode("DistanceOriginSource", getOriginSourceDistance());
- cfg->self->addChildNode("DistanceOriginDetector", getOriginDetectorDistance());
- cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount);
+ cfg->self.addAttribute("type", "fanflat");
+ cfg->self.addChildNode("DetectorCount", getDetectorCount());
+ cfg->self.addChildNode("DetectorWidth", getDetectorWidth());
+ cfg->self.addChildNode("DistanceOriginSource", getOriginSourceDistance());
+ cfg->self.addChildNode("DistanceOriginDetector", getOriginDetectorDistance());
+ cfg->self.addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount);
return cfg;
}