From c5507b6ef2abfab169150528a374526bb348bf62 Mon Sep 17 00:00:00 2001 From: "Daniel M. Pelt" Date: Fri, 13 Mar 2015 12:18:21 +0100 Subject: Adds ASTRA_*** defines for easier logging, and changes internal calls to these defines --- src/ConeProjectionGeometry3D.cpp | 2 +- src/Config.cpp | 2 +- src/CudaFilteredBackProjectionAlgorithm.cpp | 2 +- src/CudaForwardProjectionAlgorithm.cpp | 2 +- src/CudaForwardProjectionAlgorithm3D.cpp | 2 +- src/CudaReconstructionAlgorithm2D.cpp | 2 +- src/FilteredBackProjectionAlgorithm.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/ConeProjectionGeometry3D.cpp b/src/ConeProjectionGeometry3D.cpp index 13f147b..1976901 100644 --- a/src/ConeProjectionGeometry3D.cpp +++ b/src/ConeProjectionGeometry3D.cpp @@ -259,7 +259,7 @@ void CConeProjectionGeometry3D::projectPoint(float32 fX, float32 fY, float32 fZ, // Scale fS to detector plane fU = detectorOffsetXToColIndexFloat( (fS * (m_fOriginSourceDistance + m_fOriginDetectorDistance)) / fD ); - astra::CLogger::debug(__FILE__,__LINE__,"alpha: %f, D: %f, V: %f, S: %f, U: %f", alpha, fD, fV, fS, fU); + ASTRA_DEBUG("alpha: %f, D: %f, V: %f, S: %f, U: %f", alpha, fD, fV, fS, fU); } diff --git a/src/Config.cpp b/src/Config.cpp index 0a85b3c..388cfdf 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -149,7 +149,7 @@ bool ConfigStackCheck::stopParsing() if (!errors.empty()) { ostringstream os; os << "Warning: " << name << ": unused configuration options: " << errors; - astra::CLogger::warn(__FILE__,__LINE__,os.str().c_str()); + ASTRA_WARN(os.str().c_str()); return false; } diff --git a/src/CudaFilteredBackProjectionAlgorithm.cpp b/src/CudaFilteredBackProjectionAlgorithm.cpp index 26b848e..0badc20 100644 --- a/src/CudaFilteredBackProjectionAlgorithm.cpp +++ b/src/CudaFilteredBackProjectionAlgorithm.cpp @@ -485,7 +485,7 @@ E_FBPFILTER CCudaFilteredBackProjectionAlgorithm::_convertStringToFilter(const c } else { - astra::CLogger::error(__FILE__,__LINE__,"Failed to convert \"%s\" into a filter.",_filterType); + ASTRA_ERROR("Failed to convert \"%s\" into a filter.",_filterType); } return output; diff --git a/src/CudaForwardProjectionAlgorithm.cpp b/src/CudaForwardProjectionAlgorithm.cpp index 1ae6b83..19cadd6 100644 --- a/src/CudaForwardProjectionAlgorithm.cpp +++ b/src/CudaForwardProjectionAlgorithm.cpp @@ -106,7 +106,7 @@ bool CCudaForwardProjectionAlgorithm::initialize(const Config& _cfg) id = boost::lexical_cast(node->getContent()); CProjector2D *projector = CProjector2DManager::getSingleton().get(id); if (!dynamic_cast(projector)) { - astra::CLogger::warn(__FILE__,__LINE__,"Warning: non-CUDA Projector2D passed to FP_CUDA"); + ASTRA_WARN("Warning: non-CUDA Projector2D passed to FP_CUDA"); } delete node; } diff --git a/src/CudaForwardProjectionAlgorithm3D.cpp b/src/CudaForwardProjectionAlgorithm3D.cpp index 57e1094..8e6bab5 100644 --- a/src/CudaForwardProjectionAlgorithm3D.cpp +++ b/src/CudaForwardProjectionAlgorithm3D.cpp @@ -267,7 +267,7 @@ void CCudaForwardProjectionAlgorithm3D::run(int) for (int k = 0; k < 2; ++k) { float fU, fV; projgeom->projectPoint(fX[i], fY[j], fZ[k], a, fU, fV); - astra::CLogger::debug(__FILE__,__LINE__,"%3d %c1,%c1,%c1 -> %12f %12f", a, i ? ' ' : '-', j ? ' ' : '-', k ? ' ' : '-', fU, fV); + ASTRA_DEBUG("%3d %c1,%c1,%c1 -> %12f %12f", a, i ? ' ' : '-', j ? ' ' : '-', k ? ' ' : '-', fU, fV); } } #endif diff --git a/src/CudaReconstructionAlgorithm2D.cpp b/src/CudaReconstructionAlgorithm2D.cpp index b434e8a..929f0f1 100644 --- a/src/CudaReconstructionAlgorithm2D.cpp +++ b/src/CudaReconstructionAlgorithm2D.cpp @@ -178,7 +178,7 @@ bool CCudaReconstructionAlgorithm2D::initialize(const Config& _cfg) id = boost::lexical_cast(node->getContent()); CProjector2D *projector = CProjector2DManager::getSingleton().get(id); if (!dynamic_cast(projector)) { - astra::CLogger::warn(__FILE__,__LINE__,"Warning: non-CUDA Projector2D passed"); + ASTRA_WARN("Warning: non-CUDA Projector2D passed"); } delete node; } diff --git a/src/FilteredBackProjectionAlgorithm.cpp b/src/FilteredBackProjectionAlgorithm.cpp index 47315bb..4a8e5ac 100644 --- a/src/FilteredBackProjectionAlgorithm.cpp +++ b/src/FilteredBackProjectionAlgorithm.cpp @@ -135,7 +135,7 @@ bool CFilteredBackProjectionAlgorithm::initialize(const Config& _cfg) for (int i = 0; i < angleCount; i ++) { if (projectionIndex[i] > m_pProjector->getProjectionGeometry()->getProjectionAngleCount() -1 ) { - astra::CLogger::error(__FILE__,__LINE__,"Invalid Projection Index"); + ASTRA_ERROR("Invalid Projection Index"); return false; } else { int orgIndex = (int)projectionIndex[i]; -- cgit v1.2.3