diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2015-12-17 14:37:41 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2016-01-05 11:15:17 +0100 |
commit | fc86917da1a175c04e9bd2e5f0bedb0a48a81c26 (patch) | |
tree | 6996a3e2e2cfd110a566d4093e22ca746a52038d /src/CudaForwardProjectionAlgorithm.cpp | |
parent | 73fa0a8df8203288aca032c71caa5ff47d35a3e2 (diff) | |
download | astra-fc86917da1a175c04e9bd2e5f0bedb0a48a81c26.tar.gz astra-fc86917da1a175c04e9bd2e5f0bedb0a48a81c26.tar.bz2 astra-fc86917da1a175c04e9bd2e5f0bedb0a48a81c26.tar.xz astra-fc86917da1a175c04e9bd2e5f0bedb0a48a81c26.zip |
Replace boost::lexical_cast by stringstreams
This is to avoid the dependence of lexical_cast on the current locale.
The stringstreams used for the new string parsing/output functions
are explicitly imbued with the C/classic locale.
Diffstat (limited to 'src/CudaForwardProjectionAlgorithm.cpp')
-rw-r--r-- | src/CudaForwardProjectionAlgorithm.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/CudaForwardProjectionAlgorithm.cpp b/src/CudaForwardProjectionAlgorithm.cpp index d38469c..80f2e02 100644 --- a/src/CudaForwardProjectionAlgorithm.cpp +++ b/src/CudaForwardProjectionAlgorithm.cpp @@ -35,8 +35,6 @@ $Id$ #include <driver_types.h> #include <cuda_runtime_api.h> -#include <boost/lexical_cast.hpp> - #include "astra/AstraObjectManager.h" #include "astra/ParallelProjectionGeometry2D.h" #include "astra/FanFlatProjectionGeometry2D.h" @@ -97,7 +95,7 @@ bool CCudaForwardProjectionAlgorithm::initialize(const Config& _cfg) m_pProjector = 0; XMLNode node = _cfg.self.getSingleNode("ProjectorId"); if (node) { - int id = boost::lexical_cast<int>(node.getContent()); + int id = node.getContentInt(); m_pProjector = CProjector2DManager::getSingleton().get(id); } CC.markNodeParsed("ProjectorId"); @@ -107,14 +105,14 @@ bool CCudaForwardProjectionAlgorithm::initialize(const Config& _cfg) // sinogram data node = _cfg.self.getSingleNode("ProjectionDataId"); ASTRA_CONFIG_CHECK(node, "FP_CUDA", "No ProjectionDataId tag specified."); - int id = boost::lexical_cast<int>(node.getContent()); + int id = node.getContentInt(); m_pSinogram = dynamic_cast<CFloat32ProjectionData2D*>(CData2DManager::getSingleton().get(id)); CC.markNodeParsed("ProjectionDataId"); // volume data node = _cfg.self.getSingleNode("VolumeDataId"); ASTRA_CONFIG_CHECK(node, "FP_CUDA", "No VolumeDataId tag specified."); - id = boost::lexical_cast<int>(node.getContent()); + id = node.getContentInt(); m_pVolume = dynamic_cast<CFloat32VolumeData2D*>(CData2DManager::getSingleton().get(id)); CC.markNodeParsed("VolumeDataId"); |