summaryrefslogtreecommitdiffstats
path: root/src/SparseMatrixProjectionGeometry2D.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SparseMatrixProjectionGeometry2D.cpp')
-rw-r--r--src/SparseMatrixProjectionGeometry2D.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/SparseMatrixProjectionGeometry2D.cpp b/src/SparseMatrixProjectionGeometry2D.cpp
index 86357d2..073720f 100644
--- a/src/SparseMatrixProjectionGeometry2D.cpp
+++ b/src/SparseMatrixProjectionGeometry2D.cpp
@@ -98,11 +98,10 @@ bool CSparseMatrixProjectionGeometry2D::initialize(const Config& _cfg)
CProjectionGeometry2D::initialize(_cfg);
// get matrix
- XMLNode* node = _cfg.self->getSingleNode("MatrixID");
+ XMLNode node = _cfg.self.getSingleNode("MatrixID");
ASTRA_CONFIG_CHECK(node, "SparseMatrixProjectionGeometry2D", "No MatrixID tag specified.");
- int id = boost::lexical_cast<int>(node->getContent());
+ int id = boost::lexical_cast<int>(node.getContent());
m_pMatrix = CMatrixManager::getSingleton().get(id);
- ASTRA_DELETE(node);
CC.markNodeParsed("MatrixID");
// success
@@ -194,11 +193,11 @@ Config* CSparseMatrixProjectionGeometry2D::getConfiguration() const
{
Config* cfg = new Config();
cfg->initialize("ProjectionGeometry2D");
- cfg->self->addAttribute("type", "sparse matrix");
- cfg->self->addChildNode("DetectorCount", getDetectorCount());
- cfg->self->addChildNode("DetectorWidth", getDetectorWidth());
- cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount);
- cfg->self->addChildNode("MatrixID", CMatrixManager::getSingleton().getIndex(m_pMatrix));
+ cfg->self.addAttribute("type", "sparse matrix");
+ cfg->self.addChildNode("DetectorCount", getDetectorCount());
+ cfg->self.addChildNode("DetectorWidth", getDetectorWidth());
+ cfg->self.addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount);
+ cfg->self.addChildNode("MatrixID", CMatrixManager::getSingleton().getIndex(m_pMatrix));
return cfg;
}