changeset 1742:911cd9a11ad3

removed "using namespace Orthanc"
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 30 Jan 2021 12:30:09 +0100
parents 62377949e739
children 12528a80e3dd 04019fd631aa
files OrthancStone/Sources/Scene2DViewport/LayerHolder.cpp OrthancStone/Sources/Toolbox/ImageToolbox.cpp UnitTestsSources/TestStructureSet.cpp
diffstat 3 files changed, 24 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancStone/Sources/Scene2DViewport/LayerHolder.cpp	Tue Jan 19 16:12:43 2021 +0100
+++ b/OrthancStone/Sources/Scene2DViewport/LayerHolder.cpp	Sat Jan 30 12:30:09 2021 +0100
@@ -115,7 +115,6 @@
     std::unique_ptr<IViewport::ILock> lock(GetViewportLock());
     const Scene2D& scene = lock->GetController().GetScene();
 
-    using namespace Orthanc;
     ORTHANC_ASSERT(baseLayerIndex_ != -1);
     ORTHANC_ASSERT(scene.HasLayer(GetPolylineLayerIndex(index)));
     ISceneLayer* layer = &(scene.GetLayer(GetPolylineLayerIndex(index)));
@@ -132,7 +131,6 @@
     std::unique_ptr<IViewport::ILock> lock(GetViewportLock());
     const Scene2D& scene = lock->GetController().GetScene();
 
-    using namespace Orthanc;
     ORTHANC_ASSERT(baseLayerIndex_ != -1);
     ORTHANC_ASSERT(scene.HasLayer(GetTextLayerIndex(index)));
     ISceneLayer* layer = &(scene.GetLayer(GetTextLayerIndex(index)));
@@ -146,14 +144,12 @@
 
   int LayerHolder::GetPolylineLayerIndex(int index /*= 0*/)
   {
-    using namespace Orthanc;
     ORTHANC_ASSERT(index < polylineLayerCount_);
     return baseLayerIndex_ + index;
   }
   
   int LayerHolder::GetTextLayerIndex(int index /*= 0*/)
   {
-    using namespace Orthanc;
     ORTHANC_ASSERT(index < textLayerCount_);
 
     // the text layers are placed right after the polyline layers
--- a/OrthancStone/Sources/Toolbox/ImageToolbox.cpp	Tue Jan 19 16:12:43 2021 +0100
+++ b/OrthancStone/Sources/Toolbox/ImageToolbox.cpp	Sat Jan 30 12:30:09 2021 +0100
@@ -220,30 +220,28 @@
   void ComputeHistogram(const Orthanc::ImageAccessor& img,
                         HistogramData& hd, double binSize)
   {
-    using namespace Orthanc;
-
     hd.binSize = binSize;
 
     // dynamic/static bridge
     switch (img.GetFormat())
     {
-    case PixelFormat_Grayscale8:
-      ComputeHistogram_<PixelFormat_Grayscale8>       (img, hd);
+    case Orthanc::PixelFormat_Grayscale8:
+      ComputeHistogram_<Orthanc::PixelFormat_Grayscale8>       (img, hd);
       break;
-    case PixelFormat_Grayscale16:
-      ComputeHistogram_<PixelFormat_Grayscale16>      (img, hd);
+    case Orthanc::PixelFormat_Grayscale16:
+      ComputeHistogram_<Orthanc::PixelFormat_Grayscale16>      (img, hd);
       break;
-    case PixelFormat_SignedGrayscale16:
-      ComputeHistogram_<PixelFormat_SignedGrayscale16>(img, hd);
+    case Orthanc::PixelFormat_SignedGrayscale16:
+      ComputeHistogram_<Orthanc::PixelFormat_SignedGrayscale16>(img, hd);
       break;
-    case PixelFormat_Float32:
-      ComputeHistogram_<PixelFormat_Float32>          (img, hd);
+    case Orthanc::PixelFormat_Float32:
+      ComputeHistogram_<Orthanc::PixelFormat_Float32>          (img, hd);
       break;
-    case PixelFormat_Grayscale32:
-      ComputeHistogram_<PixelFormat_Grayscale32>      (img, hd);
+    case Orthanc::PixelFormat_Grayscale32:
+      ComputeHistogram_<Orthanc::PixelFormat_Grayscale32>      (img, hd);
       break;
-    case PixelFormat_Grayscale64:
-      ComputeHistogram_<PixelFormat_Grayscale64>      (img, hd);
+    case Orthanc::PixelFormat_Grayscale64:
+      ComputeHistogram_<Orthanc::PixelFormat_Grayscale64>      (img, hd);
       break;
     default:
       throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageFormat);
@@ -253,28 +251,26 @@
   void ComputeMinMax(const Orthanc::ImageAccessor& img,
                      double& minValue, double& maxValue)
   {
-    using namespace Orthanc;
-
     // dynamic/static bridge
     switch (img.GetFormat())
     {
-    case PixelFormat_Grayscale8:
-      ComputeMinMax_<PixelFormat_Grayscale8>       (img, minValue, maxValue);
+    case Orthanc::PixelFormat_Grayscale8:
+      ComputeMinMax_<Orthanc::PixelFormat_Grayscale8>       (img, minValue, maxValue);
       break;                                                
-    case PixelFormat_Grayscale16:                           
-      ComputeMinMax_<PixelFormat_Grayscale16>      (img, minValue, maxValue);
+    case Orthanc::PixelFormat_Grayscale16:                           
+      ComputeMinMax_<Orthanc::PixelFormat_Grayscale16>      (img, minValue, maxValue);
       break;                                                
-    case PixelFormat_SignedGrayscale16:                     
-      ComputeMinMax_<PixelFormat_SignedGrayscale16>(img, minValue, maxValue);
+    case Orthanc::PixelFormat_SignedGrayscale16:                     
+      ComputeMinMax_<Orthanc::PixelFormat_SignedGrayscale16>(img, minValue, maxValue);
       break;                                                
-    case PixelFormat_Float32:                               
-      ComputeMinMax_<PixelFormat_Float32>          (img, minValue, maxValue);
+    case Orthanc::PixelFormat_Float32:                               
+      ComputeMinMax_<Orthanc::PixelFormat_Float32>          (img, minValue, maxValue);
       break;                                                
-    case PixelFormat_Grayscale32:                           
-      ComputeMinMax_<PixelFormat_Grayscale32>      (img, minValue, maxValue);
+    case Orthanc::PixelFormat_Grayscale32:                           
+      ComputeMinMax_<Orthanc::PixelFormat_Grayscale32>      (img, minValue, maxValue);
       break;                                                
-    case PixelFormat_Grayscale64:                           
-      ComputeMinMax_<PixelFormat_Grayscale64>      (img, minValue, maxValue);
+    case Orthanc::PixelFormat_Grayscale64:                           
+      ComputeMinMax_<Orthanc::PixelFormat_Grayscale64>      (img, minValue, maxValue);
       break;
     default:
       throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageFormat);
--- a/UnitTestsSources/TestStructureSet.cpp	Tue Jan 19 16:12:43 2021 +0100
+++ b/UnitTestsSources/TestStructureSet.cpp	Sat Jan 30 12:30:09 2021 +0100
@@ -40,7 +40,6 @@
 #include <gtest/gtest.h>
 #include <string>
 
-using namespace Orthanc;
 using namespace OrthancStone;
 
 /*