diff options
Diffstat (limited to 'src/ParallelProjectionGeometry3D.cpp')
-rw-r--r-- | src/ParallelProjectionGeometry3D.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/ParallelProjectionGeometry3D.cpp b/src/ParallelProjectionGeometry3D.cpp index 7130d71..d47a4bb 100644 --- a/src/ParallelProjectionGeometry3D.cpp +++ b/src/ParallelProjectionGeometry3D.cpp @@ -27,6 +27,7 @@ $Id$ */ #include "astra/ParallelProjectionGeometry3D.h" +#include <boost/lexical_cast.hpp> #include <cstring> @@ -168,6 +169,22 @@ void CParallelProjectionGeometry3D::toXML(XMLNode* _sNode) const _sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); } +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CParallelProjectionGeometry3D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("ProjectionGeometry3D"); + cfg->self->addAttribute("type", "parallel3d"); + cfg->self->addChildNode("DetectorRowCount", m_iDetectorRowCount); + cfg->self->addChildNode("DetectorColCount", m_iDetectorColCount); + cfg->self->addChildNode("DetectorSpacingX", m_fDetectorSpacingX); + cfg->self->addChildNode("DetectorSpacingY", m_fDetectorSpacingY); + cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); + return cfg; +} +//---------------------------------------------------------------------------------------- + CVector3D CParallelProjectionGeometry3D::getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) const { float fTheta = m_pfProjectionAngles[_iProjectionIndex]; |