diff options
author | Willem Jan Palenstijn <wjp@usecode.org> | 2015-05-01 17:48:32 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-05-06 15:18:03 +0200 |
commit | 47fe3421585302f2101691a685ab99b0e1ad5cfc (patch) | |
tree | 5f7ff204c5d19f83313487a840748724e04ad8e5 /src/ParallelBeamBlobKernelProjector2D.cpp | |
parent | bf31003d74f538a9096ef5999b31b0daa58c38c9 (diff) | |
download | astra-47fe3421585302f2101691a685ab99b0e1ad5cfc.tar.gz astra-47fe3421585302f2101691a685ab99b0e1ad5cfc.tar.bz2 astra-47fe3421585302f2101691a685ab99b0e1ad5cfc.tar.xz astra-47fe3421585302f2101691a685ab99b0e1ad5cfc.zip |
Change XMLNode* to XMLNode
An XMLNode object is already simply a pointer, so no need to dynamically allocate XMLNodes.
Diffstat (limited to 'src/ParallelBeamBlobKernelProjector2D.cpp')
-rw-r--r-- | src/ParallelBeamBlobKernelProjector2D.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ParallelBeamBlobKernelProjector2D.cpp b/src/ParallelBeamBlobKernelProjector2D.cpp index 3253f88..4559a48 100644 --- a/src/ParallelBeamBlobKernelProjector2D.cpp +++ b/src/ParallelBeamBlobKernelProjector2D.cpp @@ -128,28 +128,28 @@ bool CParallelBeamBlobKernelProjector2D::initialize(const Config& _cfg) } // required: Kernel - XMLNode* node = _cfg.self->getSingleNode("Kernel"); + XMLNode node = _cfg.self.getSingleNode("Kernel"); ASTRA_CONFIG_CHECK(node, "BlobProjector", "No Kernel tag specified."); { // Required: KernelSize - XMLNode* node2 = node->getSingleNode("KernelSize"); + XMLNode node2 = node.getSingleNode("KernelSize"); ASTRA_CONFIG_CHECK(node2, "BlobProjector", "No Kernel/KernelSize tag specified."); - m_fBlobSize = boost::lexical_cast<float32>(node2->getContent()); + m_fBlobSize = boost::lexical_cast<float32>(node2.getContent()); // Required: SampleRate - node2 = node->getSingleNode("SampleRate"); + node2 = node.getSingleNode("SampleRate"); ASTRA_CONFIG_CHECK(node2, "BlobProjector", "No Kernel/SampleRate tag specified."); - m_fBlobSampleRate = boost::lexical_cast<float32>(node2->getContent()); + m_fBlobSampleRate = boost::lexical_cast<float32>(node2.getContent()); // Required: SampleCount - node2 = node->getSingleNode("SampleCount"); + node2 = node.getSingleNode("SampleCount"); ASTRA_CONFIG_CHECK(node2, "BlobProjector", "No Kernel/SampleCount tag specified."); - m_iBlobSampleCount = boost::lexical_cast<int>(node2->getContent()); + m_iBlobSampleCount = boost::lexical_cast<int>(node2.getContent()); // Required: KernelValues - node2 = node->getSingleNode("KernelValues"); + node2 = node.getSingleNode("KernelValues"); ASTRA_CONFIG_CHECK(node2, "BlobProjector", "No Kernel/KernelValues tag specified."); - vector<float32> values = node2->getContentNumericalArray(); + vector<float32> values = node2.getContentNumericalArray(); ASTRA_CONFIG_CHECK(values.size() == (unsigned int)m_iBlobSampleCount, "BlobProjector", "Number of specified values doesn't match SampleCount."); m_pfBlobValues = new float32[m_iBlobSampleCount]; for (int i = 0; i < m_iBlobSampleCount; i++) { @@ -157,9 +157,9 @@ bool CParallelBeamBlobKernelProjector2D::initialize(const Config& _cfg) } // Required: KernelValues - node2 = node->getSingleNode("KernelValuesNeg"); + node2 = node.getSingleNode("KernelValuesNeg"); ASTRA_CONFIG_CHECK(node2, "BlobProjector", "No Kernel/KernelValuesNeg tag specified."); - vector<float32> values2 = node2->getContentNumericalArray(); + vector<float32> values2 = node2.getContentNumericalArray(); ASTRA_CONFIG_CHECK(values2.size() == (unsigned int)m_iBlobSampleCount, "BlobProjector", "Number of specified values doesn't match SampleCount."); m_pfBlobValuesNeg = new float32[m_iBlobSampleCount]; for (int i = 0; i < m_iBlobSampleCount; i++) { |