summaryrefslogtreecommitdiffstats
path: root/src/VolumeGeometry2D.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-13 11:56:24 +0200
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2015-05-13 11:56:24 +0200
commitde30f7538a865a2ee7acb7dd8294fb6cdc4f98be (patch)
treeba11189e6e83e83e73167518b45641fc287c8eda /src/VolumeGeometry2D.cpp
parent6504cffdbe74d9b671222a7ec24b26fbb4f871f0 (diff)
parent86ad56f005d9d3871f654390739459d5634dd5d5 (diff)
downloadastra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.tar.gz
astra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.tar.bz2
astra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.tar.xz
astra-de30f7538a865a2ee7acb7dd8294fb6cdc4f98be.zip
Merge branch 'master'
Diffstat (limited to 'src/VolumeGeometry2D.cpp')
-rw-r--r--src/VolumeGeometry2D.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/src/VolumeGeometry2D.cpp b/src/VolumeGeometry2D.cpp
index d412914..6eea1b2 100644
--- a/src/VolumeGeometry2D.cpp
+++ b/src/VolumeGeometry2D.cpp
@@ -164,24 +164,22 @@ bool CVolumeGeometry2D::initialize(const Config& _cfg)
}
// Required: GridColCount
- XMLNode* node = _cfg.self->getSingleNode("GridColCount");
+ XMLNode node = _cfg.self.getSingleNode("GridColCount");
ASTRA_CONFIG_CHECK(node, "ReconstructionGeometry2D", "No GridColCount tag specified.");
- m_iGridColCount = boost::lexical_cast<int>(node->getContent());
- ASTRA_DELETE(node);
+ m_iGridColCount = boost::lexical_cast<int>(node.getContent());
CC.markNodeParsed("GridColCount");
// Required: GridRowCount
- node = _cfg.self->getSingleNode("GridRowCount");
+ node = _cfg.self.getSingleNode("GridRowCount");
ASTRA_CONFIG_CHECK(node, "ReconstructionGeometry2D", "No GridRowCount tag specified.");
- m_iGridRowCount = boost::lexical_cast<int>(node->getContent());
- ASTRA_DELETE(node);
+ m_iGridRowCount = boost::lexical_cast<int>(node.getContent());
CC.markNodeParsed("GridRowCount");
// Optional: Window minima and maxima
- m_fWindowMinX = _cfg.self->getOptionNumerical("WindowMinX", -m_iGridColCount/2.0f);
- m_fWindowMaxX = _cfg.self->getOptionNumerical("WindowMaxX", m_iGridColCount/2.0f);
- m_fWindowMinY = _cfg.self->getOptionNumerical("WindowMinY", -m_iGridRowCount/2.0f);
- m_fWindowMaxY = _cfg.self->getOptionNumerical("WindowMaxY", m_iGridRowCount/2.0f);
+ m_fWindowMinX = _cfg.self.getOptionNumerical("WindowMinX", -m_iGridColCount/2.0f);
+ m_fWindowMaxX = _cfg.self.getOptionNumerical("WindowMaxX", m_iGridColCount/2.0f);
+ m_fWindowMinY = _cfg.self.getOptionNumerical("WindowMinY", -m_iGridRowCount/2.0f);
+ m_fWindowMaxY = _cfg.self.getOptionNumerical("WindowMaxY", m_iGridRowCount/2.0f);
CC.markOptionParsed("WindowMinX");
CC.markOptionParsed("WindowMaxX");
CC.markOptionParsed("WindowMinY");
@@ -285,13 +283,13 @@ Config* CVolumeGeometry2D::getConfiguration() const
Config* cfg = new Config();
cfg->initialize("VolumeGeometry2D");
- cfg->self->addChildNode("GridColCount", m_iGridColCount);
- cfg->self->addChildNode("GridRowCount", m_iGridRowCount);
+ cfg->self.addChildNode("GridColCount", m_iGridColCount);
+ cfg->self.addChildNode("GridRowCount", m_iGridRowCount);
- cfg->self->addOption("WindowMinX", m_fWindowMinX);
- cfg->self->addOption("WindowMaxX", m_fWindowMaxX);
- cfg->self->addOption("WindowMinY", m_fWindowMinY);
- cfg->self->addOption("WindowMaxY", m_fWindowMaxY);
+ cfg->self.addOption("WindowMinX", m_fWindowMinX);
+ cfg->self.addOption("WindowMaxX", m_fWindowMaxX);
+ cfg->self.addOption("WindowMinY", m_fWindowMinY);
+ cfg->self.addOption("WindowMaxY", m_fWindowMaxY);
return cfg;
}