summaryrefslogtreecommitdiffstats
path: root/src/ConeProjectionGeometry3D.cpp
diff options
context:
space:
mode:
authorWim van Aarle <wimvanaarle@gmail.com>2015-02-26 13:47:59 +0100
committerWim van Aarle <wimvanaarle@gmail.com>2015-02-26 13:47:59 +0100
commitcca150841cd1de4f3b4d24c1188263b9623bc511 (patch)
treedca9846737f33fd9173a53231bd0bec566fb6bb3 /src/ConeProjectionGeometry3D.cpp
parent065d9c6a18f2b8eececc608ce850a9a308ca6356 (diff)
downloadastra-cca150841cd1de4f3b4d24c1188263b9623bc511.tar.gz
astra-cca150841cd1de4f3b4d24c1188263b9623bc511.tar.bz2
astra-cca150841cd1de4f3b4d24c1188263b9623bc511.tar.xz
astra-cca150841cd1de4f3b4d24c1188263b9623bc511.zip
get_geometry now uses XML config object (for projections)
Diffstat (limited to 'src/ConeProjectionGeometry3D.cpp')
-rw-r--r--src/ConeProjectionGeometry3D.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ConeProjectionGeometry3D.cpp b/src/ConeProjectionGeometry3D.cpp
index e6999df..50f2c8f 100644
--- a/src/ConeProjectionGeometry3D.cpp
+++ b/src/ConeProjectionGeometry3D.cpp
@@ -197,6 +197,24 @@ void CConeProjectionGeometry3D::toXML(XMLNode* _sNode) const
_sNode->addChildNode("DistanceOriginDetector", m_fOriginDetectorDistance);
_sNode->addChildNode("DistanceOriginSource", m_fOriginSourceDistance);
}
+
+//----------------------------------------------------------------------------------------
+// Get the configuration object
+Config* CConeProjectionGeometry3D::getConfiguration() const
+{
+ 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