From 065d9c6a18f2b8eececc608ce850a9a308ca6356 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Wed, 25 Feb 2015 16:46:09 +0100 Subject: get_geometry now uses XML config object (for volumes) --- src/VolumeGeometry2D.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'src/VolumeGeometry2D.cpp') diff --git a/src/VolumeGeometry2D.cpp b/src/VolumeGeometry2D.cpp index 19aa905..d412914 100644 --- a/src/VolumeGeometry2D.cpp +++ b/src/VolumeGeometry2D.cpp @@ -152,7 +152,7 @@ CVolumeGeometry2D* CVolumeGeometry2D::clone() } //---------------------------------------------------------------------------------------- -// Initialization witha COnfig object +// Initialization witha Config object bool CVolumeGeometry2D::initialize(const Config& _cfg) { ASTRA_ASSERT(_cfg.self); @@ -277,6 +277,24 @@ bool CVolumeGeometry2D::isEqual(CVolumeGeometry2D* _pGeom2) const return true; } + +//---------------------------------------------------------------------------------------- +// Get the configuration object +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->addOption("WindowMinX", m_fWindowMinX); + cfg->self->addOption("WindowMaxX", m_fWindowMaxX); + cfg->self->addOption("WindowMinY", m_fWindowMinY); + cfg->self->addOption("WindowMaxY", m_fWindowMaxY); + + return cfg; +} //---------------------------------------------------------------------------------------- } // namespace astra -- cgit v1.2.3