summaryrefslogtreecommitdiffstats
path: root/src/VolumeGeometry3D.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/VolumeGeometry3D.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/VolumeGeometry3D.cpp')
-rw-r--r--src/VolumeGeometry3D.cpp45
1 files changed, 21 insertions, 24 deletions
diff --git a/src/VolumeGeometry3D.cpp b/src/VolumeGeometry3D.cpp
index 66e6f0c..a1cf424 100644
--- a/src/VolumeGeometry3D.cpp
+++ b/src/VolumeGeometry3D.cpp
@@ -192,33 +192,30 @@ bool CVolumeGeometry3D::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");
// Required: GridRowCount
- node = _cfg.self->getSingleNode("GridSliceCount");
+ node = _cfg.self.getSingleNode("GridSliceCount");
ASTRA_CONFIG_CHECK(node, "ReconstructionGeometry2D", "No GridSliceCount tag specified.");
- m_iGridSliceCount = boost::lexical_cast<int>(node->getContent());
- ASTRA_DELETE(node);
+ m_iGridSliceCount = boost::lexical_cast<int>(node.getContent());
CC.markNodeParsed("GridSliceCount");
// 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_fWindowMinZ = _cfg.self->getOptionNumerical("WindowMinZ", -m_iGridSliceCount/2.0f);
- m_fWindowMaxZ = _cfg.self->getOptionNumerical("WindowMaxZ", m_iGridSliceCount/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);
+ m_fWindowMinZ = _cfg.self.getOptionNumerical("WindowMinZ", -m_iGridSliceCount/2.0f);
+ m_fWindowMaxZ = _cfg.self.getOptionNumerical("WindowMaxZ", m_iGridSliceCount/2.0f);
CC.markOptionParsed("WindowMinX");
CC.markOptionParsed("WindowMaxX");
CC.markOptionParsed("WindowMinY");
@@ -386,16 +383,16 @@ Config* CVolumeGeometry3D::getConfiguration() const
Config* cfg = new Config();
cfg->initialize("VolumeGeometry3D");
- cfg->self->addChildNode("GridColCount", m_iGridColCount);
- cfg->self->addChildNode("GridRowCount", m_iGridRowCount);
- cfg->self->addChildNode("GridSliceCount", m_iGridSliceCount);
+ cfg->self.addChildNode("GridColCount", m_iGridColCount);
+ cfg->self.addChildNode("GridRowCount", m_iGridRowCount);
+ cfg->self.addChildNode("GridSliceCount", m_iGridSliceCount);
- 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("WindowMinZ", m_fWindowMinZ);
- cfg->self->addOption("WindowMaxZ", m_fWindowMaxZ);
+ 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("WindowMinZ", m_fWindowMinZ);
+ cfg->self.addOption("WindowMaxZ", m_fWindowMaxZ);
return cfg;
}