diff options
Diffstat (limited to 'src/FanFlatProjectionGeometry2D.cpp')
-rw-r--r-- | src/FanFlatProjectionGeometry2D.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/FanFlatProjectionGeometry2D.cpp b/src/FanFlatProjectionGeometry2D.cpp index 8bee0d6..4eec9c4 100644 --- a/src/FanFlatProjectionGeometry2D.cpp +++ b/src/FanFlatProjectionGeometry2D.cpp @@ -28,6 +28,8 @@ $Id$ #include "astra/FanFlatProjectionGeometry2D.h" +#include "astra/GeometryUtil2D.h" + #include <cstring> #include <sstream> @@ -214,7 +216,21 @@ Config* CFanFlatProjectionGeometry2D::getConfiguration() const cfg->self.addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); return cfg; } -//---------------------------------------------------------------------------------------- +//---------------------------------------------------------------------------------------- +CFanFlatVecProjectionGeometry2D* CFanFlatProjectionGeometry2D::toVectorGeometry() +{ + SFanProjection* vectors = genFanProjections(m_iProjectionAngleCount, + m_iDetectorCount, + m_fOriginSourceDistance, + m_fOriginDetectorDistance, + m_fDetectorWidth, + m_pfProjectionAngles); + + CFanFlatVecProjectionGeometry2D* vecGeom = new CFanFlatVecProjectionGeometry2D(); + vecGeom->initialize(m_iProjectionAngleCount, m_iDetectorCount, vectors); + delete[] vectors; + return vecGeom; +} } // namespace astra |