diff --git a/Code/BasicFilters/otbChangeLabelImageFilter.h b/Code/BasicFilters/otbChangeLabelImageFilter.h index 0f688876b4e1a0225db24cdc1657c33bdab2c3cc..d68482c2467c3bc3a268340a429dad1724d2d021 100644 --- a/Code/BasicFilters/otbChangeLabelImageFilter.h +++ b/Code/BasicFilters/otbChangeLabelImageFilter.h @@ -187,7 +187,6 @@ private: #endif - #ifndef __otbChangeLabelImageFilter_h #define __otbChangeLabelImageFilter_h diff --git a/Code/Common/otbImageList.txx b/Code/Common/otbImageList.txx index ae031df8b7c284a7f3c5e39487be6b8ece1569ff..0b8db4e023abacdd42ace00af50dc7692a06a548 100644 --- a/Code/Common/otbImageList.txx +++ b/Code/Common/otbImageList.txx @@ -41,15 +41,15 @@ ImageList<TImage> // Check that the requested region lies within the largest possible region if ( ! it.Get()->VerifyRequestedRegion() ) - { - // invalid requested region, throw an exception - itk::InvalidRequestedRegionError e(__FILE__, __LINE__); - e.SetLocation(ITK_LOCATION); - e.SetDataObject(it.Get()); - e.SetDescription("Requested region is (at least partially) outside the largest possible region."); - - throw e; - } + { + // invalid requested region, throw an exception + itk::InvalidRequestedRegionError e(__FILE__, __LINE__); + e.SetLocation(ITK_LOCATION); + e.SetDataObject(it.Get()); + e.SetDescription("Requested region is (at least partially) outside the largest possible region."); + + throw e; + } it.Get()->GetSource()->UpdateOutputData(it.Get()); } diff --git a/Code/Common/otbLabelObjectToPolygonFunctor.h b/Code/Common/otbLabelObjectToPolygonFunctor.h index 7fa982eb9faecf276e981599a4c98e3ffc285d02..5751ceb09f01abcb3659f2850701ea2352506a95 100644 --- a/Code/Common/otbLabelObjectToPolygonFunctor.h +++ b/Code/Common/otbLabelObjectToPolygonFunctor.h @@ -109,17 +109,17 @@ public: /** Constructor */ LabelObjectToPolygonFunctor() : m_Polygon(NULL), - m_CurrentState(UP_LEFT), - m_PositionFlag(LEFT_END), - m_StartingPoint(), - m_CurrentPoint(), - m_CurrentRun(), - m_CurrentLine(0), - m_Solution(), - m_LineOffset(0), - m_StartIndex(), - m_Origin(), - m_Spacing(1.) + m_CurrentState(UP_LEFT), + m_PositionFlag(LEFT_END), + m_StartingPoint(), + m_CurrentPoint(), + m_CurrentRun(), + m_CurrentLine(0), + m_Solution(), + m_LineOffset(0), + m_StartIndex(), + m_Origin(), + m_Spacing(1.) {} /** Destructor */ diff --git a/Code/Common/otbRadiometricAttributesLabelMapFilter.txx b/Code/Common/otbRadiometricAttributesLabelMapFilter.txx index 3306816cae17be7acc4690c6579b2c54e4404a23..e33375f9c9d10cd0215add81b2ea50a9fbb15be0 100644 --- a/Code/Common/otbRadiometricAttributesLabelMapFilter.txx +++ b/Code/Common/otbRadiometricAttributesLabelMapFilter.txx @@ -29,7 +29,7 @@ namespace Functor template <class TLabelObject, class TFeatureImage> MultiStatsAttributesLabelObjectFunctor<TLabelObject,TFeatureImage> ::MultiStatsAttributesLabelObjectFunctor() : m_ReducedAttributeSet(true), - m_StatsFunctorsMap() + m_StatsFunctorsMap() {} /** Destructor */ @@ -165,9 +165,9 @@ MultiStatsAttributesLabelObjectFunctor<TLabelObject,TFeatureImage> template <class TImage, class TFeatureImage> RadiometricAttributesLabelMapFilter<TImage, TFeatureImage> ::RadiometricAttributesLabelMapFilter() : m_RedChannelIndex(2), - m_GreenChannelIndex(1), - m_BlueChannelIndex(0), - m_NIRChannelIndex(3) + m_GreenChannelIndex(1), + m_BlueChannelIndex(0), + m_NIRChannelIndex(3) { this->SetNumberOfRequiredInputs(2); } diff --git a/Code/Common/otbShapeAttributesLabelMapFilter.h b/Code/Common/otbShapeAttributesLabelMapFilter.h index cc9cb7f7ffb73525cad825adaf9f88de5eeb436c..c586cc8f0178f035f9bc9c3f5e10226fda9339df 100644 --- a/Code/Common/otbShapeAttributesLabelMapFilter.h +++ b/Code/Common/otbShapeAttributesLabelMapFilter.h @@ -165,8 +165,8 @@ class ShapeAttributesLabelObjectFunctor * \ingroup ImageEnhancement MathematicalMorphologyImageFilters */ template<class TImage, - class TLabelImage = Image< typename TImage::PixelType, - TImage::ImageDimension > > + class TLabelImage = Image< typename TImage::PixelType, + TImage::ImageDimension > > class ITK_EXPORT ShapeAttributesLabelMapFilter : public otb::LabelMapFeaturesFunctorImageFilter <TImage, diff --git a/Code/Common/otbShapeAttributesLabelMapFilter.txx b/Code/Common/otbShapeAttributesLabelMapFilter.txx index eb189945d1dad6e656bde3bdc974ede2b8d1a721..1cd19cdc0abddbf0d27a4c3956cc52076e96cf11 100644 --- a/Code/Common/otbShapeAttributesLabelMapFilter.txx +++ b/Code/Common/otbShapeAttributesLabelMapFilter.txx @@ -39,10 +39,10 @@ namespace Functor { template <class TLabelObject, class TLabelImage> ShapeAttributesLabelObjectFunctor<TLabelObject,TLabelImage> ::ShapeAttributesLabelObjectFunctor() : m_ComputeFeretDiameter(false), - m_ComputePerimeter(false), - m_ReducedAttributeSet(true), - m_PerimeterCalculator(NULL), - m_LabelImage(NULL) + m_ComputePerimeter(false), + m_ReducedAttributeSet(true), + m_PerimeterCalculator(NULL), + m_LabelImage(NULL) {} /** The comparator (!=) */ @@ -391,7 +391,6 @@ ShapeAttributesLabelObjectFunctor<TLabelObject,TLabelImage> } - // Compute principal moments and axes itk::Vector<double,LabelObjectType::ImageDimension> principalMoments; vnl_symmetric_eigensystem<double> eigen( centralMoments.GetVnlMatrix() ); @@ -501,7 +500,6 @@ ShapeAttributesLabelObjectFunctor<TLabelObject,TLabelImage> - // Set the attributes PolygonFunctorType polygonFunctor; polygonFunctor.SetStartIndex(m_LabelImage->GetLargestPossibleRegion().GetIndex()); diff --git a/Code/Common/otbStatisticsAttributesLabelMapFilter.h b/Code/Common/otbStatisticsAttributesLabelMapFilter.h index 9461339315ef7b817982e01b4b4adf9b27b3091b..0a870895ee551585b35a65537ee7af64dd4efdae 100644 --- a/Code/Common/otbStatisticsAttributesLabelMapFilter.h +++ b/Code/Common/otbStatisticsAttributesLabelMapFilter.h @@ -44,10 +44,10 @@ public: // Matrix typedef typedef typename itk::Matrix<double, TFeatureImage::ImageDimension, - TFeatureImage::ImageDimension> MatrixType; + TFeatureImage::ImageDimension> MatrixType; // Vector typedef typedef typename itk::Vector<double, - TFeatureImage::ImageDimension> VectorType; + TFeatureImage::ImageDimension> VectorType; /// Typedef of the feature image type typedef typename TFeatureImage::PixelType FeatureType; diff --git a/Code/Common/otbStatisticsAttributesLabelMapFilter.txx b/Code/Common/otbStatisticsAttributesLabelMapFilter.txx index 27a22da069bf63a9fc02da4316840365659179c1..a27e32e8201cdf83e05fc79cbf1d18f4a3338e3a 100644 --- a/Code/Common/otbStatisticsAttributesLabelMapFilter.txx +++ b/Code/Common/otbStatisticsAttributesLabelMapFilter.txx @@ -34,8 +34,8 @@ namespace Functor template <class TLabelObject, class TFeatureImage> StatisticsAttributesLabelObjectFunctor<TLabelObject,TFeatureImage> ::StatisticsAttributesLabelObjectFunctor() : m_FeatureName("Default"), - m_FeatureImage(), - m_ReducedAttributeSet(true) + m_FeatureImage(), + m_ReducedAttributeSet(true) {} /** Destructor */ @@ -158,8 +158,8 @@ StatisticsAttributesLabelObjectFunctor<TLabelObject,TFeatureImage> const double epsilon = 1E-10; if ( vcl_abs(variance) > epsilon ) - { - skewness = ( ( sum3 - 3.0 * mean * sum2) / totalFreq + 2.0 * mean * mean2 ) / ( variance * sigma ); + { + skewness = ( ( sum3 - 3.0 * mean * sum2) / totalFreq + 2.0 * mean * mean2 ) / ( variance * sigma ); kurtosis = ( ( sum4 - 4.0 * mean * sum3 + 6.0 * mean2 * sum2) / totalFreq - 3.0 * mean2 * mean2 ) / ( variance * variance ) - 3.0; } diff --git a/Code/IO/otbImageFileReader.txx b/Code/IO/otbImageFileReader.txx index e8a0301ee8582ff58afe318cff7138e298f5e44b..4b860459db7712d1238393be083330ae0b9fb2c8 100644 --- a/Code/IO/otbImageFileReader.txx +++ b/Code/IO/otbImageFileReader.txx @@ -464,29 +464,29 @@ ImageFileReader<TOutputImage> std::string browser = "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"; if (curl) - { - curl_easy_setopt(curl, CURLOPT_USERAGENT, browser.data()); - curl_easy_setopt(curl, CURLOPT_URL,this->m_FileName.data()); - // Set the dummy write function - curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,&Self::curlDummyWriteFunction); - curl_easy_setopt(curl, CURLOPT_MAXFILESIZE,1); - - // Perform requet - res = curl_easy_perform(curl); - - if(res != 0 && res != 63) // 63 stands for filesize exceed - { - itk::ImageFileReaderException e(__FILE__, __LINE__); - itk::OStringStream msg; - msg <<"File name is an http address, but curl fails to connect to it " - << std::endl << "Filename = " << this->m_FileName - << std::endl << "Curl error code = "<<res - << std::endl; - e.SetDescription(msg.str().c_str()); - throw e; - } - return; - } + { + curl_easy_setopt(curl, CURLOPT_USERAGENT, browser.data()); + curl_easy_setopt(curl, CURLOPT_URL,this->m_FileName.data()); + // Set the dummy write function + curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,&Self::curlDummyWriteFunction); + curl_easy_setopt(curl, CURLOPT_MAXFILESIZE,1); + + // Perform requet + res = curl_easy_perform(curl); + + if(res != 0 && res != 63) // 63 stands for filesize exceed + { + itk::ImageFileReaderException e(__FILE__, __LINE__); + itk::OStringStream msg; + msg <<"File name is an http address, but curl fails to connect to it " + << std::endl << "Filename = " << this->m_FileName + << std::endl << "Curl error code = "<<res + << std::endl; + e.SetDescription(msg.str().c_str()); + throw e; + } + return; + } } #endif diff --git a/Testing/Code/Common/otbLabelObjectToPolygonFunctorNew.cxx b/Testing/Code/Common/otbLabelObjectToPolygonFunctorNew.cxx index da68e21b5d05a36cd06aeb9ff520661002fe89e5..476fd7c49d8528531bbcddc803abff0feb810067 100644 --- a/Testing/Code/Common/otbLabelObjectToPolygonFunctorNew.cxx +++ b/Testing/Code/Common/otbLabelObjectToPolygonFunctorNew.cxx @@ -32,7 +32,7 @@ int otbLabelObjectToPolygonFunctorNew(int argc, char * argv[]) // Instantiation //FunctorPointerType myFunctor = FunctorType::New(); - FunctorType myFunctor ; + FunctorType myFunctor; return EXIT_SUCCESS; } diff --git a/Testing/Code/IO/otbDEMHandlerTest.cxx b/Testing/Code/IO/otbDEMHandlerTest.cxx index 155df6e18d90d1386525a19e7ac459b8d4cbf536..bf0f71316a3e4558636c4e8a328225702010d4c4 100644 --- a/Testing/Code/IO/otbDEMHandlerTest.cxx +++ b/Testing/Code/IO/otbDEMHandlerTest.cxx @@ -52,7 +52,7 @@ int otbDEMHandlerTest(int argc, char * argv[]) std::ofstream file; file.open(outputfilename); file << "--- HEIGHT ABOVE MSL TEST ---" << std::endl; - file << " geoPoint: " << geoPoint[1] << " ; " << geoPoint[0] << std::endl; + file << " geoPoint: " << geoPoint[1] << "; " << geoPoint[0] << std::endl; file << " -> Height above MSL: " << height << std::endl; std::cout << "Height above MSL: " << height << std::endl; diff --git a/Testing/Fa/0000041-mean_shift.cxx b/Testing/Fa/0000041-mean_shift.cxx index 44db5e962eae5c78550038249a783bf4620a43e2..a85bfae3a7a70a9fab6ee6664fc2e7efceef089e 100644 --- a/Testing/Fa/0000041-mean_shift.cxx +++ b/Testing/Fa/0000041-mean_shift.cxx @@ -12,7 +12,7 @@ int main( int argc, char *argv[] ) if (argc < 9) { - std::cout << "Usage : inputImage rangeRadius spatialRadius minRegionSize outfilenamefiltered outfilenamesegmented outfilenamelabeled outfilenameboundary" << std::endl ; + std::cout << "Usage : inputImage rangeRadius spatialRadius minRegionSize outfilenamefiltered outfilenamesegmented outfilenamelabeled outfilenameboundary" << std::endl; return EXIT_FAILURE; } diff --git a/Testing/Fa/MapActivation.cxx b/Testing/Fa/MapActivation.cxx index 1969e1b4368f1a4e612c42dc3464aca30081f128..82d772ee8827992300d74a773fd1a7cdf71ca619 100644 --- a/Testing/Fa/MapActivation.cxx +++ b/Testing/Fa/MapActivation.cxx @@ -49,7 +49,7 @@ int main(int argc, char* argv[] ) if (argc < 12) { - std::cout << "Usage : " << argv[0] << " inputTabImage size radius NumberOfIterations BetaInit BetaEnd MaxWeight MinWeight som actMap som" << std::endl ; + std::cout << "Usage : " << argv[0] << " inputTabImage size radius NumberOfIterations BetaInit BetaEnd MaxWeight MinWeight som actMap som" << std::endl; return EXIT_FAILURE; } @@ -64,20 +64,20 @@ int main(int argc, char* argv[] ) typedef itk::ImageRegionIterator< ListImageType > IteratorType; IteratorType It1( tabreadImage, tabreadImage->GetLargestPossibleRegion() ); - const int nblines= 591 ; //const int)(tabreadImage->GetLargestPossibleRegion().GetSize()[1]); + const int nblines= 591; //const int)(tabreadImage->GetLargestPossibleRegion().GetSize()[1]); const int nbcolonnes= 9; //(const int)tabreadImage->GetLargestPossibleRegion().GetSize()[0]; double vectTab[nblines][nbcolonnes]; std::cout<<"lignes = "<<nblines<<" colonnes = "<<nbcolonnes<<std::endl; - for ( It1.GoToBegin(); !It1.IsAtEnd() ;++It1) + for ( It1.GoToBegin(); !It1.IsAtEnd();++It1) { vectTab[It1.GetIndex()[1]][It1.GetIndex()[0]]=It1.Get(); } - typedef itk::VariableLengthVector< double > MeasurementVectorType ; - typedef itk::Statistics::ListSample< MeasurementVectorType > SampleType ; - SampleType::Pointer liste = SampleType::New() ; + typedef itk::VariableLengthVector< double > MeasurementVectorType; + typedef itk::Statistics::ListSample< MeasurementVectorType > SampleType; + SampleType::Pointer liste = SampleType::New(); for(int j=0;j<nblines;j++) { @@ -145,11 +145,11 @@ int main(int argc, char* argv[] ) somreader->SetFileName(argv[11]/*"som.mhd"*/); somreader->Update(); - ClassifierType::Pointer classifier = ClassifierType::New() ; + ClassifierType::Pointer classifier = ClassifierType::New(); classifier->SetSample(liste); classifier->SetMap(somreader->GetOutput()); - classifier->Update() ; + classifier->Update(); ClassifierType::OutputType* membershipSample = classifier->GetOutput(); // std::cout<<"liste: "<<membershipSample->GetMeasurementVectorSize()<< " " << membershipSample->GetMeasurementVector(1)<<std::endl; @@ -173,7 +173,7 @@ int main(int argc, char* argv[] ) // " class sample: "<< membershipSample->GetClassSample(m_iter.GetClassLabel())<< // std::endl; //count[m_iter.GetClassLabel()]++; - ++m_iter ; + ++m_iter; } /*for(int i=0;i<16;i++) @@ -181,10 +181,10 @@ int main(int argc, char* argv[] ) std::cout<<" classe: "<< i <<" nb elements= "<<count[i]<<std::endl; }*/ - int nbclass = membershipSample->GetNumberOfClasses() ; + int nbclass = membershipSample->GetNumberOfClasses(); std::cout<< " nb of classes= "<< nbclass << std::endl; - for (int i=0 ; i< nbclass ; i++) + for (int i=0; i< nbclass; i++) { if(membershipSample->GetInternalClassLabel(i)!=-1) { diff --git a/Utilities/otbkml/third_party/zlib-1.2.3.win32/bin/minizip.dll b/Utilities/otbkml/third_party/zlib-1.2.3.win32/bin/minizip.dll old mode 100755 new mode 100644 diff --git a/Utilities/otbkml/third_party/zlib-1.2.3.win32/bin/zlib1.dll b/Utilities/otbkml/third_party/zlib-1.2.3.win32/bin/zlib1.dll old mode 100755 new mode 100644