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/SparseMatrixProjectionGeometry2D.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/SparseMatrixProjectionGeometry2D.cpp') diff --git a/src/SparseMatrixProjectionGeometry2D.cpp b/src/SparseMatrixProjectionGeometry2D.cpp index 7f14d9d..86357d2 100644 --- a/src/SparseMatrixProjectionGeometry2D.cpp +++ b/src/SparseMatrixProjectionGeometry2D.cpp @@ -189,7 +189,20 @@ bool CSparseMatrixProjectionGeometry2D::isOfType(const std::string& _sType) return (_sType == "sparse_matrix"); } //---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CSparseMatrixProjectionGeometry2D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("ProjectionGeometry2D"); + cfg->self->addAttribute("type", "sparse matrix"); + cfg->self->addChildNode("DetectorCount", getDetectorCount()); + cfg->self->addChildNode("DetectorWidth", getDetectorWidth()); + cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); + cfg->self->addChildNode("MatrixID", CMatrixManager::getSingleton().getIndex(m_pMatrix)); + return cfg; +} +//---------------------------------------------------------------------------------------- CVector3D CSparseMatrixProjectionGeometry2D::getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) { CVector3D vOutput(0.0f, 0.0f, 0.0f); -- cgit v1.2.3