From 569515f3e20ef3b3c2c4a777f38f45dc67e6f9b6 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Tue, 24 Feb 2015 16:46:39 +0100 Subject: added get_geometry for 3d projection data objects --- src/ConeVecProjectionGeometry3D.cpp | 4 ++-- src/ParallelProjectionGeometry3D.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/ConeVecProjectionGeometry3D.cpp b/src/ConeVecProjectionGeometry3D.cpp index cf8f76d..fd549e0 100644 --- a/src/ConeVecProjectionGeometry3D.cpp +++ b/src/ConeVecProjectionGeometry3D.cpp @@ -198,13 +198,13 @@ bool CConeVecProjectionGeometry3D::isEqual(const CProjectionGeometry3D * _pGeom2 // is of type bool CConeVecProjectionGeometry3D::isOfType(const std::string& _sType) const { - return (_sType == "cone3d_vec"); + return (_sType == "cone3d_vec" || _sType == "cone_vec"); } //---------------------------------------------------------------------------------------- void CConeVecProjectionGeometry3D::toXML(XMLNode* _sNode) const { - _sNode->addAttribute("type","cone3d_vec"); + _sNode->addAttribute("type","cone_vec"); _sNode->addChildNode("DetectorRowCount", m_iDetectorRowCount); _sNode->addChildNode("DetectorColCount", m_iDetectorColCount); // TODO: diff --git a/src/ParallelProjectionGeometry3D.cpp b/src/ParallelProjectionGeometry3D.cpp index 8a13f0f..2400ff9 100644 --- a/src/ParallelProjectionGeometry3D.cpp +++ b/src/ParallelProjectionGeometry3D.cpp @@ -154,7 +154,7 @@ bool CParallelProjectionGeometry3D::isEqual(const CProjectionGeometry3D * _pGeom // is of type bool CParallelProjectionGeometry3D::isOfType(const std::string& _sType) const { - return (_sType == "parallel"); + return (_sType == "parallel" || _sType == "parallel3d"); } //---------------------------------------------------------------------------------------- -- cgit v1.2.3 From 85f397c64461499a27b13e84fbc0348b19feb248 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Tue, 24 Feb 2015 16:58:50 +0100 Subject: re-enabled get_geometry for 3d projectors --- src/ConeVecProjectionGeometry3D.cpp | 2 +- src/ParallelProjectionGeometry3D.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ConeVecProjectionGeometry3D.cpp b/src/ConeVecProjectionGeometry3D.cpp index fd549e0..3c32527 100644 --- a/src/ConeVecProjectionGeometry3D.cpp +++ b/src/ConeVecProjectionGeometry3D.cpp @@ -198,7 +198,7 @@ bool CConeVecProjectionGeometry3D::isEqual(const CProjectionGeometry3D * _pGeom2 // is of type bool CConeVecProjectionGeometry3D::isOfType(const std::string& _sType) const { - return (_sType == "cone3d_vec" || _sType == "cone_vec"); + return (_sType == "cone_vec"); } //---------------------------------------------------------------------------------------- diff --git a/src/ParallelProjectionGeometry3D.cpp b/src/ParallelProjectionGeometry3D.cpp index 2400ff9..7130d71 100644 --- a/src/ParallelProjectionGeometry3D.cpp +++ b/src/ParallelProjectionGeometry3D.cpp @@ -154,7 +154,7 @@ bool CParallelProjectionGeometry3D::isEqual(const CProjectionGeometry3D * _pGeom // is of type bool CParallelProjectionGeometry3D::isOfType(const std::string& _sType) const { - return (_sType == "parallel" || _sType == "parallel3d"); + return (_sType == "parallel3d"); } //---------------------------------------------------------------------------------------- -- cgit v1.2.3 From 065d9c6a18f2b8eececc608ce850a9a308ca6356 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Wed, 25 Feb 2015 16:46:09 +0100 Subject: get_geometry now uses XML config object (for volumes) --- src/Config.cpp | 12 ++++++++++++ src/VolumeGeometry2D.cpp | 20 +++++++++++++++++++- src/VolumeGeometry3D.cpp | 23 +++++++++++++++++++++++ src/XMLDocument.cpp | 8 ++++++++ 4 files changed, 62 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Config.cpp b/src/Config.cpp index 3a3cb53..653935e 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -54,12 +54,24 @@ Config::Config(XMLNode* _self) self = _self; } +//----------------------------------------------------------------------------- Config::~Config() { delete self; self = 0; } +//----------------------------------------------------------------------------- +void Config::initialize(std::string rootname) +{ + if (self == 0) { + XMLDocument* doc = XMLDocument::createDocument(rootname); + self = doc->getRootNode(); + } +} + + +//----------------------------------------------------------------------------- template ConfigStackCheck::ConfigStackCheck(const char *_name, T* _obj, const Config& _cfg) : object(_obj), cfg(&_cfg), name(_name) diff --git a/src/VolumeGeometry2D.cpp b/src/VolumeGeometry2D.cpp index 19aa905..d412914 100644 --- a/src/VolumeGeometry2D.cpp +++ b/src/VolumeGeometry2D.cpp @@ -152,7 +152,7 @@ CVolumeGeometry2D* CVolumeGeometry2D::clone() } //---------------------------------------------------------------------------------------- -// Initialization witha COnfig object +// Initialization witha Config object bool CVolumeGeometry2D::initialize(const Config& _cfg) { ASTRA_ASSERT(_cfg.self); @@ -277,6 +277,24 @@ bool CVolumeGeometry2D::isEqual(CVolumeGeometry2D* _pGeom2) const return true; } + +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CVolumeGeometry2D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("VolumeGeometry2D"); + + cfg->self->addChildNode("GridColCount", m_iGridColCount); + cfg->self->addChildNode("GridRowCount", m_iGridRowCount); + + cfg->self->addOption("WindowMinX", m_fWindowMinX); + cfg->self->addOption("WindowMaxX", m_fWindowMaxX); + cfg->self->addOption("WindowMinY", m_fWindowMinY); + cfg->self->addOption("WindowMaxY", m_fWindowMaxY); + + return cfg; +} //---------------------------------------------------------------------------------------- } // namespace astra diff --git a/src/VolumeGeometry3D.cpp b/src/VolumeGeometry3D.cpp index d7a93a9..66e6f0c 100644 --- a/src/VolumeGeometry3D.cpp +++ b/src/VolumeGeometry3D.cpp @@ -379,6 +379,29 @@ CVolumeGeometry2D * CVolumeGeometry3D::createVolumeGeometry2D() const return pOutput; } +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CVolumeGeometry3D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("VolumeGeometry3D"); + + cfg->self->addChildNode("GridColCount", m_iGridColCount); + cfg->self->addChildNode("GridRowCount", m_iGridRowCount); + cfg->self->addChildNode("GridSliceCount", m_iGridSliceCount); + + cfg->self->addOption("WindowMinX", m_fWindowMinX); + cfg->self->addOption("WindowMaxX", m_fWindowMaxX); + cfg->self->addOption("WindowMinY", m_fWindowMinY); + cfg->self->addOption("WindowMaxY", m_fWindowMaxY); + cfg->self->addOption("WindowMinZ", m_fWindowMinZ); + cfg->self->addOption("WindowMaxZ", m_fWindowMaxZ); + + return cfg; +} +//---------------------------------------------------------------------------------------- + + //---------------------------------------------------------------------------------------- } // namespace astra diff --git a/src/XMLDocument.cpp b/src/XMLDocument.cpp index b39875b..406564f 100644 --- a/src/XMLDocument.cpp +++ b/src/XMLDocument.cpp @@ -109,4 +109,12 @@ void XMLDocument::saveToFile(string sFilename) } //----------------------------------------------------------------------------- +std::string XMLDocument::toString() +{ + std::stringstream ss; + ss << *fDOMDocument->first_node(); + return ss.str(); +} + +//----------------------------------------------------------------------------- -- cgit v1.2.3 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/ConeProjectionGeometry3D.cpp | 18 +++++++++++++++++ src/ConeVecProjectionGeometry3D.cpp | 33 +++++++++++++++++++++++++++++++ src/FanFlatProjectionGeometry2D.cpp | 14 +++++++++++++ src/FanFlatVecProjectionGeometry2D.cpp | 24 +++++++++++++++++++++- src/ParallelProjectionGeometry2D.cpp | 14 +++++++++++++ src/ParallelProjectionGeometry3D.cpp | 17 ++++++++++++++++ src/ParallelVecProjectionGeometry3D.cpp | 34 ++++++++++++++++++++++++++++++++ src/SparseMatrixProjectionGeometry2D.cpp | 13 ++++++++++++ src/XMLNode.cpp | 10 ++++------ 9 files changed, 170 insertions(+), 7 deletions(-) (limited to 'src') 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 diff --git a/src/ConeVecProjectionGeometry3D.cpp b/src/ConeVecProjectionGeometry3D.cpp index 3c32527..4f58188 100644 --- a/src/ConeVecProjectionGeometry3D.cpp +++ b/src/ConeVecProjectionGeometry3D.cpp @@ -210,6 +210,39 @@ void CConeVecProjectionGeometry3D::toXML(XMLNode* _sNode) const // TODO: //_sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); } +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CConeVecProjectionGeometry3D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("ProjectionGeometry3D"); + + cfg->self->addAttribute("type", "cone"); + cfg->self->addChildNode("DetectorRowCount", m_iDetectorRowCount); + cfg->self->addChildNode("DetectorColCount", m_iDetectorColCount); + + std::string vectors = ""; + for (int i = 0; i < m_iProjectionAngleCount; ++i) { + SConeProjection& p = m_pProjectionAngles[i]; + vectors += boost::lexical_cast(p.fSrcX) + ","; + vectors += boost::lexical_cast(p.fSrcY) + ","; + vectors += boost::lexical_cast(p.fSrcZ) + ","; + vectors += boost::lexical_cast(p.fDetSX + 0.5f*m_iDetectorRowCount*p.fDetUX + 0.5f*m_iDetectorColCount*p.fDetVX) + ","; + vectors += boost::lexical_cast(p.fDetSY + 0.5f*m_iDetectorRowCount*p.fDetUY + 0.5f*m_iDetectorColCount*p.fDetVY) + ","; + vectors += boost::lexical_cast(p.fDetSZ + 0.5f*m_iDetectorRowCount*p.fDetUZ + 0.5f*m_iDetectorColCount*p.fDetVZ) + ","; + vectors += boost::lexical_cast(p.fDetUX) + ","; + vectors += boost::lexical_cast(p.fDetUY) + ","; + vectors += boost::lexical_cast(p.fDetUZ) + ","; + vectors += boost::lexical_cast(p.fDetVX) + ","; + vectors += boost::lexical_cast(p.fDetVY) + ","; + vectors += boost::lexical_cast(p.fDetVZ); + if (i < m_iProjectionAngleCount-1) vectors += ';'; + } + cfg->self->addChildNode("Vectors", vectors); + + return cfg; +} +//---------------------------------------------------------------------------------------- CVector3D CConeVecProjectionGeometry3D::getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) const { diff --git a/src/FanFlatProjectionGeometry2D.cpp b/src/FanFlatProjectionGeometry2D.cpp index bfc7fa9..d757f18 100644 --- a/src/FanFlatProjectionGeometry2D.cpp +++ b/src/FanFlatProjectionGeometry2D.cpp @@ -204,6 +204,20 @@ CVector3D CFanFlatProjectionGeometry2D::getProjectionDirection(int _iProjectionI } //---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CFanFlatProjectionGeometry2D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("ProjectionGeometry2D"); + cfg->self->addAttribute("type", "fanflat"); + cfg->self->addChildNode("DetectorCount", getDetectorCount()); + cfg->self->addChildNode("DetectorWidth", getDetectorWidth()); + cfg->self->addChildNode("DistanceOriginSource", getOriginSourceDistance()); + cfg->self->addChildNode("DistanceOriginDetector", getOriginDetectorDistance()); + cfg->self->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); + return cfg; +} +//---------------------------------------------------------------------------------------- } // namespace astra diff --git a/src/FanFlatVecProjectionGeometry2D.cpp b/src/FanFlatVecProjectionGeometry2D.cpp index 77f9db7..9c7b596 100644 --- a/src/FanFlatVecProjectionGeometry2D.cpp +++ b/src/FanFlatVecProjectionGeometry2D.cpp @@ -194,7 +194,7 @@ bool CFanFlatVecProjectionGeometry2D::isEqual(CProjectionGeometry2D* _pGeom2) co // Is of type bool CFanFlatVecProjectionGeometry2D::isOfType(const std::string& _sType) { - return (_sType == "fanflat_vec"); + return (_sType == "fanflat_vec"); } //---------------------------------------------------------------------------------------- @@ -226,6 +226,28 @@ bool CFanFlatVecProjectionGeometry2D::_check() } +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CFanFlatVecProjectionGeometry2D::getConfiguration() const +{ + Config* cfg = new Config(); + cfg->initialize("ProjectionGeometry2D"); + cfg->self->addAttribute("type", "fanflat_vec"); + cfg->self->addChildNode("DetectorCount", getDetectorCount()); + std::string vectors = ""; + for (int i = 0; i < m_iProjectionAngleCount; ++i) { + SFanProjection& p = m_pProjectionAngles[i]; + vectors += boost::lexical_cast(p.fSrcX) + ","; + vectors += boost::lexical_cast(p.fSrcY) + ","; + vectors += boost::lexical_cast(p.fDetSX + 0.5f * m_iDetectorCount * p.fDetUX) + ","; + vectors += boost::lexical_cast(p.fDetSY + 0.5f * m_iDetectorCount * p.fDetUY) + ","; + vectors += boost::lexical_cast(p.fDetUX) + ","; + vectors += boost::lexical_cast(p.fDetUY); + if (i < m_iProjectionAngleCount-1) vectors += ';'; + } + cfg->self->addChildNode("Vectors", vectors); + return cfg; +} //---------------------------------------------------------------------------------------- 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 #include @@ -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 */) 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 #include @@ -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]; diff --git a/src/ParallelVecProjectionGeometry3D.cpp b/src/ParallelVecProjectionGeometry3D.cpp index 17f00a4..0f39c4a 100644 --- a/src/ParallelVecProjectionGeometry3D.cpp +++ b/src/ParallelVecProjectionGeometry3D.cpp @@ -211,6 +211,40 @@ void CParallelVecProjectionGeometry3D::toXML(XMLNode* _sNode) const //_sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); } +//---------------------------------------------------------------------------------------- +// Get the configuration object +Config* CParallelVecProjectionGeometry3D::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); + + std::string vectors = ""; + for (int i = 0; i < m_iProjectionAngleCount; ++i) { + SPar3DProjection& p = m_pProjectionAngles[i]; + vectors += boost::lexical_cast(p.fRayX) + ","; + vectors += boost::lexical_cast(p.fRayY) + ","; + vectors += boost::lexical_cast(p.fRayZ) + ","; + vectors += boost::lexical_cast(p.fDetSX + 0.5f*m_iDetectorRowCount*p.fDetUX + 0.5f*m_iDetectorColCount*p.fDetVX) + ","; + vectors += boost::lexical_cast(p.fDetSY + 0.5f*m_iDetectorRowCount*p.fDetUY + 0.5f*m_iDetectorColCount*p.fDetVY) + ","; + vectors += boost::lexical_cast(p.fDetSZ + 0.5f*m_iDetectorRowCount*p.fDetUZ + 0.5f*m_iDetectorColCount*p.fDetVZ) + ","; + vectors += boost::lexical_cast(p.fDetUX) + ","; + vectors += boost::lexical_cast(p.fDetUY) + ","; + vectors += boost::lexical_cast(p.fDetUZ) + ","; + vectors += boost::lexical_cast(p.fDetVX) + ","; + vectors += boost::lexical_cast(p.fDetVY) + ","; + vectors += boost::lexical_cast(p.fDetVZ); + if (i < m_iProjectionAngleCount-1) vectors += ';'; + } + cfg->self->addChildNode("Vectors", vectors); + + return cfg; +} +//---------------------------------------------------------------------------------------- + CVector3D CParallelVecProjectionGeometry3D::getProjectionDirection(int _iProjectionIndex, int _iDetectorIndex) const { const SPar3DProjection& p = m_pProjectionAngles[_iProjectionIndex]; 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); diff --git a/src/XMLNode.cpp b/src/XMLNode.cpp index a5b6796..4b2bdf4 100644 --- a/src/XMLNode.cpp +++ b/src/XMLNode.cpp @@ -448,13 +448,11 @@ void XMLNode::setContent(float32 _fValue) // Set content - LIST void XMLNode::setContent(float32* pfList, int _iSize) { - addAttribute("listsize", _iSize); - for (int i = 0; i < _iSize; i++) { - XMLNode* item = addChildNode("ListItem"); - item->addAttribute("index", i); - item->addAttribute("value",pfList[i]); - delete item; + std::string str = (_iSize > 0) ? boost::lexical_cast(pfList[0]) : ""; + for (int i = 1; i < _iSize; i++) { + str += "," + boost::lexical_cast(pfList[i]); } + setContent(str); } //----------------------------------------------------------------------------- -- cgit v1.2.3 From 2d11dcfc8d85cd562a36c192f5dda64c8378d160 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Thu, 26 Feb 2015 14:00:14 +0100 Subject: updated docs --- src/ConeProjectionGeometry3D.cpp | 13 ------------- src/ConeVecProjectionGeometry3D.cpp | 9 --------- src/ParallelProjectionGeometry3D.cpp | 11 ----------- src/ParallelVecProjectionGeometry3D.cpp | 10 ---------- 4 files changed, 43 deletions(-) (limited to 'src') diff --git a/src/ConeProjectionGeometry3D.cpp b/src/ConeProjectionGeometry3D.cpp index 50f2c8f..eb9adcf 100644 --- a/src/ConeProjectionGeometry3D.cpp +++ b/src/ConeProjectionGeometry3D.cpp @@ -185,19 +185,6 @@ bool CConeProjectionGeometry3D::isOfType(const std::string& _sType) const return (_sType == "cone"); } -//---------------------------------------------------------------------------------------- -void CConeProjectionGeometry3D::toXML(XMLNode* _sNode) const -{ - _sNode->addAttribute("type", "cone"); - _sNode->addChildNode("DetectorSpacingX", m_fDetectorSpacingX); - _sNode->addChildNode("DetectorSpacingY", m_fDetectorSpacingY); - _sNode->addChildNode("DetectorRowCount", m_iDetectorRowCount); - _sNode->addChildNode("DetectorColCount", m_iDetectorColCount); - _sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); - _sNode->addChildNode("DistanceOriginDetector", m_fOriginDetectorDistance); - _sNode->addChildNode("DistanceOriginSource", m_fOriginSourceDistance); -} - //---------------------------------------------------------------------------------------- // Get the configuration object Config* CConeProjectionGeometry3D::getConfiguration() const diff --git a/src/ConeVecProjectionGeometry3D.cpp b/src/ConeVecProjectionGeometry3D.cpp index 4f58188..a4bd22d 100644 --- a/src/ConeVecProjectionGeometry3D.cpp +++ b/src/ConeVecProjectionGeometry3D.cpp @@ -201,15 +201,6 @@ bool CConeVecProjectionGeometry3D::isOfType(const std::string& _sType) const return (_sType == "cone_vec"); } -//---------------------------------------------------------------------------------------- -void CConeVecProjectionGeometry3D::toXML(XMLNode* _sNode) const -{ - _sNode->addAttribute("type","cone_vec"); - _sNode->addChildNode("DetectorRowCount", m_iDetectorRowCount); - _sNode->addChildNode("DetectorColCount", m_iDetectorColCount); - // TODO: - //_sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); -} //---------------------------------------------------------------------------------------- // Get the configuration object Config* CConeVecProjectionGeometry3D::getConfiguration() const diff --git a/src/ParallelProjectionGeometry3D.cpp b/src/ParallelProjectionGeometry3D.cpp index d47a4bb..eb200f9 100644 --- a/src/ParallelProjectionGeometry3D.cpp +++ b/src/ParallelProjectionGeometry3D.cpp @@ -158,17 +158,6 @@ bool CParallelProjectionGeometry3D::isOfType(const std::string& _sType) const return (_sType == "parallel3d"); } -//---------------------------------------------------------------------------------------- -void CParallelProjectionGeometry3D::toXML(XMLNode* _sNode) const -{ - _sNode->addAttribute("type","parallel3d"); - _sNode->addChildNode("DetectorSpacingX", m_fDetectorSpacingX); - _sNode->addChildNode("DetectorSpacingY", m_fDetectorSpacingY); - _sNode->addChildNode("DetectorRowCount", m_iDetectorRowCount); - _sNode->addChildNode("DetectorColCount", m_iDetectorColCount); - _sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); -} - //---------------------------------------------------------------------------------------- // Get the configuration object Config* CParallelProjectionGeometry3D::getConfiguration() const diff --git a/src/ParallelVecProjectionGeometry3D.cpp b/src/ParallelVecProjectionGeometry3D.cpp index 0f39c4a..cfac485 100644 --- a/src/ParallelVecProjectionGeometry3D.cpp +++ b/src/ParallelVecProjectionGeometry3D.cpp @@ -201,16 +201,6 @@ bool CParallelVecProjectionGeometry3D::isOfType(const std::string& _sType) const return (_sType == "parallel3d_vec"); } -//---------------------------------------------------------------------------------------- -void CParallelVecProjectionGeometry3D::toXML(XMLNode* _sNode) const -{ - _sNode->addAttribute("type","parallel3d_vec"); - _sNode->addChildNode("DetectorRowCount", m_iDetectorRowCount); - _sNode->addChildNode("DetectorColCount", m_iDetectorColCount); - // TODO: - //_sNode->addChildNode("ProjectionAngles", m_pfProjectionAngles, m_iProjectionAngleCount); -} - //---------------------------------------------------------------------------------------- // Get the configuration object Config* CParallelVecProjectionGeometry3D::getConfiguration() const -- cgit v1.2.3