From 929796f27c1b76349401ee6db774a10e4decd02e Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Fri, 16 Jan 2009 13:01:38 +0800 Subject: [PATCH] STYLE: tab replaced by 2 spaces in Testing --- .../otbChangeLabelImageFilter.cxx | 10 +- .../otbConvolutionImageFilterNew.cxx | 2 +- Testing/Code/BasicFilters/otbFrostFilter.cxx | 4 +- .../Code/BasicFilters/otbFrostFilterNew.cxx | 4 +- .../otbInverseLogPolarTransform.cxx | 32 +-- .../otbInverseLogPolarTransformResample.cxx | 2 +- Testing/Code/BasicFilters/otbLeeFilter.cxx | 4 +- .../otbLogPolarTransformResample.cxx | 2 +- ...tbOverlapSaveConvolutionImageFilterNew.cxx | 2 +- .../otbPersistentVectorizationFilter.cxx | 10 +- ...amingResampleImageFilterCompareWithITK.cxx | 4 +- .../Code/Common/otbDrawLineSpatialObject.cxx | 8 +- .../Common/otbDrawLineSpatialObjectList.cxx | 20 +- .../otbDrawLineSpatialObjectListNew.cxx | 6 +- .../Common/otbDrawLineSpatialObjectNew.cxx | 6 +- Testing/Code/Common/otbExtractROI.cxx | 4 +- Testing/Code/Common/otbExtractROI2.cxx | 4 +- Testing/Code/Common/otbExtractROINew.cxx | 4 +- .../Common/otbHistogramStatisticsFunction.cxx | 38 +-- .../otbImageToLineSpatialObjectListNew.cxx | 4 +- Testing/Code/Common/otbList.cxx | 12 +- .../Common/otbMirrorBoundaryConditionTest.cxx | 62 ++--- .../Code/Common/otbMultiChannelExtractROI.cxx | 46 ++-- .../Common/otbMultiChannelExtractROINew.cxx | 8 +- .../otbMultiToMonoChannelExtractROI.cxx | 8 +- .../otbMultiToMonoChannelExtractROINew.cxx | 8 +- Testing/Code/Common/otbObjectList.cxx | 4 +- .../otbPathListToHistogramGenerator.cxx | 12 +- .../otbPathListToHistogramGeneratorNew.cxx | 2 +- .../otbTestCommandLineArgumentParser.cxx | 10 +- ...TestCommandLineArgumentParserWithError.cxx | 10 +- ...enteredRigidDeformationFieldEstimation.cxx | 10 +- .../otbDisparityMapEstimationMethod.cxx | 4 +- .../otbEuler2DDeformationFieldEstimation.cxx | 10 +- ...bTranslationDeformationFieldEstimation.cxx | 10 +- .../otbAddCarvingPathFilterNew.cxx | 4 +- .../FeatureExtraction/otbAlignImageToPath.cxx | 14 +- .../otbAssociativeSymmetricalSum.cxx | 6 +- .../otbAssociativeSymmetricalSumNew.cxx | 6 +- .../otbAssymmetricFusionOfLineDetector.cxx | 6 +- .../otbAssymmetricFusionOfLineDetectorNew.cxx | 6 +- .../otbBreakAngularPathListFilter.cxx | 92 ++++---- .../otbComplexMomentImage.cxx | 4 +- .../otbComplexMomentPath.cxx | 2 +- .../otbComplexMomentPathFloat.cxx | 2 +- .../Code/FeatureExtraction/otbDrawPath.cxx | 8 +- .../FeatureExtraction/otbDrawPathAlign.cxx | 8 +- .../FeatureExtraction/otbExtractSegments.cxx | 8 +- .../otbExtractSegmentsNew.cxx | 6 +- .../FeatureExtraction/otbFillGapsFilter.cxx | 10 +- .../FeatureExtraction/otbFlusserImage.cxx | 4 +- .../otbFourierMellinImageFilter.cxx | 4 +- .../otbFourierMellinImageFilterNew.cxx | 6 +- .../otbFourierMellinImageFilterTestFFT.cxx | 2 +- .../Code/FeatureExtraction/otbHarrisImage.cxx | 8 +- .../FeatureExtraction/otbHarrisToPointSet.cxx | 2 +- Testing/Code/FeatureExtraction/otbHuImage.cxx | 4 +- .../Code/FeatureExtraction/otbHuPathNew.cxx | 2 +- .../otbImageToCarvingPathFilterNew.cxx | 4 +- .../otbImageToEdgePathFilter.cxx | 24 +- ...ToFastSIFTKeyPointSetFilterOutputAscii.cxx | 8 +- ...ToFastSIFTKeyPointSetFilterOutputImage.cxx | 34 +-- ...mageToSIFTKeyPointSetFilterDistanceMap.cxx | 40 ++-- ...mageToSIFTKeyPointSetFilterOutputAscii.cxx | 8 +- ...mageToSIFTKeyPointSetFilterOutputImage.cxx | 34 +-- .../otbImageToSIFTKeyPointSetFilterValid.cxx | 10 +- ...mageToSURFKeyPointSetFilterDistanceMap.cxx | 36 +-- ...mageToSURFKeyPointSetFilterOutputAscii.cxx | 8 +- ...mageToSURFKeyPointSetFilterOutputImage.cxx | 34 +-- .../otbLikelihoodPathListFilter.cxx | 64 ++--- .../otbLineCorrelationDetector.cxx | 4 +- .../otbLineCorrelationDetectorLinear.cxx | 6 +- .../otbLineCorrelationDetectorNew.cxx | 4 +- .../otbLineDetectorBaseNew.cxx | 4 +- .../otbLineRatioDetector.cxx | 4 +- .../otbLineRatioDetectorLinear.cxx | 6 +- .../otbLineRatioDetectorNew.cxx | 4 +- .../otbLinkPathListFilter.cxx | 64 ++--- .../Code/FeatureExtraction/otbLocalHough.cxx | 6 +- .../FeatureExtraction/otbLocalHoughDraw.cxx | 6 +- .../FeatureExtraction/otbLocalHoughNew.cxx | 4 +- .../otbModulusAndDirectionImageFiltersNew.cxx | 4 +- .../otbMultiplyByScalarImageTest.cxx | 14 +- .../otbParallelLinePathListFilter.cxx | 32 +-- .../otbPixelSuppressionByDirection.cxx | 8 +- .../otbPixelSuppressionByDirectionNew.cxx | 6 +- .../otbRemoveCarvingPathFilterNew.cxx | 4 +- .../otbRemoveTortuousPathListFilter.cxx | 64 ++--- .../otbSimplifyPathListFilter.cxx | 64 ++--- .../otbThresholdImageToPointSetTest.cxx | 2 +- .../otbTouziEdgeDetector.cxx | 4 +- .../otbTouziEdgeDetectorDirection.cxx | 4 +- .../otbTouziEdgeDetectorNew.cxx | 4 +- .../otbVectorizationPathListFilter.cxx | 18 +- Testing/Code/Gui/otbFltkFilterWatcher.cxx | 12 +- Testing/Code/IO/otbDEMHandlerTest.cxx | 2 +- Testing/Code/IO/otbDoubleImageIOTest.cxx | 4 +- Testing/Code/IO/otbFloatImageIOTest.cxx | 4 +- Testing/Code/IO/otbImageFileReaderERS.cxx | 4 +- Testing/Code/IO/otbImageFileReaderONERA.cxx | 4 +- .../IO/otbImageFileReaderONERAComplex.cxx | 6 +- Testing/Code/IO/otbImageFileReaderRADChar.cxx | 4 +- .../IO/otbImageFileReaderRADComplexDouble.cxx | 6 +- .../IO/otbImageFileReaderRADComplexFloat.cxx | 6 +- ...bImageFileReaderRADComplexFloatExtract.cxx | 6 +- .../IO/otbImageFileReaderRADComplexInt.cxx | 6 +- .../Code/IO/otbImageFileReaderRADFloat.cxx | 6 +- Testing/Code/IO/otbImageFileReaderRADInt.cxx | 4 +- Testing/Code/IO/otbImageFileReaderRGBTest.cxx | 2 +- Testing/Code/IO/otbImageFileReaderTest.cxx | 6 +- .../Code/IO/otbImageFileReaderTestFloat.cxx | 6 +- .../IO/otbImageFileWriterONERAComplex.cxx | 4 +- Testing/Code/IO/otbImageFileWriterRGBTest.cxx | 2 +- ...tbImageFileWriterStreamingONERAComplex.cxx | 10 +- Testing/Code/IO/otbImageFileWriterTest.cxx | 6 +- .../IO/otbImageMetadataFileWriterTest.cxx | 6 +- ...tbImageMetadataStreamingFileWriterTest.cxx | 6 +- Testing/Code/IO/otbImageTest.cxx | 4 +- Testing/Code/IO/otbIntImageIOTest.cxx | 4 +- .../IO/otbMultiToMonoChannelExtractROISAR.cxx | 4 +- .../IO/otbOSSIMImageMetaDataReaderTest.cxx | 20 +- Testing/Code/IO/otbOssimElevManagerTest.cxx | 20 +- .../IO/otbPipelineMetadataHandlingTest.cxx | 6 +- ...pelineMetadataHandlingWithUFFilterTest.cxx | 6 +- Testing/Code/IO/otbShortImageIOTest.cxx | 4 +- Testing/Code/IO/otbShortRGBImageIOTest.cxx | 2 +- Testing/Code/IO/otbSpatialObjectDXFReader.cxx | 26 +-- .../IO/otbStreamingImageFileWriterTest.cxx | 6 +- ...leWriterTestCalculateNumberOfDivisions.cxx | 6 +- ...StreamingImageFileWriterWithFilterTest.cxx | 6 +- .../Code/IO/otbStreamingImageFilterTest.cxx | 6 +- .../otbStreamingShortImageFileWriterTest.cxx | 6 +- Testing/Code/IO/otbVectorDataFileReader.cxx | 8 +- .../IO/otbVectorImageFileReaderWriterTest.cxx | 6 +- Testing/Code/IO/otbVectorImageTest.cxx | 4 +- .../otbKMeansImageClassificationFilter.cxx | 6 +- Testing/Code/Learning/otbSOMClassifier.cxx | 2 +- Testing/Code/Learning/otbSOMClassifierNew.cxx | 2 +- .../Code/Learning/otbSVMClassifierImage.cxx | 8 +- .../Learning/otbSVMClassifierPointSet.cxx | 6 +- ...otbSVMImageModelEstimatorModelAccessor.cxx | 24 +- .../Learning/otbSVMImageModelEstimatorNew.cxx | 2 +- ...leKernelFunctorImageModelEstimatorTest.cxx | 10 +- Testing/Code/Learning/otbSVMModelAccessor.cxx | 12 +- .../Learning/otbSVMModelAllocateProblem.cxx | 2 +- Testing/Code/Learning/otbSVMModelCopyTest.cxx | 2 +- .../otbSVMModelGenericKernelLoadSave.cxx | 2 +- Testing/Code/Learning/otbSVMModelLoad.cxx | 2 +- Testing/Code/Learning/otbSVMModelLoadSave.cxx | 2 +- Testing/Code/Learning/otbSVMModelNew.cxx | 2 +- .../otbSVMPointSetModelEstimatorNew.cxx | 2 +- ...ologyIterativeDecompositionImageFilter.cxx | 54 ++--- .../otbMorphologicalPyramidAnalysisFilter.cxx | 10 +- .../otbCreateInverseForwardSensorModel.cxx | 2 +- .../otbCreateProjectionWithOTB.cxx | 2 +- .../otbOrthoRectificationFilter.cxx | 2 +- .../otbOrthoRectificationFilterWithDEM.cxx | 10 +- .../otbOrthoRectificationMonoThreadFilter.cxx | 2 +- .../Code/Projections/otbRegionProjection.cxx | 208 ++++++++--------- .../otbRegionProjectionResampler.cxx | 16 +- .../Projections/otbSensorImageDEMToCarto.cxx | 216 ++++++++--------- .../Projections/otbSensorImageToCarto.cxx | 220 +++++++++--------- .../Radiometry/otbFilterFunctionValues.cxx | 4 +- ...lRAndBAndNIRVegetationIndexImageFilter.cxx | 8 +- ...annelRAndNIRVegetationIndexImageFilter.cxx | 52 ++--- ...bRAndBAndNIRVegetationIndexImageFilter.cxx | 10 +- .../otbRAndNIRVegetationIndexImageFilter.cxx | 52 ++--- ...ToRomaniaSurfaceReflectanceImageFilter.cxx | 8 +- ...SIXSTraitsComputeAtmosphericParameters.cxx | 42 ++-- ...annelRAndNIRVegetationIndexImageFilter.cxx | 16 +- ...ASetBRAndNIRVegetationIndexImageFilter.cxx | 16 +- ...eAdjencyEffect6SCorrectionSchemeFilter.cxx | 8 +- .../otbHHnHVPolarimetricSynthesisFilter.cxx | 2 +- ...otbHHnHVnVVPolarimetricSynthesisFilter.cxx | 2 +- ...ltiChannelsPolarimetricSynthesisFilter.cxx | 2 +- ...ChannelsPolarimetricSynthesisFilterNew.cxx | 2 +- .../otbPolarimetricSynthesisFilter.cxx | 2 +- .../otbPolarimetricSynthesisFilterNew.cxx | 2 +- .../otbVHnVVPolarimetricSynthesisFilter.cxx | 2 +- ...ltiChannelsPolarimetricSynthesisFilter.cxx | 2 +- .../otbImageToImageRCC8Calculator.cxx | 82 +++---- .../otbPolygonToPolygonRCC8Calculator.cxx | 90 +++---- .../Code/SpatialReasoning/otbRCC8Graph.cxx | 50 ++-- .../otbRCC8GraphFileReader.cxx | 110 ++++----- .../SpatialReasoning/otbRCC8VertexBase.cxx | 36 +-- .../otbRCC8VertexWithCompacity.cxx | 38 +-- Testing/Fa/AlignementsQB.cxx | 8 +- Testing/Fa/MapActivation.cxx | 34 +-- 188 files changed, 1509 insertions(+), 1509 deletions(-) diff --git a/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx b/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx index 0a5e8a3d74..e15c05f3f8 100644 --- a/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx +++ b/Testing/Code/BasicFilters/otbChangeLabelImageFilter.cxx @@ -96,11 +96,11 @@ int otbChangeLabelImageFilterTest(int argc, char * argv[]) std::cout << (double) input<<": "; for(unsigned int j=0; j<filter->GetNumberOfComponentsPerPixel(); j++) { - std::cout<< " " << (double)output[j]; - if( (double)output[j] > (double)maxRemainingLabel ) - { - pass = false; - } + std::cout<< " " << (double)output[j]; + if( (double)output[j] > (double)maxRemainingLabel ) + { + pass = false; + } } std::cout<<std::endl; diff --git a/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx b/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx index d5960a3175..0a4b7eab84 100644 --- a/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx +++ b/Testing/Code/BasicFilters/otbConvolutionImageFilterNew.cxx @@ -26,7 +26,7 @@ int otbConvolutionImageFilterNew( int argc, char * argv[] ) { typedef double InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/BasicFilters/otbFrostFilter.cxx b/Testing/Code/BasicFilters/otbFrostFilter.cxx index 0c1b22ad6b..66057a1f97 100644 --- a/Testing/Code/BasicFilters/otbFrostFilter.cxx +++ b/Testing/Code/BasicFilters/otbFrostFilter.cxx @@ -39,8 +39,8 @@ int otbFrostFilter( int argc, char * argv[] ) double Deramp ((double)::atof(argv[5])); typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/BasicFilters/otbFrostFilterNew.cxx b/Testing/Code/BasicFilters/otbFrostFilterNew.cxx index d22dbabb59..33100521db 100644 --- a/Testing/Code/BasicFilters/otbFrostFilterNew.cxx +++ b/Testing/Code/BasicFilters/otbFrostFilterNew.cxx @@ -32,8 +32,8 @@ int otbFrostFilterNew( int argc, char * argv[] ) { typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx b/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx index 8c6b9ee58d..a914bb97e3 100644 --- a/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx +++ b/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx @@ -64,23 +64,23 @@ int otbInverseLogPolarTransform(int argc, char* argv[]) double rho = vcl_sqrt((*it)[0]*(*it)[0]+(*it)[1]*(*it)[1]); if(rho>0) - { - pprime[0]=(1./angularStep)*vcl_asin((*it)[1]/rho); - pprime[0]=pprime[0]*(180./M_PI); - // Deplacing the range to [0,90], [270,360] - pprime[0]= pprime[0]>0. ? pprime[0] : pprime[0]+360.; - // Avoiding asin indetermination - if(p[0]>=0) - { - pprime[0]=pprime[0]<90. ? pprime[0]+90. : pprime[0]-90.; - } - pprime[1]=(1./radialStep)*vcl_log(rho); - } + { + pprime[0]=(1./angularStep)*vcl_asin((*it)[1]/rho); + pprime[0]=pprime[0]*(180./M_PI); + // Deplacing the range to [0,90], [270,360] + pprime[0]= pprime[0]>0. ? pprime[0] : pprime[0]+360.; + // Avoiding asin indetermination + if(p[0]>=0) + { + pprime[0]=pprime[0]<90. ? pprime[0]+90. : pprime[0]-90.; + } + pprime[1]=(1./radialStep)*vcl_log(rho); + } else - { - pprime[0]=400.; - pprime[1]=0.; - } + { + pprime[0]=400.; + pprime[1]=0.; + } file <<"Original Point: "<<(*it)<<", Reference point: "<<pprime<<", Transformed point: "<<p<<std::endl; } diff --git a/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx b/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx index 3dbe82a247..492989815a 100644 --- a/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx +++ b/Testing/Code/BasicFilters/otbInverseLogPolarTransformResample.cxx @@ -62,7 +62,7 @@ int otbInverseLogPolarTransformResample(int argc, char* argv[]) params[1]=0.5*static_cast<double>(size[1]); params[2]=360./reader->GetOutput()->GetLargestPossibleRegion().GetSize()[0]; params[3]=vcl_log(vcl_sqrt(vcl_pow(static_cast<double>(size[0]),2.) - +vcl_pow(static_cast<double>(size[1]),2.))/2)/reader->GetOutput()->GetLargestPossibleRegion().GetSize()[1]; + +vcl_pow(static_cast<double>(size[1]),2.))/2)/reader->GetOutput()->GetLargestPossibleRegion().GetSize()[1]; transform->SetParameters(params); diff --git a/Testing/Code/BasicFilters/otbLeeFilter.cxx b/Testing/Code/BasicFilters/otbLeeFilter.cxx index 259d5c21aa..866249c123 100644 --- a/Testing/Code/BasicFilters/otbLeeFilter.cxx +++ b/Testing/Code/BasicFilters/otbLeeFilter.cxx @@ -38,8 +38,8 @@ int otbLeeFilter( int argc, char * argv[] ) double NbLooks((double)::atof(argv[5])); typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx b/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx index 13e1e3bf1a..45ffe23493 100644 --- a/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx +++ b/Testing/Code/BasicFilters/otbLogPolarTransformResample.cxx @@ -56,7 +56,7 @@ int otbLogPolarTransformResample(int argc, char* argv[]) params[1]=0.5*static_cast<double>(reader->GetOutput()->GetLargestPossibleRegion().GetSize()[1]); params[2]=360./1024; params[3]=vcl_log(vcl_sqrt(vcl_pow(static_cast<double>(reader->GetOutput()->GetLargestPossibleRegion().GetSize()[0]),2) - +vcl_pow(static_cast<double>(reader->GetOutput()->GetLargestPossibleRegion().GetSize()[1]),2))/2)/512; + +vcl_pow(static_cast<double>(reader->GetOutput()->GetLargestPossibleRegion().GetSize()[1]),2))/2)/512; transform->SetParameters(params); ImageType::SizeType size; diff --git a/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx b/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx index 3217aafb6d..9604614a77 100644 --- a/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx +++ b/Testing/Code/BasicFilters/otbOverlapSaveConvolutionImageFilterNew.cxx @@ -26,7 +26,7 @@ int otbOverlapSaveConvolutionImageFilterNew( int argc, char * argv[] ) { typedef double InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx b/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx index d03fd93c31..1628ffe3a8 100644 --- a/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx +++ b/Testing/Code/BasicFilters/otbPersistentVectorizationFilter.cxx @@ -53,11 +53,11 @@ int otbPersistentVectorizationFilter(int argc, char * argv[]) ++it) { for(unsigned int i = 0; i < it.Get()->GetVertexList()->Size();++i) - { - f<<"[ "<<it.Get()->GetVertexList()->GetElement(i)[0] - <<", "<<it.Get()->GetVertexList()->GetElement(i)[1] - <<"] "; - } + { + f<<"[ "<<it.Get()->GetVertexList()->GetElement(i)[0] + <<", "<<it.Get()->GetVertexList()->GetElement(i)[1] + <<"] "; + } f<<std::endl; } diff --git a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx index 0ae6a1fc37..13eb62597e 100644 --- a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx +++ b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx @@ -43,7 +43,7 @@ int otbStreamingResampleImageFilterCompareWithITK(int argc, char * argv[]) typedef otb::Image<InputPixelType,Dimension> InputImageType; typedef otb::Image<OutputPixelType,Dimension> OutputImageType; - // typedef otb::VectorImage<OutputPixelType,Dimension> InputVectorImageType; + // typedef otb::VectorImage<OutputPixelType,Dimension> InputVectorImageType; typedef otb::ImageFileReader<InputImageType> ReaderType; typedef otb::ImageFileWriter<OutputImageType> WriterType; typedef otb::StreamingImageFileWriter<OutputImageType> StreamingWriterType; @@ -99,7 +99,7 @@ int otbStreamingResampleImageFilterCompareWithITK(int argc, char * argv[]) writerITKFilter->Update(); writerOTBFilter->SetInput(resamplerOTB->GetOutput()); - // writerOTBFilter->SetTilingStreamDivisions(); + // writerOTBFilter->SetTilingStreamDivisions(); writerOTBFilter->SetFileName(outputOTBFilename); writerOTBFilter->SetNumberOfStreamDivisions(10); writerOTBFilter->Update(); diff --git a/Testing/Code/Common/otbDrawLineSpatialObject.cxx b/Testing/Code/Common/otbDrawLineSpatialObject.cxx index 05635ef2b9..604c814ae5 100644 --- a/Testing/Code/Common/otbDrawLineSpatialObject.cxx +++ b/Testing/Code/Common/otbDrawLineSpatialObject.cxx @@ -45,9 +45,9 @@ int otbDrawLineSpatialObject( int argc, char* argv[] ) double Vy((double)::atof(argv[6])); - typedef double InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -67,7 +67,7 @@ int otbDrawLineSpatialObject( int argc, char* argv[] ) writer->SetFileName( outputFilename ); // Definition of the line - typedef itk::LineSpatialObject<2> LineType; + typedef itk::LineSpatialObject<2> LineType; LineType::PointListType list; LineType::LinePointType point; diff --git a/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx b/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx index f384b8cd26..0745f1b8e6 100644 --- a/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx +++ b/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx @@ -39,9 +39,9 @@ int otbDrawLineSpatialObjectList( int argc, char* argv[] ) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef double InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -60,8 +60,8 @@ int otbDrawLineSpatialObjectList( int argc, char* argv[] ) reader->SetFileName( inputFilename ); writer->SetFileName( outputFilename ); - typedef otb::LineSpatialObjectList LinesListType; - typedef LinesListType::LineType LineType; + typedef otb::LineSpatialObjectList LinesListType; + typedef LinesListType::LineType LineType; LinesListType::Pointer list = LinesListType::New(); LineType::PointListType pointList; @@ -127,10 +127,10 @@ int otbDrawLineSpatialObjectList( int argc, char* argv[] ) list->push_back(line3); - /* LinesListType::const_iterator it; - std::cout<<list.size()<<std::endl; - for (it=list.begin(); it!=list.end(); it++) - std::cout<< (*it) <<std::endl;*/ + /* LinesListType::const_iterator it; + std::cout<<list.size()<<std::endl; + for (it=list.begin(); it!=list.end(); it++) + std::cout<< (*it) <<std::endl;*/ filter->SetInputLineSpatialObjectList(list); @@ -141,7 +141,7 @@ int otbDrawLineSpatialObjectList( int argc, char* argv[] ) - return EXIT_SUCCESS; + return EXIT_SUCCESS; } diff --git a/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx b/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx index 02a8a6cd58..a7bb9b221f 100644 --- a/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx +++ b/Testing/Code/Common/otbDrawLineSpatialObjectListNew.cxx @@ -29,9 +29,9 @@ int otbDrawLineSpatialObjectListNew( int argc, char* argv[] ) { - typedef double InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx b/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx index 110199968d..17e56e0285 100644 --- a/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx +++ b/Testing/Code/Common/otbDrawLineSpatialObjectNew.cxx @@ -29,9 +29,9 @@ int otbDrawLineSpatialObjectNew( int argc, char* argv[] ) { - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/Common/otbExtractROI.cxx b/Testing/Code/Common/otbExtractROI.cxx index f0fab55a5f..0f0be7407b 100644 --- a/Testing/Code/Common/otbExtractROI.cxx +++ b/Testing/Code/Common/otbExtractROI.cxx @@ -33,8 +33,8 @@ int otbExtractROI( int argc, char * argv[] ) unsigned int sizeX((unsigned int)::atoi(argv[5])); unsigned int sizeY((unsigned int)::atoi(argv[6])); - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; typedef otb::ExtractROI< InputPixelType, OutputPixelType > FilterType; diff --git a/Testing/Code/Common/otbExtractROI2.cxx b/Testing/Code/Common/otbExtractROI2.cxx index 18d4edc7a5..f3bd212a2e 100644 --- a/Testing/Code/Common/otbExtractROI2.cxx +++ b/Testing/Code/Common/otbExtractROI2.cxx @@ -33,8 +33,8 @@ int otbExtractROI2( int argc, char * argv[] ) unsigned int sizeX((unsigned int)::atoi(argv[5])); unsigned int sizeY((unsigned int)::atoi(argv[6])); - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; typedef otb::ExtractROI< InputPixelType, OutputPixelType > FilterType; diff --git a/Testing/Code/Common/otbExtractROINew.cxx b/Testing/Code/Common/otbExtractROINew.cxx index a048a41d99..d69b465517 100644 --- a/Testing/Code/Common/otbExtractROINew.cxx +++ b/Testing/Code/Common/otbExtractROINew.cxx @@ -26,8 +26,8 @@ int otbExtractROINew( int argc, char * argv[] ) { - typedef std::complex<float> InputPixelType; - typedef std::complex<double> OutputPixelType; + typedef std::complex<float> InputPixelType; + typedef std::complex<double> OutputPixelType; typedef otb::ExtractROI< InputPixelType, OutputPixelType > FilterType; diff --git a/Testing/Code/Common/otbHistogramStatisticsFunction.cxx b/Testing/Code/Common/otbHistogramStatisticsFunction.cxx index 6d129260eb..1a853d189d 100644 --- a/Testing/Code/Common/otbHistogramStatisticsFunction.cxx +++ b/Testing/Code/Common/otbHistogramStatisticsFunction.cxx @@ -67,8 +67,8 @@ int otbHistogramStatisticsFunction(int argc, char* argv[]) if(vcl_abs(Entropy-vcl_log(static_cast<double>(NbOfBins)))>0.00001 ) { - std::cout << "Error in entropy estimation" << std::endl; - return EXIT_FAILURE; + std::cout << "Error in entropy estimation" << std::endl; + return EXIT_FAILURE; } Mean = HistogramStatisticsFunction->GetMean()[0]; @@ -76,8 +76,8 @@ int otbHistogramStatisticsFunction(int argc, char* argv[]) if( Mean != NbOfBins/2. ) { - std::cout << "Error in mean estimation" << std::endl; - return EXIT_FAILURE; + std::cout << "Error in mean estimation" << std::endl; + return EXIT_FAILURE; } Covariance = HistogramStatisticsFunction->GetCovariance()[0]; @@ -85,21 +85,21 @@ int otbHistogramStatisticsFunction(int argc, char* argv[]) if( Covariance != 0 ) { - std::cout << "Error in covariance estimation" << std::endl; - return EXIT_FAILURE; + std::cout << "Error in covariance estimation" << std::endl; + return EXIT_FAILURE; } // create histogram just all value equal to zero except the first one for (HistogramType::Iterator iter = histogram->Begin(); iter != histogram->End(); ++iter) { if(iter == histogram->Begin()) - { - iter.SetFrequency(1.0); - } - else - { - iter.SetFrequency(0.0); - } + { + iter.SetFrequency(1.0); + } + else + { + iter.SetFrequency(0.0); + } } HistogramStatisticsFunction->Update(); @@ -109,8 +109,8 @@ int otbHistogramStatisticsFunction(int argc, char* argv[]) if( Entropy!=0.0 ) { - std::cout << "Error in entropy estimation" << std::endl; - return EXIT_FAILURE; + std::cout << "Error in entropy estimation" << std::endl; + return EXIT_FAILURE; } Mean = HistogramStatisticsFunction->GetMean()[0]; @@ -118,8 +118,8 @@ int otbHistogramStatisticsFunction(int argc, char* argv[]) if( Mean != 0.5 ) { - std::cout << "Error in mean estimation" << std::endl; - return EXIT_FAILURE; + std::cout << "Error in mean estimation" << std::endl; + return EXIT_FAILURE; } Covariance = HistogramStatisticsFunction->GetCovariance()[0]; @@ -127,8 +127,8 @@ int otbHistogramStatisticsFunction(int argc, char* argv[]) if( Covariance != 0 ) { - std::cout << "Error in covariance estimation" << std::endl; - return EXIT_FAILURE; + std::cout << "Error in covariance estimation" << std::endl; + return EXIT_FAILURE; } return EXIT_SUCCESS; diff --git a/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx b/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx index f065196c74..e2a8b15e06 100644 --- a/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx +++ b/Testing/Code/Common/otbImageToLineSpatialObjectListNew.cxx @@ -29,8 +29,8 @@ int otbImageToLineSpatialObjectListNew( int argc, char* argv[] ) { - typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/Common/otbList.cxx b/Testing/Code/Common/otbList.cxx index 10d6ac1ca5..443a6c4be4 100644 --- a/Testing/Code/Common/otbList.cxx +++ b/Testing/Code/Common/otbList.cxx @@ -80,8 +80,8 @@ int otbList(int argc, char * argv[]) // Testing erase operation imageList->Erase(2); otbControlConditionTestMacro((imageList->Size()!=2) - ||(imageList->GetNthElement(0)!=reader1->GetOutput()) - ||(imageList->GetNthElement(1)!=reader2->GetOutput()),"Erase(3)"); + ||(imageList->GetNthElement(0)!=reader1->GetOutput()) + ||(imageList->GetNthElement(1)!=reader2->GetOutput()),"Erase(3)"); // Testing iterator ImageListType::Iterator iter = imageList->Begin(); @@ -101,14 +101,14 @@ int otbList(int argc, char * argv[]) iter = imageList->Begin(); index=0; otbControlConditionTestMacro(imageList->GetNthElement(0) != iter.Get(), - "Iterator != GetNthElement(0)"); + "Iterator != GetNthElement(0)"); otbControlConditionTestMacro(imageList->GetNthElement(1) != (iter+1).Get(), - "Iterator+1 != GetNthElement(1)"); + "Iterator+1 != GetNthElement(1)"); ++iter; otbControlConditionTestMacro(imageList->GetNthElement(1) != iter.Get(), - "Iterator != GetNthElement(1)"); + "Iterator != GetNthElement(1)"); otbControlConditionTestMacro(imageList->GetNthElement(0) != (iter-1).Get(), - "Iterator-1 != GetNthElement(0)"); + "Iterator-1 != GetNthElement(0)"); // Testing const iterator ImageListType::ConstIterator constIter = imageList->Begin(); diff --git a/Testing/Code/Common/otbMirrorBoundaryConditionTest.cxx b/Testing/Code/Common/otbMirrorBoundaryConditionTest.cxx index a223c4d732..8c70a0a1c6 100644 --- a/Testing/Code/Common/otbMirrorBoundaryConditionTest.cxx +++ b/Testing/Code/Common/otbMirrorBoundaryConditionTest.cxx @@ -52,23 +52,23 @@ int otbMirrorBoundaryConditionTest(int argc, char * argv[]) for(unsigned int i = 1;i<=rad[0];++i) { for(unsigned int j = 1;j<=rad[1];++j) - { - off1[0] = -static_cast<int>(i); - off1[1] = -static_cast<int>(j); - off2[0] = i; - off2[1] = j; - - out=it.GetPixel(off1); - in = it.GetPixel(off2); - - for(unsigned int band = 0;band<reader->GetOutput()->GetNumberOfComponentsPerPixel();++band) - { - oss.str(""); - oss<<"Band "<<band<<" : OutOfBound offset: "<<off1<<" <-> value: "<<out[band]<<" != inside image offset: "<<off2<<" <-> value: "<<in[band]; - otbControlConditionTestMacro(out[band]!=in[band],oss.str().c_str()); - - } - } + { + off1[0] = -static_cast<int>(i); + off1[1] = -static_cast<int>(j); + off2[0] = i; + off2[1] = j; + + out=it.GetPixel(off1); + in = it.GetPixel(off2); + + for(unsigned int band = 0;band<reader->GetOutput()->GetNumberOfComponentsPerPixel();++band) + { + oss.str(""); + oss<<"Band "<<band<<" : OutOfBound offset: "<<off1<<" <-> value: "<<out[band]<<" != inside image offset: "<<off2<<" <-> value: "<<in[band]; + otbControlConditionTestMacro(out[band]!=in[band],oss.str().c_str()); + + } + } } @@ -83,20 +83,20 @@ int otbMirrorBoundaryConditionTest(int argc, char * argv[]) for(unsigned int i = 0;i<rad[0];++i) { for(unsigned int j = 0;j<rad[1];++j) - { - off1[0] = -static_cast<int>(i); - off1[1] = -static_cast<int>(j); - off2[0] = i; - off2[1] = j; - - out=it.GetPixel(off1); - in = it.GetPixel(off2); - - for(unsigned int band = 0;band<reader->GetOutput()->GetNumberOfComponentsPerPixel();++band) - { - resp = resp && (out[band]==in[band]); - } - } + { + off1[0] = -static_cast<int>(i); + off1[1] = -static_cast<int>(j); + off2[0] = i; + off2[1] = j; + + out=it.GetPixel(off1); + in = it.GetPixel(off2); + + for(unsigned int band = 0;band<reader->GetOutput()->GetNumberOfComponentsPerPixel();++band) + { + resp = resp && (out[band]==in[band]); + } + } } otbControlConditionTestMacro(resp,"All symmetrical value of the iterator are equal in the center of the image. their might be a problem."); diff --git a/Testing/Code/Common/otbMultiChannelExtractROI.cxx b/Testing/Code/Common/otbMultiChannelExtractROI.cxx index f8bde6bc9b..ba528b06e8 100644 --- a/Testing/Code/Common/otbMultiChannelExtractROI.cxx +++ b/Testing/Code/Common/otbMultiChannelExtractROI.cxx @@ -39,30 +39,30 @@ int generic_otbMultiChannelExtractROI( int argc, char * argv[], const char * inp while ( argv[cpt] != NULL ) { std::string strArgv(argv[cpt]); - if ( strArgv == "-startX" ) { extractROIFilter->SetStartX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} - else if ( strArgv == "-startY" ) { extractROIFilter->SetStartY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} - else if ( strArgv == "-sizeX" ) { extractROIFilter->SetSizeX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} - else if ( strArgv == "-sizeY" ) { extractROIFilter->SetSizeY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + if ( strArgv == "-startX" ) { extractROIFilter->SetStartX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + else if ( strArgv == "-startY" ) { extractROIFilter->SetStartY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + else if ( strArgv == "-sizeX" ) { extractROIFilter->SetSizeX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + else if ( strArgv == "-sizeY" ) { extractROIFilter->SetSizeY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} else if ( strArgv == "-channels" ) - { - cpt++; - bool searchChannels(true); - while (searchChannels==true) - { - if ( argv[cpt] == NULL ) { searchChannels = false;} - else - //Regarde si ce n'est pas une autre otption - { - if ( argv[cpt][0] == '-' ) { searchChannels = false;} - else - { - extractROIFilter->SetChannel((unsigned int)::atoi(argv[cpt]) ); - std::cout <<" ->SetChannel("<<::atoi(argv[cpt])<<")"<<std::endl; - cpt++;nbcanaux++; - } - } - } - } + { + cpt++; + bool searchChannels(true); + while (searchChannels==true) + { + if ( argv[cpt] == NULL ) { searchChannels = false;} + else + //Regarde si ce n'est pas une autre otption + { + if ( argv[cpt][0] == '-' ) { searchChannels = false;} + else + { + extractROIFilter->SetChannel((unsigned int)::atoi(argv[cpt]) ); + std::cout <<" ->SetChannel("<<::atoi(argv[cpt])<<")"<<std::endl; + cpt++;nbcanaux++; + } + } + } + } } // Resume de la ligne de commande diff --git a/Testing/Code/Common/otbMultiChannelExtractROINew.cxx b/Testing/Code/Common/otbMultiChannelExtractROINew.cxx index f7f4a0e57f..1fc972797c 100644 --- a/Testing/Code/Common/otbMultiChannelExtractROINew.cxx +++ b/Testing/Code/Common/otbMultiChannelExtractROINew.cxx @@ -22,11 +22,11 @@ int otbMultiChannelExtractROINew ( int argc, char * argv[] ) { - // typedef unsigned char InputPixelType; - // typedef unsigned char OutputPixelType; + // typedef unsigned char InputPixelType; + // typedef unsigned char OutputPixelType; - typedef std::complex<float> InputPixelType; - typedef std::complex<double> OutputPixelType; + typedef std::complex<float> InputPixelType; + typedef std::complex<double> OutputPixelType; typedef otb::MultiChannelExtractROI< InputPixelType, OutputPixelType > ExtractROIFilterType; diff --git a/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx b/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx index be64712aad..c4cbbb8101 100644 --- a/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx +++ b/Testing/Code/Common/otbMultiToMonoChannelExtractROI.cxx @@ -34,10 +34,10 @@ int generic_otbMultiToMonoChannelExtractROI ( int argc, char * argv[], const cha while ( argv[cpt] != NULL ) { std::string strArgv(argv[cpt]); - if ( strArgv == "-startX" ) { extractROIFilter->SetStartX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} - else if ( strArgv == "-startY" ) { extractROIFilter->SetStartY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} - else if ( strArgv == "-sizeX" ) { extractROIFilter->SetSizeX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} - else if ( strArgv == "-sizeY" ) { extractROIFilter->SetSizeY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + if ( strArgv == "-startX" ) { extractROIFilter->SetStartX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + else if ( strArgv == "-startY" ) { extractROIFilter->SetStartY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetStartY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + else if ( strArgv == "-sizeX" ) { extractROIFilter->SetSizeX((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeX("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} + else if ( strArgv == "-sizeY" ) { extractROIFilter->SetSizeY((unsigned long)::atoi(argv[cpt+1]));std::cout <<" ->SetSizeY("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} else if ( strArgv == "-channel" ) { extractROIFilter->SetChannel((unsigned int)::atoi(argv[cpt+1]));std::cout <<" ->SetChannel("<<::atoi(argv[cpt+1])<<")"<<std::endl;cpt += 2;} } diff --git a/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx b/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx index 61dfedae37..cfa19a5d71 100644 --- a/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx +++ b/Testing/Code/Common/otbMultiToMonoChannelExtractROINew.cxx @@ -22,11 +22,11 @@ int otbMultiToMonoChannelExtractROINew ( int argc, char * argv[] ) { - // typedef unsigned char InputPixelType; - // typedef unsigned char OutputPixelType; + // typedef unsigned char InputPixelType; + // typedef unsigned char OutputPixelType; - typedef std::complex<float> InputPixelType; - typedef std::complex<double> OutputPixelType; + typedef std::complex<float> InputPixelType; + typedef std::complex<double> OutputPixelType; typedef otb::MultiToMonoChannelExtractROI< InputPixelType, OutputPixelType > ExtractROIFilterType; diff --git a/Testing/Code/Common/otbObjectList.cxx b/Testing/Code/Common/otbObjectList.cxx index c0d9605dd7..2811e29b0e 100644 --- a/Testing/Code/Common/otbObjectList.cxx +++ b/Testing/Code/Common/otbObjectList.cxx @@ -80,8 +80,8 @@ int otbObjectList(int argc, char * argv[]) // Testing erase operation imageList->Erase(2); otbControlConditionTestMacro((imageList->Size()!=2) - ||(imageList->GetNthElement(0)!=reader1->GetOutput()) - ||(imageList->GetNthElement(1)!=reader2->GetOutput()),"Erase(3)"); + ||(imageList->GetNthElement(0)!=reader1->GetOutput()) + ||(imageList->GetNthElement(1)!=reader2->GetOutput()),"Erase(3)"); // Testing iterator ImageListType::Iterator iter = imageList->Begin(); diff --git a/Testing/Code/Common/otbPathListToHistogramGenerator.cxx b/Testing/Code/Common/otbPathListToHistogramGenerator.cxx index 7335296d78..07fceed2e5 100644 --- a/Testing/Code/Common/otbPathListToHistogramGenerator.cxx +++ b/Testing/Code/Common/otbPathListToHistogramGenerator.cxx @@ -30,10 +30,10 @@ int otbPathListToHistogramGenerator( int argc, char* argv[] ) { unsigned int NbOfBins((unsigned int)::atoi(argv[1])); unsigned int NbOfPointsPerHistogram((unsigned int)::atoi(argv[2])); - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::PolyLineParametricPath< Dimension > PathType; typedef PathType::Pointer PathPointer; - typedef std::vector< PathPointer > PathListType; + typedef std::vector< PathPointer > PathListType; typedef otb::OrientationPathFunction<PathType> FunctionType; @@ -83,10 +83,10 @@ int otbPathListToHistogramGenerator( int argc, char* argv[] ) for( unsigned int bin=0; bin < histogramSize; bin++ ) { if(histogram->GetFrequency( bin, 0 ) !=NbOfPointsPerHistogram) - { - std::cout << "Error in histogram value !" << std::endl; - return EXIT_FAILURE; - } + { + std::cout << "Error in histogram value !" << std::endl; + return EXIT_FAILURE; + } std::cout << "bin = " << bin << " frequency = "; std::cout << histogram->GetFrequency( bin, 0 ) << std::endl; } diff --git a/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx b/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx index 3ac945685f..d311fd8a0b 100644 --- a/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx +++ b/Testing/Code/Common/otbPathListToHistogramGeneratorNew.cxx @@ -27,7 +27,7 @@ int otbPathListToHistogramGeneratorNew( int argc, char* argv[] ) { - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::PolyLineParametricPath< Dimension > PathType; typedef otb::OrientationPathFunction<PathType> FunctionType; diff --git a/Testing/Code/Common/otbTestCommandLineArgumentParser.cxx b/Testing/Code/Common/otbTestCommandLineArgumentParser.cxx index 47f9e694b4..48be5032d4 100644 --- a/Testing/Code/Common/otbTestCommandLineArgumentParser.cxx +++ b/Testing/Code/Common/otbTestCommandLineArgumentParser.cxx @@ -42,11 +42,11 @@ int otbTestCommandLineArgumentParser( int argc, char * argv[] ) unsigned int lEntier = parseResult->GetParameterUInt("-entier"); std::cout << "Entier : "<<lEntier<<std::endl; - if( parseResult->IsOptionPresent("-deuxentiers")) - { - std::cout << "Entier : "<<lEntier<<std::endl; - } - double lDouble = parseResult->GetParameterDouble("-double"); + if( parseResult->IsOptionPresent("-deuxentiers")) + { + std::cout << "Entier : "<<lEntier<<std::endl; + } + double lDouble = parseResult->GetParameterDouble("-double"); std::cout << "Double : "<<lDouble<<std::endl; diff --git a/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx b/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx index ecd13765bc..32f9f7a651 100644 --- a/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx +++ b/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx @@ -46,11 +46,11 @@ int otbTestCommandLineArgumentParserWithError( int argc, char * argv[] ) unsigned int lEntier = parseResult->GetParameterUInt("-entier"); std::cout << "Entier : "<<lEntier<<std::endl; if( parseResult->IsOptionPresent("-deuxentiers")) - { - //unsigned int lEntierDeux = otb::GetParameter<unsigned int>(parseResult,"-deuxentiers",1); - unsigned int lEntierDeux = parseResult->GetParameterUInt("-deuxentiers",1); - std::cout << "Entier : "<<lEntierDeux<<std::endl; - } + { + //unsigned int lEntierDeux = otb::GetParameter<unsigned int>(parseResult,"-deuxentiers",1); + unsigned int lEntierDeux = parseResult->GetParameterUInt("-deuxentiers",1); + std::cout << "Entier : "<<lEntierDeux<<std::endl; + } //double lDouble = otb::GetParameter<double>(parseResult,"-double"); double lDouble = parseResult->GetParameterDouble("-double"); std::cout << "Double : "<<lDouble<<std::endl; diff --git a/Testing/Code/DisparityMap/otbCenteredRigidDeformationFieldEstimation.cxx b/Testing/Code/DisparityMap/otbCenteredRigidDeformationFieldEstimation.cxx index 04df4593ac..2093567c18 100644 --- a/Testing/Code/DisparityMap/otbCenteredRigidDeformationFieldEstimation.cxx +++ b/Testing/Code/DisparityMap/otbCenteredRigidDeformationFieldEstimation.cxx @@ -142,11 +142,11 @@ int otbCenteredRigidDeformationFieldEstimation(int argc, char* argv[]) for(unsigned int x=0; x<NumberOfXNodes; x++) for(unsigned int y=0; y<NumberOfYNodes; y++) { - PointType p; - p[0] = firstNodeIndex[0]+x*step; // x coordinate - p[1] = firstNodeIndex[1]+y*step; // y coordinate - std::cout << "Id: " << nodeCounter << " -> " << p << std::endl; - nodes->SetPoint( nodeCounter++, p ); + PointType p; + p[0] = firstNodeIndex[0]+x*step; // x coordinate + p[1] = firstNodeIndex[1]+y*step; // y coordinate + std::cout << "Id: " << nodeCounter << " -> " << p << std::endl; + nodes->SetPoint( nodeCounter++, p ); } // Fix to avoid recomputing the disparity for each deformation field generation method. diff --git a/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx b/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx index cbb004793a..a86fd22c5e 100644 --- a/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx +++ b/Testing/Code/DisparityMap/otbDisparityMapEstimationMethod.cxx @@ -134,8 +134,8 @@ int otbDisparityMapEstimationMethod(int argc, char* argv[]) PointDataIteratorType itData = pointSet->GetPointData()->Begin(); std::cout<<"Point data size: "<<pointSet->GetPointData()->Size()<<std::endl; for(;it!=pointSet->GetPoints()->End() - &&itData!=pointSet->GetPointData()->End() - ;++it,++itData) + &&itData!=pointSet->GetPointData()->End() + ;++it,++itData) { out<<"Point "<<it.Value()<<" -> transform parameters: "; out<<itData.Value(); diff --git a/Testing/Code/DisparityMap/otbEuler2DDeformationFieldEstimation.cxx b/Testing/Code/DisparityMap/otbEuler2DDeformationFieldEstimation.cxx index 34f08c9e8b..2b6b59d7f6 100644 --- a/Testing/Code/DisparityMap/otbEuler2DDeformationFieldEstimation.cxx +++ b/Testing/Code/DisparityMap/otbEuler2DDeformationFieldEstimation.cxx @@ -142,11 +142,11 @@ int otbEuler2DDeformationFieldEstimation(int argc, char* argv[]) for(unsigned int x=0; x<NumberOfXNodes; x++) for(unsigned int y=0; y<NumberOfYNodes; y++) { - PointType p; - p[0] = firstNodeIndex[0]+x*step; // x coordinate - p[1] = firstNodeIndex[1]+y*step; // y coordinate - std::cout << "Id: " << nodeCounter << " -> " << p << std::endl; - nodes->SetPoint( nodeCounter++, p ); + PointType p; + p[0] = firstNodeIndex[0]+x*step; // x coordinate + p[1] = firstNodeIndex[1]+y*step; // y coordinate + std::cout << "Id: " << nodeCounter << " -> " << p << std::endl; + nodes->SetPoint( nodeCounter++, p ); } // Fix to avoid recomputing the disparity for each deformation field generation method. diff --git a/Testing/Code/DisparityMap/otbTranslationDeformationFieldEstimation.cxx b/Testing/Code/DisparityMap/otbTranslationDeformationFieldEstimation.cxx index 195ee52f26..65155b9ca5 100644 --- a/Testing/Code/DisparityMap/otbTranslationDeformationFieldEstimation.cxx +++ b/Testing/Code/DisparityMap/otbTranslationDeformationFieldEstimation.cxx @@ -139,11 +139,11 @@ int otbTranslationDeformationFieldEstimation(int argc, char* argv[]) for(unsigned int x=0; x<NumberOfXNodes; x++) for(unsigned int y=0; y<NumberOfYNodes; y++) { - PointType p; - p[0] = firstNodeIndex[0]+x*step; // x coordinate - p[1] = firstNodeIndex[1]+y*step; // y coordinate - std::cout << "Id: " << nodeCounter << " -> " << p << std::endl; - nodes->SetPoint( nodeCounter++, p ); + PointType p; + p[0] = firstNodeIndex[0]+x*step; // x coordinate + p[1] = firstNodeIndex[1]+y*step; // y coordinate + std::cout << "Id: " << nodeCounter << " -> " << p << std::endl; + nodes->SetPoint( nodeCounter++, p ); } // Fix to avoid recomputing the disparity for each deformation field generation method. diff --git a/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx b/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx index 3bd8bcdad7..306cf4725e 100644 --- a/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx +++ b/Testing/Code/FeatureExtraction/otbAddCarvingPathFilterNew.cxx @@ -27,14 +27,14 @@ int otbAddCarvingPathFilterNew(int argc, char* argv[]) { typedef double PixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< PixelType, Dimension > InputImageType; typedef otb::Image< PixelType, Dimension > OutputImageType; typedef itk::PolyLineParametricPath<Dimension> PathType; typedef otb::AddCarvingPathFilter<InputImageType, PathType, - OutputImageType> AddCarvingPathFilterType; + OutputImageType> AddCarvingPathFilterType; AddCarvingPathFilterType::Pointer addCarvingPathFilter = AddCarvingPathFilterType::New(); diff --git a/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx b/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx index f9606adf9b..0e7f93a4a6 100644 --- a/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx +++ b/Testing/Code/FeatureExtraction/otbAlignImageToPath.cxx @@ -46,15 +46,15 @@ int otbAlignImageToPath( int argc, char * argv[] ) const char * outputFilename = argv[2]; - typedef double InputPixelType; - typedef double OutputPixelType; - typedef double RealPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + typedef double RealPixelType; + const unsigned int Dimension = 2; - typedef itk::Image< InputPixelType, Dimension > InputImageType; - typedef itk::Image< RealPixelType, Dimension > RealImageType; + typedef itk::Image< InputPixelType, Dimension > InputImageType; + typedef itk::Image< RealPixelType, Dimension > RealImageType; - typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; typedef PathType::Pointer PathTypePointer; PathType::Pointer ltoto = PathType::New(); diff --git a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx index 3da47e466a..95fe2b61b1 100644 --- a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx +++ b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSum.cxx @@ -37,9 +37,9 @@ int otbAssociativeSymmetricalSum( int argc, char* argv[] ) const char * outputFilename = argv[3]; - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType1; typedef itk::Image< InputPixelType, Dimension > InputImageType2; diff --git a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx index 1dfe9cfc85..8afcd63eeb 100644 --- a/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx +++ b/Testing/Code/FeatureExtraction/otbAssociativeSymmetricalSumNew.cxx @@ -30,9 +30,9 @@ int otbAssociativeSymmetricalSumNew( int argc, char* argv[] ) { - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType1; typedef itk::Image< InputPixelType, Dimension > InputImageType2; diff --git a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx index 19033cac7a..e72ccc70d1 100644 --- a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx +++ b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetector.cxx @@ -41,8 +41,8 @@ int otbAssymmetricFusionOfLineDetector( int argc, char * argv[] ) unsigned int LengthLine((unsigned int)::atoi(argv[4])); typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -51,7 +51,7 @@ int otbAssymmetricFusionOfLineDetector( int argc, char * argv[] ) typedef otb::ImageFileReader< InputImageType > ReaderType; typedef otb::ImageFileWriter< OutputImageType > WriterType; - typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; + typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef otb::AssymmetricFusionOfLineDetectorImageFilter< InputImageType, OutputImageType, OutputImageDirectionType, InterpolatorType > FilterType; diff --git a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx index 58179dcbbe..2a53b5c9a1 100644 --- a/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx +++ b/Testing/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorNew.cxx @@ -36,14 +36,14 @@ int otbAssymmetricFusionOfLineDetectorNew( int argc, char * argv[] ) { typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageDirectionType; - typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; + typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef otb::AssymmetricFusionOfLineDetectorImageFilter< InputImageType, OutputImageType, OutputImageDirectionType, InterpolatorType > FilterType; diff --git a/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx index c82e4d41b7..d951445848 100644 --- a/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbBreakAngularPathListFilter.cxx @@ -49,16 +49,16 @@ int otbBreakAngularPathListFilter(int argc, char * argv[]) { if( argv[cpt][0] == '|' ) { - if( (ListPoints.size()%2) != 0 ) - { - itkGenericExceptionMacro(<<"Missing point in parameters !"); - } - MatricePoints.push_back(ListPoints); - ListPoints.clear(); + if( (ListPoints.size()%2) != 0 ) + { + itkGenericExceptionMacro(<<"Missing point in parameters !"); + } + MatricePoints.push_back(ListPoints); + ListPoints.clear(); } else { - ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); + ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); } cpt++; } @@ -82,13 +82,13 @@ int otbBreakAngularPathListFilter(int argc, char * argv[]) //Generate PathList std::cout << "List "<<std::endl; for(PointsVectorType::iterator it=(*listpos).begin() ; it != (*listpos).end() ; ++it) - { - cindex[0] = *it; - ++it; - cindex[1] = *it; - std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; - path->AddVertex(cindex); - } + { + cindex[0] = *it; + ++it; + cindex[1] = *it; + std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; + path->AddVertex(cindex); + } InputPathList->PushBack(path); } @@ -121,43 +121,43 @@ int otbBreakAngularPathListFilter(int argc, char * argv[]) file<<"MAX ANGULAR :"<<breakAngularFilter->GetMaxAngle()<< "("<<(*itAngle)<<" deg.)"<<std::endl; file<<"INPUT list of Path "<<": "<<std::endl; while(pathListIt!=InputPathList->End()) - { - file<<"Path "<<counter<<": "; - for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } - file<<std::endl; - ++pathListIt; - ++counter; - } + { + file<<"Path "<<counter<<": "; + for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } + file<<std::endl; + ++pathListIt; + ++counter; + } counter = 1; pathListIt = OutputPathList->Begin(); file<<"OUTPUT list of Path "<<": "<<std::endl; while(pathListIt!=OutputPathList->End()) - { - file<<"Path "<<counter<<": "; - for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } - file<<std::endl; - ++pathListIt; - ++counter; - } + { + file<<"Path "<<counter<<": "; + for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } + file<<std::endl; + ++pathListIt; + ++counter; + } } //Enf for angle file.close(); diff --git a/Testing/Code/FeatureExtraction/otbComplexMomentImage.cxx b/Testing/Code/FeatureExtraction/otbComplexMomentImage.cxx index ea336d5c67..153d9b776c 100644 --- a/Testing/Code/FeatureExtraction/otbComplexMomentImage.cxx +++ b/Testing/Code/FeatureExtraction/otbComplexMomentImage.cxx @@ -33,9 +33,9 @@ int otbComplexMomentImage( int argc, char * argv[] ) unsigned int q((unsigned int)::atoi(argv[3])); typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; - typedef itk::Image< InputPixelType, Dimension > InputImageType; + typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; typedef std::complex<float> ComplexType; diff --git a/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx b/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx index bcc5f4bcfe..675b90b443 100644 --- a/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx +++ b/Testing/Code/FeatureExtraction/otbComplexMomentPath.cxx @@ -32,7 +32,7 @@ int otbComplexMomentPath( int argc, char * argv[] ) const unsigned int Dimension = 2; - typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; typedef otb::ComplexMomentPathFunction< PathType > CMType; typedef CMType::ComplexType ComplexType; diff --git a/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx b/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx index dfb06fb4e5..5ac1430ba7 100644 --- a/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx +++ b/Testing/Code/FeatureExtraction/otbComplexMomentPathFloat.cxx @@ -32,7 +32,7 @@ int otbComplexMomentPathFloat( int argc, char * argv[] ) const unsigned int Dimension = 2; - typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; typedef std::complex<float> ComplexType; typedef otb::ComplexMomentPathFunction< PathType,ComplexType > CMType; diff --git a/Testing/Code/FeatureExtraction/otbDrawPath.cxx b/Testing/Code/FeatureExtraction/otbDrawPath.cxx index dce43c7327..0f21448adc 100644 --- a/Testing/Code/FeatureExtraction/otbDrawPath.cxx +++ b/Testing/Code/FeatureExtraction/otbDrawPath.cxx @@ -36,14 +36,14 @@ int otbDrawPathDessinCarre( int argc, char * argv[] ) const char * outputFilename = argv[2]; typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; - typedef itk::Image< InputPixelType, Dimension > InputImageType; + typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef InputImageType::PointType InputImagePointType; - typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; typedef otb::ImageFileReader< InputImageType > ReaderType; typedef itk::ImageFileWriter< OutputImageType > WriterType; diff --git a/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx b/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx index e591300bcb..37543cd235 100644 --- a/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx +++ b/Testing/Code/FeatureExtraction/otbDrawPathAlign.cxx @@ -39,13 +39,13 @@ int otbDrawPathAlign( int argc, char * argv[] ) typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; - typedef itk::Image< InputPixelType, Dimension > InputImageType; + typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; - typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; typedef PathType::Pointer PathPointerType; typedef otb::ImageFileReader< InputImageType > ReaderType; diff --git a/Testing/Code/FeatureExtraction/otbExtractSegments.cxx b/Testing/Code/FeatureExtraction/otbExtractSegments.cxx index 35715ec360..15a4dba625 100644 --- a/Testing/Code/FeatureExtraction/otbExtractSegments.cxx +++ b/Testing/Code/FeatureExtraction/otbExtractSegments.cxx @@ -37,7 +37,7 @@ int otbExtractSegments( int argc, char * argv[] ) const char * outputFilename = argv[3]; unsigned int PixelSuppressionRadiusX((unsigned int)::atoi(argv[4])); - float PixelSuppressionAngularBeam((float)::atof(argv[5])); + float PixelSuppressionAngularBeam((float)::atof(argv[5])); unsigned int LocalHoughRadiusX((unsigned int)::atoi(argv[6])); unsigned int LocalHoughRadiusY((unsigned int)::atoi(argv[7])); @@ -46,9 +46,9 @@ int otbExtractSegments( int argc, char * argv[] ) float FillGapsRadius((float)::atof(argv[9])); float FillGapsAngularBeam((float)::atof(argv[10])); - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx b/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx index 8bde65f17c..1c16bcc6c2 100644 --- a/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx +++ b/Testing/Code/FeatureExtraction/otbExtractSegmentsNew.cxx @@ -31,9 +31,9 @@ int otbExtractSegmentsNew( int argc, char * argv[] ) { - typedef double InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx b/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx index 1aecb72c51..9a9dc9108b 100644 --- a/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbFillGapsFilter.cxx @@ -33,9 +33,9 @@ int otbFillGapsFilter( int argc, char * argv[] ) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef double InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -43,8 +43,8 @@ int otbFillGapsFilter( int argc, char * argv[] ) typedef otb::DrawLineSpatialObjectListFilter< InputImageType,OutputImageType > FilterType; typedef otb::FillGapsFilter FillGapsFilterType; - typedef otb::LineSpatialObjectList LinesListType; - typedef LinesListType::LineType LineType; + typedef otb::LineSpatialObjectList LinesListType; + typedef LinesListType::LineType LineType; FilterType::Pointer filter = FilterType::New(); diff --git a/Testing/Code/FeatureExtraction/otbFlusserImage.cxx b/Testing/Code/FeatureExtraction/otbFlusserImage.cxx index 006a9387b4..114f7f2b8c 100644 --- a/Testing/Code/FeatureExtraction/otbFlusserImage.cxx +++ b/Testing/Code/FeatureExtraction/otbFlusserImage.cxx @@ -32,9 +32,9 @@ int otbFlusserImage( int argc, char * argv[] ) unsigned int Number = 1; typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; - typedef itk::Image< InputPixelType, Dimension > InputImageType; + typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; typedef std::complex<float> ComplexType; typedef float RealType; diff --git a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx index 201a61ded8..079c983b55 100644 --- a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilter.cxx @@ -38,13 +38,13 @@ int otbFourierMellinImageFilter(int argc, char* argv[]) const char * outputImaginaryFilename = argv[3]; typedef double InputPixelType; typedef std::complex<double> OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; typedef otb::ImageFileWriter< InputImageType> WriterType; - typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; + typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef otb::ForwardFourierMellinTransformImageFilter<InputPixelType,InterpolatorType,Dimension> FourierMellinTransformType; typedef FourierMellinTransformType::OutputImageType OutputImageType; typedef itk::ComplexToRealImageFilter<OutputImageType,InputImageType> RealFilterType; diff --git a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx index 7ff85a1033..22ae760b27 100644 --- a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx +++ b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterNew.cxx @@ -28,14 +28,14 @@ int otbFourierMellinImageFilterNew(int argc, char* argv[]) { typedef double PixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< PixelType, Dimension > InputImageType; typedef otb::Image< PixelType, Dimension > OutputImageType; - typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; + typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef otb::ForwardFourierMellinTransformImageFilter<PixelType, - InterpolatorType,Dimension> FourierMellinTransformType; + InterpolatorType,Dimension> FourierMellinTransformType; FourierMellinTransformType::Pointer fourierMellinTransform = FourierMellinTransformType::New(); diff --git a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx index 21385b17ee..e7bd3e9e5f 100644 --- a/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx +++ b/Testing/Code/FeatureExtraction/otbFourierMellinImageFilterTestFFT.cxx @@ -33,7 +33,7 @@ int otbFourierMellinImageFilterTestFFT(int argc, char* argv[]) const char * outputFilename = argv[2]; typedef double InputPixelType; typedef std::complex<InputPixelType> OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::VnlFFTRealToComplexConjugateImageFilter<InputPixelType,Dimension> FourierImageFilterType; diff --git a/Testing/Code/FeatureExtraction/otbHarrisImage.cxx b/Testing/Code/FeatureExtraction/otbHarrisImage.cxx index 068dac015a..ee7eadf283 100644 --- a/Testing/Code/FeatureExtraction/otbHarrisImage.cxx +++ b/Testing/Code/FeatureExtraction/otbHarrisImage.cxx @@ -37,11 +37,11 @@ int otbHarrisImage( int argc, char * argv[] ) double Alpha((double)::atof(argv[5])); typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; - typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; + typedef unsigned char OutputPixelType; - typedef itk::Image< InputPixelType, Dimension > InputImageType; - typedef itk::Image< OutputPixelType, Dimension > OutputImageType; + typedef itk::Image< InputPixelType, Dimension > InputImageType; + typedef itk::Image< OutputPixelType, Dimension > OutputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; typedef otb::HarrisImageFilter<InputImageType,OutputImageType> FunctionType; typedef otb::ImageFileWriter< OutputImageType > WriterType; diff --git a/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx b/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx index 1a1c5abf17..2dce80671f 100644 --- a/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx +++ b/Testing/Code/FeatureExtraction/otbHarrisToPointSet.cxx @@ -38,7 +38,7 @@ int otbHarrisToPointSet( int argc, char * argv[] ) double AlphaValue((double)::atof(argv[5])); typedef unsigned char PixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; PixelType LowerThreshold((PixelType)::atoi(argv[6])); PixelType UpperThreshold((PixelType)::atoi(argv[7])); diff --git a/Testing/Code/FeatureExtraction/otbHuImage.cxx b/Testing/Code/FeatureExtraction/otbHuImage.cxx index bfb440186a..f5d729bd90 100644 --- a/Testing/Code/FeatureExtraction/otbHuImage.cxx +++ b/Testing/Code/FeatureExtraction/otbHuImage.cxx @@ -32,9 +32,9 @@ int otbHuImage( int argc, char * argv[] ) unsigned int Number = 1; typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; - typedef itk::Image< InputPixelType, Dimension > InputImageType; + typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; typedef std::complex<float> ComplexType; typedef float RealType; diff --git a/Testing/Code/FeatureExtraction/otbHuPathNew.cxx b/Testing/Code/FeatureExtraction/otbHuPathNew.cxx index 3efeb2f8f5..71977c91d1 100644 --- a/Testing/Code/FeatureExtraction/otbHuPathNew.cxx +++ b/Testing/Code/FeatureExtraction/otbHuPathNew.cxx @@ -27,7 +27,7 @@ int otbHuPathNew( int argc, char * argv[] ) { const unsigned int Dimension = 2; - typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; typedef otb::HuPathFunction<PathType> FunctionType; typedef FunctionType::RealType RealType; diff --git a/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx b/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx index 9c5821bbc2..f756fe6c49 100644 --- a/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToCarvingPathFilterNew.cxx @@ -28,12 +28,12 @@ int otbImageToCarvingPathFilterNew(int argc, char* argv[]) { typedef double PixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< PixelType, Dimension > InputImageType; typedef itk::PolyLineParametricPath<Dimension> PathType; - typedef otb::ImageToCarvingPathFilter<InputImageType, PathType> ImageToCarvingPathFilterType; + typedef otb::ImageToCarvingPathFilter<InputImageType, PathType> ImageToCarvingPathFilterType; ImageToCarvingPathFilterType::Pointer addCarvingPathFilter = ImageToCarvingPathFilterType::New(); diff --git a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx index dc75b5512a..8b9fe19191 100644 --- a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx @@ -55,9 +55,9 @@ int otbImageToEdgePathFilter(int argc, char * argv[]) PathType * outputPath = pathFilter->GetOutput(); - typedef PathType::VertexType VertexType; - typedef PathType::VertexListType VertexListType; - typedef PathType::VertexListType::ConstIterator VertexListConstIterator; + typedef PathType::VertexType VertexType; + typedef PathType::VertexListType VertexListType; + typedef PathType::VertexListType::ConstIterator VertexListConstIterator; typedef VertexListType::ConstPointer VertexListTypePointer; VertexListTypePointer vertexList; @@ -92,21 +92,21 @@ int otbImageToEdgePathFilter(int argc, char * argv[]) writer->Update(); /* VertexListConstIterator iter=ptrVertexList->Begin(); - while( iter != ptrVertexList->End() ) + while( iter != ptrVertexList->End() ) { - // it.Set( 255 ); - std::cout <<" VERTEX : "<<(*iter).GetElement()<<std::endl; + // it.Set( 255 ); + std::cout <<" VERTEX : "<<(*iter).GetElement()<<std::endl; ++iter; } */ - /* x1 = cindex[0]; - y1 = cindex[1]; - cindex = vertexList->GetElement(1); - x2 = cindex[0]; - y2 = cindex[1]; - fprintf(file,"%8.4f %8.3f\n",x1,y1); + /* x1 = cindex[0]; + y1 = cindex[1]; + cindex = vertexList->GetElement(1); + x2 = cindex[0]; + y2 = cindex[1]; + fprintf(file,"%8.4f %8.3f\n",x1,y1); */ diff --git a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputAscii.cxx index ec6cf6b900..d1533eb95b 100644 --- a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputAscii.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputAscii.cxx @@ -72,10 +72,10 @@ int otbImageToFastSIFTKeyPointSetFilterOutputAscii(int argc, char * argv[]) unsigned int lIterDesc=0; while (lIterDesc < pDataIt.Value().Size()) - { - outfile << std::setprecision(3) << pDataIt.Value()[lIterDesc] << " "; - lIterDesc++; - } + { + outfile << std::setprecision(3) << pDataIt.Value()[lIterDesc] << " "; + lIterDesc++; + } outfile << "]" << std::endl; ++pIt; ++pDataIt; diff --git a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputImage.cxx b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputImage.cxx index ac6f677cfd..4f5c965f5b 100644 --- a/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputImage.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToFastSIFTKeyPointSetFilterOutputImage.cxx @@ -86,9 +86,9 @@ int otbImageToFastSIFTKeyPointSetFilterOutputImage(int argc, char * argv[]) outputImage->Allocate(); itk::ImageRegionIterator<OutputImageType> iterOutput(outputImage, - outputImage->GetLargestPossibleRegion()); + outputImage->GetLargestPossibleRegion()); itk::ImageRegionIterator<ImageType> iterInput(reader->GetOutput(), - reader->GetOutput()->GetLargestPossibleRegion()); + reader->GetOutput()->GetLargestPossibleRegion()); for (iterOutput.GoToBegin(), iterInput.GoToBegin(); !iterOutput.IsAtEnd(); @@ -119,12 +119,12 @@ int otbImageToFastSIFTKeyPointSetFilterOutputImage(int argc, char * argv[]) ImageType::IndexType index; index[0] = (unsigned int) - (vcl_floor - ((double)((pIt.Value()[0]-origin[0])/spacing[0]+0.5))); + (vcl_floor + ((double)((pIt.Value()[0]-origin[0])/spacing[0]+0.5))); index[1] = (unsigned int) - (vcl_floor - ((double)((pIt.Value()[1]-origin[1])/spacing[1]+0.5))); + (vcl_floor + ((double)((pIt.Value()[1]-origin[1])/spacing[1]+0.5))); OutputImageType::PixelType keyPixel; keyPixel.SetRed(0); @@ -132,21 +132,21 @@ int otbImageToFastSIFTKeyPointSetFilterOutputImage(int argc, char * argv[]) keyPixel.SetBlue(0); if (outputImage->GetLargestPossibleRegion().IsInside(index)) - { - outputImage->SetPixel(index,keyPixel); + { + outputImage->SetPixel(index,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+t)) - outputImage->SetPixel(index+t,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+t)) + outputImage->SetPixel(index+t,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+b)) - outputImage->SetPixel(index+b,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+b)) + outputImage->SetPixel(index+b,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+l)) - outputImage->SetPixel(index+l,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+l)) + outputImage->SetPixel(index+l,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+r)) - outputImage->SetPixel(index+r,keyPixel); - } + if (outputImage->GetLargestPossibleRegion().IsInside(index+r)) + outputImage->SetPixel(index+r,keyPixel); + } ++pIt; } diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx index deb2a081e4..3cc46c773a 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx @@ -52,11 +52,11 @@ typedef otb::ImageFileWriter<OutputImageType> WriterType; typedef otb::ImageFileWriter<ImageType> WriterInputType; OutputImageType::Pointer sift(ImageType::Pointer input, - const unsigned int octaves, - const unsigned int scales, - const float threshold, - const float ratio, - const char* siftFileName) + const unsigned int octaves, + const unsigned int scales, + const float threshold, + const float ratio, + const char* siftFileName) { typedef otb::ImageToSIFTKeyPointSetFilter<ImageType,PointSetType> SiftFilterType; typedef itk::PointSetToImageFilter<PointSetType, OutputImageType> PointSetFilterType; @@ -87,7 +87,7 @@ OutputImageType::Pointer sift(ImageType::Pointer input, } OutputImageType::Pointer ddm( OutputImageType::Pointer input, - const char* ddmFileName) + const char* ddmFileName) { typedef itk::DanielssonDistanceMapImageFilter <OutputImageType, OutputImageType> DDMFilterType; DDMFilterType::Pointer ddmFilter = DDMFilterType::New(); @@ -105,7 +105,7 @@ OutputImageType::Pointer ddm( OutputImageType::Pointer input, } ImageType::Pointer rotate( ImageType::Pointer input, - const unsigned int rotation) + const unsigned int rotation) { typedef itk::AffineTransform<double, 2> TransformType; typedef itk::ResampleImageFilter<ImageType, ImageType> @@ -144,7 +144,7 @@ ImageType::Pointer rotate( ImageType::Pointer input, } OutputImageType::Pointer invRotate(OutputImageType::Pointer input, - const unsigned int rotation) + const unsigned int rotation) { typedef itk::AffineTransform<double, 2> TransformType; typedef itk::ResampleImageFilter<OutputImageType, OutputImageType> @@ -184,7 +184,7 @@ OutputImageType::Pointer invRotate(OutputImageType::Pointer input, } ImageType::Pointer zoom( ImageType::Pointer input, - const unsigned int zoomFactor) + const unsigned int zoomFactor) { typedef itk::ShrinkImageFilter<ImageType, ImageType> ShrinkFilterType; ShrinkFilterType::Pointer shrink = ShrinkFilterType::New(); @@ -197,7 +197,7 @@ ImageType::Pointer zoom( ImageType::Pointer input, } OutputImageType::Pointer invZoom( OutputImageType::Pointer input, - const unsigned int zoomFactor) + const unsigned int zoomFactor) { typedef itk::ExpandImageFilter<OutputImageType, OutputImageType> ExpandFilterType; ExpandFilterType::Pointer expand = ExpandFilterType::New(); @@ -210,8 +210,8 @@ OutputImageType::Pointer invZoom( OutputImageType::Pointer input, } ImageType::Pointer contrast(ImageType::Pointer input, - const unsigned int contrastMin, - const unsigned int contrastMax) + const unsigned int contrastMin, + const unsigned int contrastMax) { typedef itk::RescaleIntensityImageFilter<ImageType, ImageType> RescaleFilterType; RescaleFilterType::Pointer rescaler= RescaleFilterType::New(); @@ -224,15 +224,15 @@ ImageType::Pointer contrast(ImageType::Pointer input, } OutputImageType::Pointer invContrast( OutputImageType::Pointer input, - const unsigned int contrastMin, - const unsigned int contrastMax) + const unsigned int contrastMin, + const unsigned int contrastMax) { return input; } void subtract(OutputImageType::Pointer image1, - OutputImageType::Pointer image2, - const char* subtractFileName) + OutputImageType::Pointer image2, + const char* subtractFileName) { typedef itk::SubtractImageFilter<OutputImageType, OutputImageType, ImageType> SubtractFilterType; typedef itk::MinimumMaximumImageCalculator<ImageType> MaximumCalculatorType; @@ -334,16 +334,16 @@ int otbImageToSIFTKeyPointSetFilterDistanceMap(int argc, char * argv[]) OutputImageType::Pointer ddm_combined = ddm(sift_combined, "ddm_combined.png"); subtract(ddm_base, ddm_rotated, - "subtract_rotated.png"); + "subtract_rotated.png"); subtract(ddm_base, ddm_zoomed, - "subtract_zoomed.png"); + "subtract_zoomed.png"); subtract(ddm_base, ddm_contrasted, - "subtract_contrasted.png"); + "subtract_contrasted.png"); subtract(ddm_base, ddm_combined, - "subtract_combined.png"); + "subtract_combined.png"); return EXIT_SUCCESS; } diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx index e0c522c810..9df641bdd1 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx @@ -79,10 +79,10 @@ int otbImageToSIFTKeyPointSetFilterOutputAscii(int argc, char * argv[]) unsigned int lIterDesc=0; while (lIterDesc < pDataIt.Value().Size()) - { - outfile << std::setprecision(3) << pDataIt.Value()[lIterDesc] << " "; - lIterDesc++; - } + { + outfile << std::setprecision(3) << pDataIt.Value()[lIterDesc] << " "; + lIterDesc++; + } outfile << "]" << std::endl; ++pIt; ++pDataIt; diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx index c724c4e112..cb8217f932 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputImage.cxx @@ -94,9 +94,9 @@ int otbImageToSIFTKeyPointSetFilterOutputImage(int argc, char * argv[]) outputImage->Allocate(); itk::ImageRegionIterator<OutputImageType> iterOutput(outputImage, - outputImage->GetLargestPossibleRegion()); + outputImage->GetLargestPossibleRegion()); itk::ImageRegionIterator<ImageType> iterInput(reader->GetOutput(), - reader->GetOutput()->GetLargestPossibleRegion()); + reader->GetOutput()->GetLargestPossibleRegion()); for (iterOutput.GoToBegin(), iterInput.GoToBegin(); !iterOutput.IsAtEnd(); @@ -127,12 +127,12 @@ int otbImageToSIFTKeyPointSetFilterOutputImage(int argc, char * argv[]) ImageType::IndexType index; index[0] = (unsigned int) - (vcl_floor - ((double)((pIt.Value()[0]-origin[0])/spacing[0]+0.5))); + (vcl_floor + ((double)((pIt.Value()[0]-origin[0])/spacing[0]+0.5))); index[1] = (unsigned int) - (vcl_floor - ((double)((pIt.Value()[1]-origin[1])/spacing[1]+0.5))); + (vcl_floor + ((double)((pIt.Value()[1]-origin[1])/spacing[1]+0.5))); OutputImageType::PixelType keyPixel; keyPixel.SetRed(0); @@ -140,21 +140,21 @@ int otbImageToSIFTKeyPointSetFilterOutputImage(int argc, char * argv[]) keyPixel.SetBlue(0); if (outputImage->GetLargestPossibleRegion().IsInside(index)) - { - outputImage->SetPixel(index,keyPixel); + { + outputImage->SetPixel(index,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+t)) - outputImage->SetPixel(index+t,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+t)) + outputImage->SetPixel(index+t,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+b)) - outputImage->SetPixel(index+b,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+b)) + outputImage->SetPixel(index+b,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+l)) - outputImage->SetPixel(index+l,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+l)) + outputImage->SetPixel(index+l,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+r)) - outputImage->SetPixel(index+r,keyPixel); - } + if (outputImage->GetLargestPossibleRegion().IsInside(index+r)) + outputImage->SetPixel(index+r,keyPixel); + } ++pIt; } diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterValid.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterValid.cxx index 872f4536bc..31ca47bedd 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterValid.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterValid.cxx @@ -63,7 +63,7 @@ int otbImageToSIFTKeyPointSetFilterValid(int argc, char * argv[]) outputImage->Allocate(); itk::ImageRegionIterator<OutputImageType> iterOutput(outputImage, - outputImage->GetRequestedRegion()); + outputImage->GetRequestedRegion()); for (iterOutput.GoToBegin(); !iterOutput.IsAtEnd(); ++iterOutput) { @@ -97,13 +97,13 @@ int otbImageToSIFTKeyPointSetFilterValid(int argc, char * argv[]) outputImage->SetPixel(index, greenPixel); if (static_cast<unsigned int>(index[1]) < static_cast<unsigned int>(size[1]) ) - outputImage->SetPixel(index+t,greenPixel); + outputImage->SetPixel(index+t,greenPixel); if (index[1] > 0) - outputImage->SetPixel(index+b,greenPixel); + outputImage->SetPixel(index+b,greenPixel); if (static_cast<unsigned int>(index[0]) < static_cast<unsigned int>(size[0]) ) - outputImage->SetPixel(index+l,greenPixel); + outputImage->SetPixel(index+l,greenPixel); if (index[0] > 0) - outputImage->SetPixel(index+r,greenPixel); + outputImage->SetPixel(index+r,greenPixel); } desc.close(); diff --git a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterDistanceMap.cxx b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterDistanceMap.cxx index 627361a903..50d23c589a 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterDistanceMap.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterDistanceMap.cxx @@ -54,9 +54,9 @@ typedef otb::ImageFileWriter<OutputImageType> WriterType; typedef otb::ImageFileWriter<ImageType> WriterInputType; OutputImageType::Pointer surf(ImageType::Pointer input, - const unsigned int octaves, - const unsigned int scales, - const char* surfFileName) + const unsigned int octaves, + const unsigned int scales, + const char* surfFileName) { typedef otb::ImageToSURFKeyPointSetFilter<ImageType,PointSetType> SurfFilterType; typedef itk::PointSetToImageFilter<PointSetType, OutputImageType> PointSetFilterType; @@ -86,7 +86,7 @@ OutputImageType::Pointer surf(ImageType::Pointer input, } OutputImageType::Pointer ddm( OutputImageType::Pointer input, - const char* ddmFileName) + const char* ddmFileName) { typedef itk::DanielssonDistanceMapImageFilter <OutputImageType, OutputImageType> DDMFilterType; DDMFilterType::Pointer ddmFilter = DDMFilterType::New(); @@ -104,7 +104,7 @@ OutputImageType::Pointer ddm( OutputImageType::Pointer input, } ImageType::Pointer rotate( ImageType::Pointer input, - const unsigned int rotation) + const unsigned int rotation) { typedef itk::AffineTransform<double, 2> TransformType; typedef itk::ResampleImageFilter<ImageType, ImageType> @@ -143,7 +143,7 @@ ImageType::Pointer rotate( ImageType::Pointer input, } OutputImageType::Pointer invRotate(OutputImageType::Pointer input, - const unsigned int rotation) + const unsigned int rotation) { typedef itk::AffineTransform<double, 2> TransformType; typedef itk::ResampleImageFilter<OutputImageType, OutputImageType> @@ -183,7 +183,7 @@ OutputImageType::Pointer invRotate(OutputImageType::Pointer input, } ImageType::Pointer zoom( ImageType::Pointer input, - const unsigned int zoomFactor) + const unsigned int zoomFactor) { typedef itk::ShrinkImageFilter<ImageType, ImageType> ShrinkFilterType; ShrinkFilterType::Pointer shrink = ShrinkFilterType::New(); @@ -196,7 +196,7 @@ ImageType::Pointer zoom( ImageType::Pointer input, } OutputImageType::Pointer invZoom( OutputImageType::Pointer input, - const unsigned int zoomFactor) + const unsigned int zoomFactor) { typedef itk::ExpandImageFilter<OutputImageType, OutputImageType> ExpandFilterType; ExpandFilterType::Pointer expand = ExpandFilterType::New(); @@ -209,8 +209,8 @@ OutputImageType::Pointer invZoom( OutputImageType::Pointer input, } ImageType::Pointer contrast(ImageType::Pointer input, - const unsigned int contrastMin, - const unsigned int contrastMax) + const unsigned int contrastMin, + const unsigned int contrastMax) { typedef itk::RescaleIntensityImageFilter<ImageType, ImageType> RescaleFilterType; RescaleFilterType::Pointer rescaler= RescaleFilterType::New(); @@ -223,15 +223,15 @@ ImageType::Pointer contrast(ImageType::Pointer input, } OutputImageType::Pointer invContrast( OutputImageType::Pointer input, - const unsigned int contrastMin, - const unsigned int contrastMax) + const unsigned int contrastMin, + const unsigned int contrastMax) { return input; } void subtract(OutputImageType::Pointer image1, - OutputImageType::Pointer image2, - const char* subtractFileName) + OutputImageType::Pointer image2, + const char* subtractFileName) { typedef itk::SubtractImageFilter<OutputImageType, OutputImageType, ImageType> SubtractFilterType; typedef itk::MinimumMaximumImageCalculator<ImageType> MaximumCalculatorType; @@ -331,16 +331,16 @@ int otbImageToSURFKeyPointSetFilterDistanceMap(int argc, char * argv[]) OutputImageType::Pointer ddm_combined = ddm(surf_combined, "ddm_combined.png"); subtract(ddm_base, ddm_rotated, - "subtract_rotated.png"); + "subtract_rotated.png"); subtract(ddm_base, ddm_zoomed, - "subtract_zoomed.png"); + "subtract_zoomed.png"); subtract(ddm_base, ddm_contrasted, - "subtract_contrasted.png"); + "subtract_contrasted.png"); subtract(ddm_base, ddm_combined, - "subtract_combined.png"); + "subtract_combined.png"); return EXIT_SUCCESS; } diff --git a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputAscii.cxx index 2d4f90a1be..23cf8a1466 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputAscii.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputAscii.cxx @@ -87,10 +87,10 @@ int otbImageToSURFKeyPointSetFilterOutputAscii(int argc, char * argv[]) unsigned int lIterDesc=0; while (lIterDesc < pDataIt.Value().Size()) - { - outfile << std::setprecision(3) << pDataIt.Value()[lIterDesc] << " "; - lIterDesc++; - } + { + outfile << std::setprecision(3) << pDataIt.Value()[lIterDesc] << " "; + lIterDesc++; + } outfile << "]" << std::endl; ++pIt; ++pDataIt; diff --git a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputImage.cxx b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputImage.cxx index bbfa954cc5..bad2d683c2 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputImage.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilterOutputImage.cxx @@ -91,9 +91,9 @@ int otbImageToSURFKeyPointSetFilterOutputImage(int argc, char * argv[]) outputImage->Allocate(); itk::ImageRegionIterator<OutputImageType> iterOutput(outputImage, - outputImage->GetLargestPossibleRegion()); + outputImage->GetLargestPossibleRegion()); itk::ImageRegionIterator<ImageType> iterInput(reader->GetOutput(), - reader->GetOutput()->GetLargestPossibleRegion()); + reader->GetOutput()->GetLargestPossibleRegion()); for (iterOutput.GoToBegin(), iterInput.GoToBegin(); !iterOutput.IsAtEnd(); @@ -124,12 +124,12 @@ int otbImageToSURFKeyPointSetFilterOutputImage(int argc, char * argv[]) ImageType::IndexType index; index[0] = (unsigned int) - (vcl_floor - ((double)((pIt.Value()[0]-origin[0])/spacing[0]+0.5))); + (vcl_floor + ((double)((pIt.Value()[0]-origin[0])/spacing[0]+0.5))); index[1] = (unsigned int) - (vcl_floor - ((double)((pIt.Value()[1]-origin[1])/spacing[1]+0.5))); + (vcl_floor + ((double)((pIt.Value()[1]-origin[1])/spacing[1]+0.5))); OutputImageType::PixelType keyPixel; keyPixel.SetRed(0); @@ -137,21 +137,21 @@ int otbImageToSURFKeyPointSetFilterOutputImage(int argc, char * argv[]) keyPixel.SetBlue(0); if (outputImage->GetLargestPossibleRegion().IsInside(index)) - { - outputImage->SetPixel(index,keyPixel); + { + outputImage->SetPixel(index,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+t)) - outputImage->SetPixel(index+t,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+t)) + outputImage->SetPixel(index+t,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+b)) - outputImage->SetPixel(index+b,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+b)) + outputImage->SetPixel(index+b,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+l)) - outputImage->SetPixel(index+l,keyPixel); + if (outputImage->GetLargestPossibleRegion().IsInside(index+l)) + outputImage->SetPixel(index+l,keyPixel); - if (outputImage->GetLargestPossibleRegion().IsInside(index+r)) - outputImage->SetPixel(index+r,keyPixel); - } + if (outputImage->GetLargestPossibleRegion().IsInside(index+r)) + outputImage->SetPixel(index+r,keyPixel); + } ++pIt; } diff --git a/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx index 71c4763c52..61c851873e 100644 --- a/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbLikelihoodPathListFilter.cxx @@ -43,16 +43,16 @@ int otbLikelihoodPathListFilter(int argc, char * argv[]) { if( argv[cpt][0] == '|' ) { - if( (ListPoints.size()%2) != 0 ) - { - itkGenericExceptionMacro(<<"Missing point in parameters !"); - } - MatricePoints.push_back(ListPoints); - ListPoints.clear(); + if( (ListPoints.size()%2) != 0 ) + { + itkGenericExceptionMacro(<<"Missing point in parameters !"); + } + MatricePoints.push_back(ListPoints); + ListPoints.clear(); } else { - ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); + ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); } cpt++; } @@ -77,13 +77,13 @@ int otbLikelihoodPathListFilter(int argc, char * argv[]) //Generate PathList std::cout << "List "<<std::endl; for(PointsVectorType::iterator it=(*listpos).begin() ; it != (*listpos).end() ; ++it) - { - cindex[0] = *it; - ++it; - cindex[1] = *it; - std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; - path->AddVertex(cindex); - } + { + cindex[0] = *it; + ++it; + cindex[1] = *it; + std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; + path->AddVertex(cindex); + } InputPathList->PushBack(path); } @@ -115,15 +115,15 @@ int otbLikelihoodPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; @@ -135,15 +135,15 @@ int otbLikelihoodPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<< " Value: "<<pathListIt.Get()->GetValue(); file<<std::endl; ++pathListIt; diff --git a/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx b/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx index 1cbe0ff174..1d8843346f 100644 --- a/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx +++ b/Testing/Code/FeatureExtraction/otbLineCorrelationDetector.cxx @@ -41,8 +41,8 @@ int otbLineCorrelationDetector( int argc, char* argv[] ) unsigned int LengthLine((unsigned int)::atoi(argv[4])); typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx index b9081db254..f192d530c9 100644 --- a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx +++ b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorLinear.cxx @@ -43,8 +43,8 @@ int otbLineCorrelationDetectorLinear( int argc, char* argv[] ) unsigned int LengthLine((unsigned int)::atoi(argv[5])); typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -53,7 +53,7 @@ int otbLineCorrelationDetectorLinear( int argc, char* argv[] ) typedef otb::ImageFileReader< InputImageType > ReaderType; typedef otb::ImageFileWriter< OutputImageType > WriterType; - typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; + typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef otb::LineCorrelationDetectorImageFilter< InputImageType, OutputImageType, OutputImageDirectionType, InterpolatorType > FilterType; FilterType::Pointer FilterLineCorrelation = FilterType::New(); diff --git a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx index fef9c37992..b9845a6fae 100644 --- a/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx +++ b/Testing/Code/FeatureExtraction/otbLineCorrelationDetectorNew.cxx @@ -29,8 +29,8 @@ int otbLineCorrelationDetectorNew( int argc, char* argv[] ) { typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx b/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx index 45d78ba102..8fdc5102b0 100644 --- a/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx +++ b/Testing/Code/FeatureExtraction/otbLineDetectorBaseNew.cxx @@ -29,8 +29,8 @@ int otbLineDetectorBaseNew( int argc, char* argv[] ) { typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx b/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx index 36dc969bf4..79a6d63119 100644 --- a/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx +++ b/Testing/Code/FeatureExtraction/otbLineRatioDetector.cxx @@ -40,8 +40,8 @@ int otbLineRatioDetector( int argc, char* argv[] ) unsigned int LengthLine((unsigned int)::atoi(argv[4])); typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx b/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx index b7d070763f..3b28f23830 100644 --- a/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx +++ b/Testing/Code/FeatureExtraction/otbLineRatioDetectorLinear.cxx @@ -44,8 +44,8 @@ int otbLineRatioDetectorLinear( int argc, char* argv[] ) unsigned int LengthLine((unsigned int)::atoi(argv[5])); typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; @@ -54,7 +54,7 @@ int otbLineRatioDetectorLinear( int argc, char* argv[] ) typedef otb::ImageFileReader< InputImageType > ReaderType; typedef otb::ImageFileWriter< OutputImageType > WriterType; - typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; + typedef itk::LinearInterpolateImageFunction< InputImageType, double > InterpolatorType; typedef otb::LineRatioDetectorImageFilter< InputImageType, OutputImageType, OutputImageDirectionType, InterpolatorType > FilterType; FilterType::Pointer FilterLineRatio = FilterType::New(); diff --git a/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx index b8c58bfccb..aedab5207c 100644 --- a/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx +++ b/Testing/Code/FeatureExtraction/otbLineRatioDetectorNew.cxx @@ -30,8 +30,8 @@ int otbLineRatioDetectorNew( int argc, char* argv[] ) { typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx index b519c4c89f..7837ae9ac4 100644 --- a/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbLinkPathListFilter.cxx @@ -45,16 +45,16 @@ int otbLinkPathListFilter(int argc, char * argv[]) { if( argv[cpt][0] == '|' ) { - if( (ListPoints.size()%2) != 0 ) - { - itkGenericExceptionMacro(<<"Missing point in parameters !"); - } - MatricePoints.push_back(ListPoints); - ListPoints.clear(); + if( (ListPoints.size()%2) != 0 ) + { + itkGenericExceptionMacro(<<"Missing point in parameters !"); + } + MatricePoints.push_back(ListPoints); + ListPoints.clear(); } else { - ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); + ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); } cpt++; } @@ -76,13 +76,13 @@ int otbLinkPathListFilter(int argc, char * argv[]) //Generate PathList std::cout << "List "<<std::endl; for(PointsVectorType::iterator it=(*listpos).begin() ; it != (*listpos).end() ; ++it) - { - cindex[0] = *it; - ++it; - cindex[1] = *it; - std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; - path->AddVertex(cindex); - } + { + cindex[0] = *it; + ++it; + cindex[1] = *it; + std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; + path->AddVertex(cindex); + } InputPathList->PushBack(path); } //Instantiating object @@ -113,15 +113,15 @@ int otbLinkPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; @@ -133,15 +133,15 @@ int otbLinkPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; diff --git a/Testing/Code/FeatureExtraction/otbLocalHough.cxx b/Testing/Code/FeatureExtraction/otbLocalHough.cxx index 1686967584..f4f7f8936d 100644 --- a/Testing/Code/FeatureExtraction/otbLocalHough.cxx +++ b/Testing/Code/FeatureExtraction/otbLocalHough.cxx @@ -39,8 +39,8 @@ int otbLocalHough( int argc, char* argv[] ) unsigned int RadiusY((unsigned int)::atoi(argv[3])); unsigned int NumberOfLines((unsigned int)::atoi(argv[4])); - typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; @@ -59,7 +59,7 @@ int otbLocalHough( int argc, char* argv[] ) Radius[0] = RadiusX; Radius[1] = RadiusY; - typedef otb::LineSpatialObjectList LinesListType; + typedef otb::LineSpatialObjectList LinesListType; LinesListType::Pointer list = LinesListType::New(); filter->SetRadius( Radius ); diff --git a/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx b/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx index ec60a1f849..6751a4c215 100644 --- a/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx +++ b/Testing/Code/FeatureExtraction/otbLocalHoughDraw.cxx @@ -46,9 +46,9 @@ int otbLocalHoughDraw( int argc, char* argv[] ) unsigned int RadiusY((unsigned int)::atoi(argv[4])); unsigned int NumberOfLines((unsigned int)::atoi(argv[5])); - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx b/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx index 9416050ee1..861408e991 100644 --- a/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx +++ b/Testing/Code/FeatureExtraction/otbLocalHoughNew.cxx @@ -32,8 +32,8 @@ int otbLocalHoughNew( int argc, char* argv[] ) { - typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx b/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx index e6c3e84c2f..a05b01c55b 100644 --- a/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx +++ b/Testing/Code/FeatureExtraction/otbModulusAndDirectionImageFiltersNew.cxx @@ -29,8 +29,8 @@ int otbModulusAndDirectionImageFiltersNew( int argc, char* argv[] ) { typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > InputImageDirectionType; diff --git a/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx b/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx index 24312134b9..a02b40557b 100644 --- a/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx +++ b/Testing/Code/FeatureExtraction/otbMultiplyByScalarImageTest.cxx @@ -115,13 +115,13 @@ int otbMultiplyByScalarImageFilterTest( int argc, char * argv[] ) const OutputImageType::PixelType output = ot.Get(); const OutputImageType::PixelType multiplyByScal = 10.0* input; if( vcl_abs( multiplyByScal - output ) > epsilon ) - { - std::cerr << "Error in otbMultiplyScalarImageFilterTest " << std::endl; - std::cerr << " 10.0 * " << input << ") = " << multiplyByScal << std::endl; - std::cerr << " differs from " << output; - std::cerr << " by more than " << epsilon << std::endl; - return 1; - } + { + std::cerr << "Error in otbMultiplyScalarImageFilterTest " << std::endl; + std::cerr << " 10.0 * " << input << ") = " << multiplyByScal << std::endl; + std::cerr << " differs from " << output; + std::cerr << " by more than " << epsilon << std::endl; + return 1; + } ++ot; ++it; } diff --git a/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx b/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx index ec9f743043..f213a931b5 100644 --- a/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbParallelLinePathListFilter.cxx @@ -106,22 +106,22 @@ int otbParallelLinePathListFilter(int argc, char * argv[]) PathType::VertexListType::ConstIterator pathIt = vertexList->Begin(); PathType::VertexListType::ConstIterator parPathIt = parVertexList->Begin(); - // Loop over all the vertices in one path - while (pathIt != vertexList->End() && - parPathIt != parVertexList->End()) - { - - if( pathIt.Value() != parPathIt.Value() ) - { - std::cout << pathIt.Index() << pathIt.Value() << std::endl; - return EXIT_FAILURE; - - } - ++pathIt; - ++parPathIt; - } - ++listIt; - ++parListIt; + // Loop over all the vertices in one path + while (pathIt != vertexList->End() && + parPathIt != parVertexList->End()) + { + + if( pathIt.Value() != parPathIt.Value() ) + { + std::cout << pathIt.Index() << pathIt.Value() << std::endl; + return EXIT_FAILURE; + + } + ++pathIt; + ++parPathIt; + } + ++listIt; + ++parListIt; } diff --git a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx index 0b92b0ac5a..6ec57773ba 100644 --- a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx +++ b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirection.cxx @@ -36,11 +36,11 @@ int otbPixelSuppressionByDirection( int argc, char* argv[] ) const char * outputFilename = argv[3]; unsigned int RadiusX((unsigned int)::atoi(argv[4])); - float AngularBeam((float)::atof(argv[5])); + float AngularBeam((float)::atof(argv[5])); - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx index 38d88e3cf4..5c69623263 100644 --- a/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx +++ b/Testing/Code/FeatureExtraction/otbPixelSuppressionByDirectionNew.cxx @@ -31,9 +31,9 @@ int otbPixelSuppressionByDirectionNew( int argc, char* argv[] ) { - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx b/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx index 49b1e44551..6549b530fa 100644 --- a/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx +++ b/Testing/Code/FeatureExtraction/otbRemoveCarvingPathFilterNew.cxx @@ -27,14 +27,14 @@ int otbRemoveCarvingPathFilterNew(int argc, char* argv[]) { typedef double PixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< PixelType, Dimension > InputImageType; typedef otb::Image< PixelType, Dimension > OutputImageType; typedef itk::PolyLineParametricPath<Dimension> PathType; typedef otb::RemoveCarvingPathFilter<InputImageType, PathType, - OutputImageType> RemoveCarvingPathFilterType; + OutputImageType> RemoveCarvingPathFilterType; RemoveCarvingPathFilterType::Pointer addCarvingPathFilter = RemoveCarvingPathFilterType::New(); diff --git a/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx index 574fc5222a..48a7bd6ad1 100644 --- a/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.cxx @@ -39,16 +39,16 @@ int otbRemoveTortuousPathListFilter(int argc, char * argv[]) { if( argv[cpt][0] == '|' ) { - if( (ListPoints.size()%2) != 0 ) - { - itkGenericExceptionMacro(<<"Missing point in parameters !"); - } - MatricePoints.push_back(ListPoints); - ListPoints.clear(); + if( (ListPoints.size()%2) != 0 ) + { + itkGenericExceptionMacro(<<"Missing point in parameters !"); + } + MatricePoints.push_back(ListPoints); + ListPoints.clear(); } else { - ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); + ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); } cpt++; } @@ -70,13 +70,13 @@ int otbRemoveTortuousPathListFilter(int argc, char * argv[]) //Generate PathList std::cout << "List "<<std::endl; for(PointsVectorType::iterator it=(*listpos).begin() ; it != (*listpos).end() ; ++it) - { - cindex[0] = *it; - ++it; - cindex[1] = *it; - std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; - path->AddVertex(cindex); - } + { + cindex[0] = *it; + ++it; + cindex[1] = *it; + std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; + path->AddVertex(cindex); + } InputPathList->PushBack(path); } // Instantiating object @@ -103,15 +103,15 @@ int otbRemoveTortuousPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; @@ -123,15 +123,15 @@ int otbRemoveTortuousPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; diff --git a/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx index 1369c656eb..863f626a6b 100644 --- a/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbSimplifyPathListFilter.cxx @@ -39,16 +39,16 @@ int otbSimplifyPathListFilter(int argc, char * argv[]) { if( argv[cpt][0] == '|' ) { - if( (ListPoints.size()%2) != 0 ) - { - itkGenericExceptionMacro(<<"Missing point in parameters !"); - } - MatricePoints.push_back(ListPoints); - ListPoints.clear(); + if( (ListPoints.size()%2) != 0 ) + { + itkGenericExceptionMacro(<<"Missing point in parameters !"); + } + MatricePoints.push_back(ListPoints); + ListPoints.clear(); } else { - ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); + ListPoints.push_back(static_cast<double>(::atof(argv[cpt]))); } cpt++; } @@ -70,13 +70,13 @@ int otbSimplifyPathListFilter(int argc, char * argv[]) //Generate PathList std::cout << "List "<<std::endl; for(PointsVectorType::iterator it=(*listpos).begin() ; it != (*listpos).end() ; ++it) - { - cindex[0] = *it; - ++it; - cindex[1] = *it; - std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; - path->AddVertex(cindex); - } + { + cindex[0] = *it; + ++it; + cindex[1] = *it; + std::cout << "Point Index :"<<cindex[0]<<";"<<cindex[1]<<std::endl; + path->AddVertex(cindex); + } InputPathList->PushBack(path); } // Instantiating object @@ -103,15 +103,15 @@ int otbSimplifyPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; @@ -123,15 +123,15 @@ int otbSimplifyPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; diff --git a/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx b/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx index e4a7a3c0fb..747e0b54f6 100644 --- a/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx +++ b/Testing/Code/FeatureExtraction/otbThresholdImageToPointSetTest.cxx @@ -33,7 +33,7 @@ int otbThresholdImageToPointSetTest( int argc, char * argv[] ) const char * outputFilename = argv[2]; typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension> InputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; diff --git a/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx b/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx index 3a4b29a08a..72f49609c1 100644 --- a/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx +++ b/Testing/Code/FeatureExtraction/otbTouziEdgeDetector.cxx @@ -38,8 +38,8 @@ int otbTouziEdgeDetector( int argc, char* argv[] ) unsigned int RadiusX((unsigned int)::atoi(argv[3])); typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx index 714c83513b..f080c31104 100644 --- a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx +++ b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorDirection.cxx @@ -38,8 +38,8 @@ int otbTouziEdgeDetectorDirection( int argc, char* argv[] ) unsigned int RadiusX((unsigned int)::atoi(argv[3])); typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx index cbece2a6ca..3b1e91721d 100644 --- a/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx +++ b/Testing/Code/FeatureExtraction/otbTouziEdgeDetectorNew.cxx @@ -30,8 +30,8 @@ int otbTouziEdgeDetectorNew( int argc, char* argv[] ) { typedef unsigned char InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx b/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx index 67fdcc7161..49b2a0c0dc 100644 --- a/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbVectorizationPathListFilter.cxx @@ -71,15 +71,15 @@ int otbVectorizationPathListFilter(int argc, char * argv[]) { file<<"Path "<<counter<<": "; for(VertexIteratorType vIt = pathListIt.Get()->GetVertexList()->Begin(); - vIt!=pathListIt.Get()->GetVertexList()->End(); - ++vIt) - { - if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) - { - file<<", "; - } - file<<vIt.Value(); - } + vIt!=pathListIt.Get()->GetVertexList()->End(); + ++vIt) + { + if(vIt!=pathListIt.Get()->GetVertexList()->Begin()) + { + file<<", "; + } + file<<vIt.Value(); + } file<<std::endl; ++pathListIt; ++counter; diff --git a/Testing/Code/Gui/otbFltkFilterWatcher.cxx b/Testing/Code/Gui/otbFltkFilterWatcher.cxx index 276678bea3..5b3a07b8a4 100644 --- a/Testing/Code/Gui/otbFltkFilterWatcher.cxx +++ b/Testing/Code/Gui/otbFltkFilterWatcher.cxx @@ -26,13 +26,13 @@ int otbFltkFilterWatcher(int argc, char * argv[]) { const char * infname = argv[1]; typedef otb::Image<char,2> ImageType; - typedef otb::ImageFileReader<ImageType> ReaderType; - typedef itk::GradientMagnitudeImageFilter<ImageType, ImageType> FilterType; + typedef otb::ImageFileReader<ImageType> ReaderType; + typedef itk::GradientMagnitudeImageFilter<ImageType, ImageType> FilterType; - ReaderType::Pointer reader = ReaderType::New(); - reader->SetFileName(infname); - FilterType::Pointer gradient = FilterType::New(); - gradient->SetInput(reader->GetOutput()); + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName(infname); + FilterType::Pointer gradient = FilterType::New(); + gradient->SetInput(reader->GetOutput()); otb::FltkFilterWatcher watcher(gradient,0,0,200,20,"Gradient"); gradient->Update(); return EXIT_SUCCESS; diff --git a/Testing/Code/IO/otbDEMHandlerTest.cxx b/Testing/Code/IO/otbDEMHandlerTest.cxx index 8f44ee134c..6954d9f89b 100644 --- a/Testing/Code/IO/otbDEMHandlerTest.cxx +++ b/Testing/Code/IO/otbDEMHandlerTest.cxx @@ -38,7 +38,7 @@ int otbDEMHandlerTest(int argc, char * argv[]) demHandler->OpenDEMDirectory(srtm_directory); typedef otb::UtmInverseProjection utmProjection; - typedef utmProjection::InputPointType InputPoint; + typedef utmProjection::InputPointType InputPoint; InputPoint geoPoint; geoPoint[0] = atof(argv[3]);//3.6999; geoPoint[1] = atof(argv[4]);//44.08; diff --git a/Testing/Code/IO/otbDoubleImageIOTest.cxx b/Testing/Code/IO/otbDoubleImageIOTest.cxx index be7b8517a2..c97bb1d436 100644 --- a/Testing/Code/IO/otbDoubleImageIOTest.cxx +++ b/Testing/Code/IO/otbDoubleImageIOTest.cxx @@ -34,8 +34,8 @@ int otbDoubleImageIOTest(int argc, char* argv[]) const char * outputFilename = argv[2]; typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbFloatImageIOTest.cxx b/Testing/Code/IO/otbFloatImageIOTest.cxx index 1a65d4f4bd..87abd8dca6 100644 --- a/Testing/Code/IO/otbFloatImageIOTest.cxx +++ b/Testing/Code/IO/otbFloatImageIOTest.cxx @@ -34,8 +34,8 @@ int otbFloatImageIOTest(int argc, char* argv[]) const char * outputFilename = argv[2]; typedef float InputPixelType; - typedef float OutputPixelType; - const unsigned int Dimension = 2; + typedef float OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderERS.cxx b/Testing/Code/IO/otbImageFileReaderERS.cxx index 95ad9cc959..23c278db17 100644 --- a/Testing/Code/IO/otbImageFileReaderERS.cxx +++ b/Testing/Code/IO/otbImageFileReaderERS.cxx @@ -35,9 +35,9 @@ int otbImageFileReaderERS(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef float InputPixelType; + typedef float InputPixelType; typedef short OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; typedef otb::VectorImage< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderONERA.cxx b/Testing/Code/IO/otbImageFileReaderONERA.cxx index f081e6691e..ccce5f4e2a 100644 --- a/Testing/Code/IO/otbImageFileReaderONERA.cxx +++ b/Testing/Code/IO/otbImageFileReaderONERA.cxx @@ -34,9 +34,9 @@ int otbImageFileReaderONERATest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef float InputPixelType; + typedef float InputPixelType; typedef float OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; typedef otb::VectorImage< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx b/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx index 9449ee4a14..02db232558 100644 --- a/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx +++ b/Testing/Code/IO/otbImageFileReaderONERAComplex.cxx @@ -36,9 +36,9 @@ int otbImageFileReaderONERAComplex(int argc, char* argv[]) const char * outputRealFilename = argv[2]; const char * outputImagFilename = argv[3]; - typedef std::complex<float> InputPixelType; - typedef float OutputPixelType; - const unsigned int Dimension = 2; + typedef std::complex<float> InputPixelType; + typedef float OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRADChar.cxx b/Testing/Code/IO/otbImageFileReaderRADChar.cxx index e312f13d3b..8bab97ea59 100644 --- a/Testing/Code/IO/otbImageFileReaderRADChar.cxx +++ b/Testing/Code/IO/otbImageFileReaderRADChar.cxx @@ -34,10 +34,10 @@ int otbImageFileReaderRADChar(int argc, char* argv[]) const char * outputFilename = argv[2]; typedef char InputPixelType; - typedef char OutputPixelType; + typedef char OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx index 99459a41e8..19e442281b 100644 --- a/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx +++ b/Testing/Code/IO/otbImageFileReaderRADComplexDouble.cxx @@ -33,9 +33,9 @@ int otbImageFileReaderRADComplexDouble(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef std::complex<double> InputPixelType; - typedef std::complex<double> OutputPixelType; - const unsigned int Dimension = 2; + typedef std::complex<double> InputPixelType; + typedef std::complex<double> OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx index eca827342d..9e8a8c40f2 100644 --- a/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx +++ b/Testing/Code/IO/otbImageFileReaderRADComplexFloat.cxx @@ -33,9 +33,9 @@ int otbImageFileReaderRADComplexFloat(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef std::complex<float> InputPixelType; - typedef std::complex<float> OutputPixelType; - const unsigned int Dimension = 2; + typedef std::complex<float> InputPixelType; + typedef std::complex<float> OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx index 3eeae26a6e..83ba2e6cd0 100644 --- a/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx +++ b/Testing/Code/IO/otbImageFileReaderRADComplexFloatExtract.cxx @@ -33,9 +33,9 @@ int otbImageFileReaderRADComplexFloatExtract(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef std::complex<float> InputPixelType; - typedef std::complex<float> OutputPixelType; - const unsigned int Dimension = 2; + typedef std::complex<float> InputPixelType; + typedef std::complex<float> OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx b/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx index d44f7dcf02..04a859dda6 100644 --- a/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx +++ b/Testing/Code/IO/otbImageFileReaderRADComplexInt.cxx @@ -33,9 +33,9 @@ int otbImageFileReaderRADComplexInt(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef std::complex<int> InputPixelType; - typedef std::complex<int> OutputPixelType; - const unsigned int Dimension = 2; + typedef std::complex<int> InputPixelType; + typedef std::complex<int> OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRADFloat.cxx b/Testing/Code/IO/otbImageFileReaderRADFloat.cxx index 733abce373..39487d91a6 100644 --- a/Testing/Code/IO/otbImageFileReaderRADFloat.cxx +++ b/Testing/Code/IO/otbImageFileReaderRADFloat.cxx @@ -33,9 +33,9 @@ int otbImageFileReaderRADFloat(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef float InputPixelType; - typedef float OutputPixelType; - const unsigned int Dimension = 2; + typedef float InputPixelType; + typedef float OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRADInt.cxx b/Testing/Code/IO/otbImageFileReaderRADInt.cxx index 663234b00b..838ff70788 100644 --- a/Testing/Code/IO/otbImageFileReaderRADInt.cxx +++ b/Testing/Code/IO/otbImageFileReaderRADInt.cxx @@ -34,8 +34,8 @@ int otbImageFileReaderRADInt(int argc, char* argv[]) const char * outputFilename = argv[2]; typedef int InputPixelType; - typedef int OutputPixelType; - const unsigned int Dimension = 2; + typedef int OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderRGBTest.cxx b/Testing/Code/IO/otbImageFileReaderRGBTest.cxx index 58099b3767..43639724d7 100644 --- a/Testing/Code/IO/otbImageFileReaderRGBTest.cxx +++ b/Testing/Code/IO/otbImageFileReaderRGBTest.cxx @@ -37,7 +37,7 @@ int otbImageFileReaderRGBTest(int argc, char* argv[]) typedef itk::RGBPixel<unsigned char> InputPixelType; typedef itk::RGBPixel<unsigned char> OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderTest.cxx b/Testing/Code/IO/otbImageFileReaderTest.cxx index ceeabb9a18..622590315e 100644 --- a/Testing/Code/IO/otbImageFileReaderTest.cxx +++ b/Testing/Code/IO/otbImageFileReaderTest.cxx @@ -33,9 +33,9 @@ int otbImageFileReaderTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileReaderTestFloat.cxx b/Testing/Code/IO/otbImageFileReaderTestFloat.cxx index 180e433d06..da02c39b7c 100644 --- a/Testing/Code/IO/otbImageFileReaderTestFloat.cxx +++ b/Testing/Code/IO/otbImageFileReaderTestFloat.cxx @@ -33,9 +33,9 @@ int otbImageFileReaderTestFloat(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef float InputPixelType; - typedef float OutputPixelType; - const unsigned int Dimension = 2; + typedef float InputPixelType; + typedef float OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx b/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx index a39df1804a..df0311c3a7 100644 --- a/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx +++ b/Testing/Code/IO/otbImageFileWriterONERAComplex.cxx @@ -33,8 +33,8 @@ int otbImageFileWriterONERAComplex(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef std::complex<float> PixelType; - const unsigned int Dimension = 2; + typedef std::complex<float> PixelType; + const unsigned int Dimension = 2; typedef otb::Image< PixelType, Dimension > ImageType; diff --git a/Testing/Code/IO/otbImageFileWriterRGBTest.cxx b/Testing/Code/IO/otbImageFileWriterRGBTest.cxx index 54a792e89f..76fbba928e 100644 --- a/Testing/Code/IO/otbImageFileWriterRGBTest.cxx +++ b/Testing/Code/IO/otbImageFileWriterRGBTest.cxx @@ -36,7 +36,7 @@ int otbImageFileWriterRGBTest(int argc, char* argv[]) typedef itk::RGBPixel<unsigned char> InputPixelType; typedef itk::RGBPixel<unsigned char> OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx b/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx index cde8d0c015..bfe77adcbf 100644 --- a/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx +++ b/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx @@ -34,22 +34,22 @@ int otbImageFileWriterStreamingONERAComplex(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef std::complex<float> PixelType; - const unsigned int Dimension = 2; + typedef std::complex<float> PixelType; + const unsigned int Dimension = 2; typedef otb::Image<PixelType, Dimension > ImageType; typedef otb::ImageFileReader< ImageType > ReaderType; typedef otb::StreamingImageFileWriter< ImageType > WriterType; /* typedef itk::StreamingImageFilter< ImageType, - ImageType > StreamingType;*/ + ImageType > StreamingType;*/ ReaderType::Pointer complexReader = ReaderType::New(); complexReader->SetFileName( inputFilename ); /* StreamingType::Pointer streaming = StreamingType::New(); - streaming->SetNumberOfStreamDivisions(100); - streaming->SetInput(complexReader->GetOutput()); + streaming->SetNumberOfStreamDivisions(100); + streaming->SetInput(complexReader->GetOutput()); */ WriterType::Pointer complexWriter = WriterType::New(); complexWriter->SetNumberOfStreamDivisions(100); diff --git a/Testing/Code/IO/otbImageFileWriterTest.cxx b/Testing/Code/IO/otbImageFileWriterTest.cxx index d86a783e03..6ba77951b2 100644 --- a/Testing/Code/IO/otbImageFileWriterTest.cxx +++ b/Testing/Code/IO/otbImageFileWriterTest.cxx @@ -33,9 +33,9 @@ int otbImageFileWriterTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx b/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx index 51f4623f81..f02345c9f9 100644 --- a/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx +++ b/Testing/Code/IO/otbImageMetadataFileWriterTest.cxx @@ -33,9 +33,9 @@ int otbImageMetadataFileWriterTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; typedef otb::VectorImage< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx b/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx index 7f55796568..795cc57fb1 100644 --- a/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx +++ b/Testing/Code/IO/otbImageMetadataStreamingFileWriterTest.cxx @@ -33,9 +33,9 @@ int otbImageMetadataStreamingFileWriterTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; typedef otb::VectorImage< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbImageTest.cxx b/Testing/Code/IO/otbImageTest.cxx index 7f5708350b..ba6706b7a6 100644 --- a/Testing/Code/IO/otbImageTest.cxx +++ b/Testing/Code/IO/otbImageTest.cxx @@ -38,8 +38,8 @@ int otbImageTest(int argc, char* argv[]) const char * outputAsciiFilename = argv[2]; // unsigned int GCPnum((unsigned int)::atoi(argv[2])); - typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + const unsigned int Dimension = 2; std::ofstream file; diff --git a/Testing/Code/IO/otbIntImageIOTest.cxx b/Testing/Code/IO/otbIntImageIOTest.cxx index 4b175d7c95..c97f61f471 100644 --- a/Testing/Code/IO/otbIntImageIOTest.cxx +++ b/Testing/Code/IO/otbIntImageIOTest.cxx @@ -34,8 +34,8 @@ int otbIntImageIOTest(int argc, char* argv[]) const char * outputFilename = argv[2]; typedef int InputPixelType; - typedef int OutputPixelType; - const unsigned int Dimension = 2; + typedef int OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbMultiToMonoChannelExtractROISAR.cxx b/Testing/Code/IO/otbMultiToMonoChannelExtractROISAR.cxx index 1f1b3cfa4e..006b3f25f6 100644 --- a/Testing/Code/IO/otbMultiToMonoChannelExtractROISAR.cxx +++ b/Testing/Code/IO/otbMultiToMonoChannelExtractROISAR.cxx @@ -28,8 +28,8 @@ int otbMultiToMonoChannelExtractROISAR ( int argc, char * argv[] ) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef std::complex<float> InputPixelType; - typedef std::complex<float> OutputPixelType; + typedef std::complex<float> InputPixelType; + typedef std::complex<float> OutputPixelType; typedef otb::ExtractROI< InputPixelType, diff --git a/Testing/Code/IO/otbOSSIMImageMetaDataReaderTest.cxx b/Testing/Code/IO/otbOSSIMImageMetaDataReaderTest.cxx index e256d33770..e04b4a4051 100644 --- a/Testing/Code/IO/otbOSSIMImageMetaDataReaderTest.cxx +++ b/Testing/Code/IO/otbOSSIMImageMetaDataReaderTest.cxx @@ -38,9 +38,9 @@ int otbOSSIMImageMetaDataReaderTest (int argc, char* argv[]) const char * outputAsciiFilenameOtbImage = argv[2]; const char * outputAsciiFilenameOtbVectorImage = argv[3]; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::ImageFileReader< InputImageType > ImageReaderType; @@ -56,9 +56,9 @@ int otbOSSIMImageMetaDataReaderTest (int argc, char* argv[]) image_medianFilter->GetOutput()->UpdateOutputInformation(); otb::ImageKeywordlist otb_tmp_image; - /* itk::ExposeMetaData< otb::ImageKeywordlist >(image_medianFilter->GetOutput()->GetMetaDataDictionary(), - otb::MetaDataKey::OSSIMKeywordlistKey, - otb_tmp_image);*/ + /* itk::ExposeMetaData< otb::ImageKeywordlist >(image_medianFilter->GetOutput()->GetMetaDataDictionary(), + otb::MetaDataKey::OSSIMKeywordlistKey, + otb_tmp_image);*/ otb_tmp_image = image_reader->GetOutput()->GetImageKeywordlist(); @@ -80,9 +80,9 @@ int otbOSSIMImageMetaDataReaderTest (int argc, char* argv[]) vector_image_reader->SetFileName( inputFilename ); vector_image_reader->GenerateOutputInformation (); - /* itk::ExposeMetaData< otb::ImageKeywordlist >(vector_image_reader->GetOutput()->GetMetaDataDictionary(), - otb::MetaDataKey::OSSIMKeywordlistKey, - otb_tmp_vector_image);*/ + /* itk::ExposeMetaData< otb::ImageKeywordlist >(vector_image_reader->GetOutput()->GetMetaDataDictionary(), + otb::MetaDataKey::OSSIMKeywordlistKey, + otb_tmp_vector_image);*/ otb::ImageKeywordlist otb_tmp_vector_image; otb_tmp_vector_image = vector_image_reader->GetOutput()->GetImageKeywordlist(); @@ -91,7 +91,7 @@ int otbOSSIMImageMetaDataReaderTest (int argc, char* argv[]) std::cout << " -> otbVectorImage Ossim key word list copy : "<<ossim_kwl_vector_image<<std::endl; - // std::ofstream file; + // std::ofstream file; file.open(outputAsciiFilenameOtbVectorImage); file << "--- OSSIM KEYWORDLIST ---" << std::endl; file << ossim_kwl_vector_image; diff --git a/Testing/Code/IO/otbOssimElevManagerTest.cxx b/Testing/Code/IO/otbOssimElevManagerTest.cxx index 2348471c88..e3cf00e58d 100644 --- a/Testing/Code/IO/otbOssimElevManagerTest.cxx +++ b/Testing/Code/IO/otbOssimElevManagerTest.cxx @@ -91,16 +91,16 @@ int otbOssimElevManagerTest(int argc,char* argv[]) ossimWorldPoint.lat=point[1]; double height = elevManager->getHeightAboveMSL(ossimWorldPoint); - if (!ossim::isnan(height)) - { - // Fill the image - it.Set(height); - } - else - { - // Back to the MNT default value - it.Set(0); - } + if (!ossim::isnan(height)) + { + // Fill the image + it.Set(height); + } + else + { + // Back to the MNT default value + it.Set(0); + } } WriterType::Pointer writer = WriterType::New(); diff --git a/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx b/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx index 00f7462b76..6062f71086 100644 --- a/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx +++ b/Testing/Code/IO/otbPipelineMetadataHandlingTest.cxx @@ -33,9 +33,9 @@ int otbPipelineMetadataHandlingTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx b/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx index a4e9cfbd6d..1498e7eb9a 100644 --- a/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx +++ b/Testing/Code/IO/otbPipelineMetadataHandlingWithUFFilterTest.cxx @@ -33,9 +33,9 @@ int otbPipelineMetadataHandlingWithUFFilterTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbShortImageIOTest.cxx b/Testing/Code/IO/otbShortImageIOTest.cxx index dd4f7efad5..3368c2f592 100644 --- a/Testing/Code/IO/otbShortImageIOTest.cxx +++ b/Testing/Code/IO/otbShortImageIOTest.cxx @@ -34,8 +34,8 @@ int otbShortImageIOTest(int argc, char* argv[]) const char * outputFilename = argv[2]; typedef short InputPixelType; - typedef short OutputPixelType; - const unsigned int Dimension = 2; + typedef short OutputPixelType; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbShortRGBImageIOTest.cxx b/Testing/Code/IO/otbShortRGBImageIOTest.cxx index fea73adc74..afd7546d0b 100644 --- a/Testing/Code/IO/otbShortRGBImageIOTest.cxx +++ b/Testing/Code/IO/otbShortRGBImageIOTest.cxx @@ -37,7 +37,7 @@ int otbShortRGBImageIOTest(int argc, char* argv[]) typedef itk::RGBPixel<short> InputPixelType; typedef itk::RGBPixel<short> OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbSpatialObjectDXFReader.cxx b/Testing/Code/IO/otbSpatialObjectDXFReader.cxx index f5819faea2..ce0f9800e8 100644 --- a/Testing/Code/IO/otbSpatialObjectDXFReader.cxx +++ b/Testing/Code/IO/otbSpatialObjectDXFReader.cxx @@ -64,19 +64,19 @@ int otbSpatialObjectDXFReader(int argc, char * argv[]) minimum[1]=(*it)->GetBoundingBox()->GetMinimum()[1]; while(it != end) - { - (*it)->ComputeBoundingBox(); - - if ((*it)->GetBoundingBox()->GetMinimum()[0] < minimum[0]) - { - minimum[0]=(*it)->GetBoundingBox()->GetMinimum()[0]; - } - if ((*it)->GetBoundingBox()->GetMinimum()[1] < minimum[1]) - { - minimum[1]=(*it)->GetBoundingBox()->GetMinimum()[1]; - } - it++; - } + { + (*it)->ComputeBoundingBox(); + + if ((*it)->GetBoundingBox()->GetMinimum()[0] < minimum[0]) + { + minimum[0]=(*it)->GetBoundingBox()->GetMinimum()[0]; + } + if ((*it)->GetBoundingBox()->GetMinimum()[1] < minimum[1]) + { + minimum[1]=(*it)->GetBoundingBox()->GetMinimum()[1]; + } + it++; + } ImageType::SizeType size; diff --git a/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx b/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx index f8e78c575b..cb32ad40b6 100644 --- a/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx +++ b/Testing/Code/IO/otbStreamingImageFileWriterTest.cxx @@ -44,9 +44,9 @@ int otbStreamingImageFileWriterTest (int argc, char* argv[]) - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx b/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx index d4f9d49be8..62cdda58f2 100644 --- a/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx +++ b/Testing/Code/IO/otbStreamingImageFileWriterTestCalculateNumberOfDivisions.cxx @@ -36,10 +36,10 @@ int otbStreamingImageFileWriterTestCalculateNumberOfDivisions (int argc, char* a const char * outputFilename = argv[2]; std::string MethodCalculateNumberOfStreamDivision(argv[3]); - typedef unsigned int PixelType; - const unsigned int Dimension = 2; + typedef unsigned int PixelType; + const unsigned int Dimension = 2; - typedef otb::Image< PixelType, Dimension > ImageType; + typedef otb::Image< PixelType, Dimension > ImageType; typedef otb::ImageFileReader< ImageType > ReaderType; typedef otb::StreamingImageFileWriter< ImageType> StreamingWriterType; diff --git a/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx b/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx index 31ff24ad3b..f35c81f17e 100644 --- a/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx +++ b/Testing/Code/IO/otbStreamingImageFileWriterWithFilterTest.cxx @@ -47,9 +47,9 @@ int otbStreamingImageFileWriterWithFilterTest (int argc, char* argv[]) - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbStreamingImageFilterTest.cxx b/Testing/Code/IO/otbStreamingImageFilterTest.cxx index e7aa70c017..6db1a34ac5 100644 --- a/Testing/Code/IO/otbStreamingImageFilterTest.cxx +++ b/Testing/Code/IO/otbStreamingImageFilterTest.cxx @@ -35,9 +35,9 @@ int otbStreamingImageFilterTest (int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + typedef unsigned char OutputPixelType; + const unsigned int Dimension = 2; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx b/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx index 557f71c3ca..29f3aa6bc7 100644 --- a/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx +++ b/Testing/Code/IO/otbStreamingShortImageFileWriterTest.cxx @@ -44,9 +44,9 @@ int otbStreamingShortImageFileWriterTest (int argc, char* argv[]) - typedef unsigned short InputPixelType; - typedef unsigned short OutputPixelType; - const unsigned int Dimension = 2; + typedef unsigned short InputPixelType; + typedef unsigned short OutputPixelType; + const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; typedef otb::VectorImage< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbVectorDataFileReader.cxx b/Testing/Code/IO/otbVectorDataFileReader.cxx index d2770238d4..731b4d6f82 100644 --- a/Testing/Code/IO/otbVectorDataFileReader.cxx +++ b/Testing/Code/IO/otbVectorDataFileReader.cxx @@ -54,10 +54,10 @@ int otbVectorDataFileReader(int argc, char * argv[]) itk::PreOrderTreeIterator<DataTreeType> itParent = it; bool goesOn = true; while(itParent.HasParent() && goesOn ) - { - fout<<indent; - goesOn = itParent.GoToParent(); - } + { + fout<<indent; + goesOn = itParent.GoToParent(); + } fout<<"+"<<it.Get()->GetNodeTypeAsString()<<std::endl; ++it; } diff --git a/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx b/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx index 410165d613..1163e21227 100644 --- a/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx +++ b/Testing/Code/IO/otbVectorImageFileReaderWriterTest.cxx @@ -35,9 +35,9 @@ int otbVectorImageFileReaderWriterTest(int argc, char* argv[]) const char * inputFilename = argv[1]; const char * outputFilename = argv[2]; - typedef double InputPixelType; - typedef double OutputPixelType; - const unsigned int Dimension = 2; + typedef double InputPixelType; + typedef double OutputPixelType; + const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; typedef otb::VectorImage< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/IO/otbVectorImageTest.cxx b/Testing/Code/IO/otbVectorImageTest.cxx index 7e90a09b56..ab98869c35 100644 --- a/Testing/Code/IO/otbVectorImageTest.cxx +++ b/Testing/Code/IO/otbVectorImageTest.cxx @@ -38,8 +38,8 @@ int otbVectorImageTest(int argc, char* argv[]) const char * outputAsciiFilename = argv[2]; // unsigned int GCPnum((unsigned int)::atoi(argv[2])); - typedef unsigned char InputPixelType; - const unsigned int Dimension = 2; + typedef unsigned char InputPixelType; + const unsigned int Dimension = 2; std::ofstream file; diff --git a/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx b/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx index 22e806933b..284ee71a69 100644 --- a/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx +++ b/Testing/Code/Learning/otbKMeansImageClassificationFilter.cxx @@ -56,9 +56,9 @@ int otbKMeansImageClassificationFilter(int argc, char * argv[]) for(unsigned int i = 0; i<nbClasses;++i) { for(unsigned int j = 0; j < reader->GetOutput()->GetNumberOfComponentsPerPixel();++j) - { - parameters[i*sampleSize+j]=atof(argv[4+i*reader->GetOutput()->GetNumberOfComponentsPerPixel()+j]); - } + { + parameters[i*sampleSize+j]=atof(argv[4+i*reader->GetOutput()->GetNumberOfComponentsPerPixel()+j]); + } } std::cout<<"Parameters: "<<parameters<<std::endl; diff --git a/Testing/Code/Learning/otbSOMClassifier.cxx b/Testing/Code/Learning/otbSOMClassifier.cxx index 438e7a086c..75a5faa66a 100644 --- a/Testing/Code/Learning/otbSOMClassifier.cxx +++ b/Testing/Code/Learning/otbSOMClassifier.cxx @@ -45,7 +45,7 @@ int otbSOMClassifier(int argc, char* argv[] ) typedef double InputPixelType; typedef int LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::VariableLengthVector<InputPixelType> PixelType; typedef itk::Statistics::EuclideanDistance<PixelType> DistanceType; diff --git a/Testing/Code/Learning/otbSOMClassifierNew.cxx b/Testing/Code/Learning/otbSOMClassifierNew.cxx index 77d4a3d20f..4708f3f6d3 100644 --- a/Testing/Code/Learning/otbSOMClassifierNew.cxx +++ b/Testing/Code/Learning/otbSOMClassifierNew.cxx @@ -30,7 +30,7 @@ int otbSOMClassifierNew(int argc, char* argv[] ) { typedef double InputPixelType; typedef int LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::VariableLengthVector<InputPixelType> PixelType; typedef itk::Statistics::EuclideanDistance<PixelType> DistanceType; diff --git a/Testing/Code/Learning/otbSVMClassifierImage.cxx b/Testing/Code/Learning/otbSVMClassifierImage.cxx index db1b52f41d..0494e23264 100644 --- a/Testing/Code/Learning/otbSVMClassifierImage.cxx +++ b/Testing/Code/Learning/otbSVMClassifierImage.cxx @@ -80,9 +80,9 @@ int otbSVMClassifierImage(int argc, char* argv[] ) typedef double InputPixelType; typedef std::vector<InputPixelType> InputVectorType; typedef int LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; - typedef otb::Image< itk::FixedArray<InputPixelType,3>, Dimension > InputImageType; + typedef otb::Image< itk::FixedArray<InputPixelType,3>, Dimension > InputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; ReaderType::Pointer reader = ReaderType::New(); @@ -120,7 +120,7 @@ int otbSVMClassifierImage(int argc, char* argv[] ) /* Build the class map */ otbGenericMsgDebugMacro( << "Output image creation" ); - typedef ClassifierType::ClassLabelType OutputPixelType; + typedef ClassifierType::ClassLabelType OutputPixelType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; @@ -158,7 +158,7 @@ int otbSVMClassifierImage(int argc, char* argv[] ) otbGenericMsgDebugMacro( << "Image iterator" ); typedef itk::ImageRegionIterator< OutputImageType> OutputIteratorType; OutputIteratorType outIt( outputImage, - outputImage->GetBufferedRegion() ); + outputImage->GetBufferedRegion() ); outIt.GoToBegin(); diff --git a/Testing/Code/Learning/otbSVMClassifierPointSet.cxx b/Testing/Code/Learning/otbSVMClassifierPointSet.cxx index 9c13fb54ea..7ae3f2a8b5 100644 --- a/Testing/Code/Learning/otbSVMClassifierPointSet.cxx +++ b/Testing/Code/Learning/otbSVMClassifierPointSet.cxx @@ -49,7 +49,7 @@ int otbSVMClassifierPointSet(int argc, char* argv[] ) typedef double InputPixelType; typedef int LabelPixelType; typedef std::vector<InputPixelType> InputVectorType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::PointSet< InputVectorType, Dimension > MeasurePointSetType; @@ -142,10 +142,10 @@ int otbSVMClassifierPointSet(int argc, char* argv[] ) mPSet->GetPointData(pointId, &measure); if(label != ((measure[0]+measure[1])>0) ) - error++; + error++; std::cout << label << "/" << - ((measure[0]+measure[1])>0) << std::endl; + ((measure[0]+measure[1])>0) << std::endl; ++pointId; diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx index 6e43962d59..64cb13d648 100644 --- a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx +++ b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx @@ -98,21 +98,21 @@ int otbSVMImageModelEstimatorModelAccessor( int argc, char* argv[] ) f << " SV["<<i<<"]:"; const svm_node *p = SVs[i]; /* for(unsigned int j=0;j<nbSupportVector;j++) - { + { f << " SV["<<i<<"]["<<j<<"]:";*/ if( svmEstimator->GetKernelType() == PRECOMPUTED) - { - f << " "<<p->value; + { + f << " "<<p->value; - } + } else - { - while(p->index != -1) - { - f << " ["<<p->index << ";"<<p->value<<"] "; - p++; - } - } + { + while(p->index != -1) + { + f << " ["<<p->index << ";"<<p->value<<"] "; + p++; + } + } f << std::endl; // } } @@ -144,7 +144,7 @@ int otbSVMImageModelEstimatorModelAccessor( int argc, char* argv[] ) f << " "; for(unsigned int j=0;j<nbSupportVector;j++) { - f << " " << alphas[i][j]; + f << " " << alphas[i][j]; } } f << std::endl; diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx index 2b9035c147..30032c2fcd 100644 --- a/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx +++ b/Testing/Code/Learning/otbSVMImageModelEstimatorNew.cxx @@ -32,7 +32,7 @@ int otbSVMImageModelEstimatorNew( int argc, char* argv[] ) { typedef double InputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx b/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx index ec9ffc3a05..06a267394d 100644 --- a/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx +++ b/Testing/Code/Learning/otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest.cxx @@ -64,12 +64,12 @@ int otbSVMInverseCosSpectralAngleKernelFunctorImageModelEstimatorTest( int argc, svmEstimator->SetNumberOfClasses( 2 ); svmEstimator->SetSVMType(ONE_CLASS); - otb::InverseCosSAMKernelFunctor myKernel; - myKernel.SetValue( "Coef", 1.0 ); - myKernel.Update(); + otb::InverseCosSAMKernelFunctor myKernel; + myKernel.SetValue( "Coef", 1.0 ); + myKernel.Update(); - svmEstimator->SetKernelFunctor( &myKernel ); - svmEstimator->SetKernelType( GENERIC ); + svmEstimator->SetKernelFunctor( &myKernel ); + svmEstimator->SetKernelType( GENERIC ); svmEstimator->Update(); diff --git a/Testing/Code/Learning/otbSVMModelAccessor.cxx b/Testing/Code/Learning/otbSVMModelAccessor.cxx index 07bc52d436..d7de6162fe 100644 --- a/Testing/Code/Learning/otbSVMModelAccessor.cxx +++ b/Testing/Code/Learning/otbSVMModelAccessor.cxx @@ -32,7 +32,7 @@ int otbSVMModelAccessor( int argc, char* argv[] ) { typedef unsigned char InputPixelType; typedef unsigned char LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; @@ -70,10 +70,10 @@ int otbSVMModelAccessor( int argc, char* argv[] ) f << " SV["<<i<<"]:"; const svm_node *p = SVs[i]; while(p->index != -1) - { - f << " ["<<p->index << ";"<<p->value<<"] "; - p++; - } + { + f << " ["<<p->index << ";"<<p->value<<"] "; + p++; + } f << std::endl; } @@ -104,7 +104,7 @@ int otbSVMModelAccessor( int argc, char* argv[] ) f << " "; for(unsigned int j=0;j<nbSupportVector;j++) { - f << " " << alphas[i][j]; + f << " " << alphas[i][j]; } } f << std::endl; diff --git a/Testing/Code/Learning/otbSVMModelAllocateProblem.cxx b/Testing/Code/Learning/otbSVMModelAllocateProblem.cxx index 1b07c42aaf..b7a4de258c 100644 --- a/Testing/Code/Learning/otbSVMModelAllocateProblem.cxx +++ b/Testing/Code/Learning/otbSVMModelAllocateProblem.cxx @@ -31,7 +31,7 @@ int otbSVMModelAllocateProblem( int argc, char* argv[] ) { typedef unsigned char InputPixelType; typedef unsigned char LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/Learning/otbSVMModelCopyTest.cxx b/Testing/Code/Learning/otbSVMModelCopyTest.cxx index c0e784dfdd..bdeab7ca72 100644 --- a/Testing/Code/Learning/otbSVMModelCopyTest.cxx +++ b/Testing/Code/Learning/otbSVMModelCopyTest.cxx @@ -31,7 +31,7 @@ int otbSVMModelCopyTest( int argc, char* argv[] ) { typedef unsigned char InputPixelType; typedef unsigned char LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::SVMModel< InputPixelType, LabelPixelType > ModelType; diff --git a/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx b/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx index 011f19bfba..3cbd036167 100644 --- a/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx +++ b/Testing/Code/Learning/otbSVMModelGenericKernelLoadSave.cxx @@ -47,7 +47,7 @@ int otbSVMModelGenericKernelLoadSave( int argc, char* argv[] ) { typedef unsigned char InputPixelType; typedef unsigned char LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/Learning/otbSVMModelLoad.cxx b/Testing/Code/Learning/otbSVMModelLoad.cxx index 23eee7c6f8..ddfaba27bd 100644 --- a/Testing/Code/Learning/otbSVMModelLoad.cxx +++ b/Testing/Code/Learning/otbSVMModelLoad.cxx @@ -31,7 +31,7 @@ int otbSVMModelLoad( int argc, char* argv[] ) { typedef unsigned char InputPixelType; typedef unsigned char LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/Learning/otbSVMModelLoadSave.cxx b/Testing/Code/Learning/otbSVMModelLoadSave.cxx index afff59d2e5..5961bf95f1 100644 --- a/Testing/Code/Learning/otbSVMModelLoadSave.cxx +++ b/Testing/Code/Learning/otbSVMModelLoadSave.cxx @@ -31,7 +31,7 @@ int otbSVMModelLoadSave( int argc, char* argv[] ) { typedef unsigned char InputPixelType; typedef unsigned char LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/Learning/otbSVMModelNew.cxx b/Testing/Code/Learning/otbSVMModelNew.cxx index baf6e43672..8fe60d851d 100644 --- a/Testing/Code/Learning/otbSVMModelNew.cxx +++ b/Testing/Code/Learning/otbSVMModelNew.cxx @@ -31,7 +31,7 @@ int otbSVMModelNew( int argc, char* argv[] ) { typedef unsigned char InputPixelType; typedef unsigned char LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::SVMModel< InputPixelType, LabelPixelType > ModelType; diff --git a/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx b/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx index bd5bbcc56f..1d87b5f543 100644 --- a/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx +++ b/Testing/Code/Learning/otbSVMPointSetModelEstimatorNew.cxx @@ -32,7 +32,7 @@ int otbSVMPointSetModelEstimatorNew( int argc, char* argv[] ) { typedef std::vector<double> InputPixelType; typedef double LabelPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; typedef itk::PointSet< InputPixelType, Dimension > MeasurePointSetType; typedef itk::PointSet< LabelPixelType, Dimension > LabelPointSetType; diff --git a/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx b/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx index 610ec8a6f0..6a6e2ee629 100644 --- a/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx +++ b/Testing/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.cxx @@ -69,32 +69,32 @@ int otbGeodesicMorphologyIterativeDecompositionImageFilter(int argc, char * argv itk::OStringStream oss; // Writing the results images while((itAnalyse!=decomposition->GetOutput()->End()) - &&(itConvexMap!=decomposition->GetConvexOutput()->End()) - &&(itConcaveMap!=decomposition->GetConcaveOutput()->End()) - ) - { - oss<<outputFilenamePrefix<<"_leveling_"<<i<<"."<<outputFilenameSuffix; - writer = WriterType::New(); - writer->SetInput(itAnalyse.Get()); - writer->SetFileName(oss.str().c_str()); - writer->Update(); - oss.str(""); - oss<<outputFilenamePrefix<<"_convMap_"<<i<<"."<<outputFilenameSuffix; - writer = WriterType::New(); - writer->SetInput(itConvexMap.Get()); - writer->SetFileName(oss.str().c_str()); - writer->Update(); - oss.str(""); - oss<<outputFilenamePrefix<<"_concMap_"<<i<<"."<<outputFilenameSuffix; - writer = WriterType::New(); - writer->SetInput(itConcaveMap.Get()); - writer->SetFileName(oss.str().c_str()); - writer->Update(); - oss.str(""); - ++itAnalyse; - ++itConvexMap; - ++itConcaveMap; - ++i; - } + &&(itConvexMap!=decomposition->GetConvexOutput()->End()) + &&(itConcaveMap!=decomposition->GetConcaveOutput()->End()) + ) + { + oss<<outputFilenamePrefix<<"_leveling_"<<i<<"."<<outputFilenameSuffix; + writer = WriterType::New(); + writer->SetInput(itAnalyse.Get()); + writer->SetFileName(oss.str().c_str()); + writer->Update(); + oss.str(""); + oss<<outputFilenamePrefix<<"_convMap_"<<i<<"."<<outputFilenameSuffix; + writer = WriterType::New(); + writer->SetInput(itConvexMap.Get()); + writer->SetFileName(oss.str().c_str()); + writer->Update(); + oss.str(""); + oss<<outputFilenamePrefix<<"_concMap_"<<i<<"."<<outputFilenameSuffix; + writer = WriterType::New(); + writer->SetInput(itConcaveMap.Get()); + writer->SetFileName(oss.str().c_str()); + writer->Update(); + oss.str(""); + ++itAnalyse; + ++itConvexMap; + ++itConcaveMap; + ++i; + } return EXIT_SUCCESS; } diff --git a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx index dc170e87cf..5bbd46b6f1 100644 --- a/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx +++ b/Testing/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.cxx @@ -77,11 +77,11 @@ int otbMorphologicalPyramidAnalysisFilter(int argc, char * argv[]) itk::OStringStream oss; // Writing the results images while((itAnalyse!=pyramid->GetOutput()->End()) - &&(itSupFilter!=pyramid->GetSupFilter()->End()) - &&(itInfFilter!=pyramid->GetInfFilter()->End()) - &&(itInfDeci!=pyramid->GetInfDeci()->End()) - &&(itSupDeci!=pyramid->GetSupDeci()->End()) - ) + &&(itSupFilter!=pyramid->GetSupFilter()->End()) + &&(itInfFilter!=pyramid->GetInfFilter()->End()) + &&(itInfDeci!=pyramid->GetInfDeci()->End()) + &&(itSupDeci!=pyramid->GetSupDeci()->End()) + ) { oss<<outputFilenamePrefix<<"_an_"<<i<<"."<<outputFilenameSuffix; writer->SetInput(itAnalyse.Get()); diff --git a/Testing/Code/Projections/otbCreateInverseForwardSensorModel.cxx b/Testing/Code/Projections/otbCreateInverseForwardSensorModel.cxx index 95b6cf77c0..986de5a0b7 100644 --- a/Testing/Code/Projections/otbCreateInverseForwardSensorModel.cxx +++ b/Testing/Code/Projections/otbCreateInverseForwardSensorModel.cxx @@ -61,7 +61,7 @@ int otbCreateInverseForwardSensorModel( int argc, char* argv[] ) //Allocate pointer InverseModelType::Pointer inverse_model= InverseModelType::New(); ForwardModelType::Pointer forward_model= ForwardModelType::New(); - ReaderType::Pointer reader=ReaderType::New(); + ReaderType::Pointer reader=ReaderType::New(); // Set parameters ... reader->SetFileName(argv[1]); diff --git a/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx b/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx index 1a1bdd3366..894277ed16 100644 --- a/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx +++ b/Testing/Code/Projections/otbCreateProjectionWithOTB.cxx @@ -68,7 +68,7 @@ int otbCreateProjectionWithOTB( int argc, char* argv[] ) typedef otb::Image<unsigned int, 2> ImageType; typedef otb::ImageFileReader<ImageType> ReaderType; - ReaderType::Pointer reader=ReaderType::New(); + ReaderType::Pointer reader=ReaderType::New(); reader->SetFileName(argv[1]); //Read meta data (ossimKeywordlist) diff --git a/Testing/Code/Projections/otbOrthoRectificationFilter.cxx b/Testing/Code/Projections/otbOrthoRectificationFilter.cxx index fd6c2d1757..d4f2903b75 100644 --- a/Testing/Code/Projections/otbOrthoRectificationFilter.cxx +++ b/Testing/Code/Projections/otbOrthoRectificationFilter.cxx @@ -44,7 +44,7 @@ int otbOrthoRectificationFilter( int argc, char* argv[] ) if(argc!=11) { std::cout << argv[0] <<" <input filename> <output filename> <origin easting> <origin northing> <x size> <y size> <x spacing> <y spacing> <UTM zone> <UTM hemisphere>" - << std::endl; + << std::endl; return EXIT_FAILURE; } diff --git a/Testing/Code/Projections/otbOrthoRectificationFilterWithDEM.cxx b/Testing/Code/Projections/otbOrthoRectificationFilterWithDEM.cxx index f7b7810814..0c87dc9b96 100644 --- a/Testing/Code/Projections/otbOrthoRectificationFilterWithDEM.cxx +++ b/Testing/Code/Projections/otbOrthoRectificationFilterWithDEM.cxx @@ -54,7 +54,7 @@ int otbOrthoRectificationFilterWithDEM( int argc, char* argv[] ) if(argc!=12) { - std::cout << argv[0] <<" <input filename> <output filename> <origin easting> <origin northing> <x size> <y size>"; + std::cout << argv[0] <<" <input filename> <output filename> <origin easting> <origin northing> <x size> <y size>"; std::cout << "<x_spacing> <y_spacing> <UTM zone> <UTM hemisphere> <DEM directory>" << std::endl; return EXIT_FAILURE; @@ -69,10 +69,10 @@ int otbOrthoRectificationFilterWithDEM( int argc, char* argv[] ) typedef otb::OrthoRectificationFilter<ImageType, ImageType, UtmMapProjectionType> OrthoRectifFilterType ; //Allocate pointer - ReaderType::Pointer reader=ReaderType::New(); - WriterType::Pointer writer=WriterType::New(); + ReaderType::Pointer reader=ReaderType::New(); + WriterType::Pointer writer=WriterType::New(); - OrthoRectifFilterType::Pointer orthoRectifFilter=OrthoRectifFilterType::New(); + OrthoRectifFilterType::Pointer orthoRectifFilter=OrthoRectifFilterType::New(); UtmMapProjectionType::Pointer utmMapProjection = UtmMapProjectionType::New(); // Set parameters ... @@ -88,7 +88,7 @@ int otbOrthoRectificationFilterWithDEM( int argc, char* argv[] ) ImageType::SizeType size; size[0]=atoi(argv[5]); //X size. - size[1]=atoi(argv[6]); //Y size + size[1]=atoi(argv[6]); //Y size orthoRectifFilter->SetSize(size); ImageType::SpacingType spacing; diff --git a/Testing/Code/Projections/otbOrthoRectificationMonoThreadFilter.cxx b/Testing/Code/Projections/otbOrthoRectificationMonoThreadFilter.cxx index 0a7a1d61bd..4c323aa579 100644 --- a/Testing/Code/Projections/otbOrthoRectificationMonoThreadFilter.cxx +++ b/Testing/Code/Projections/otbOrthoRectificationMonoThreadFilter.cxx @@ -44,7 +44,7 @@ int otbOrthoRectificationMonoThreadFilter( int argc, char* argv[] ) if(argc!=11) { std::cout << argv[0] <<" <input filename> <output filename> <origin easting> <origin northing> <x size> <y size> <x spacing> <y spacing> <UTM zone <UTM hemisphere>" - << std::endl; + << std::endl; return EXIT_FAILURE; } diff --git a/Testing/Code/Projections/otbRegionProjection.cxx b/Testing/Code/Projections/otbRegionProjection.cxx index 847e11abbf..43b2e5508b 100644 --- a/Testing/Code/Projections/otbRegionProjection.cxx +++ b/Testing/Code/Projections/otbRegionProjection.cxx @@ -68,8 +68,8 @@ int otbRegionProjection( int argc, char* argv[] ) } - typedef itk::Point <double, 2> PointType; - PointType outputpoint; + typedef itk::Point <double, 2> PointType; + PointType outputpoint; /*************************************************/ /* Cr�ation de l'image de sortie outputimage */ @@ -77,27 +77,27 @@ int otbRegionProjection( int argc, char* argv[] ) typedef otb::Image<unsigned char, 2> CharImageType; typedef otb::Image<unsigned int, 2> ImageType; typedef otb::Image<unsigned int, 2> InputImageType; - ImageType::Pointer outputimage = ImageType::New(); + ImageType::Pointer outputimage = ImageType::New(); - ImageType::PixelType pixelvalue; + ImageType::PixelType pixelvalue; - ImageType::IndexType start; + ImageType::IndexType start; start[0]=0; start[1]=0; - ImageType::SizeType size; + ImageType::SizeType size; size[0]=atoi(argv[5]); //Taille en X. - size[1]=atoi(argv[6]); //Taille en Y. + size[1]=atoi(argv[6]); //Taille en Y. - ImageType::SpacingType spacing; + ImageType::SpacingType spacing; spacing[0]=atof(argv[8]); spacing[1]=atof(argv[9]); - ImageType::PointType origin; + ImageType::PointType origin; origin[0]=strtod(argv[3], NULL); //longitude de l'origine. origin[1]=strtod(argv[4], NULL); //latitude de l'origine. - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); region.SetIndex(start); @@ -112,8 +112,8 @@ int otbRegionProjection( int argc, char* argv[] ) /* Cr�ation d'un reader */ /********************************************************/ typedef otb::ImageFileReader<ImageType> ReaderType; - ReaderType::Pointer reader=ReaderType::New(); - //ReaderType::Pointer reader1=ReaderType::New(); + ReaderType::Pointer reader=ReaderType::New(); + //ReaderType::Pointer reader1=ReaderType::New(); reader->SetFileName(argv[1]); //Read meta data (ossimKeywordlist) @@ -159,17 +159,17 @@ int otbRegionProjection( int argc, char* argv[] ) //reader1->SetFileName(argv[2]); - //ImageType::Pointer image = reader1->GetOutput(); + //ImageType::Pointer image = reader1->GetOutput(); //reader->Update(); - ImageType::Pointer inputimage= reader->GetOutput(); - ImageType::IndexType currentindex; - ImageType::IndexType currentindexbis; - ImageType::IndexType pixelindex; - ImageType::IndexType pixelindexbis; + ImageType::Pointer inputimage= reader->GetOutput(); + ImageType::IndexType currentindex; + ImageType::IndexType currentindexbis; + ImageType::IndexType pixelindex; + ImageType::IndexType pixelindexbis; otbGenericMsgDebugMacro(<< "Reader created " ); //Stocker les caract�ristiques de notre image capteur: - // ImageType::SizeType inputimagesize; + // ImageType::SizeType inputimagesize; // inputimagesize=inputimage->GetLargestPossibleRegion().GetSize(); // //inputimagesize=inputimage->GetSize(); // otbGenericMsgDebugMacro(<< "Dimension de notre image capteur:"<< std::endl @@ -181,7 +181,7 @@ int otbRegionProjection( int argc, char* argv[] ) /********************************************************/ typedef itk::ExtractImageFilter<InputImageType,ImageType> ExtractType; - ExtractType::Pointer extract=ExtractType::New(); + ExtractType::Pointer extract=ExtractType::New(); otbGenericMsgDebugMacro(<< "Region Extractor created " ); /********************************************************/ @@ -189,8 +189,8 @@ int otbRegionProjection( int argc, char* argv[] ) /********************************************************/ typedef itk::LinearInterpolateImageFunction<ImageType, double> InterpolatorType; - InterpolatorType::Pointer interpolator=InterpolatorType::New(); - //InterpolatorType::OutputType value; + InterpolatorType::Pointer interpolator=InterpolatorType::New(); + //InterpolatorType::OutputType value; otbGenericMsgDebugMacro(<< "Interpolator created " ); /********************************************************/ @@ -199,8 +199,8 @@ int otbRegionProjection( int argc, char* argv[] ) //typedef otb::ImageFileWriter<CharImageType> CharWriterType; typedef otb::ImageFileWriter<ImageType> CharWriterType; typedef otb::ImageFileWriter<ImageType> WriterType; - WriterType::Pointer extractorwriter=WriterType::New(); - CharWriterType::Pointer writer=CharWriterType::New(); + WriterType::Pointer extractorwriter=WriterType::New(); + CharWriterType::Pointer writer=CharWriterType::New(); extractorwriter->SetFileName("image_temp.jpeg"); extractorwriter->SetInput(extract->GetOutput()); otbGenericMsgDebugMacro(<< "extractorwriter created" ); @@ -210,7 +210,7 @@ int otbRegionProjection( int argc, char* argv[] ) /********************************************************/ typedef itk::RescaleIntensityImageFilter<ImageType,CharImageType> RescalerType; - RescalerType::Pointer rescaler=RescalerType::New(); + RescalerType::Pointer rescaler=RescalerType::New(); //rescaler->SetOutputMinimum(50); //rescaler->SetOutputMaximum(500); rescaler->SetOutputMinimum(10); @@ -222,7 +222,7 @@ int otbRegionProjection( int argc, char* argv[] ) /* Cr�ation de RegionIteratorwithIndex */ /*************************************************/ - typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType; + typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType; //IteratorType outputIt(outputimage, region); //D�finition de notre it�rateur. //otbGenericMsgDebugMacro(<< "Iterator created " ); @@ -237,22 +237,22 @@ int otbRegionProjection( int argc, char* argv[] ) unsigned int count=0; unsigned int It, j, k; int max_x, max_y, min_x, min_y; - ImageType::IndexType iterationRegionStart; - ImageType::SizeType iteratorRegionSize; - ImageType::RegionType iteratorRegion; + ImageType::IndexType iterationRegionStart; + ImageType::SizeType iteratorRegionSize; + ImageType::RegionType iteratorRegion; for(count=0;count<NumberOfStreamDivisions;count++) {//d�but boucle principale /**Cr�ation de la r�gion pour chaque portion**/ iteratorRegionSize[0]=atoi(argv[5]); //Taille en X. if (count==NumberOfStreamDivisions-1) - {iteratorRegionSize[1]=(atoi(argv[6]))-((int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5))*(count); - iterationRegionStart[1]=(atoi(argv[5]))-(iteratorRegionSize[1]); - } + {iteratorRegionSize[1]=(atoi(argv[6]))-((int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5))*(count); + iterationRegionStart[1]=(atoi(argv[5]))-(iteratorRegionSize[1]); + } else - {iteratorRegionSize[1]=(int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5); //Taille en Y. - iterationRegionStart[1]=count*iteratorRegionSize[1]; - } + {iteratorRegionSize[1]=(int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5); //Taille en Y. + iterationRegionStart[1]=count*iteratorRegionSize[1]; + } iterationRegionStart[0]=0;//D�but de chaque ligne==>0 // otbGenericMsgDebugMacro(<<iteratorRegionSize[1]); // otbGenericMsgDebugMacro(<<iterationRegionStart[0]); @@ -271,44 +271,44 @@ int otbRegionProjection( int argc, char* argv[] ) std::cout << "Spacing : " << outputimage->GetSpacing() << std::endl; /*PointType ulc; - ulc[0]=inputimage->GetOrigin()[0]; - ulc[1]=inputimage->GetOrigin()[1]+(inputimage->GetSpacing()[1]*inputimage->GetLargestPossibleRegion().GetSize()[1]); - model->SetUpperLeftCorner(ulc);*/ + ulc[0]=inputimage->GetOrigin()[0]; + ulc[1]=inputimage->GetOrigin()[1]+(inputimage->GetSpacing()[1]*inputimage->GetLargestPossibleRegion().GetSize()[1]); + model->SetUpperLeftCorner(ulc);*/ /**On applique l'it�ration sur chaque portion**/ It=0; for (outputIt.GoToBegin(); !outputIt.IsAtEnd(); ++outputIt) - {//D�but boucle - //On get l'index courant - currentindex=outputIt.GetIndex(); - //On le transforme en Point physique - outputimage->TransformIndexToPhysicalPoint(currentindex, outputpoint); - otbGenericMsgDebugMacro(<< "Pour l'Index Ncurrent:(" << currentindex[0]<< ","<< currentindex[1] << ")"<< std::endl - << "Le point physique correspondant est: ("<< outputpoint[0]<< ","<<outputpoint[1]<< ")"); - - //On calcule les coordonn�es pixeliques sur l'image capteur - inputpoint = model->TransformPoint(outputpoint); - otbGenericMsgDebugMacro(<< "Les coordonnees en pixel sur l'image capteur correspondant a ce point sont:" << std::endl - << inputpoint[0] << ","<< inputpoint[1] ); - inputimage->TransformPhysicalPointToIndex(inputpoint,pixelindex); - otbGenericMsgDebugMacro(<< "L'index correspondant a ce point est:" << std::endl - << pixelindex[0] << ","<< pixelindex[1] ); - - /**On stocke les pixel index dans un tableau pixelindexarray**/ - pixelIndexArray[It]=pixelindex[0]; - pixelIndexArray[It+1]=pixelindex[1]; - //otbMsgDevMacro(<< "La valeur stock�e" << std::endl - // << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl; - - /**On stocke les pixel index dans un tableau currentindexarray**/ - currentIndexArray[It]=currentindex[0]; - currentIndexArray[It+1]=currentindex[1]; - otbMsgDevMacro(<< "La valeur stockee" << std::endl - << pixelIndexArray[It] << "," << pixelIndexArray[It+1] ); - It=It+2; - }//Fin boucle: on a stock� tous les index qui nous interesse + {//D�but boucle + //On get l'index courant + currentindex=outputIt.GetIndex(); + //On le transforme en Point physique + outputimage->TransformIndexToPhysicalPoint(currentindex, outputpoint); + otbGenericMsgDebugMacro(<< "Pour l'Index Ncurrent:(" << currentindex[0]<< ","<< currentindex[1] << ")"<< std::endl + << "Le point physique correspondant est: ("<< outputpoint[0]<< ","<<outputpoint[1]<< ")"); + + //On calcule les coordonn�es pixeliques sur l'image capteur + inputpoint = model->TransformPoint(outputpoint); + otbGenericMsgDebugMacro(<< "Les coordonnees en pixel sur l'image capteur correspondant a ce point sont:" << std::endl + << inputpoint[0] << ","<< inputpoint[1] ); + inputimage->TransformPhysicalPointToIndex(inputpoint,pixelindex); + otbGenericMsgDebugMacro(<< "L'index correspondant a ce point est:" << std::endl + << pixelindex[0] << ","<< pixelindex[1] ); + + /**On stocke les pixel index dans un tableau pixelindexarray**/ + pixelIndexArray[It]=pixelindex[0]; + pixelIndexArray[It+1]=pixelindex[1]; + //otbMsgDevMacro(<< "La valeur stock�e" << std::endl + // << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl; + + /**On stocke les pixel index dans un tableau currentindexarray**/ + currentIndexArray[It]=currentindex[0]; + currentIndexArray[It+1]=currentindex[1]; + otbMsgDevMacro(<< "La valeur stockee" << std::endl + << pixelIndexArray[It] << "," << pixelIndexArray[It+1] ); + It=It+2; + }//Fin boucle: on a stock� tous les index qui nous interesse //otbGenericMsgDebugMacro( << "It= " << It ); /**Calcul des max et min pour pouvoir extraire la bonne r�gion:**/ @@ -318,44 +318,44 @@ int otbRegionProjection( int argc, char* argv[] ) min_y=pixelIndexArray[1]; otbGenericMsgDebugMacro(<< "max_x=" << max_x<< std::endl - << "max_y=" << max_y<< std::endl - << "min_x=" << min_x<< std::endl - << "min_y=" << min_y); + << "max_y=" << max_y<< std::endl + << "min_x=" << min_x<< std::endl + << "min_y=" << min_y); for (j=0;j<It;j++) - { - if(j%2==0 && pixelIndexArray[j]>max_x){max_x=pixelIndexArray[j];} - if(j%2==0 && pixelIndexArray[j]<min_x){min_x=pixelIndexArray[j];} - if(j%2!=0 && pixelIndexArray[j]>max_y){max_y=pixelIndexArray[j];} - if(j%2!=0 && pixelIndexArray[j]<min_y){min_y=pixelIndexArray[j];} - }//Fin while + { + if(j%2==0 && pixelIndexArray[j]>max_x){max_x=pixelIndexArray[j];} + if(j%2==0 && pixelIndexArray[j]<min_x){min_x=pixelIndexArray[j];} + if(j%2!=0 && pixelIndexArray[j]>max_y){max_y=pixelIndexArray[j];} + if(j%2!=0 && pixelIndexArray[j]<min_y){min_y=pixelIndexArray[j];} + }//Fin while otbGenericMsgDebugMacro(<< "Mise a jour des max ...\nmax_x=" << max_x<< std::endl - << "max_y=" << max_y<< std::endl - << "min_x=" << min_x<< std::endl - << "min_y=" << min_y); + << "max_y=" << max_y<< std::endl + << "min_x=" << min_x<< std::endl + << "min_y=" << min_y); /**Cr�er un extractor pour chaque portion:**/ - InputImageType::RegionType extractregion; + InputImageType::RegionType extractregion; - InputImageType::IndexType extractstart; + InputImageType::IndexType extractstart; if (min_x<10 && min_y<10) - { - extractstart[0]=0; - extractstart[1]=0; - } + { + extractstart[0]=0; + extractstart[1]=0; + } else - { - extractstart[0]=min_x-10; - extractstart[1]=min_y-10; - } + { + extractstart[0]=min_x-10; + extractstart[1]=min_y-10; + } - InputImageType::SizeType extractsize; + InputImageType::SizeType extractsize; extractsize[0]=(max_x-min_x)+20; //Taille en X. - extractsize[1]=(max_y-min_y)+20; //Taille en Y. + extractsize[1]=(max_y-min_y)+20; //Taille en Y. extractregion.SetSize(extractsize); extractregion.SetIndex(extractstart); //extractregion=inputimage->GetRequestedRegion(); @@ -367,19 +367,19 @@ int otbRegionProjection( int argc, char* argv[] ) interpolator->SetInputImage(reader->GetOutput()); //interpolator->SetDefaultPixelValue(0); for ( k=0; k<It/2; k++) - { - pixelindexbis[0]= pixelIndexArray[2*k]; - pixelindexbis[1]= pixelIndexArray[2*k+1]; - currentindexbis[0]= currentIndexArray[2*k]; - currentindexbis[1]= currentIndexArray[2*k+1]; - //Test si notre index est dans la r�gion extraite: - if (interpolator->IsInsideBuffer(pixelindexbis)) - {pixelvalue=int (interpolator->EvaluateAtIndex(pixelindexbis));} - else {pixelvalue=0;} - otbMsgDevMacro(<< "La valeur du pixel est:" << std::endl - << float(pixelvalue) ); - outputimage->SetPixel(currentindexbis,pixelvalue); - } + { + pixelindexbis[0]= pixelIndexArray[2*k]; + pixelindexbis[1]= pixelIndexArray[2*k+1]; + currentindexbis[0]= currentIndexArray[2*k]; + currentindexbis[1]= currentIndexArray[2*k+1]; + //Test si notre index est dans la r�gion extraite: + if (interpolator->IsInsideBuffer(pixelindexbis)) + {pixelvalue=int (interpolator->EvaluateAtIndex(pixelindexbis));} + else {pixelvalue=0;} + otbMsgDevMacro(<< "La valeur du pixel est:" << std::endl + << float(pixelvalue) ); + outputimage->SetPixel(currentindexbis,pixelvalue); + } delete pixelIndexArray; otbGenericMsgDebugMacro(<< "pixelIndexArray deleted" ); delete currentIndexArray; diff --git a/Testing/Code/Projections/otbRegionProjectionResampler.cxx b/Testing/Code/Projections/otbRegionProjectionResampler.cxx index cd9d706909..0107b57863 100644 --- a/Testing/Code/Projections/otbRegionProjectionResampler.cxx +++ b/Testing/Code/Projections/otbRegionProjectionResampler.cxx @@ -78,18 +78,18 @@ int otbRegionProjectionResampler( int argc, char* argv[] ) typedef itk::TranslationTransform<double,2> TransformType; typedef otb::CompositeTransform<ModelType,TransformType> CompositeType; - ImageType::IndexType start; - ImageType::SizeType size; - ImageType::SpacingType spacing; - ImageType::PointType origin; + ImageType::IndexType start; + ImageType::SizeType size; + ImageType::SpacingType spacing; + ImageType::PointType origin; ImageType::RegionType region; //Allocate pointer ModelType::Pointer model = ModelType::New(); - ReaderType::Pointer reader = ReaderType::New(); - WriterType::Pointer writer = WriterType::New(); - InterpolatorType::Pointer interpolator = InterpolatorType::New(); - RescalerType::Pointer rescaler = RescalerType::New(); + ReaderType::Pointer reader = ReaderType::New(); + WriterType::Pointer writer = WriterType::New(); + InterpolatorType::Pointer interpolator = InterpolatorType::New(); + RescalerType::Pointer rescaler = RescalerType::New(); ResamplerType::Pointer resampler = ResamplerType::New(); // Set parameters ... diff --git a/Testing/Code/Projections/otbSensorImageDEMToCarto.cxx b/Testing/Code/Projections/otbSensorImageDEMToCarto.cxx index e8469b4129..939f17272f 100644 --- a/Testing/Code/Projections/otbSensorImageDEMToCarto.cxx +++ b/Testing/Code/Projections/otbSensorImageDEMToCarto.cxx @@ -37,8 +37,8 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) return EXIT_FAILURE; } - typedef itk::Point <double, 2> PointType; - PointType outputpoint; + typedef itk::Point <double, 2> PointType; + PointType outputpoint; /*************************************************/ /* Création des diverses images */ @@ -47,27 +47,27 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) typedef otb::Image<unsigned char, 2> CharImageType; typedef otb::Image<unsigned int, 2> ImageType; typedef otb::Image<unsigned int, 2> InputImageType; - ImageType::Pointer outputimage = ImageType::New(); - CharImageType::Pointer charoutputimage=CharImageType::New(); + ImageType::Pointer outputimage = ImageType::New(); + CharImageType::Pointer charoutputimage=CharImageType::New(); - ImageType::PixelType pixelvalue; - ImageType::IndexType start; + ImageType::PixelType pixelvalue; + ImageType::IndexType start; start[0]=0; start[1]=0; - ImageType::SizeType size; + ImageType::SizeType size; size[0]=atoi(argv[5]); //Taille en X. - size[1]=atoi(argv[6]); //Taille en Y. + size[1]=atoi(argv[6]); //Taille en Y. - ImageType::SpacingType spacing; + ImageType::SpacingType spacing; spacing[0]=atof(argv[9]); spacing[1]=atof(argv[10]); - ImageType::PointType origin; + ImageType::PointType origin; origin[0]=strtod(argv[3], NULL); //longitude de l'origine. origin[1]=strtod(argv[4], NULL); //latitude de l'origine. - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); region.SetIndex(start); @@ -112,13 +112,13 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /********************************************************/ typedef otb::ImageFileReader<ImageType> ReaderType; - ReaderType::Pointer reader=ReaderType::New(); + ReaderType::Pointer reader=ReaderType::New(); reader->SetFileName(argv[1]); - ImageType::Pointer inputimage= reader->GetOutput(); - ImageType::IndexType currentindex; - ImageType::IndexType currentindexbis; - // ImageType::IndexType pixelindex; - ImageType::IndexType pixelindexbis; + ImageType::Pointer inputimage= reader->GetOutput(); + ImageType::IndexType currentindex; + ImageType::IndexType currentindexbis; + // ImageType::IndexType pixelindex; + ImageType::IndexType pixelindexbis; otbGenericMsgDebugMacro(<< "Reader created " ); /********************************************************/ @@ -126,7 +126,7 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /********************************************************/ typedef itk::ExtractImageFilter<InputImageType,ImageType> ExtractType; - ExtractType::Pointer extract=ExtractType::New(); + ExtractType::Pointer extract=ExtractType::New(); otbGenericMsgDebugMacro(<< "Region Extractor created " ); /********************************************************/ @@ -134,7 +134,7 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /********************************************************/ typedef itk::LinearInterpolateImageFunction<ImageType, double> InterpolatorType; - InterpolatorType::Pointer interpolator=InterpolatorType::New(); + InterpolatorType::Pointer interpolator=InterpolatorType::New(); otbGenericMsgDebugMacro(<< "Interpolator created " ); /********************************************************/ @@ -144,8 +144,8 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) typedef otb::ImageFileWriter<ImageType> WriterType; typedef otb::ImageFileWriter<CharImageType> CharWriterType; - WriterType::Pointer extractorwriter=WriterType::New(); - CharWriterType::Pointer writer=CharWriterType::New(); + WriterType::Pointer extractorwriter=WriterType::New(); + CharWriterType::Pointer writer=CharWriterType::New(); extractorwriter->SetFileName("image_temp1.jpeg"); extractorwriter->SetInput(extract->GetOutput()); @@ -156,7 +156,7 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /********************************************************/ typedef itk::RescaleIntensityImageFilter<ImageType,CharImageType> RescalerType; - RescalerType::Pointer rescaler=RescalerType::New(); + RescalerType::Pointer rescaler=RescalerType::New(); rescaler->SetOutputMinimum(0); rescaler->SetOutputMaximum(255); otbGenericMsgDebugMacro(<< "rescaler created" ); @@ -165,8 +165,8 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /* Création de notre projection */ /********************************************************/ typedef otb::UtmInverseProjection utmProjection; - typedef utmProjection::OutputPointType OutputPoint; - typedef utmProjection::InputPointType InputPoint; + typedef utmProjection::OutputPointType OutputPoint; + typedef utmProjection::InputPointType InputPoint; InputPoint geoPoint; utmProjection::Pointer utmprojection= utmProjection::New(); utmprojection->SetZone(31); @@ -176,7 +176,7 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /* Création de RegionIteratorwithIndex */ /*************************************************/ - typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType; + typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType; otbGenericMsgDebugMacro(<< "Iterator created " ); //Donner une valeur par défaut numberofstreamdivision ou le faire fixer par l'utilisateur. @@ -190,9 +190,9 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) unsigned int count=0; unsigned int It, j, k, It1; int max_x, max_y, min_x, min_y; - ImageType::IndexType iterationRegionStart; - ImageType::SizeType iteratorRegionSize; - ImageType::RegionType iteratorRegion; + ImageType::IndexType iterationRegionStart; + ImageType::SizeType iteratorRegionSize; + ImageType::RegionType iteratorRegion; model->SetDEMDirectory(argv[8]); @@ -201,13 +201,13 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /**Création de la région pour chaque portion**/ iteratorRegionSize[0]=atoi(argv[5]); //Taille en X. if (count==NumberOfStreamDivisions-1) - {iteratorRegionSize[1]=(atoi(argv[6]))-((int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5))*(count); - iterationRegionStart[1]=(atoi(argv[5]))-(iteratorRegionSize[1]); - } + {iteratorRegionSize[1]=(atoi(argv[6]))-((int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5))*(count); + iterationRegionStart[1]=(atoi(argv[5]))-(iteratorRegionSize[1]); + } else - {iteratorRegionSize[1]=(int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5); //Taille en Y. - iterationRegionStart[1]=count*iteratorRegionSize[1]; - } + {iteratorRegionSize[1]=(int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5); //Taille en Y. + iterationRegionStart[1]=count*iteratorRegionSize[1]; + } iterationRegionStart[0]=0;//Début de chaque ligne==>0 iteratorRegion.SetSize(iteratorRegionSize); iteratorRegion.SetIndex(iterationRegionStart); @@ -224,45 +224,45 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) It=0; It1=0; for (outputIt.GoToBegin(); !outputIt.IsAtEnd(); ++outputIt) - {//Début boucle - //On get l'index courant - currentindex=outputIt.GetIndex(); - //On le transforme en Point physique - outputimage->TransformIndexToPhysicalPoint(currentindex, outputpoint); - otbMsgDevMacro(<< "Pour l'Index N°:(" << currentindex[0]<< ","<< currentindex[1] << ")"<< std::endl - << "Le point physique correspondant est: ("<< outputpoint[0]<< ","<< outputpoint[1]<< ")"); - - //On applique la projection: - geoPoint= utmprojection->TransformPoint(outputpoint); - otbMsgDevMacro(<< "Le point géographique correspondant est: ("<< geoPoint[0]<< ","<< geoPoint[1]<< ")"); - - //On calcule les coordonnées pixeliques sur l'image capteur - inputpoint = model->TransformPoint(geoPoint); - otbMsgDevMacro(<< "Les coordonnées en pixel sur l'image capteur correspondant à ce point sont:" << std::endl - << inputpoint[0] << ","<< inputpoint[1] ); - //inputimage->TransformPhysicalPointToIndex(inputpoint,pixelindex); - // otbMsgDevMacro(<< "L'index correspondant à ce point est:" << std::endl - // << pixelindex[0] << ","<< pixelindex[1] ); - - /**On stocke les pixel index dans un tableau pixelindexarray**/ - // pixelIndexArray[It]=pixelindex[0]; - // pixelIndexArray[It+1]=pixelindex[1]; - pixelIndexArray[It]=static_cast<int>(inputpoint[0]); - pixelIndexArray[It+1]=static_cast<int>(inputpoint[1]); - - otbMsgDevMacro(<< "La valeur stockée" << std::endl - << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl); - - /**On stocke les pixel index dans un tableau currentindexarray**/ - currentIndexArray[It]=currentindex[0]; - currentIndexArray[It+1]=currentindex[1]; - otbMsgDevMacro(<< "La valeur stockée" << std::endl - << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl); - - - It=It+2; - It1=It1+1; - }//Fin boucle: on a stocké tous les index qui nous interesse + {//Début boucle + //On get l'index courant + currentindex=outputIt.GetIndex(); + //On le transforme en Point physique + outputimage->TransformIndexToPhysicalPoint(currentindex, outputpoint); + otbMsgDevMacro(<< "Pour l'Index N°:(" << currentindex[0]<< ","<< currentindex[1] << ")"<< std::endl + << "Le point physique correspondant est: ("<< outputpoint[0]<< ","<< outputpoint[1]<< ")"); + + //On applique la projection: + geoPoint= utmprojection->TransformPoint(outputpoint); + otbMsgDevMacro(<< "Le point géographique correspondant est: ("<< geoPoint[0]<< ","<< geoPoint[1]<< ")"); + + //On calcule les coordonnées pixeliques sur l'image capteur + inputpoint = model->TransformPoint(geoPoint); + otbMsgDevMacro(<< "Les coordonnées en pixel sur l'image capteur correspondant à ce point sont:" << std::endl + << inputpoint[0] << ","<< inputpoint[1] ); + //inputimage->TransformPhysicalPointToIndex(inputpoint,pixelindex); + // otbMsgDevMacro(<< "L'index correspondant à ce point est:" << std::endl + // << pixelindex[0] << ","<< pixelindex[1] ); + + /**On stocke les pixel index dans un tableau pixelindexarray**/ + // pixelIndexArray[It]=pixelindex[0]; + // pixelIndexArray[It+1]=pixelindex[1]; + pixelIndexArray[It]=static_cast<int>(inputpoint[0]); + pixelIndexArray[It+1]=static_cast<int>(inputpoint[1]); + + otbMsgDevMacro(<< "La valeur stockée" << std::endl + << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl); + + /**On stocke les pixel index dans un tableau currentindexarray**/ + currentIndexArray[It]=currentindex[0]; + currentIndexArray[It+1]=currentindex[1]; + otbMsgDevMacro(<< "La valeur stockée" << std::endl + << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl); + + + It=It+2; + It1=It1+1; + }//Fin boucle: on a stocké tous les index qui nous interesse /**Calcul des max et min pour pouvoir extraire la bonne région:**/ max_x=pixelIndexArray[0]; @@ -271,39 +271,39 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) min_y=pixelIndexArray[1]; for (j=0;j<It;j++) - { - if(j%2==0 && pixelIndexArray[j]>max_x){max_x=pixelIndexArray[j];} - if(j%2==0 && pixelIndexArray[j]<min_x){min_x=pixelIndexArray[j];} - if(j%2!=0 && pixelIndexArray[j]>max_y){max_y=pixelIndexArray[j];} - if(j%2!=0 && pixelIndexArray[j]<min_y){min_y=pixelIndexArray[j];} - }//Fin while + { + if(j%2==0 && pixelIndexArray[j]>max_x){max_x=pixelIndexArray[j];} + if(j%2==0 && pixelIndexArray[j]<min_x){min_x=pixelIndexArray[j];} + if(j%2!=0 && pixelIndexArray[j]>max_y){max_y=pixelIndexArray[j];} + if(j%2!=0 && pixelIndexArray[j]<min_y){min_y=pixelIndexArray[j];} + }//Fin while otbMsgDevMacro(<< "max_x=" << max_x<< std::endl - << "max_y=" << max_y<< std::endl - << "min_x=" << min_x<< std::endl - << "min_y=" << min_y); + << "max_y=" << max_y<< std::endl + << "min_x=" << min_x<< std::endl + << "min_y=" << min_y); /**Créer un extractor pour chaque portion:**/ - InputImageType::RegionType extractregion; + InputImageType::RegionType extractregion; - InputImageType::IndexType extractstart; + InputImageType::IndexType extractstart; if (min_x<10 && min_y<10) - { - extractstart[0]=0; - extractstart[1]=0; - } + { + extractstart[0]=0; + extractstart[1]=0; + } else - { - extractstart[0]=min_x-10; - extractstart[1]=min_y-10; - } + { + extractstart[0]=min_x-10; + extractstart[1]=min_y-10; + } - InputImageType::SizeType extractsize; + InputImageType::SizeType extractsize; extractsize[0]=(max_x-min_x)+20; //Taille en X. - extractsize[1]=(max_y-min_y)+20; //Taille en Y. + extractsize[1]=(max_y-min_y)+20; //Taille en Y. extractregion.SetSize(extractsize); extractregion.SetIndex(extractstart); extract->SetExtractionRegion(extractregion); @@ -313,24 +313,24 @@ int otbSensorImageDEMToCarto( int argc, char* argv[] ) /**Interpolation:**/ interpolator->SetInputImage(reader->GetOutput()); for ( k=0; k<It/2; k++) - { - pixelindexbis[0]= pixelIndexArray[2*k]; - pixelindexbis[1]= pixelIndexArray[2*k+1]; - currentindexbis[0]= currentIndexArray[2*k]; - currentindexbis[1]= currentIndexArray[2*k+1]; + { + pixelindexbis[0]= pixelIndexArray[2*k]; + pixelindexbis[1]= pixelIndexArray[2*k+1]; + currentindexbis[0]= currentIndexArray[2*k]; + currentindexbis[1]= currentIndexArray[2*k+1]; - //Test si notre index est dans la région extraite: - if (interpolator->IsInsideBuffer(pixelindexbis) ) - { - pixelvalue=int (interpolator->EvaluateAtIndex(pixelindexbis)); - } - else {pixelvalue=0;} + //Test si notre index est dans la région extraite: + if (interpolator->IsInsideBuffer(pixelindexbis) ) + { + pixelvalue=int (interpolator->EvaluateAtIndex(pixelindexbis)); + } + else {pixelvalue=0;} - otbMsgDevMacro(<< "La valeur du pixel est:"<< float(pixelvalue) ); + otbMsgDevMacro(<< "La valeur du pixel est:"<< float(pixelvalue) ); - outputimage->SetPixel(currentindexbis,pixelvalue); + outputimage->SetPixel(currentindexbis,pixelvalue); - } + } delete pixelIndexArray; otbMsgDevMacro(<< "pixelIndexArray deleted" ); delete currentIndexArray; diff --git a/Testing/Code/Projections/otbSensorImageToCarto.cxx b/Testing/Code/Projections/otbSensorImageToCarto.cxx index d770e70b2a..80911126a4 100644 --- a/Testing/Code/Projections/otbSensorImageToCarto.cxx +++ b/Testing/Code/Projections/otbSensorImageToCarto.cxx @@ -62,8 +62,8 @@ int otbSensorImageToCarto( int argc, char* argv[] ) return EXIT_FAILURE; } - typedef itk::Point <double, 2> PointType; - PointType outputpoint; + typedef itk::Point <double, 2> PointType; + PointType outputpoint; /*************************************************/ /* Création de l'image de sortie outputimage */ @@ -71,27 +71,27 @@ int otbSensorImageToCarto( int argc, char* argv[] ) typedef otb::Image<unsigned char, 2> CharImageType; typedef otb::Image<unsigned int, 2> ImageType; typedef otb::Image<unsigned int, 2> InputImageType; - ImageType::Pointer outputimage = ImageType::New(); + ImageType::Pointer outputimage = ImageType::New(); - ImageType::PixelType pixelvalue; + ImageType::PixelType pixelvalue; - ImageType::IndexType start; + ImageType::IndexType start; start[0]=0; start[1]=0; - ImageType::SizeType size; + ImageType::SizeType size; size[0]=atoi(argv[5]); //Taille en X. - size[1]=atoi(argv[6]); //Taille en Y. + size[1]=atoi(argv[6]); //Taille en Y. - ImageType::SpacingType spacing; + ImageType::SpacingType spacing; spacing[0]=atof(argv[8]); spacing[1]=atof(argv[9]); - ImageType::PointType origin; + ImageType::PointType origin; origin[0]=strtod(argv[3], NULL); //longitude de l'origine. origin[1]=strtod(argv[4], NULL); //latitude de l'origine. - ImageType::RegionType region; + ImageType::RegionType region; region.SetSize(size); region.SetIndex(start); @@ -118,8 +118,8 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /* Création de notre modèle en fonction de l'image */ /********************************************************/ typedef otb::ImageFileReader<ImageType> ReaderType; - ReaderType::Pointer reader=ReaderType::New(); - //ReaderType::Pointer reader1=ReaderType::New(); + ReaderType::Pointer reader=ReaderType::New(); + //ReaderType::Pointer reader1=ReaderType::New(); reader->SetFileName(argv[1]); reader->GenerateOutputInformation(); @@ -127,15 +127,15 @@ int otbSensorImageToCarto( int argc, char* argv[] ) otb::ImageKeywordlist otb_tmp_image; - /* itk::ExposeMetaData< otb::ImageKeywordlist >(image_medianFilter->GetOutput()->GetMetaDataDictionary(), - otb::MetaDataKey::OSSIMKeywordlistKey, - otb_tmp_image);*/ + /* itk::ExposeMetaData< otb::ImageKeywordlist >(image_medianFilter->GetOutput()->GetMetaDataDictionary(), + otb::MetaDataKey::OSSIMKeywordlistKey, + otb_tmp_image);*/ otb_tmp_image = reader->GetOutput()->GetImageKeywordlist(); ossimKeywordlist ossim_kwl_image; otb_tmp_image.convertToOSSIMKeywordlist(ossim_kwl_image); - std::cout << " ossim_kwl_image: "<<ossim_kwl_image<<std::endl; + std::cout << " ossim_kwl_image: "<<ossim_kwl_image<<std::endl; ossimRefPtr<ossimProjection> toto = ossimProjectionFactoryRegistry::instance()->createProjection(ossim_kwl_image); if( toto.valid() == false) @@ -165,17 +165,17 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /********************************************************/ //reader1->SetFileName(argv[2]); - //ImageType::Pointer image = reader1->GetOutput(); + //ImageType::Pointer image = reader1->GetOutput(); //reader->Update(); - ImageType::Pointer inputimage= reader->GetOutput(); - ImageType::IndexType currentindex; - ImageType::IndexType currentindexbis; - //ImageType::IndexType pixelindex; - ImageType::IndexType pixelindexbis; + ImageType::Pointer inputimage= reader->GetOutput(); + ImageType::IndexType currentindex; + ImageType::IndexType currentindexbis; + //ImageType::IndexType pixelindex; + ImageType::IndexType pixelindexbis; otbGenericMsgDebugMacro(<< "Reader created " ); //Stocker les caractéristiques de notre image capteur: - // ImageType::SizeType inputimagesize; + // ImageType::SizeType inputimagesize; // inputimagesize=inputimage->GetLargestPossibleRegion().GetSize(); // //inputimagesize=inputimage->GetSize(); // std::cout << "Dimension de notre image capteur:"<< endl @@ -187,7 +187,7 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /********************************************************/ typedef itk::ExtractImageFilter<InputImageType,ImageType> ExtractType; - ExtractType::Pointer extract=ExtractType::New(); + ExtractType::Pointer extract=ExtractType::New(); otbGenericMsgDebugMacro(<< "Region Extractor created " ); /********************************************************/ @@ -195,7 +195,7 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /********************************************************/ typedef itk::LinearInterpolateImageFunction<ImageType, double> InterpolatorType; - InterpolatorType::Pointer interpolator=InterpolatorType::New(); + InterpolatorType::Pointer interpolator=InterpolatorType::New(); otbGenericMsgDebugMacro(<< "Interpolator created " ); /********************************************************/ @@ -204,8 +204,8 @@ int otbSensorImageToCarto( int argc, char* argv[] ) typedef otb::ImageFileWriter<ImageType> WriterType; typedef otb::ImageFileWriter<CharImageType> CharWriterType; - WriterType::Pointer extractorwriter=WriterType::New(); - CharWriterType::Pointer writer=CharWriterType::New(); + WriterType::Pointer extractorwriter=WriterType::New(); + CharWriterType::Pointer writer=CharWriterType::New(); extractorwriter->SetFileName("image_temp.jpeg"); extractorwriter->SetInput(extract->GetOutput()); otbGenericMsgDebugMacro(<< "extractorwriter created" ); @@ -215,7 +215,7 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /********************************************************/ typedef itk::RescaleIntensityImageFilter<ImageType,CharImageType> RescalerType; - RescalerType::Pointer rescaler=RescalerType::New(); + RescalerType::Pointer rescaler=RescalerType::New(); rescaler->SetOutputMinimum(0); rescaler->SetOutputMaximum(255); otbGenericMsgDebugMacro(<< "rescaler created" ); @@ -224,8 +224,8 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /* Création de notre projection */ /********************************************************/ typedef otb::UtmInverseProjection utmProjection; - typedef utmProjection::OutputPointType OutputPoint; - typedef utmProjection::InputPointType InputPoint; + typedef utmProjection::OutputPointType OutputPoint; + typedef utmProjection::InputPointType InputPoint; InputPoint geoPoint; utmProjection::Pointer utmprojection= utmProjection::New(); utmprojection->SetZone(31); @@ -235,7 +235,7 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /* Création de RegionIteratorwithIndex */ /*************************************************/ - typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType; + typedef itk::ImageRegionIteratorWithIndex<ImageType> IteratorType; //IteratorType outputIt(outputimage, region); //Définition de notre itérateur. //std::cout << "Iterator created " << std::endl; @@ -250,22 +250,22 @@ int otbSensorImageToCarto( int argc, char* argv[] ) unsigned int count=0; unsigned int It, j, k; int max_x, max_y, min_x, min_y; - ImageType::IndexType iterationRegionStart; - ImageType::SizeType iteratorRegionSize; - ImageType::RegionType iteratorRegion; + ImageType::IndexType iterationRegionStart; + ImageType::SizeType iteratorRegionSize; + ImageType::RegionType iteratorRegion; for(count=0;count<NumberOfStreamDivisions;count++) {//début boucle principale /**Création de la région pour chaque portion**/ iteratorRegionSize[0]=atoi(argv[5]); //Taille en X. if (count==NumberOfStreamDivisions-1) - {iteratorRegionSize[1]=(atoi(argv[6]))-((int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5))*(count); - iterationRegionStart[1]=(atoi(argv[5]))-(iteratorRegionSize[1]); - } + {iteratorRegionSize[1]=(atoi(argv[6]))-((int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5))*(count); + iterationRegionStart[1]=(atoi(argv[5]))-(iteratorRegionSize[1]); + } else - {iteratorRegionSize[1]=(int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5); //Taille en Y. - iterationRegionStart[1]=count*iteratorRegionSize[1]; - } + {iteratorRegionSize[1]=(int)(((atoi(argv[6]))/NumberOfStreamDivisions)+0.5); //Taille en Y. + iterationRegionStart[1]=count*iteratorRegionSize[1]; + } iterationRegionStart[0]=0;//Début de chaque ligne==>0 // std::cout <<iteratorRegionSize[1]<< std::endl; // std::cout <<iterationRegionStart[0]<< std::endl; @@ -283,42 +283,42 @@ int otbSensorImageToCarto( int argc, char* argv[] ) /**On applique l'itération sur chaque portion**/ It=0; for (outputIt.GoToBegin(); !outputIt.IsAtEnd(); ++outputIt) - {//Début boucle - //On get l'index courant - currentindex=outputIt.GetIndex(); - //On le transforme en Point physique - outputimage->TransformIndexToPhysicalPoint(currentindex, outputpoint); - otbMsgDevMacro(<< "Pour l'Index N°:(" << currentindex[0]<< ","<< currentindex[1] << ")"<< std::endl - << "Le point physique correspondant est: ("<< outputpoint[0]<< ","<< outputpoint[1]<< ")"); - - //On applique la projection: - geoPoint= utmprojection->TransformPoint(outputpoint); - otbMsgDevMacro(<< "Le point géographique correspondant est: ("<< geoPoint[0]<< ","<< geoPoint[1]<< ")"); - //On calcule les coordonnées pixeliques sur l'image capteur - inputpoint = model->TransformPoint(geoPoint); - otbMsgDevMacro(<< "Les coordonnées en pixel sur l'image capteur correspondant à ce point sont:" << std::endl - << inputpoint[0] << ","<< inputpoint[1] ); - //inputimage->TransformPhysicalPointToIndex(inputpoint,pixelindex); - // otbMsgDevMacro(<< "L'index correspondant à ce point est:" << std::endl - // << pixelindex[0] << ","<< pixelindex[1] ); - - /**On stocke les pixel index dans un tableau pixelindexarray**/ - // pixelIndexArray[It]=pixelindex[0]; - // pixelIndexArray[It+1]=pixelindex[1]; - pixelIndexArray[It]=static_cast<int>(inputpoint[0]); - pixelIndexArray[It+1]=static_cast<int>(inputpoint[1]); - - - //std::cout << "La valeur stockée" << endl - // << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl; - - /**On stocke les pixel index dans un tableau currentindexarray**/ - currentIndexArray[It]=currentindex[0]; - currentIndexArray[It+1]=currentindex[1]; - otbMsgDevMacro(<< "La valeur stockée" << std::endl - << pixelIndexArray[It] << "," << pixelIndexArray[It+1]); - It=It+2; - }//Fin boucle: on a stocké tous les index qui nous interesse + {//Début boucle + //On get l'index courant + currentindex=outputIt.GetIndex(); + //On le transforme en Point physique + outputimage->TransformIndexToPhysicalPoint(currentindex, outputpoint); + otbMsgDevMacro(<< "Pour l'Index N°:(" << currentindex[0]<< ","<< currentindex[1] << ")"<< std::endl + << "Le point physique correspondant est: ("<< outputpoint[0]<< ","<< outputpoint[1]<< ")"); + + //On applique la projection: + geoPoint= utmprojection->TransformPoint(outputpoint); + otbMsgDevMacro(<< "Le point géographique correspondant est: ("<< geoPoint[0]<< ","<< geoPoint[1]<< ")"); + //On calcule les coordonnées pixeliques sur l'image capteur + inputpoint = model->TransformPoint(geoPoint); + otbMsgDevMacro(<< "Les coordonnées en pixel sur l'image capteur correspondant à ce point sont:" << std::endl + << inputpoint[0] << ","<< inputpoint[1] ); + //inputimage->TransformPhysicalPointToIndex(inputpoint,pixelindex); + // otbMsgDevMacro(<< "L'index correspondant à ce point est:" << std::endl + // << pixelindex[0] << ","<< pixelindex[1] ); + + /**On stocke les pixel index dans un tableau pixelindexarray**/ + // pixelIndexArray[It]=pixelindex[0]; + // pixelIndexArray[It+1]=pixelindex[1]; + pixelIndexArray[It]=static_cast<int>(inputpoint[0]); + pixelIndexArray[It+1]=static_cast<int>(inputpoint[1]); + + + //std::cout << "La valeur stockée" << endl + // << pixelIndexArray[It] << "," << pixelIndexArray[It+1] <<std::endl; + + /**On stocke les pixel index dans un tableau currentindexarray**/ + currentIndexArray[It]=currentindex[0]; + currentIndexArray[It+1]=currentindex[1]; + otbMsgDevMacro(<< "La valeur stockée" << std::endl + << pixelIndexArray[It] << "," << pixelIndexArray[It+1]); + It=It+2; + }//Fin boucle: on a stocké tous les index qui nous interesse //std::cout << "It= " << It << std::endl; /**Calcul des max et min pour pouvoir extraire la bonne région:**/ @@ -328,39 +328,39 @@ int otbSensorImageToCarto( int argc, char* argv[] ) min_y=pixelIndexArray[1]; for (j=0;j<It;j++) - { - if(j%2==0 && pixelIndexArray[j]>max_x){max_x=pixelIndexArray[j];} - if(j%2==0 && pixelIndexArray[j]<min_x){min_x=pixelIndexArray[j];} - if(j%2!=0 && pixelIndexArray[j]>max_y){max_y=pixelIndexArray[j];} - if(j%2!=0 && pixelIndexArray[j]<min_y){min_y=pixelIndexArray[j];} - }//Fin while + { + if(j%2==0 && pixelIndexArray[j]>max_x){max_x=pixelIndexArray[j];} + if(j%2==0 && pixelIndexArray[j]<min_x){min_x=pixelIndexArray[j];} + if(j%2!=0 && pixelIndexArray[j]>max_y){max_y=pixelIndexArray[j];} + if(j%2!=0 && pixelIndexArray[j]<min_y){min_y=pixelIndexArray[j];} + }//Fin while otbGenericMsgDebugMacro(<< "max_x=" << max_x<< std::endl - << "max_y=" << max_y<< std::endl - << "min_x=" << min_x<< std::endl - << "min_y=" << min_y); + << "max_y=" << max_y<< std::endl + << "min_x=" << min_x<< std::endl + << "min_y=" << min_y); /**Créer un extractor pour chaque portion:**/ - InputImageType::RegionType extractregion; + InputImageType::RegionType extractregion; - InputImageType::IndexType extractstart; + InputImageType::IndexType extractstart; if (min_x<10 && min_y<10) - { - extractstart[0]=0; - extractstart[1]=0; - } + { + extractstart[0]=0; + extractstart[1]=0; + } else - { - extractstart[0]=min_x-10; - extractstart[1]=min_y-10; - } + { + extractstart[0]=min_x-10; + extractstart[1]=min_y-10; + } - InputImageType::SizeType extractsize; + InputImageType::SizeType extractsize; extractsize[0]=(max_x-min_x)+20; //Taille en X. - extractsize[1]=(max_y-min_y)+20; //Taille en Y. + extractsize[1]=(max_y-min_y)+20; //Taille en Y. extractregion.SetSize(extractsize); extractregion.SetIndex(extractstart); //extractregion=inputimage->GetRequestedRegion(); @@ -372,19 +372,19 @@ int otbSensorImageToCarto( int argc, char* argv[] ) interpolator->SetInputImage(reader->GetOutput()); //interpolator->SetDefaultPixelValue(0); for ( k=0; k<It/2; k++) - { - pixelindexbis[0]= pixelIndexArray[2*k]; - pixelindexbis[1]= pixelIndexArray[2*k+1]; - currentindexbis[0]= currentIndexArray[2*k]; - currentindexbis[1]= currentIndexArray[2*k+1]; - //Test si notre index est dans la région extraite: - if (interpolator->IsInsideBuffer(pixelindexbis)) - {pixelvalue=int(interpolator->EvaluateAtIndex(pixelindexbis));} - else {pixelvalue=0;} - otbMsgDevMacro(<< "La valeur du pixel est:" << std::endl - << float(pixelvalue) ); - outputimage->SetPixel(currentindexbis,pixelvalue); - } + { + pixelindexbis[0]= pixelIndexArray[2*k]; + pixelindexbis[1]= pixelIndexArray[2*k+1]; + currentindexbis[0]= currentIndexArray[2*k]; + currentindexbis[1]= currentIndexArray[2*k+1]; + //Test si notre index est dans la région extraite: + if (interpolator->IsInsideBuffer(pixelindexbis)) + {pixelvalue=int(interpolator->EvaluateAtIndex(pixelindexbis));} + else {pixelvalue=0;} + otbMsgDevMacro(<< "La valeur du pixel est:" << std::endl + << float(pixelvalue) ); + outputimage->SetPixel(currentindexbis,pixelvalue); + } delete pixelIndexArray; otbGenericMsgDebugMacro(<< "pixelIndexArray deleted" ); delete currentIndexArray; diff --git a/Testing/Code/Radiometry/otbFilterFunctionValues.cxx b/Testing/Code/Radiometry/otbFilterFunctionValues.cxx index a55b32353f..3e230feb12 100644 --- a/Testing/Code/Radiometry/otbFilterFunctionValues.cxx +++ b/Testing/Code/Radiometry/otbFilterFunctionValues.cxx @@ -47,8 +47,8 @@ int otbFilterFunctionValuesTest(int argc, char * argv[]) // Call interpolate otb::SIXSTraits::ComputeWavelenghtSpectralBandValuesFor6S( - SIXSStepOfWavelenghtSpectralBandValues, - object); + SIXSStepOfWavelenghtSpectralBandValues, + object); // Writing output file diff --git a/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx index 662e447b83..7cc3dfcde6 100644 --- a/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx +++ b/Testing/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.cxx @@ -68,11 +68,11 @@ int otbMultiChannelRAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[] argc--; argv++; if ( strArgv == "ARVI" ) return( generic_MultiChannelRAndBAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::ARVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - InputImageType::InternalPixelType, + otb::Functor::ARVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + InputImageType::InternalPixelType, OutputImageType::PixelType> > - (argc,argv) ); + (argc,argv) ); else return EXIT_FAILURE; diff --git a/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx index 792e5c0d05..8d06c3ab59 100644 --- a/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx +++ b/Testing/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.cxx @@ -64,35 +64,35 @@ int otbMultiChannelRAndNIRVegetationIndexImageFilter(int argc, char * argv[]) argc--; argv++; if ( strArgv == "NDVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::NDVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv) ); + otb::Functor::NDVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv) ); else if ( strArgv == "RVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::RVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv) ); - /* else if ( strArgv == "PVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::PVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv) );*/ + otb::Functor::RVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv) ); + /* else if ( strArgv == "PVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, + otb::Functor::PVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv) );*/ else if ( strArgv == "SAVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::SAVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv) ); - /* else if ( strArgv == "TSAVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::TSAVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv) );*/ + otb::Functor::SAVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv) ); + /* else if ( strArgv == "TSAVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, + otb::Functor::TSAVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv) );*/ else if ( strArgv == "MSAVI" ) return( generic_MultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::MSAVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv) ); + otb::Functor::MSAVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv) ); else return EXIT_FAILURE; return EXIT_SUCCESS; diff --git a/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx index 765d602769..ada91f2544 100644 --- a/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx +++ b/Testing/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.cxx @@ -77,11 +77,11 @@ int otbRAndBAndNIRVegetationIndexImageFilter(int argc, char * argv[]) argc--; argv++; if ( strArgv == "ARVI" ) return( generic_RAndBAndNIRVegetationIndexImageFilter<InputRImageType, InputBImageType, InputNIRImageType, OutputImageType, - otb::Functor::ARVI< InputRImageType::PixelType, - InputBImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv) ); + otb::Functor::ARVI< InputRImageType::PixelType, + InputBImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv) ); else return EXIT_FAILURE; return EXIT_SUCCESS; diff --git a/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx index 760062801b..20ecc7fd1b 100644 --- a/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx +++ b/Testing/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.cxx @@ -68,35 +68,35 @@ int otbRAndNIRVegetationIndexImageFilter(int argc, char * argv[]) argc--; argv++; if ( strArgv == "NDVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::NDVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv) ); + otb::Functor::NDVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv) ); else if ( strArgv == "RVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::RVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv) ); - /* else if ( strArgv == "PVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::PVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv) );*/ + otb::Functor::RVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv) ); + /* else if ( strArgv == "PVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, + otb::Functor::PVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv) );*/ else if ( strArgv == "SAVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::SAVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv) ); - /* else if ( strArgv == "TSAVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::TSAVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv) );*/ + otb::Functor::SAVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv) ); + /* else if ( strArgv == "TSAVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, + otb::Functor::TSAVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv) );*/ else if ( strArgv == "MSAVI" ) return( generic_RAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::MSAVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv) ); + otb::Functor::MSAVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv) ); else return EXIT_FAILURE; return EXIT_SUCCESS; diff --git a/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx b/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx index 75ed70a1b6..e2305b75e9 100644 --- a/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx +++ b/Testing/Code/Radiometry/otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter.cxx @@ -132,10 +132,10 @@ int otbRomaniaReflectanceToRomaniaSurfaceReflectanceImageFilter(int argc, char * fin >> maxSpectralValue;//wlsup; while (!fin.eof() && fin.good()) - { - fin >> value; - vect.push_back(value); - } + { + fin >> value; + vect.push_back(value); + } fin.close(); functionValues->SetFilterFunctionValues(vect); functionValues->SetMinSpectralValue(minSpectralValue); diff --git a/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx b/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx index 8f2b60ca09..47cb0e4706 100644 --- a/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx +++ b/Testing/Code/Radiometry/otbSIXSTraitsComputeAtmosphericParameters.cxx @@ -101,27 +101,27 @@ int otbSIXSTraitsComputeAtmosphericParametersTest(int argc, char * argv[]) functionValues->SetUserStep(.0025); otb::SIXSTraits::ComputeAtmosphericParameters( - SolarZenithalAngle, - SolarAzimutalAngle, - ViewingZenithalAngle, - ViewingAzimutalAngle, - Month, - Day, - AtmosphericPressure, - WaterVaporAmount, - OzoneAmount, - AerosolModel, - AerosolOptical, - functionValues, - AtmosphericReflectance, - AtmosphericSphericalAlbedo, - TotalGaseousTransmission, - DownwardTransmittance, - UpwardTransmittance, - UpwardDiffuseTransmittance, - UpwardDirectTransmittance, - UpwardDiffuseTransmittanceForRayleigh, - UpwardDiffuseTransmittanceForAerosol ); + SolarZenithalAngle, + SolarAzimutalAngle, + ViewingZenithalAngle, + ViewingAzimutalAngle, + Month, + Day, + AtmosphericPressure, + WaterVaporAmount, + OzoneAmount, + AerosolModel, + AerosolOptical, + functionValues, + AtmosphericReflectance, + AtmosphericSphericalAlbedo, + TotalGaseousTransmission, + DownwardTransmittance, + UpwardTransmittance, + UpwardDiffuseTransmittance, + UpwardDirectTransmittance, + UpwardDiffuseTransmittanceForRayleigh, + UpwardDiffuseTransmittanceForAerosol ); fout.open(outname); fout <<" ---------------------------------------------------------"<<std::endl; diff --git a/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx index 815f80d344..503ba70478 100644 --- a/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx +++ b/Testing/Code/Radiometry/otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter.cxx @@ -66,14 +66,14 @@ int otbSetASetBMultiChannelRAndNIRVegetationIndexImageFilter(int argc, char * ar argc--; argv++; if ( strArgv == "PVI" ) generic_SetASetBMultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::PVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv); + otb::Functor::PVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv); else if ( strArgv == "TSAVI" ) generic_SetASetBMultiChannelRAndNIRVegetationIndexImageFilter<InputImageType, OutputImageType, - otb::Functor::TSAVI< InputImageType::InternalPixelType, - InputImageType::InternalPixelType, - OutputImageType::PixelType> > - (argc,argv); + otb::Functor::TSAVI< InputImageType::InternalPixelType, + InputImageType::InternalPixelType, + OutputImageType::PixelType> > + (argc,argv); return EXIT_SUCCESS; } diff --git a/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx b/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx index c48e41de31..25ad8d1d64 100644 --- a/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx +++ b/Testing/Code/Radiometry/otbSetASetBRAndNIRVegetationIndexImageFilter.cxx @@ -69,14 +69,14 @@ int otbSetASetBRAndNIRVegetationIndexImageFilter(int argc, char * argv[]) argc--; argv++; if ( strArgv == "PVI" ) generic_SetASetBRAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::PVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv); + otb::Functor::PVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv); else if ( strArgv == "TSAVI" ) generic_SetASetBRAndNIRVegetationIndexImageFilter<InputRImageType, InputNIRImageType, OutputImageType, - otb::Functor::TSAVI< InputRImageType::PixelType, - InputNIRImageType::PixelType, - OutputImageType::PixelType> > - (argc,argv); + otb::Functor::TSAVI< InputRImageType::PixelType, + InputNIRImageType::PixelType, + OutputImageType::PixelType> > + (argc,argv); return EXIT_SUCCESS; } diff --git a/Testing/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.cxx b/Testing/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.cxx index e635ab142d..90187e927f 100644 --- a/Testing/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.cxx +++ b/Testing/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.cxx @@ -139,10 +139,10 @@ int otbSurfaceAdjencyEffect6SCorrectionSchemeFilter(int argc, char * argv[]) fin >> maxSpectralValue;//wlsup; while (!fin.eof() && fin.good()) - { - fin >> value; - vect.push_back(value); - } + { + fin >> value; + vect.push_back(value); + } fin.close(); functionValues->SetFilterFunctionValues(vect); diff --git a/Testing/Code/SARPolarimetry/otbHHnHVPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbHHnHVPolarimetricSynthesisFilter.cxx index f273bbc53c..2e0d6d488f 100644 --- a/Testing/Code/SARPolarimetry/otbHHnHVPolarimetricSynthesisFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbHHnHVPolarimetricSynthesisFilter.cxx @@ -43,7 +43,7 @@ int otbHHnHVPolarimetricSynthesisFilter( int argc, char * argv[] ) typedef std::complex <double> InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/SARPolarimetry/otbHHnHVnVVPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbHHnHVnVVPolarimetricSynthesisFilter.cxx index 63bc3e5ee0..a4db3be847 100644 --- a/Testing/Code/SARPolarimetry/otbHHnHVnVVPolarimetricSynthesisFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbHHnHVnVVPolarimetricSynthesisFilter.cxx @@ -44,7 +44,7 @@ int otbHHnHVnVVPolarimetricSynthesisFilter( int argc, char * argv[] ) typedef std::complex <double> InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx index 0c0699fc2b..f5dce8697d 100644 --- a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.cxx @@ -44,7 +44,7 @@ int otbMultiChannelsPolarimetricSynthesisFilter( int argc, char * argv[] ) typedef std::complex <double> InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx index 40c80e876e..63542ccfb4 100644 --- a/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilterNew.cxx @@ -29,7 +29,7 @@ int otbMultiChannelsPolarimetricSynthesisFilterNew( int argc, char * argv[] ) { typedef double InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.cxx index 66b8320be4..436e7b8b49 100644 --- a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.cxx @@ -44,7 +44,7 @@ int otbPolarimetricSynthesisFilter( int argc, char * argv[] ) double KhiR = strtod(argv[9],NULL); typedef std::complex <double> InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx index fab9003eb9..97cb64b105 100644 --- a/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx +++ b/Testing/Code/SARPolarimetry/otbPolarimetricSynthesisFilterNew.cxx @@ -29,7 +29,7 @@ int otbPolarimetricSynthesisFilterNew( int argc, char * argv[] ) { typedef std::complex<double> InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/SARPolarimetry/otbVHnVVPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbVHnVVPolarimetricSynthesisFilter.cxx index 2994cea96a..6afab82f9e 100644 --- a/Testing/Code/SARPolarimetry/otbVHnVVPolarimetricSynthesisFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbVHnVVPolarimetricSynthesisFilter.cxx @@ -42,7 +42,7 @@ int otbVHnVVPolarimetricSynthesisFilter( int argc, char * argv[] ) double KhiR = strtod(argv[7],NULL); typedef std::complex <double> InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::Image< InputPixelType, Dimension > InputImageType; diff --git a/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx b/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx index 8c24b9d805..f93450fc88 100644 --- a/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbVectorMultiChannelsPolarimetricSynthesisFilter.cxx @@ -40,7 +40,7 @@ int otbVectorMultiChannelsPolarimetricSynthesisFilter( int argc, char * argv[] ) double KhiR = strtod(argv[6],NULL); typedef std::complex <double> InputPixelType; - typedef double OutputPixelType; + typedef double OutputPixelType; const unsigned int Dimension = 2; typedef otb::VectorImage< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx b/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx index 87ea14146b..889da2c3cc 100644 --- a/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx +++ b/Testing/Code/SpatialReasoning/otbImageToImageRCC8Calculator.cxx @@ -56,48 +56,48 @@ int otbImageToImageRCC8Calculator(int argc, char* argv[]) for(IteratorType it1=images->Begin();it1!=images->End();++it1) { for(IteratorType it2=images->Begin();it2!=images->End();++it2) - { - std::cout << "Test: computing relation " << i <<","<< j << std::endl; - calc=CalculatorType::New(); - calc->SetInput1(it1.Get()); - calc->SetInput2(it2.Get()); - calc->Update(); - out<<calc->GetValue()<<"\t"; + { + std::cout << "Test: computing relation " << i <<","<< j << std::endl; + calc=CalculatorType::New(); + calc->SetInput1(it1.Get()); + calc->SetInput2(it2.Get()); + calc->Update(); + out<<calc->GetValue()<<"\t"; - if(calc->GetValue()<3 - ||calc->GetValue()==4 - ||calc->GetValue()==6) - { - calc1=CalculatorType::New(); - calc1->SetInput1(it1.Get()); - calc1->SetInput2(it2.Get()); - calc1->SetLevel1APrioriKnowledge(true); - calc1->Update(); - if(calc1->GetValue()!=calc->GetValue()) - { - std::cout<<"Test failed: Result with level1AprioriKnowledge "; - std::cout<<"different from result without a priori knowledge"<<std::endl; - std::cout<<calc->GetValue()<<"!="<<calc1->GetValue()<<std::endl; - return EXIT_FAILURE; - } - } - if(calc->GetValue()<4) - { - calc2=CalculatorType::New(); - calc2->SetInput1(it1.Get()); - calc2->SetInput2(it2.Get()); - calc2->SetLevel3APrioriKnowledge(true); - calc2->Update(); - if(calc2->GetValue()!=calc->GetValue()) - { - std::cout<<"Test failed: Result with level3AprioriKnowledge "; - std::cout<<"different from result without a priori knowledge"<<std::endl; - std::cout<<calc->GetValue()<<"!="<<calc1->GetValue()<<std::endl; - return EXIT_FAILURE; - } - } - j++; - } + if(calc->GetValue()<3 + ||calc->GetValue()==4 + ||calc->GetValue()==6) + { + calc1=CalculatorType::New(); + calc1->SetInput1(it1.Get()); + calc1->SetInput2(it2.Get()); + calc1->SetLevel1APrioriKnowledge(true); + calc1->Update(); + if(calc1->GetValue()!=calc->GetValue()) + { + std::cout<<"Test failed: Result with level1AprioriKnowledge "; + std::cout<<"different from result without a priori knowledge"<<std::endl; + std::cout<<calc->GetValue()<<"!="<<calc1->GetValue()<<std::endl; + return EXIT_FAILURE; + } + } + if(calc->GetValue()<4) + { + calc2=CalculatorType::New(); + calc2->SetInput1(it1.Get()); + calc2->SetInput2(it2.Get()); + calc2->SetLevel3APrioriKnowledge(true); + calc2->Update(); + if(calc2->GetValue()!=calc->GetValue()) + { + std::cout<<"Test failed: Result with level3AprioriKnowledge "; + std::cout<<"different from result without a priori knowledge"<<std::endl; + std::cout<<calc->GetValue()<<"!="<<calc1->GetValue()<<std::endl; + return EXIT_FAILURE; + } + } + j++; + } j=1; i++; out<<std::endl; diff --git a/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx b/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx index c0e9416e51..a91098f568 100644 --- a/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx +++ b/Testing/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.cxx @@ -103,51 +103,51 @@ int otbPolygonToPolygonRCC8Calculator(int argc, char* argv[]) for(IteratorType it1=simplifier->GetOutput()->Begin();it1!=simplifier->GetOutput()->End();++it1) { for(IteratorType it2=simplifier->GetOutput()->Begin();it2!=simplifier->GetOutput()->End();++it2) - { - std::cout << "Test: computing relation " << i << "," << j << std::endl; - calc1=CalculatorType::New(); - calc1->SetPolygon1(it1.Get()); - calc1->SetPolygon2(it2.Get()); - calc1->Compute(); - out<<calc1->GetValue()<<"\t"; - std::cout << "Result without a priori knowledge " << calc1->GetValue() << std::endl; - - if(calc1->GetValue()<3 - ||calc1->GetValue()==4 - ||calc1->GetValue()==6) - { - calc2=CalculatorType::New(); - calc2->SetPolygon1(it1.Get()); - calc2->SetPolygon2(it2.Get()); - calc2->SetLevel1APrioriKnowledge(true); - calc2->Compute(); - std::cout << "Result with level1 a priori knowledge " << calc2->GetValue() << std::endl; - if(calc2->GetValue()!=calc1->GetValue()) - { - std::cout << "Test failed: Result with level1AprioriKnowledge "; - std::cout << "different from result without a priori knowledge" << std::endl; - std::cout << calc1->GetValue() << "!=" << calc2->GetValue() << std::endl; - return EXIT_FAILURE; - } - } - if(calc1->GetValue()<4) - { - calc3=CalculatorType::New(); - calc3->SetPolygon1(it1.Get()); - calc3->SetPolygon2(it2.Get()); - calc3->SetLevel3APrioriKnowledge(true); - calc3->Compute(); - std::cout << "Result with level3 a priori knowledge " << calc3->GetValue() << std::endl; - if(calc3->GetValue()!=calc1->GetValue()) - { - std::cout << "Test failed: Result with level3AprioriKnowledge "; - std::cout << "different from result without a priori knowledge" << std::endl; - std::cout << calc1->GetValue() << "!=" << calc3->GetValue() << std::endl; - return EXIT_FAILURE; - } - } - j++; - } + { + std::cout << "Test: computing relation " << i << "," << j << std::endl; + calc1=CalculatorType::New(); + calc1->SetPolygon1(it1.Get()); + calc1->SetPolygon2(it2.Get()); + calc1->Compute(); + out<<calc1->GetValue()<<"\t"; + std::cout << "Result without a priori knowledge " << calc1->GetValue() << std::endl; + + if(calc1->GetValue()<3 + ||calc1->GetValue()==4 + ||calc1->GetValue()==6) + { + calc2=CalculatorType::New(); + calc2->SetPolygon1(it1.Get()); + calc2->SetPolygon2(it2.Get()); + calc2->SetLevel1APrioriKnowledge(true); + calc2->Compute(); + std::cout << "Result with level1 a priori knowledge " << calc2->GetValue() << std::endl; + if(calc2->GetValue()!=calc1->GetValue()) + { + std::cout << "Test failed: Result with level1AprioriKnowledge "; + std::cout << "different from result without a priori knowledge" << std::endl; + std::cout << calc1->GetValue() << "!=" << calc2->GetValue() << std::endl; + return EXIT_FAILURE; + } + } + if(calc1->GetValue()<4) + { + calc3=CalculatorType::New(); + calc3->SetPolygon1(it1.Get()); + calc3->SetPolygon2(it2.Get()); + calc3->SetLevel3APrioriKnowledge(true); + calc3->Compute(); + std::cout << "Result with level3 a priori knowledge " << calc3->GetValue() << std::endl; + if(calc3->GetValue()!=calc1->GetValue()) + { + std::cout << "Test failed: Result with level3AprioriKnowledge "; + std::cout << "different from result without a priori knowledge" << std::endl; + std::cout << calc1->GetValue() << "!=" << calc3->GetValue() << std::endl; + return EXIT_FAILURE; + } + } + j++; + } j=1; i++; out<<std::endl; diff --git a/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx b/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx index d3b1395170..60fcfe8cb6 100644 --- a/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx +++ b/Testing/Code/SpatialReasoning/otbRCC8Graph.cxx @@ -91,68 +91,68 @@ int otbRCC8Graph(int argc, char* argv[]) rcc8Graph->SetVertex(1,vertex2); otbControlConditionTestMacro(rcc8Graph->GetNumberOfVertices()!=nbVertices, - "rcc8Graph->GetNumberOfVertices()!=nbVertices"); + "rcc8Graph->GetNumberOfVertices()!=nbVertices"); otbControlConditionTestMacro(rcc8Graph->GetVertex(0)->GetSegmentationLevel()!=vertex1SegLevel, - "rcc8Graph->GetVertex(0)->GetSegmentationLevel()!=vertex1SegLevel"); + "rcc8Graph->GetVertex(0)->GetSegmentationLevel()!=vertex1SegLevel"); otbControlConditionTestMacro(rcc8Graph->GetVertex(0)->GetSegmentationType()!=vertex1SegType, - "rcc8Graph->GetVertex(0)->GetSegmentationType()!=vertex1SegType"); + "rcc8Graph->GetVertex(0)->GetSegmentationType()!=vertex1SegType"); otbControlConditionTestMacro(rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(0)!=p1, - "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(0)!=p1"); + "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(0)!=p1"); otbControlConditionTestMacro(rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(1)!=p2, - "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(1)!=p2"); + "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(1)!=p2"); otbControlConditionTestMacro(rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(2)!=p3, - "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(2)!=p3"); + "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(2)!=p3"); otbControlConditionTestMacro(rcc8Graph->GetVertex(1)->GetSegmentationLevel()!=vertex2SegLevel, - "rcc8Graph->GetVertex(1)->GetSegmentationLevel()!=vertex2SegLevel"); + "rcc8Graph->GetVertex(1)->GetSegmentationLevel()!=vertex2SegLevel"); otbControlConditionTestMacro(rcc8Graph->GetVertex(1)->GetSegmentationType()!=vertex2SegType, - "rcc8Graph->GetVertex(1)->GetObjectLabelInImgage()!=vertex2SegType"); + "rcc8Graph->GetVertex(1)->GetObjectLabelInImgage()!=vertex2SegType"); otbControlConditionTestMacro(rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(0)!=p4, - "rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(0)!=p4"); + "rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(0)!=p4"); otbControlConditionTestMacro(rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(1)!=p5, - "rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(1)!=p5"); + "rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(1)!=p5"); otbControlConditionTestMacro(rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(2)!=p6, - "rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(2)!=p6"); + "rcc8Graph->GetVertex(1)->GetPath()->GetVertexList()->GetElement(2)!=p6"); VertexIteratorType v(rcc8Graph); v.GoToBegin(); otbControlConditionTestMacro(v.Get()->GetSegmentationLevel()!=vertex1SegLevel, - "v.Get()->GetSegmentationLevel()!=vertex1SegLevel"); + "v.Get()->GetSegmentationLevel()!=vertex1SegLevel"); otbControlConditionTestMacro(v.Get()->GetSegmentationType()!=vertex1SegType, - "v.Get()->GetSegmentationType()!=vertex1SegType"); + "v.Get()->GetSegmentationType()!=vertex1SegType"); otbControlConditionTestMacro(v.Get()->GetPath()->GetVertexList()->GetElement(0)!=p1, - "v.Get()->GetPath()->GetVertexList()->GetElement(0)!=p1"); + "v.Get()->GetPath()->GetVertexList()->GetElement(0)!=p1"); otbControlConditionTestMacro(v.Get()->GetPath()->GetVertexList()->GetElement(1)!=p2, - "v.Get()->GetPath()->GetVertexList()->GetElement(1)!=p2"); + "v.Get()->GetPath()->GetVertexList()->GetElement(1)!=p2"); otbControlConditionTestMacro(v.Get()->GetPath()->GetVertexList()->GetElement(2)!=p3, - "v.Get()->GetPath()->GetVertexList()->GetElement(2)!=p3"); + "v.Get()->GetPath()->GetVertexList()->GetElement(2)!=p3"); ++v; otbControlConditionTestMacro(v.Get()->GetSegmentationLevel()!=vertex2SegLevel, - "v.Get()->GetSegmentationLevel()!=vertex2SegLevel"); + "v.Get()->GetSegmentationLevel()!=vertex2SegLevel"); otbControlConditionTestMacro(v.Get()->GetSegmentationType()!=vertex2SegType, - "v.Get()->GetObjectLabelInImgage()!=vertex2SegType"); + "v.Get()->GetObjectLabelInImgage()!=vertex2SegType"); otbControlConditionTestMacro(v.Get()->GetPath()->GetVertexList()->GetElement(0)!=p4, - "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(0)!=p4"); + "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(0)!=p4"); otbControlConditionTestMacro(v.Get()->GetPath()->GetVertexList()->GetElement(1)!=p5, - "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(1)!=p5"); + "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(1)!=p5"); otbControlConditionTestMacro(v.Get()->GetPath()->GetVertexList()->GetElement(2)!=p6, - "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(2)!=p6"); + "rcc8Graph->GetVertex(0)->GetPath()->GetVertexList()->GetElement(2)!=p6"); // Testing the edge iterator rcc8Graph->AddEdge(0,1,otb::OTB_RCC8_NTPPI); otbControlConditionTestMacro(rcc8Graph->GetNumberOfEdges()!=1, - "rcc8Graph->GetNumberOfEdges()!=1"); + "rcc8Graph->GetNumberOfEdges()!=1"); EdgeIteratorType e(rcc8Graph); e.GoToBegin(); otbControlConditionTestMacro(e.GetValue()!=otb::OTB_RCC8_NTPPI, - "e.GetValue()!=otb::OTB_RCC8_NTPPI"); + "e.GetValue()!=otb::OTB_RCC8_NTPPI"); otbControlConditionTestMacro(e.GetSourceIndex()!=0, - "e.GetSourceIndex()!=0"); + "e.GetSourceIndex()!=0"); otbControlConditionTestMacro(e.GetTargetIndex()!=1, - "e.GetTargetIndex()!=1"); + "e.GetTargetIndex()!=1"); return EXIT_SUCCESS; diff --git a/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx b/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx index c088d9d799..94daca0f8a 100644 --- a/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx +++ b/Testing/Code/SpatialReasoning/otbRCC8GraphFileReader.cxx @@ -51,9 +51,9 @@ int otbRCC8GraphFileReader(int argc, char* argv[]) unsigned int count = 0; otbControlConditionTestMacro(graph->GetNumberOfVertices()!=4, - "graph->GetNumberOfVertices()!=4"); + "graph->GetNumberOfVertices()!=4"); otbControlConditionTestMacro(graph->GetNumberOfEdges()!=6, - "graph->GetNumberOfEdges()!=6"); + "graph->GetNumberOfEdges()!=6"); // Checking edges EdgeIteratorType eIt(graph); @@ -61,59 +61,59 @@ int otbRCC8GraphFileReader(int argc, char* argv[]) for(eIt.GoToBegin();!eIt.IsAtEnd();++eIt,++count) { switch(count) - { - case 0: - otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_EC, - "eIt.GetValue()!=otb::OTB_RCC8_EC"); - otbControlConditionTestMacro(eIt.GetSourceIndex()!=0, - "eIt.GetSourceIndex()!=0"); - otbControlConditionTestMacro(eIt.GetTargetIndex()!=1, - "eIt.GetTargetIndex()!=1"); - break; - case 1: - otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_PO, - "eIt.GetValue()!=otb::OTB_RCC8_PO"); - otbControlConditionTestMacro(eIt.GetSourceIndex()!=1, - "eIt.GetSourceIndex()!=1"); - otbControlConditionTestMacro(eIt.GetTargetIndex()!=2, - "eIt.GetTargetIndex()!=2"); - break; - case 2: - otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_TPP, - "eIt.GetValue()!=otb::OTB_RCC8_TPP"); - otbControlConditionTestMacro(eIt.GetSourceIndex()!=2, - "eIt.GetSourceIndex()!=2"); - otbControlConditionTestMacro(eIt.GetTargetIndex()!=3, - "eIt.GetTargetIndex()!=3"); - break; - case 3: - otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_TPPI, - "eIt.GetValue()!=otb::OTB_RCC8_TPPI"); - otbControlConditionTestMacro(eIt.GetSourceIndex()!=0, - "eIt.GetSourceIndex()!=0"); - otbControlConditionTestMacro(eIt.GetTargetIndex()!=2, - "eIt.GetTargetIndex()!=2"); - break; - case 4: - otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_NTPP, - "eIt.GetValue()!=otb::OTB_RCC8_NTPP"); - otbControlConditionTestMacro(eIt.GetSourceIndex()!=1, - "eIt.GetSourceIndex()!=1"); - otbControlConditionTestMacro(eIt.GetTargetIndex()!=3, - "eIt.GetTargetIndex()!=3"); - break; - case 5: - otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_NTPPI, - "eIt.GetValue()!=otb::OTB_RCC8_NTPPI"); - otbControlConditionTestMacro(eIt.GetSourceIndex()!=0, - "eIt.GetSourceIndex()!=0"); - otbControlConditionTestMacro(eIt.GetTargetIndex()!=3, - "eIt.GetTargetIndex()!=3"); - break; - default: - otbControlConditionTestMacro(true,"Error in graph reading."); - break; - } + { + case 0: + otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_EC, + "eIt.GetValue()!=otb::OTB_RCC8_EC"); + otbControlConditionTestMacro(eIt.GetSourceIndex()!=0, + "eIt.GetSourceIndex()!=0"); + otbControlConditionTestMacro(eIt.GetTargetIndex()!=1, + "eIt.GetTargetIndex()!=1"); + break; + case 1: + otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_PO, + "eIt.GetValue()!=otb::OTB_RCC8_PO"); + otbControlConditionTestMacro(eIt.GetSourceIndex()!=1, + "eIt.GetSourceIndex()!=1"); + otbControlConditionTestMacro(eIt.GetTargetIndex()!=2, + "eIt.GetTargetIndex()!=2"); + break; + case 2: + otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_TPP, + "eIt.GetValue()!=otb::OTB_RCC8_TPP"); + otbControlConditionTestMacro(eIt.GetSourceIndex()!=2, + "eIt.GetSourceIndex()!=2"); + otbControlConditionTestMacro(eIt.GetTargetIndex()!=3, + "eIt.GetTargetIndex()!=3"); + break; + case 3: + otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_TPPI, + "eIt.GetValue()!=otb::OTB_RCC8_TPPI"); + otbControlConditionTestMacro(eIt.GetSourceIndex()!=0, + "eIt.GetSourceIndex()!=0"); + otbControlConditionTestMacro(eIt.GetTargetIndex()!=2, + "eIt.GetTargetIndex()!=2"); + break; + case 4: + otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_NTPP, + "eIt.GetValue()!=otb::OTB_RCC8_NTPP"); + otbControlConditionTestMacro(eIt.GetSourceIndex()!=1, + "eIt.GetSourceIndex()!=1"); + otbControlConditionTestMacro(eIt.GetTargetIndex()!=3, + "eIt.GetTargetIndex()!=3"); + break; + case 5: + otbControlConditionTestMacro(eIt.GetValue()!=otb::OTB_RCC8_NTPPI, + "eIt.GetValue()!=otb::OTB_RCC8_NTPPI"); + otbControlConditionTestMacro(eIt.GetSourceIndex()!=0, + "eIt.GetSourceIndex()!=0"); + otbControlConditionTestMacro(eIt.GetTargetIndex()!=3, + "eIt.GetTargetIndex()!=3"); + break; + default: + otbControlConditionTestMacro(true,"Error in graph reading."); + break; + } } diff --git a/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx b/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx index 73b15c01df..4fcf12a068 100644 --- a/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx +++ b/Testing/Code/SpatialReasoning/otbRCC8VertexBase.cxx @@ -54,51 +54,51 @@ int otbRCC8VertexBase(int argc, char* argv[]) vertex1->SetPath(path); otbControlConditionTestMacro(vertex1->GetSegmentationLevel()!=imageLevel, - "Test failed: vertex1->GetSegmentationLevel()!=imageLevel"); + "Test failed: vertex1->GetSegmentationLevel()!=imageLevel"); otbControlConditionTestMacro( vertex1->GetSegmentationType()!=imageType, - "Test failed: vertex1->GetSegmentationType()!=imageType"); + "Test failed: vertex1->GetSegmentationType()!=imageType"); otbControlConditionTestMacro(vertex1->GetPath()->GetVertexList()->GetElement(0)!=p1, - "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(0)!=p1"); + "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(0)!=p1"); otbControlConditionTestMacro(vertex1->GetPath()->GetVertexList()->GetElement(1)!=p2, - "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(1)!=p2"); + "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(1)!=p2"); otbControlConditionTestMacro(vertex1->GetPath()->GetVertexList()->GetElement(2)!=p3, - "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(2)!=p3"); + "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(2)!=p3"); // attributes vector set test AttributesMapType attr1 = vertex1->GetAttributesMap(); otbControlConditionTestMacro( attr1["SegmentationLevel"].compare(std::string(argv[1]))!=0, - "Test failed: vertex1->GetAttributesMap()[\"SegmentationLevel\"]!=std::string(argv[1])"); + "Test failed: vertex1->GetAttributesMap()[\"SegmentationLevel\"]!=std::string(argv[1])"); otbControlConditionTestMacro(atoi(attr1["SegmentationType"].c_str())!=static_cast<int>(imageType), - "Test failed:atoi(attr1[\"SegmentationType\"].c_str())!=imageType "); + "Test failed:atoi(attr1[\"SegmentationType\"].c_str())!=imageType "); otbControlConditionTestMacro( atof(attr1["P0x"].c_str())!=p1[0], - "Test failed: atof(attr1[\"P0x\"].c_str())!=p1[0]"); + "Test failed: atof(attr1[\"P0x\"].c_str())!=p1[0]"); otbControlConditionTestMacro( atof(attr1["P0y"].c_str())!=p1[1], - "Test failed: atof(attr1[\"P0y\"].c_str())!=p1[1]"); + "Test failed: atof(attr1[\"P0y\"].c_str())!=p1[1]"); otbControlConditionTestMacro( atof(attr1["P1x"].c_str())!=p2[0], - "Test failed: atof(attr1[\"P1x\"].c_str())!=p2[0]"); + "Test failed: atof(attr1[\"P1x\"].c_str())!=p2[0]"); otbControlConditionTestMacro( atof(attr1["P1y"].c_str())!=p2[1], - "Test failed: atof(attr1[\"P1y\"].c_str())!=p2[1]"); + "Test failed: atof(attr1[\"P1y\"].c_str())!=p2[1]"); otbControlConditionTestMacro( atof(attr1["P2x"].c_str())!=p3[0], - "Test failed: atof(attr1[\"P2x\"].c_str())!=p3[0]"); + "Test failed: atof(attr1[\"P2x\"].c_str())!=p3[0]"); otbControlConditionTestMacro(atof( attr1["P2y"].c_str())!=p3[1], - "Test failed: atof( attr1[\"P2y\"].c_str())!=p3[1]"); + "Test failed: atof( attr1[\"P2y\"].c_str())!=p3[1]"); // attributes vector get test RCC8VertexType::Pointer vertex2 = RCC8VertexType::New(); vertex2->SetAttributesMap(attr1); otbControlConditionTestMacro(vertex1->GetSegmentationLevel()!=vertex2->GetSegmentationLevel(), - "Test failed: vertex1->GetSegmentationLevel()!=vertex2->GetSegmentationLevel()"); + "Test failed: vertex1->GetSegmentationLevel()!=vertex2->GetSegmentationLevel()"); otbControlConditionTestMacro(vertex1->GetSegmentationType()!=vertex2->GetSegmentationType(), - "Test failed: vertex1->GetSegmentationType()!=vertex2->GetSegmentationType()"); + "Test failed: vertex1->GetSegmentationType()!=vertex2->GetSegmentationType()"); otbControlConditionTestMacro(vertex2->GetPath()->GetVertexList()->GetElement(0)!=p1, - "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(0)!=p1"); + "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(0)!=p1"); otbControlConditionTestMacro(vertex2->GetPath()->GetVertexList()->GetElement(1)!=p2, - "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(1)!=p2"); + "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(1)!=p2"); otbControlConditionTestMacro(vertex2->GetPath()->GetVertexList()->GetElement(2)!=p3, - "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(2)!=p3"); + "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(2)!=p3"); return EXIT_SUCCESS; diff --git a/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx b/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx index 342600d7ce..ff8815929b 100644 --- a/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx +++ b/Testing/Code/SpatialReasoning/otbRCC8VertexWithCompacity.cxx @@ -60,65 +60,65 @@ int otbRCC8VertexWithCompacity(int argc, char* argv[]) vertex1->SetCompacity(compacity); otbControlConditionTestMacro(vertex1->GetSegmentationLevel()!=imageLevel, - "Test failed: vertex1->GetSegmentationLevel()!=imageLevel"); + "Test failed: vertex1->GetSegmentationLevel()!=imageLevel"); otbControlConditionTestMacro( vertex1->GetSegmentationType()!=imageType, - "Test failed: vertex1->GetSegmentationType()!=imageType"); + "Test failed: vertex1->GetSegmentationType()!=imageType"); otbControlConditionTestMacro(vertex1->GetPath()->GetVertexList()->GetElement(0)!=p1, - "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(0)!=p1"); + "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(0)!=p1"); otbControlConditionTestMacro(vertex1->GetPath()->GetVertexList()->GetElement(1)!=p2, - "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(1)!=p2"); + "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(1)!=p2"); otbControlConditionTestMacro(vertex1->GetPath()->GetVertexList()->GetElement(2)!=p3, - "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(2)!=p3"); + "Test failed:vertex1->GetPath()->GetVertexList()->GetElement(2)!=p3"); otbControlConditionTestMacro(vertex1->GetCompacity()!=compacity, - "Test failed: vertex1->GetSegmentationImageIndex()!=imageIndex"); + "Test failed: vertex1->GetSegmentationImageIndex()!=imageIndex"); // attributes vector set test AttributesMapType attr1 = vertex1->GetAttributesMap(); itk::OStringStream oss; oss<<p1[0]; otbControlConditionTestMacro( attr1["P0x"].compare(oss.str())!=0, - "Test failed:attr1[\"P0x\"].compare(std::string(p1[0]))!=0"); + "Test failed:attr1[\"P0x\"].compare(std::string(p1[0]))!=0"); oss.str(""); oss<<p1[1]; otbControlConditionTestMacro( attr1["P0y"].compare(oss.str())!=0, - "Test failed:attr1[\"P0y\"].compare(std::string(p1[1]))!=0"); + "Test failed:attr1[\"P0y\"].compare(std::string(p1[1]))!=0"); oss.str(""); oss<<p2[0]; otbControlConditionTestMacro( attr1["P1x"].compare(oss.str())!=0, - "Test failed:attr1[\"P1x\"].compare(std::string(p2[0]))!=0"); + "Test failed:attr1[\"P1x\"].compare(std::string(p2[0]))!=0"); oss.str(""); oss<<p2[1]; otbControlConditionTestMacro( attr1["P1y"].compare(oss.str())!=0, - "Test failed:attr1[\"P1y\"].compare(std::string(p2[1]))!=0"); + "Test failed:attr1[\"P1y\"].compare(std::string(p2[1]))!=0"); oss.str(""); oss<<p3[0]; otbControlConditionTestMacro( attr1["P2x"].compare(oss.str())!=0, - "Test failed:attr1[\"P2x\"].compare(std::string(p3[0]))!=0"); + "Test failed:attr1[\"P2x\"].compare(std::string(p3[0]))!=0"); oss.str(""); oss<<p3[1]; otbControlConditionTestMacro( attr1["P2y"].compare(oss.str())!=0, - "Test failed:attr1[\"P2y\"].compare(std::string(p3[1]))!=0"); + "Test failed:attr1[\"P2y\"].compare(std::string(p3[1]))!=0"); otbControlConditionTestMacro(attr1["Compacity"].compare(std::string(argv[3]))!=0, - "Test failed: vertex1->GetAttributesMap()[\"Compacity\"]!=std::string(argv[2])"); + "Test failed: vertex1->GetAttributesMap()[\"Compacity\"]!=std::string(argv[2])"); // attributes vector get test RCC8VertexType::Pointer vertex2 = RCC8VertexType::New(); vertex2->SetAttributesMap(attr1); otbControlConditionTestMacro(vertex1->GetSegmentationLevel()!=vertex2->GetSegmentationLevel(), - "Test failed: vertex1->GetSegmentationLevel()!=vertex2->GetSegmentationLevel()"); + "Test failed: vertex1->GetSegmentationLevel()!=vertex2->GetSegmentationLevel()"); otbControlConditionTestMacro(vertex1->GetSegmentationType()!=vertex2->GetSegmentationType(), - "Test failed: vertex1->GetSegmentationType()!=vertex2->GetSegmentationType()"); + "Test failed: vertex1->GetSegmentationType()!=vertex2->GetSegmentationType()"); otbControlConditionTestMacro(vertex2->GetPath()->GetVertexList()->GetElement(0)!=p1, - "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(0)!=p1"); + "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(0)!=p1"); otbControlConditionTestMacro(vertex2->GetPath()->GetVertexList()->GetElement(1)!=p2, - "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(1)!=p2"); + "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(1)!=p2"); otbControlConditionTestMacro(vertex2->GetPath()->GetVertexList()->GetElement(2)!=p3, - "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(2)!=p3"); + "Test failed:vertex2->GetPath()->GetVertexList()->GetElement(2)!=p3"); otbControlConditionTestMacro(vertex1->GetCompacity()!=vertex2->GetCompacity(), - "Test failed: vertex1->GetCompacity()!=vertex2->GetCompacity()"); + "Test failed: vertex1->GetCompacity()!=vertex2->GetCompacity()"); return EXIT_SUCCESS; diff --git a/Testing/Fa/AlignementsQB.cxx b/Testing/Fa/AlignementsQB.cxx index 2773972cde..757fe2ed99 100644 --- a/Testing/Fa/AlignementsQB.cxx +++ b/Testing/Fa/AlignementsQB.cxx @@ -45,11 +45,11 @@ int main( int argc, char ** argv ) typedef unsigned char InputPixelType; - typedef unsigned char OutputPixelType; + typedef unsigned char OutputPixelType; - const unsigned int Dimension = 2; + const unsigned int Dimension = 2; - typedef otb::Image< InputPixelType, Dimension > InputImageType; + typedef otb::Image< InputPixelType, Dimension > InputImageType; typedef otb::Image< OutputPixelType, Dimension > OutputImageType; typedef otb::ImageFileReader< InputImageType > ReaderType; @@ -80,7 +80,7 @@ int main( int argc, char ** argv ) std::cout << "Extraction ROI" << std::endl; - typedef itk::PolyLineParametricPath< Dimension > PathType; + typedef itk::PolyLineParametricPath< Dimension > PathType; typedef otb::ImageToPathListAlignFilter<InputImageType,PathType> ListAlignFilterType; ListAlignFilterType::Pointer alignFilter = ListAlignFilterType::New(); diff --git a/Testing/Fa/MapActivation.cxx b/Testing/Fa/MapActivation.cxx index abcb270430..a7aab03d6a 100644 --- a/Testing/Fa/MapActivation.cxx +++ b/Testing/Fa/MapActivation.cxx @@ -89,13 +89,13 @@ int main(int argc, char* argv[] ) MeasurementVectorType tab; tab.SetSize(nbcolonnes); for(int i=0;i<nbcolonnes;i++) - { - tab[i] = vectTab[j][i]; - } + { + tab[i] = vectTab[j][i]; + } liste->PushBack(tab); } - // std::cout<<"liste: "<<liste->GetMeasurementVectorSize()<< " " << liste->GetMeasurementVector(1) - // <<" " <<liste->GetMeasurementVector(2)<< " " <<liste->GetMeasurementVector(3)<<std::endl; + // std::cout<<"liste: "<<liste->GetMeasurementVectorSize()<< " " << liste->GetMeasurementVector(1) + // <<" " <<liste->GetMeasurementVector(2)<< " " <<liste->GetMeasurementVector(3)<<std::endl; typedef itk::Statistics::EuclideanDistance<MeasurementVectorType> DistanceType; @@ -157,26 +157,26 @@ int main(int argc, char* argv[] ) classifier->Update() ; ClassifierType::OutputType* membershipSample = classifier->GetOutput(); - // std::cout<<"liste: "<<membershipSample->GetMeasurementVectorSize()<< " " << membershipSample->GetMeasurementVector(1)<<std::endl; + // std::cout<<"liste: "<<membershipSample->GetMeasurementVectorSize()<< " " << membershipSample->GetMeasurementVector(1)<<std::endl; ClassifierType::OutputType::ConstIterator m_iter = membershipSample->Begin(); ClassifierType::OutputType::ConstIterator m_last = membershipSample->End(); /*int count[16]; - for(int i=0;i<16;i++) - { - count[i]=0; - } + for(int i=0;i<16;i++) + { + count[i]=0; + } */ while (m_iter != m_last) { // std::cout<<" classlabel : "<<m_iter.GetClassLabel()<< -// " ClassSize= "<< membershipSample->GetClassSampleSize(m_iter.GetClassLabel()) << -// " instance id = " << m_iter.GetInstanceIdentifier() << -// " measurement vector = " << m_iter.GetMeasurementVector() << +// " ClassSize= "<< membershipSample->GetClassSampleSize(m_iter.GetClassLabel()) << +// " instance id = " << m_iter.GetInstanceIdentifier() << +// " measurement vector = " << m_iter.GetMeasurementVector() << // -// " class sample: "<< membershipSample->GetClassSample(m_iter.GetClassLabel())<< -// std::endl; +// " class sample: "<< membershipSample->GetClassSample(m_iter.GetClassLabel())<< +// std::endl; //count[m_iter.GetClassLabel()]++; ++m_iter ; } @@ -192,9 +192,9 @@ int main(int argc, char* argv[] ) for (int i=0 ; i< nbclass ; i++) { if(membershipSample->GetInternalClassLabel(i)!=-1) - { + { std::cout<<"classlabel= "<< i << " classSize= "<< membershipSample->GetClassSampleSize(i) <<std::endl; - } + } } -- GitLab