From 47fe3421585302f2101691a685ab99b0e1ad5cfc Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Fri, 1 May 2015 17:48:32 +0200 Subject: Change XMLNode* to XMLNode An XMLNode object is already simply a pointer, so no need to dynamically allocate XMLNodes. --- src/CudaRoiSelectAlgorithm.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/CudaRoiSelectAlgorithm.cpp') diff --git a/src/CudaRoiSelectAlgorithm.cpp b/src/CudaRoiSelectAlgorithm.cpp index bfccb3a..7635c69 100644 --- a/src/CudaRoiSelectAlgorithm.cpp +++ b/src/CudaRoiSelectAlgorithm.cpp @@ -66,22 +66,21 @@ bool CCudaRoiSelectAlgorithm::initialize(const Config& _cfg) ConfigStackCheck CC("CudaDartMaskAlgorithm", this, _cfg); // reconstruction data - XMLNode* node = _cfg.self->getSingleNode("DataId"); + XMLNode node = _cfg.self.getSingleNode("DataId"); ASTRA_CONFIG_CHECK(node, "CudaRoiSelect", "No DataId tag specified."); - int id = boost::lexical_cast(node->getContent()); + int id = boost::lexical_cast(node.getContent()); m_pData = dynamic_cast(CData2DManager::getSingleton().get(id)); - ASTRA_DELETE(node); CC.markNodeParsed("DataId"); // Option: GPU number - m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUindex", -1); - m_iGPUIndex = (int)_cfg.self->getOptionNumerical("GPUIndex", m_iGPUIndex); + m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUindex", -1); + m_iGPUIndex = (int)_cfg.self.getOptionNumerical("GPUIndex", m_iGPUIndex); CC.markOptionParsed("GPUindex"); - if (!_cfg.self->hasOption("GPUindex")) + if (!_cfg.self.hasOption("GPUindex")) CC.markOptionParsed("GPUIndex"); // Option: Radius - m_fRadius = (unsigned int)_cfg.self->getOptionNumerical("Radius", 0.0f); + m_fRadius = (unsigned int)_cfg.self.getOptionNumerical("Radius", 0.0f); CC.markOptionParsed("Radius"); _check(); -- cgit v1.2.3