diff --git a/app/otbSARMetadataCorrection.cxx b/app/otbSARMetadataCorrection.cxx index 669a59fc820e088962762dafaa85a77f24d7846d..cf6833c6085ca7c033525a461b7132a75aa216f2 100644 --- a/app/otbSARMetadataCorrection.cxx +++ b/app/otbSARMetadataCorrection.cxx @@ -253,7 +253,7 @@ int createGCPAndUpdateKWL(std::vector<double *>* vector_lonlat, std::vector<doub std::vector<double> vector_ranTime, otb::ImageKeywordlist & outKWL) { // Check size (same size for all vectors) - int vecSize = vector_lonlat->size(); + unsigned int vecSize = vector_lonlat->size(); if (vector_colrow->size() != vecSize || vector_ind.size() != vecSize || vector_aziTime.size() != vecSize || vector_ranTime.size() != vecSize) { @@ -265,7 +265,7 @@ int createGCPAndUpdateKWL(std::vector<double *>* vector_lonlat, std::vector<doub std::string gcpCount = std::to_string(vecSize); outKWL.AddKey(GCP_NUMBER_KEY, gcpCount); // Create or update each GCP - for (int i = 0; i < vecSize; i++) + for (unsigned int i = 0; i < vecSize; i++) { // Add the GCP to kwl char prefix[1024]; @@ -305,7 +305,7 @@ int createGCPAndUpdateKWL(std::vector<double *>* vector_lonlat, std::vector<doub } // Update only GCP height and KWL // -int updateGCPAndKWL(std::vector<double> * vector_hgt, int gcpcount, otb::ImageKeywordlist & outKWL) +int updateGCPAndKWL(std::vector<double> * vector_hgt, unsigned int gcpcount, otb::ImageKeywordlist & outKWL) { // Check vector size with gcp count if (vector_hgt->size() != gcpcount) @@ -315,7 +315,7 @@ int updateGCPAndKWL(std::vector<double> * vector_hgt, int gcpcount, otb::ImageKe } // Create or update each GCP - for (int i = 0; i < vector_hgt->size(); i++) + for (unsigned int i = 0; i < vector_hgt->size(); i++) { // Add the GCP to kwl char prefix[1024]; @@ -467,7 +467,7 @@ private: std::vector<double> * vector_hgt = new vector<double>(); vector_hgt->resize(vector_lonlat->size()); // Same size than lon and lat - for (int k = 0; k < vector_lonlat->size(); k++) + for (unsigned int k = 0; k < vector_lonlat->size(); k++) { vector_hgt->at(k) = 0; } @@ -496,7 +496,7 @@ private: otbAppLogINFO(<< ossOutput.str()); // Free Memory - for (int itab = 0; itab < vector_lonlat->size(); itab++) + for (unsigned int itab = 0; itab < vector_lonlat->size(); itab++) { delete vector_lonlat->at(itab); vector_lonlat->at(itab) = 0; @@ -510,7 +510,7 @@ private: vector_hgt = 0; - for (int itab = 0; itab < vector_colrow->size(); itab++) + for (unsigned int itab = 0; itab < vector_colrow->size(); itab++) { delete vector_colrow->at(itab); vector_colrow->at(itab) = 0; diff --git a/include/otbSARCartesianMeanFunctor.h b/include/otbSARCartesianMeanFunctor.h index d3b89c5c28b2af977d17b90282bdb2028d84aedc..d49869d7eb6e5708c7d1fd02a0369357eb3eacbe 100644 --- a/include/otbSARCartesianMeanFunctor.h +++ b/include/otbSARCartesianMeanFunctor.h @@ -53,7 +53,7 @@ namespace Function public: /** Standard class typedefs */ typedef SARCartesianMeanFunctor Self; - typedef itk::Object Superclass; + typedef SARPolygonsFunctor<TInputPixel, TOutputPixel> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -377,6 +377,7 @@ public: this->SetEstimatedComponents(estimatedComponents); } + using Superclass::GetOutputGeometry; /** * Method GetOutputGeometry (override) diff --git a/include/otbSARGroupedByOrthoImageFilter.txx b/include/otbSARGroupedByOrthoImageFilter.txx index 658724ef91e4bbb1cc4337c595b5f5a5dbf91dd1..a8128e705ad62117296872c15a3d190c10c8d7fd 100644 --- a/include/otbSARGroupedByOrthoImageFilter.txx +++ b/include/otbSARGroupedByOrthoImageFilter.txx @@ -446,8 +446,6 @@ SARGroupedByOrthoImageFilter< TImageVector, TImageDEM, TImageOut > // Allocate outputs this->AllocateOutputs(); - int nbThreads = this->GetNumberOfThreads(); - // Get Output Requested region ImageOutRegionType outputRegion = this->GetOutput()->GetRequestedRegion(); @@ -459,7 +457,7 @@ SARGroupedByOrthoImageFilter< TImageVector, TImageDEM, TImageOut > if (isIntoInputImage) { // Allocation for temporay arrays - int regionSize = outputRegion.GetSize()[0] * outputRegion.GetSize()[1]; + unsigned int regionSize = outputRegion.GetSize()[0] * outputRegion.GetSize()[1]; m_tmpArray_real = new double[regionSize]; m_tmpArray_imag = new double[regionSize]; m_tmpArray_mod = new double[regionSize]; @@ -606,15 +604,13 @@ SARGroupedByOrthoImageFilter< TImageVector, TImageDEM, TImageOut > const ImageOutRegionType& outputRegion, double * tmpArray_real, double * tmpArray_imag, double * tmpArray_mod, double * tmpArray_count, - itk::ThreadIdType threadId) + itk::ThreadIdType itkNotUsed(threadId)) { Point2DType demLonLatPoint; itk::ContinuousIndex<double,2> pixel_Into_DEM_index; ImageOutIndexType index; - int regionSize = outputRegion.GetSize()[0] * outputRegion.GetSize()[1]; - // Iterators on inputs (SAR geometry) InputIterator CartMeanIt(this->GetCartesianMeanInput(), inputRegion); InputIterator CompComplexIt(this->GetCompensatedComplexInput(), inputRegion); @@ -653,10 +649,10 @@ SARGroupedByOrthoImageFilter< TImageVector, TImageDEM, TImageOut > // Check if index into outputRegion if (index[0] >= outputRegion.GetIndex()[0] && index[0] < (outputRegion.GetIndex()[0] + - outputRegion.GetSize()[0]) && + (int) outputRegion.GetSize()[0]) && index[1] >= outputRegion.GetIndex()[1] && index[1] < (outputRegion.GetIndex()[1] + - outputRegion.GetSize()[1])) + (int) outputRegion.GetSize()[1])) { // Accumulations for CompensatedComplex for current ground index int index_intoArray = static_cast<int>((index[0]-outputRegion.GetIndex()[0]) + diff --git a/include/otbSARStreamingDEMClosestHgtFilter.h b/include/otbSARStreamingDEMClosestHgtFilter.h index 087eb387daf97da79737bf08edf58276a420a8af..6acffba00d2a88af38aa1fb18f299df9d0592bf3 100644 --- a/include/otbSARStreamingDEMClosestHgtFilter.h +++ b/include/otbSARStreamingDEMClosestHgtFilter.h @@ -344,13 +344,13 @@ public: // Copy the selected hgt into closestHgt at given index - for (int i = 0; i < hgts->size(); i++) + for (unsigned int i = 0; i < hgts->size(); i++) { closestHgt->at(id->at(i)) = hgts->at(i); } // Handle duplications by searching for each elt into the duplicates map - for (int i = 0; i < closestHgt->size(); i++) + for (unsigned int i = 0; i < closestHgt->size(); i++) { //closestHgt->at(id->at(i)) = hgts->at(i); itMap = duplicates->find(i); diff --git a/include/otbSARStreamingDEMClosestHgtFilter.txx b/include/otbSARStreamingDEMClosestHgtFilter.txx index 18c304c143aa908c4c8ee67787832b2ffb7d7818..f524481aa159420cddf58f6b49c7c4072ef7f710 100644 --- a/include/otbSARStreamingDEMClosestHgtFilter.txx +++ b/include/otbSARStreamingDEMClosestHgtFilter.txx @@ -199,7 +199,7 @@ PersistentDEMClosestHgtFilter<TInputImage> IndexType index; // Fill index vectors according to input lon/lat - for (int i = 0; i < m_VectorLonLat->size(); i++) + for (unsigned int i = 0; i < m_VectorLonLat->size(); i++) { pixel_Into_DEM_LonLat[0] = m_VectorLonLat->at(i)[0]; // lon pixel_Into_DEM_LonLat[1] = m_VectorLonLat->at(i)[1]; // lat @@ -220,7 +220,7 @@ PersistentDEMClosestHgtFilter<TInputImage> std::map<int,int>::iterator itMap = this->GetMapDuplicates()->begin(); if (it != m_indexCL->end()) { - this->GetMapDuplicates()->insert(itMap, std::pair<int, int>(i, std::distance(m_indexCL->begin(), it))); + this->GetMapDuplicates()->insert(itMap, std::pair<int, int>((int) i, (int) std::distance(m_indexCL->begin(), it))); } m_indexCL->push_back(index); @@ -306,10 +306,6 @@ PersistentDEMClosestHgtFilter<TInputImage> inIt.GoToBegin(); - // Retrive the DEM dimensions for the side - int nbColDEM = this->GetInput()->GetLargestPossibleRegion().GetSize()[0]; - int nbLinesDEM = this->GetInput()->GetLargestPossibleRegion().GetSize()[1]; - // For each line while ( !inIt.IsAtEnd()) { diff --git a/include/otbSARTemporalCorrelationGridImageFilter.txx b/include/otbSARTemporalCorrelationGridImageFilter.txx index 8f8fe2cbc0bf79e75d8e04c2dc28441521ea2a91..239db269ac459c61973de23e9f920129cdee80ad 100644 --- a/include/otbSARTemporalCorrelationGridImageFilter.txx +++ b/include/otbSARTemporalCorrelationGridImageFilter.txx @@ -703,7 +703,7 @@ namespace otb ::PIC(float TAB_PIC[3][3], float *DX, float *DY, float *VAL_MAX, int *CR) const { float TAB_COS[3]= {-0.5,1.,-0.5}; - float TAB_SIN[3]= {-0.8660254,0.,+0.8660254}; + float TAB_SIN[3]= {-0.8660254f,0.f,+0.8660254f}; float SXF,SYF,SF,N,A1,B1,SDXF,SDYF,A2,B2; float AX, AY; int i, j; diff --git a/include/otbSARTilesCoregistrationFunctor.h b/include/otbSARTilesCoregistrationFunctor.h index e5e179bae049b40d832cccc72470200d2582892e..b7f7f2681b3489afb0ca23b738af1f47a287097f 100644 --- a/include/otbSARTilesCoregistrationFunctor.h +++ b/include/otbSARTilesCoregistrationFunctor.h @@ -347,9 +347,9 @@ public: } return; } - if ((index_InRegion[0] + m_SizeWindow) > + if (static_cast<ImageInIndexValueType>(index_InRegion[0] + m_SizeWindow) > static_cast<ImageInIndexValueType>(inputPtr->GetLargestPossibleRegion().GetSize()[0]) || - (index_InRegion[1] + m_SizeWindow) > + static_cast<ImageInIndexValueType>(index_InRegion[1] + m_SizeWindow) > static_cast<ImageInIndexValueType>(inputPtr->GetLargestPossibleRegion().GetSize()[1])) { for (unsigned int i = 0; i < lastInd; i++)