summaryrefslogtreecommitdiffstats
path: root/src/ParallelVecProjectionGeometry3D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-09-16 12:01:02 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-09-16 12:01:02 +0200
commit55cbaa5df6f91594b7cd69754e04c186c7c88c97 (patch)
treeb1456253660a7762df6868d1452a6d9480e25b19 /src/ParallelVecProjectionGeometry3D.cpp
parent7584ffbd6748bcca8c3f7ed2dc961be01f2fcfdc (diff)
parent026aa46c5db24ddd687cec0fa6e056a2ee3790c5 (diff)
downloadastra-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/ParallelVecProjectionGeometry3D.cpp')
-rw-r--r--src/ParallelVecProjectionGeometry3D.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/src/ParallelVecProjectionGeometry3D.cpp b/src/ParallelVecProjectionGeometry3D.cpp
index dc325e9..ffad6d0 100644
--- a/src/ParallelVecProjectionGeometry3D.cpp
+++ b/src/ParallelVecProjectionGeometry3D.cpp
@@ -73,33 +73,30 @@ bool CParallelVecProjectionGeometry3D::initialize(const Config& _cfg)
ASTRA_ASSERT(_cfg.self);
ConfigStackCheck<CProjectionGeometry3D> CC("ParallelVecProjectionGeometry3D", this, _cfg);
- XMLNode* node;
+ XMLNode node;
// TODO: Fix up class hierarchy... this class doesn't fit very well.
// initialization of parent class
//CProjectionGeometry3D::initialize(_cfg);
// Required: DetectorRowCount
- node = _cfg.self->getSingleNode("DetectorRowCount");
+ node = _cfg.self.getSingleNode("DetectorRowCount");
ASTRA_CONFIG_CHECK(node, "ParallelVecProjectionGeometry3D", "No DetectorRowCount tag specified.");
- m_iDetectorRowCount = boost::lexical_cast<int>(node->getContent());
- ASTRA_DELETE(node);
+ m_iDetectorRowCount = boost::lexical_cast<int>(node.getContent());
CC.markNodeParsed("DetectorRowCount");
// Required: DetectorCount
- node = _cfg.self->getSingleNode("DetectorColCount");
+ node = _cfg.self.getSingleNode("DetectorColCount");
ASTRA_CONFIG_CHECK(node, "", "No DetectorColCount tag specified.");
- m_iDetectorColCount = boost::lexical_cast<int>(node->getContent());
+ m_iDetectorColCount = boost::lexical_cast<int>(node.getContent());
m_iDetectorTotCount = m_iDetectorRowCount * m_iDetectorColCount;
- ASTRA_DELETE(node);
CC.markNodeParsed("DetectorColCount");
// Required: Vectors
- node = _cfg.self->getSingleNode("Vectors");
+ node = _cfg.self.getSingleNode("Vectors");
ASTRA_CONFIG_CHECK(node, "ParallelVecProjectionGeometry3D", "No Vectors tag specified.");
- vector<double> data = node->getContentNumericalArrayDouble();
+ vector<double> data = node.getContentNumericalArrayDouble();
CC.markNodeParsed("Vectors");
- ASTRA_DELETE(node);
ASTRA_CONFIG_CHECK(data.size() % 12 == 0, "ParallelVecProjectionGeometry3D", "Vectors doesn't consist of 12-tuples.");
m_iProjectionAngleCount = data.size() / 12;
m_pProjectionAngles = new SPar3DProjection[m_iProjectionAngleCount];
@@ -208,9 +205,9 @@ Config* CParallelVecProjectionGeometry3D::getConfiguration() const
Config* cfg = new Config();
cfg->initialize("ProjectionGeometry3D");
- cfg->self->addAttribute("type", "parallel3d_vec");
- cfg->self->addChildNode("DetectorRowCount", m_iDetectorRowCount);
- cfg->self->addChildNode("DetectorColCount", m_iDetectorColCount);
+ cfg->self.addAttribute("type", "parallel3d_vec");
+ cfg->self.addChildNode("DetectorRowCount", m_iDetectorRowCount);
+ cfg->self.addChildNode("DetectorColCount", m_iDetectorColCount);
std::string vectors = "";
for (int i = 0; i < m_iProjectionAngleCount; ++i) {
@@ -229,7 +226,7 @@ Config* CParallelVecProjectionGeometry3D::getConfiguration() const
vectors += boost::lexical_cast<string>(p.fDetVZ);
if (i < m_iProjectionAngleCount-1) vectors += ';';
}
- cfg->self->addChildNode("Vectors", vectors);
+ cfg->self.addChildNode("Vectors", vectors);
return cfg;
}