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/ParallelProjectionGeometry2D.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/ParallelProjectionGeometry2D.cpp')
-rw-r--r-- | src/ParallelProjectionGeometry2D.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ParallelProjectionGeometry2D.cpp b/src/ParallelProjectionGeometry2D.cpp index 8f8faa4..cac8f30 100644 --- a/src/ParallelProjectionGeometry2D.cpp +++ b/src/ParallelProjectionGeometry2D.cpp @@ -27,6 +27,7 @@ $Id$ */ #include "astra/ParallelProjectionGeometry2D.h" +#include <boost/lexical_cast.hpp> #include <cstring> @@ -168,6 +169,19 @@ bool CParallelProjectionGeometry2D::isOfType(const std::string& _sType) { return (_sType == "parallel"); } + +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CParallelProjectionGeometry2D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("ProjectionGeometry2D"); + cfg->self->addAttribute("type", "parallel"); + cfg->self->addChildNode("DetectorCount", getDetectorCount()); + cfg->self->addChildNode("DetectorWidth", getDetectorWidth()); + cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); + return cfg; +} //---------------------------------------------------------------------------------------- CVector3D CParallelProjectionGeometry2D::getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex /* = 0 */) |