From 6607fc1aeff2b7bc49999f34a90eb84c1d11365e Mon Sep 17 00:00:00 2001 From: Romain Garrigues <romain.garrigues@c-s.fr> Date: Tue, 11 Jul 2006 12:31:14 +0000 Subject: [PATCH] Corrections pour enlever les warning sous VC++ 7.1 lors de la compilation --- Code/Common/otbCommandLineArgumentParser.cxx | 4 ++-- .../otbFlusserImageFunction.txx | 2 +- ...otbPixelSuppressionByDirectionImageFilter.txx | 16 +++++----------- .../otbTouziEdgeDetectorImageFilter.txx | 1 - Code/IO/otbImageBase.cxx | 2 +- Code/Learning/otbSVMClassifier.txx | 9 +++++---- Code/Visu/otbGLVectorImageViewBase.txx | 5 ++--- Code/Visu/otbPrincipalImageViewAS.txx | 3 +-- .../SVMPointSetClassificationExample.cxx | 5 +++-- Examples/Learning/SVMPointSetExample.cxx | 8 +++++--- .../FeatureExtraction/otbHarrisToPointSet.cxx | 5 ++--- 11 files changed, 27 insertions(+), 33 deletions(-) diff --git a/Code/Common/otbCommandLineArgumentParser.cxx b/Code/Common/otbCommandLineArgumentParser.cxx index aed9ad96e2..043b491b9e 100755 --- a/Code/Common/otbCommandLineArgumentParser.cxx +++ b/Code/Common/otbCommandLineArgumentParser.cxx @@ -269,7 +269,7 @@ CommandLineArgumentParser //Cherche dans la liste des options installées bool trouve(false); bool continuer(true); - int cpt(0); + unsigned int cpt(0); std::string strOption(option); while ( continuer == true ) { @@ -296,7 +296,7 @@ CommandLineArgumentParser os << " Usage : "<<m_ProgramName<<std::endl; // Calcul de la largeur max en caractere de l'affichage des options (pour mise en page) int largeurmax(-1); - int i; + unsigned int i; for(i=0 ; i < m_OptionList.size() ; i++ ) { diff --git a/Code/FeatureExtraction/otbFlusserImageFunction.txx b/Code/FeatureExtraction/otbFlusserImageFunction.txx index 3c99bab165..b41e05f932 100644 --- a/Code/FeatureExtraction/otbFlusserImageFunction.txx +++ b/Code/FeatureExtraction/otbFlusserImageFunction.txx @@ -55,7 +55,7 @@ typename FlusserImageFunction<TInput,TOutput,TCoordRep>::RealType FlusserImageFunction<TInput,TOutput,TCoordRep> ::EvaluateAtIndex(const IndexType& index) const { - typename InputType::SizeType ImageSize; + RealType FlusserValue; ComplexType FlusserValueComplex; diff --git a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx index 1891ca8313..98347e3f65 100755 --- a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx +++ b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx @@ -152,7 +152,7 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade int threadId ) { - unsigned int i; + itk::ConstantBoundaryCondition<InputImageType> cbc; const InputPixelType cvalue = 255; cbc.SetConstant(cvalue); @@ -179,30 +179,24 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade // support progress methods/callbacks itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels()); - typename TInputImage::IndexType bitIndex; + //typename TInputImage::IndexType bitIndex; //--------------------------------------------------------------------------- InputPixelType PixelValue; // Location of the central pixel in the input image - int Xc, Yc; +// int Xc, Yc; // Pixel location in the system axis of the region int x, y; // Pixel location in the system axis of the region after rotation of theta // where theta is the direction of the cantral pixel - double xt, yt; - // Distance between pixel (x,y) and the central pixel of the region - double DistanceXY; - + // Pixel Direction - double ThetaXcYc, Thetaxtyt, ThetaXY ; - - // Angular tolerance on the direction of the central pixel - double MinThetaXcYc, MaxThetaXcYc; + double ThetaXcYc, Thetaxtyt ; //--------------------------------------------------------------------------- diff --git a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx index 6b2c9554cf..3c319152bb 100755 --- a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx +++ b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx @@ -141,7 +141,6 @@ void TouziEdgeDetectorImageFilter< TInputImage, TOutputImage> unsigned int i; itk::ZeroFluxNeumannBoundaryCondition<InputImageType> nbc; itk::ConstNeighborhoodIterator<InputImageType> bit; - typename itk::ConstNeighborhoodIterator<InputImageType>::OffsetType off; itk::ImageRegionIterator<OutputImageType> it; itk::ImageRegionIterator<OutputImageType> it_dir; diff --git a/Code/IO/otbImageBase.cxx b/Code/IO/otbImageBase.cxx index 015b1bbb5b..3dcbb67eb6 100755 --- a/Code/IO/otbImageBase.cxx +++ b/Code/IO/otbImageBase.cxx @@ -278,7 +278,7 @@ ImageBase::PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDiction VectorType vvalue; double dvalue; OTB_GCP gcpvalue; - int i ; + unsigned int i ; // Copy of the const metadata dictionary in a metadata dictionary to be used // by the ExposeMetaData method diff --git a/Code/Learning/otbSVMClassifier.txx b/Code/Learning/otbSVMClassifier.txx index 7d27ec8745..2ed82c3ee5 100644 --- a/Code/Learning/otbSVMClassifier.txx +++ b/Code/Learning/otbSVMClassifier.txx @@ -228,7 +228,6 @@ SVMClassifier< TSample, TLabel > int *labels=(int *) malloc(nr_class*sizeof(int)); double *prob_estimates=NULL; - int j; if(predict_probability) { @@ -253,10 +252,12 @@ SVMClassifier< TSample, TLabel > { int i = 0; - int c; - double target,v; + double v; - /*if (fscanf(input,"%lf",&target)==EOF) + /* + double target; + int c; + if (fscanf(input,"%lf",&target)==EOF) break;*/ // while(1) diff --git a/Code/Visu/otbGLVectorImageViewBase.txx b/Code/Visu/otbGLVectorImageViewBase.txx index 0d341fe4d1..fc98e23c3b 100755 --- a/Code/Visu/otbGLVectorImageViewBase.txx +++ b/Code/Visu/otbGLVectorImageViewBase.txx @@ -489,9 +489,8 @@ GLVectorImageViewBase<TPixel>:: SetWinImData(const RegionType & zone) { IndexType ind; - int l, m; - float tf; - + int l; + int lWinMinX = zone.GetIndex()[0]; int lWinMinY = zone.GetIndex()[1]; int lWinMaxX = lWinMinX + zone.GetSize()[0] - 1; diff --git a/Code/Visu/otbPrincipalImageViewAS.txx b/Code/Visu/otbPrincipalImageViewAS.txx index 2ae7442a1e..f36313ee13 100755 --- a/Code/Visu/otbPrincipalImageViewAS.txx +++ b/Code/Visu/otbPrincipalImageViewAS.txx @@ -53,8 +53,7 @@ int PrincipalImageViewAS<TPixel, TPixelOverlay>::handle(int event) { - int key, x, y ,z=0; - bool mem; + int key, x=0, y=0 ,z=0; ColorType colorTmp; std::list<ClickPoint>::iterator it; diff --git a/Examples/Learning/SVMPointSetClassificationExample.cxx b/Examples/Learning/SVMPointSetClassificationExample.cxx index 7f81a1408b..8821ffb959 100644 --- a/Examples/Learning/SVMPointSetClassificationExample.cxx +++ b/Examples/Learning/SVMPointSetClassificationExample.cxx @@ -129,11 +129,12 @@ int main( int argc, char* argv[] ) srand(0); + unsigned int pointId; // Software Guide : BeginCodeSnippet int lowest = 0; int range = 1000; - for(unsigned int pointId = 0; pointId<100; pointId++) + for(pointId = 0; pointId<100; pointId++) { MeasurePointType tP; @@ -324,7 +325,7 @@ int main( int argc, char* argv[] ) double error = 0.0; - unsigned int pointId = 0; + pointId = 0; while (m_iter != m_last) { diff --git a/Examples/Learning/SVMPointSetExample.cxx b/Examples/Learning/SVMPointSetExample.cxx index 1f664dc8fd..5fb676a18b 100644 --- a/Examples/Learning/SVMPointSetExample.cxx +++ b/Examples/Learning/SVMPointSetExample.cxx @@ -69,7 +69,9 @@ int main( int argc, char* argv[] ) int lowest = 0; int range = 1000; - for(unsigned int pointId = 0; pointId<500; pointId++) + unsigned int pointId; + + for(pointId = 0; pointId<500; pointId++) { MeasurePointType mP; @@ -135,7 +137,7 @@ int main( int argc, char* argv[] ) MeasurePointSetType::Pointer tPSet = MeasurePointSetType::New(); MeasurePointsContainer::Pointer tCont = MeasurePointsContainer::New(); - for(unsigned int pointId = 0; pointId<100; pointId++) + for(pointId = 0; pointId<100; pointId++) { MeasurePointType tP; @@ -205,7 +207,7 @@ int main( int argc, char* argv[] ) double error = 0.0; - unsigned int pointId = 0; + pointId = 0; while (m_iter != m_last) { ClassifierType::ClassLabelType label = m_iter.GetClassLabel(); diff --git a/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx b/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx index 2ed2f077ab..a8faec69fb 100644 --- a/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx +++ b/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx @@ -59,9 +59,8 @@ int otbHarrisToPointSet( int argc, char * argv[] ) OutputPointSetType::Pointer pointList = OutputPointSetType::New(); OutputImageType::Pointer outImage = OutputImageType::New(); WriterType::Pointer writer = WriterType::New(); - OutputPointType *CoordPoint; - InputImageType::IndexType index; - + OutputPointType *CoordPoint = NULL; + reader->SetFileName( inputFilename ); writer->SetFileName( outputFilename ); -- GitLab