diff Framework/DicomizerParameters.cpp @ 91:8fd5bf76bb8e

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 22 Dec 2016 20:18:34 +0100
parents 147bd6dc28db
children ff0ef01c332c
line wrap: on
line diff
--- a/Framework/DicomizerParameters.cpp	Thu Dec 22 09:03:36 2016 +0100
+++ b/Framework/DicomizerParameters.cpp	Thu Dec 22 20:18:34 2016 +0100
@@ -53,24 +53,26 @@
   }
 
 
-  DicomizerParameters::DicomizerParameters()
+  DicomizerParameters::DicomizerParameters() :
+    safetyCheck_(false),
+    repaintBackground_(false),
+    targetCompression_(ImageCompression_Jpeg),
+    hasTargetTileSize_(false),
+    targetTileWidth_(512),
+    targetTileHeight_(512),
+    maxDicomFileSize_(10 * 1024 * 1024),   // 10MB
+    reconstructPyramid_(false),
+    pyramidLevelsCount_(0),
+    pyramidLowerLevelsCount_(0),
+    smooth_(false),
+    jpegQuality_(90),
+    forceReencode_(false),
+    opticalPath_(OpticalPath_Brightfield)
   {
-    safetyCheck_ = false;
-    repaintBackground_ = false;
     backgroundColor_[0] = 255;
     backgroundColor_[1] = 255;
     backgroundColor_[2] = 255;
-    targetCompression_ = ImageCompression_Jpeg;
-    hasTargetTileSize_ = false;
     threadsCount_ = ChooseNumberOfThreads();
-    maxDicomFileSize_ = 10 * 1024 * 1024;   // 10MB
-    reconstructPyramid_ = false;
-    pyramidLevelsCount_ = 0;
-    pyramidLowerLevelsCount_ = 0;
-    smooth_ = false;
-    jpegQuality_ = 90;
-    forceReencode_ = false;
-    opticalPath_ = OpticalPath_Brightfield;
   }
 
 
@@ -146,7 +148,7 @@
 
   void DicomizerParameters::SetPyramidLevelsCount(unsigned int count)
   {
-    if (count <= 0)
+    if (count == 0)
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
     }
@@ -195,7 +197,7 @@
 
   void DicomizerParameters::SetPyramidLowerLevelsCount(unsigned int count)
   {
-    if (count <= 0)
+    if (count == 0)
     {
       throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
     }