1. Rashad M
  2. OTB-Rashad

Commits

Rashad M  committed 48eb944 Merge

SYN syncing otbmain

  • Participants
  • Parent commits 3823aef, 7770129
  • Branches default

Comments (0)

Files changed (3)

File Applications/Utils/otbColorMapping.cxx

View file
  • Ignore whitespace
 
             // Convert the radiometric value to [0, 255]
             // using the clamping from histogram cut
-            // Since an UInt8 output value is expected, the round() instruction is used
-            VectorPixelType::ValueType val = round(255 * (meanValue[dispIndex] - minVal[dispIndex])
-                                       / (maxVal[dispIndex] - minVal[dispIndex]));
+            // Since an UInt8 output value is expected, the rounding instruction is used (floor(x+0.5) as rounding method)
+            VectorPixelType::ValueType val = vcl_floor(255 * (meanValue[dispIndex] - minVal[dispIndex])
+                                       / (maxVal[dispIndex] - minVal[dispIndex])+0.5);
             color[RGB] = val < 0.0 ? 0.0 : ( val > 255.0 ? 255.0 : val );
             }
           }

File CMakeLists.txt

View file
  • Ignore whitespace
 #-----------------------------------------------------------------------------
 # OTB version number.  An even minor number corresponds to releases.
 SET(OTB_VERSION_MAJOR "3")
-SET(OTB_VERSION_MINOR "18")
-SET(OTB_VERSION_PATCH "1")
+SET(OTB_VERSION_MINOR "19")
+SET(OTB_VERSION_PATCH "0")
 
 # Version string should not include patch level.  The major.minor is
 # enough to distinguish available features of the toolkit.

File Code/IO/otbGDALDriverManagerWrapper.cxx

View file
  • Ignore whitespace
       itkExceptionMacro(<< "Error while opening the file "<< m_InputFileName.c_str() << ".");
       }
 
+
+    if( m_NbOfResolutions==0 )
+      {
+      itkExceptionMacro(
+	<< "Wrong number of resolutions: " << m_NbOfResolutions
+      );
+      }
+
     // Build the overviews list from nb of resolution desired
     std::vector<int> ovwlist;
     unsigned int factor = 1;