diff --git a/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx b/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx index a9ee238bc6009e93b5aad2ad268b7687fcaa71ac..e22755604331e510d27e5571c7557d5995a53e07 100644 --- a/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx +++ b/Code/Common/otbUnaryFunctorNeighborhoodWithOffsetImageFilter.txx @@ -50,7 +50,7 @@ UnaryFunctorNeighborhoodWithOffsetImageFilter<TInputImage,TOutputImage,TFunction { Superclass::BeforeThreadedGenerateData(); - for (unsigned int i =0; i<this->GetNumberOfThreads(); i++) + for (unsigned int i =0; i<static_cast<unsigned int>(this->GetNumberOfThreads()); i++) { m_FunctorList.push_back(m_Functor); } diff --git a/Code/FeatureExtraction/otbEntropyTextureFunctor.h b/Code/FeatureExtraction/otbEntropyTextureFunctor.h index 9c18e478a374a411fa555f78fb75a4a7978c115f..8c57376d9da6693a9d31d3e0161b3ab49d038f31 100644 --- a/Code/FeatureExtraction/otbEntropyTextureFunctor.h +++ b/Code/FeatureExtraction/otbEntropyTextureFunctor.h @@ -180,11 +180,11 @@ public: IntVectorType histoTemp; IntVectorVectorType histo; if (binsLength[0][i] != 0) - histoTemp = IntVectorType( vcl_floor((m_Maxi[i]-m_Mini[i])/binsLength[0][i])+1, 0 ); + histoTemp = IntVectorType( vcl_floor( static_cast<double>(m_Maxi[i]-m_Mini[i])/binsLength[0][i])+1., 0); else histoTemp = IntVectorType( 1, 0 ); if (binsLength[1][i] != 0) - histo = IntVectorVectorType( vcl_floor((m_MaxiOff[i]-m_MiniOff[i])/binsLength[1][i])+1, histoTemp ); + histo = IntVectorVectorType( vcl_floor(static_cast<double>(m_MaxiOff[i]-m_MiniOff[i])/binsLength[1][i])+1., histoTemp ); else histo = IntVectorVectorType( 1, histoTemp ); @@ -204,11 +204,11 @@ public: offsetOff[1]++; offset[1] = k; if ( binsLength[1][i] != 0) - histoIdX = vcl_floor( (itOff.GetPixel(offsetOff)[i]-m_MiniOff[i]) / binsLength[1][i] ); + histoIdX = static_cast<int>(vcl_floor( (itOff.GetPixel(offsetOff)[i]-m_MiniOff[i]) / binsLength[1][i] )); else histoIdX = 0; if ( binsLength[0][i] !=0 ) - histoIdY = vcl_floor( (it.GetPixel(offset)[i]-m_Mini[i]) / binsLength[0][i] ); + histoIdY = static_cast<int>(vcl_floor( (it.GetPixel(offset)[i]-m_Mini[i]) / binsLength[0][i] )); else histoIdY = 0; histo[histoIdX][histoIdY]++;