From cca150841cd1de4f3b4d24c1188263b9623bc511 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Thu, 26 Feb 2015 13:47:59 +0100 Subject: get_geometry now uses XML config object (for projections) --- src/ConeProjectionGeometry3D.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/ConeProjectionGeometry3D.cpp') diff --git a/src/ConeProjectionGeometry3D.cpp b/src/ConeProjectionGeometry3D.cpp index e6999df..50f2c8f 100644 --- a/src/ConeProjectionGeometry3D.cpp +++ b/src/ConeProjectionGeometry3D.cpp @@ -197,6 +197,24 @@ void CConeProjectionGeometry3D::toXML(XMLNode* _sNode) const _sNode->addChildNode("DistanceOriginDetector", m_fOriginDetectorDistance); _sNode->addChildNode("DistanceOriginSource", m_fOriginSourceDistance); } + +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CConeProjectionGeometry3D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("ProjectionGeometry3D"); + cfg->self->addAttribute("type", "cone"); + cfg->self->addChildNode("DetectorSpacingX", m_fDetectorSpacingX); + cfg->self->addChildNode("DetectorSpacingY", m_fDetectorSpacingY); + cfg->self->addChildNode("DetectorRowCount", m_iDetectorRowCount); + cfg->self->addChildNode("DetectorColCount", m_iDetectorColCount); + cfg->self->addChildNode("DistanceOriginDetector", m_fOriginDetectorDistance); + cfg->self->addChildNode("DistanceOriginSource", m_fOriginSourceDistance); + cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); + return cfg; +} + //---------------------------------------------------------------------------------------- CVector3D CConeProjectionGeometry3D::getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) const -- cgit v1.2.3 From 2d11dcfc8d85cd562a36c192f5dda64c8378d160 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Thu, 26 Feb 2015 14:00:14 +0100 Subject: updated docs --- src/ConeProjectionGeometry3D.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/ConeProjectionGeometry3D.cpp') diff --git a/src/ConeProjectionGeometry3D.cpp b/src/ConeProjectionGeometry3D.cpp index 50f2c8f..eb9adcf 100644 --- a/src/ConeProjectionGeometry3D.cpp +++ b/src/ConeProjectionGeometry3D.cpp @@ -185,19 +185,6 @@ bool CConeProjectionGeometry3D::isOfType(const std::string& _sType) const return (_sType == "cone"); } -//---------------------------------------------------------------------------------------- -void CConeProjectionGeometry3D::toXML(XMLNode* _sNode) const -{ - _sNode->addAttribute("type", "cone"); - _sNode->addChildNode("DetectorSpacingX", m_fDetectorSpacingX); - _sNode->addChildNode("DetectorSpacingY", m_fDetectorSpacingY); - _sNode->addChildNode("DetectorRowCount", m_iDetectorRowCount); - _sNode->addChildNode("DetectorColCount", m_iDetectorColCount); - _sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); - _sNode->addChildNode("DistanceOriginDetector", m_fOriginDetectorDistance); - _sNode->addChildNode("DistanceOriginSource", m_fOriginSourceDistance); -} - //---------------------------------------------------------------------------------------- // Get the configuration object Config* CConeProjectionGeometry3D::getConfiguration() const -- cgit v1.2.3