diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2015-02-27 11:46:29 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <wjp@usecode.org> | 2015-02-27 11:46:29 +0100 |
commit | 03a9dd972ada50eedb83386910cecf02fe8d0e35 (patch) | |
tree | f764bff6a8109d42445bdd1db622fd739baf5d4a /src/ConeProjectionGeometry3D.cpp | |
parent | 9e2bb413a937aefe57f4fcf343413543ae57258a (diff) | |
parent | 169e912d2633cda7ffc234e78afba1b096e122ea (diff) | |
download | astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.tar.gz astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.tar.bz2 astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.tar.xz astra-03a9dd972ada50eedb83386910cecf02fe8d0e35.zip |
Merge pull request #20 from wvaarle/matlab-get-geometry
'get_geometry' functions in the matlab layer
Diffstat (limited to 'src/ConeProjectionGeometry3D.cpp')
-rw-r--r-- | src/ConeProjectionGeometry3D.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/ConeProjectionGeometry3D.cpp b/src/ConeProjectionGeometry3D.cpp index e6999df..eb9adcf 100644 --- a/src/ConeProjectionGeometry3D.cpp +++ b/src/ConeProjectionGeometry3D.cpp @@ -186,17 +186,22 @@ bool CConeProjectionGeometry3D::isOfType(const std::string& _sType) const } //---------------------------------------------------------------------------------------- -void CConeProjectionGeometry3D::toXML(XMLNode* _sNode) const +// Get the configuration object +Config* CConeProjectionGeometry3D::getConfiguration() 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); + 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 |