diff --git a/Code/BasicFilters/otbBCOInterpolateImageFunction.h b/Code/BasicFilters/otbBCOInterpolateImageFunction.h index 578e933d02c5576b58090cd3b3244cb365b7ab13..c1a8884dd375f8ddd57c30dd8d419b61d1c2860b 100644 --- a/Code/BasicFilters/otbBCOInterpolateImageFunction.h +++ b/Code/BasicFilters/otbBCOInterpolateImageFunction.h @@ -49,12 +49,12 @@ namespace otb */ template< class TInputImage, class TCoordRep = double > class ITK_EXPORT BCOInterpolateImageFunctionBase : - public itk::InterpolateImageFunction<TInputImage,TCoordRep> + public itk::InterpolateImageFunction<TInputImage, TCoordRep> { public: /** Standard class typedefs. */ typedef BCOInterpolateImageFunctionBase Self; - typedef itk::InterpolateImageFunction<TInputImage,TCoordRep> Superclass; + typedef itk::InterpolateImageFunction<TInputImage, TCoordRep> Superclass; /** Run-time type information (and related methods). */ itkTypeMacro(BCOInterpolateImageFunctionBase, InterpolateImageFunction); @@ -131,13 +131,13 @@ class ITK_EXPORT BCOInterpolateImageFunction : public: /** Standard class typedefs. */ typedef BCOInterpolateImageFunction Self; - typedef BCOInterpolateImageFunctionBase<TInputImage,TCoordRep> Superclass; + typedef BCOInterpolateImageFunctionBase<TInputImage, TCoordRep> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; itkTypeMacro(BCOInterpolateImageFunction, BCOInterpolateImageFunctionBase); itkNewMacro(Self); - itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension); + itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); typedef typename Superclass::OutputType OutputType; typedef typename Superclass::InputImageType InputImageType; @@ -163,20 +163,20 @@ private: template < typename TPixel, unsigned int VImageDimension, class TCoordRep > -class ITK_EXPORT BCOInterpolateImageFunction< otb::VectorImage<TPixel,VImageDimension> , TCoordRep > : - public otb::BCOInterpolateImageFunctionBase< otb::VectorImage<TPixel,VImageDimension> , TCoordRep > +class ITK_EXPORT BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordRep > : + public otb::BCOInterpolateImageFunctionBase< otb::VectorImage<TPixel, VImageDimension> , TCoordRep > { public: /** Standard class typedefs.*/ typedef BCOInterpolateImageFunction Self; typedef BCOInterpolateImageFunctionBase - < otb::VectorImage<TPixel,VImageDimension>, TCoordRep > Superclass; + < otb::VectorImage<TPixel, VImageDimension>, TCoordRep > Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; itkTypeMacro(BCOInterpolateImageFunction, BCOInterpolateImageFunctionBase); itkNewMacro(Self); - itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension); + itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); typedef typename Superclass::OutputType OutputType; typedef typename Superclass::InputImageType InputImageType; diff --git a/Code/BasicFilters/otbBCOInterpolateImageFunction.txx b/Code/BasicFilters/otbBCOInterpolateImageFunction.txx index 5fb9bb2bf26e3e54d4a469ae9b51df8229ec6f89..433bbc1448abfc99fc48c431c0d8c76dcf0f5295 100644 --- a/Code/BasicFilters/otbBCOInterpolateImageFunction.txx +++ b/Code/BasicFilters/otbBCOInterpolateImageFunction.txx @@ -188,16 +188,16 @@ BCOInterpolateImageFunction<TInputImage, TCoordRep> } template < typename TPixel, unsigned int VImageDimension, class TCoordRep > -void BCOInterpolateImageFunction< otb::VectorImage<TPixel,VImageDimension> , TCoordRep > +void BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordRep > ::PrintSelf(std::ostream& os, itk::Indent indent) const { Superclass::PrintSelf(os, indent); } template < typename TPixel, unsigned int VImageDimension, class TCoordRep > -typename BCOInterpolateImageFunction< otb::VectorImage<TPixel,VImageDimension> , TCoordRep > +typename BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordRep > ::OutputType -BCOInterpolateImageFunction< otb::VectorImage<TPixel,VImageDimension> , TCoordRep > +BCOInterpolateImageFunction< otb::VectorImage<TPixel, VImageDimension> , TCoordRep > ::EvaluateAtContinuousIndex( const ContinuousIndexType & index ) const { typedef typename itk::NumericTraits<InputPixelType>::ScalarRealType ScalarRealType; diff --git a/Code/BasicFilters/otbBandMathImageFilter.h b/Code/BasicFilters/otbBandMathImageFilter.h index 36cfe0899fd4d3b8a2d0a9f1ff41464d65d2a1d3..0a3bc48015c8483d8a6edcf5755098393a1c0e53 100644 --- a/Code/BasicFilters/otbBandMathImageFilter.h +++ b/Code/BasicFilters/otbBandMathImageFilter.h @@ -53,18 +53,18 @@ namespace otb * Next step is to set the expression according to the variable * names. For example, in the default case with three input images the * following expression is valid : - * "ndvi(b1,b2)*b3" + * "ndvi(b1, b2)*b3" * * As an additional functionality, the filter also granted access to * indexes information under special virtual bands named idxX, idxY - * for the images indexes and idxPhyX,idxPhyY for the physical + * for the images indexes and idxPhyX, idxPhyY for the physical * indexes. * It allows the user to perform, for example a spatial processing * aiming to suppress a determined area : * "if(sqrt((idxPhyX-105.3)*(idxPhyX-105.3)+ * (idxPhyY-207.1)*(idxPhyY-207.1))>100, b1, 0)" * This expression replace the physical zone around the point of - * physical index (105.3;207.1) by a black area + * physical index (105.3; 207.1) by a black area * This functionality assumes that all the band involved have the same * spacing and origin. * diff --git a/Code/BasicFilters/otbComplexToIntensityImageFilter.h b/Code/BasicFilters/otbComplexToIntensityImageFilter.h index 4a7f58f2cffe0c481653880ecf4f50cc695f4119..3e05e61b7c6eae1b7372d7d848b1c26c7430a590 100644 --- a/Code/BasicFilters/otbComplexToIntensityImageFilter.h +++ b/Code/BasicFilters/otbComplexToIntensityImageFilter.h @@ -57,7 +57,7 @@ public: template <class TInputImage, class TOutputImage> class ITK_EXPORT ComplexToIntensityImageFilter : public -itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, +itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, Function::ComplexToIntensity< typename TInputImage::PixelType, typename TOutputImage::PixelType> > @@ -66,7 +66,7 @@ public: /** Standard class typedefs. */ typedef ComplexToIntensityImageFilter Self; typedef itk::UnaryFunctorImageFilter< - TInputImage,TOutputImage, + TInputImage, TOutputImage, Function::ComplexToIntensity< typename TInputImage::PixelType, typename TOutputImage::PixelType> > Superclass; diff --git a/Code/BasicFilters/otbComplexToVectorImageCastFilter.h b/Code/BasicFilters/otbComplexToVectorImageCastFilter.h index ea8aecb5712cd05b3e4882b2ac6d8dc98f63708d..92d29966da3f085ea568a31cdd8315439a4714ad 100644 --- a/Code/BasicFilters/otbComplexToVectorImageCastFilter.h +++ b/Code/BasicFilters/otbComplexToVectorImageCastFilter.h @@ -65,7 +65,7 @@ public: template <class TInputImage, class TOutputImage> class ITK_EXPORT ComplexToVectorImageCastFilter : public -otb::UnaryFunctorImageFilter<TInputImage,TOutputImage, +otb::UnaryFunctorImageFilter<TInputImage, TOutputImage, Functor::ComplexToVector< typename TInputImage::PixelType, typename TOutputImage::PixelType> > @@ -74,7 +74,7 @@ public: /** Standard class typedefs. */ typedef ComplexToVectorImageCastFilter Self; typedef otb::UnaryFunctorImageFilter< - TInputImage,TOutputImage, + TInputImage, TOutputImage, Functor::ComplexToVector< typename TInputImage::PixelType, typename TOutputImage::PixelType> > Superclass; typedef itk::SmartPointer<Self> Pointer; diff --git a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h index 019ad038bc1b2283f175114fe6e8d1e20fb969bf..3ddeab06590788707415df0fdbd8b47149522fe0 100644 --- a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h +++ b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h @@ -37,8 +37,8 @@ namespace otb * The continuous extrema is assumed to be at the zero of the first order * derivative of this polynom. * - * If we denote \f$ (x_0,y_0) \f$ the extrema and \f$ (x_{-1},y_{-1}) \f$ and - * \f$ (x_1,y_1) \f$ its neighbor, the second degree polynom verify the + * If we denote \f$ (x_0, y_0) \f$ the extrema and \f$ (x_{-1}, y_{-1}) \f$ and + * \f$ (x_1, y_1) \f$ its neighbor, the second degree polynom verify the * following equations: * * diff --git a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx index 44fd9f5c32a58e3f28cc8742aa10a1e482580579..b50deca627b94e28761f2b5127d55c6661fa6fca 100644 --- a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx +++ b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx @@ -219,7 +219,7 @@ ContinuousMinimumMaximumImageCalculator<TInputImage> ++it; } - //Solve equations a,b,c + //Solve equations a, b, c // y0 = a*x0^2 + b*x0 +c // y1 = a*x1^2 + b*x1 +c // y2 = a*x2^2 + b*x2 +c diff --git a/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h b/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h index ee73cc6a00b4bdf32d7531f98dbc8854c688f387..3e5d2621b09f844e9cedab0551aea190dcdefd18 100644 --- a/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h +++ b/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.h @@ -36,7 +36,7 @@ namespace Statistics { * * The general formulation is defined as: * \f$ - d(x,y) = \sum_i | x_i^a - y_i^a |^b. + d(x, y) = \sum_i | x_i^a - y_i^a |^b. \f$ * * The class can be templated over any container that holds data elements, as diff --git a/Code/BasicFilters/otbFrostImageFilter.h b/Code/BasicFilters/otbFrostImageFilter.h index c7d5cb9ee493edba3c5430a3c9120eee24188a39..978a2d1cf3beaf9d08cb40968cd5b8efdf404eef 100644 --- a/Code/BasicFilters/otbFrostImageFilter.h +++ b/Code/BasicFilters/otbFrostImageFilter.h @@ -32,13 +32,13 @@ namespace otb * The output of the filter for pixel p is: * \f$ \hat I_{s}=\sum_{p\in\eta_{p}} m_{p}I_{p} \f$ * - * where : \f$ m_{p}=\frac{KC_{s}^{2}\exp(-KC_{s}^{2}d_{s,p})}{\sum_{p\in\eta_{p}} KC_{s}^{2}\exp(-KC_{s}^{2}d_{s,p})} \f$ - * and \f$ d_{s,p}=\sqrt{(i-i_{p})^2+(j-j_{p})^2} \f$ + * where : \f$ m_{p}=\frac{KC_{s}^{2}\exp(-KC_{s}^{2}d_{s, p})}{\sum_{p\in\eta_{p}} KC_{s}^{2}\exp(-KC_{s}^{2}d_{s, p})} \f$ + * and \f$ d_{s, p}=\sqrt{(i-i_{p})^2+(j-j_{p})^2} \f$ * * \f$ K \f$ : the decrease coefficient - * \f$ (i,j)\f$ : the coordinates of the pixel inside the region + * \f$ (i, j)\f$ : the coordinates of the pixel inside the region * defined by \f$ \eta_{s} \f$ - * \f$ (i_{p},j_{p})\f$ : the coordinates of the pixels belonging to \f$ \eta_{p} \subset \eta_{s} \f$ + * \f$ (i_{p}, j_{p})\f$ : the coordinates of the pixels belonging to \f$ \eta_{p} \subset \eta_{s} \f$ * \f$ C_{s}\f$ : the variation coefficient computed over \f$ \eta_{p}\f$ * */ diff --git a/Code/BasicFilters/otbFunctionToImageFilter.txx b/Code/BasicFilters/otbFunctionToImageFilter.txx index 2ec6249c0fe98c11c711ab86c83291042e647fdb..38a06dd08a744102b6b787dbfedcb66761c1a2ed 100644 --- a/Code/BasicFilters/otbFunctionToImageFilter.txx +++ b/Code/BasicFilters/otbFunctionToImageFilter.txx @@ -46,7 +46,7 @@ FunctionToImageFilter<TInputImage, TOutputImage, TFunction> */ // template<class TInputImage, class TOutputImage, class TFunction > // void -// FunctionToImageFilter<TInputImage,TOutputImage,TFunction> +// FunctionToImageFilter<TInputImage, TOutputImage, TFunction> // ::SetInput( const TInputImage *image ) // { // // The ProcessObject is not const-correct so the const_cast is required here diff --git a/Code/BasicFilters/otbGaborFilterGenerator.h b/Code/BasicFilters/otbGaborFilterGenerator.h index 4a5ebba0a5510ccdd27f2f7d756b96bc2e5ffb6a..9fbf5c7f86e5f7e5f6ab04dca5a0c0449ebaa28e 100644 --- a/Code/BasicFilters/otbGaborFilterGenerator.h +++ b/Code/BasicFilters/otbGaborFilterGenerator.h @@ -46,7 +46,7 @@ namespace otb * * The formula used to compute these coefficients is as follows: * - * \f$ g(x,y) = \exp\Big(-\pi((a x_\theta)^{2} +(b y_\theta)^{2})\Big) * \cos\big(2\pi(u_0*x + v_0*y)+\phi\big) \f$ + * \f$ g(x, y) = \exp\Big(-\pi((a x_\theta)^{2} +(b y_\theta)^{2})\Big) * \cos\big(2\pi(u_0*x + v_0*y)+\phi\big) \f$ * * with: * diff --git a/Code/BasicFilters/otbHillShadingFunctor.h b/Code/BasicFilters/otbHillShadingFunctor.h index 8eaa280c216e277dac4ff7bfba44f40735e7c7a7..5537e54b3ae0bf9f4458c48ea806926034138dc5 100644 --- a/Code/BasicFilters/otbHillShadingFunctor.h +++ b/Code/BasicFilters/otbHillShadingFunctor.h @@ -144,7 +144,7 @@ public: const typename IteratorType::OffsetType RIGHTDOWN = {{1, 1}}; const typename IteratorType::OffsetType RIGHTUP = {{1, -1}}; const typename IteratorType::OffsetType LEFTDOWN = {{-1, 1}}; -// const typename IteratorType::OffsetType CENTER ={{0,0}}; +// const typename IteratorType::OffsetType CENTER ={{0, 0}}; float xSlope = ((makeValid(it.GetPixel(LEFTUP)) + 2 * makeValid(it.GetPixel(LEFT)) + makeValid(it.GetPixel(LEFTDOWN))) diff --git a/Code/BasicFilters/otbImaginaryImageToComplexImageFilter.h b/Code/BasicFilters/otbImaginaryImageToComplexImageFilter.h index 9c7c132ff5f6167b7e895700a495abc092cbd71a..48f7ff800569519cfab9d262d6099a1ea82adb8f 100644 --- a/Code/BasicFilters/otbImaginaryImageToComplexImageFilter.h +++ b/Code/BasicFilters/otbImaginaryImageToComplexImageFilter.h @@ -51,14 +51,14 @@ public: } inline TOutput operator()( const TInputImageImaginaryPart & imaginary) const { - return TOutput(static_cast<OutputValueType>(0.0),static_cast<OutputValueType>(imaginary)); + return TOutput(static_cast<OutputValueType>(0.0), static_cast<OutputValueType>(imaginary)); } }; } template <class TInputImageImaginaryPart, class TOutputImage> class ITK_EXPORT ImaginaryImageToComplexImageFilter : - public itk::UnaryFunctorImageFilter<TInputImageImaginaryPart,TOutputImage, + public itk::UnaryFunctorImageFilter<TInputImageImaginaryPart, TOutputImage, Function::ImaginaryToComplex< typename TInputImageImaginaryPart::PixelType, typename TOutputImage::PixelType> > diff --git a/Code/BasicFilters/otbImportGeoInformationImageFilter.txx b/Code/BasicFilters/otbImportGeoInformationImageFilter.txx index b13373e4a9c8710f2638787aa3773ee0d6605770..efcb8db3bddab8b39ebddc3c7625d727be084d21 100644 --- a/Code/BasicFilters/otbImportGeoInformationImageFilter.txx +++ b/Code/BasicFilters/otbImportGeoInformationImageFilter.txx @@ -89,7 +89,7 @@ ImportGeoInformationImageFilter<TImage, TSourceImage> // template <class TImage, class TSourceImage> // void -// ImportGeoInformationImageFilter<TImage,TSourceImage> +// ImportGeoInformationImageFilter<TImage, TSourceImage> // ::GenerateData(void) // { // // Get output and source pointer diff --git a/Code/BasicFilters/otbInverseLogPolarTransform.h b/Code/BasicFilters/otbInverseLogPolarTransform.h index 8475d5f429c7e44d885a5cba40902c154b89321b..27dda1d64ecf66a269a647a4b7d7b799b79a9b25 100644 --- a/Code/BasicFilters/otbInverseLogPolarTransform.h +++ b/Code/BasicFilters/otbInverseLogPolarTransform.h @@ -25,14 +25,14 @@ namespace otb /** \class InverseLogPolarTransform * \brief This transform is the back transform of the LogPolarTransform. * - * Given (x,y) the coordinates of a point in cartesian system, the corresponding + * Given (x, y) the coordinates of a point in cartesian system, the corresponding * log-polar coordinates are : * \f$ \rho = 1/2*log((x-xc)^2+(y+yc)^2) \f$ * \f$ \theta = asin(y-yc)/(\sqrt{(x-xc)^2+(y+yc)^2}) \f$ * * In this implemenatation, theta is expressed in degree, and the result of the asin function - * is clamped to the [0,360] range. Please note that since the transform of the center has no meaning - * it is rejected to the point [400,0], which does not belong to this range. This is done to provide + * is clamped to the [0, 360] range. Please note that since the transform of the center has no meaning + * it is rejected to the point [400, 0], which does not belong to this range. This is done to provide * a coordinate not likely to belong to a log-polar image buffer. * * \sa LogPolarTransform diff --git a/Code/BasicFilters/otbInverseLogPolarTransform.txx b/Code/BasicFilters/otbInverseLogPolarTransform.txx index 00db344f8140ea516430a081f80e157cf1d7d120..15fb563dd3278b792e4d4d4378d03b322a8739bd 100644 --- a/Code/BasicFilters/otbInverseLogPolarTransform.txx +++ b/Code/BasicFilters/otbInverseLogPolarTransform.txx @@ -98,7 +98,7 @@ InverseLogPolarTransform<TScalarType> result[0] = (1. / m_Scale[0]) * vcl_asin((point[1] - m_Center[1]) / rho); // degree conversion result[0] = result[0] * (180. / CONST_PI); - // Deplacing the range to [0,90], [270,360] + // Deplacing the range to [0, 90], [270, 360] result[0] = result[0] > 0. ? result[0] : result[0] + 360.; // Avoiding asin indetermination if ((point[0] - m_Center[0]) >= 0) @@ -106,7 +106,7 @@ InverseLogPolarTransform<TScalarType> result[0] = result[0] < 90. ? result[0] + 90. : result[0] - 90.; } result[1] = (1. / m_Scale[1]) * vcl_log(rho); - // otbMsgDebugMacro(<<vcl_log(vcl_pow(point[0]-m_Center[0],2)+vcl_pow(point[1]-m_Center[1],2))); + // otbMsgDebugMacro(<<vcl_log(vcl_pow(point[0]-m_Center[0], 2)+vcl_pow(point[1]-m_Center[1], 2))); } else { @@ -134,7 +134,7 @@ InverseLogPolarTransform<TScalarType> result[0] = (1 / m_Scale[0]) * vcl_asin((vector[1] - m_Center[1]) / rho); // degree conversion result[0] = result[0] * (180 / CONST_PI); - // Deplacing the range to [0,90], [270,360] + // Deplacing the range to [0, 90], [270, 360] result[0] = result[0] > 0 ? result[0] : result[0] + 360; // Avoiding asin indetermination if ((vector[0] - m_Center[0]) >= 0) @@ -142,7 +142,7 @@ InverseLogPolarTransform<TScalarType> result[0] = result[0] < 90 ? result[0] + 90 : result[0] - 90; } result[1] = (1 / m_Scale[1]) * vcl_log(rho); - // otbMsgDebugMacro(<<vcl_log(vcl_pow(vector[0]-m_Center[0],2)+vcl_pow(vector[1]-m_Center[1],2))); + // otbMsgDebugMacro(<<vcl_log(vcl_pow(vector[0]-m_Center[0], 2)+vcl_pow(vector[1]-m_Center[1], 2))); } else { @@ -170,7 +170,7 @@ InverseLogPolarTransform<TScalarType> result[0] = (1 / m_Scale[0]) * vcl_asin((vector[1] - m_Center[1]) / rho); // degree conversion result[0] = result[0] * (180 / CONST_PI); - // Deplacing the range to [0,90], [270,360] + // Deplacing the range to [0, 90], [270, 360] result[0] = result[0] > 0 ? result[0] : result[0] + 360; // Avoiding vcl_asin indetermination if ((vector[0] - m_Center[0]) >= 0) @@ -178,7 +178,7 @@ InverseLogPolarTransform<TScalarType> result[0] = result[0] < 90 ? result[0] + 90 : result[0] - 90; } result[1] = (1 / m_Scale[1]) * vcl_log(rho); - // otbMsgDebugMacro(<<log(vcl_pow(vector[0]-m_Center[0],2)+vcl_pow(vector[1]-m_Center[1],2))); + // otbMsgDebugMacro(<<log(vcl_pow(vector[0]-m_Center[0], 2)+vcl_pow(vector[1]-m_Center[1], 2))); } else { diff --git a/Code/BasicFilters/otbLogPolarTransform.h b/Code/BasicFilters/otbLogPolarTransform.h index 4eda0016cbf5546a05928241585eaa3c2e924cf9..d757f226e1663f47ac834f3c4bf7d8b75d7d2020 100644 --- a/Code/BasicFilters/otbLogPolarTransform.h +++ b/Code/BasicFilters/otbLogPolarTransform.h @@ -34,7 +34,7 @@ namespace otb * \f$ x-xc=exp(\rho)*cos(\theta) \f$ * \f$ y-yc=exp(\rho)*sin(\theta) \f$ * - * Where (xc,yc) is the center of the log-polar transform in the cartesian space. + * Where (xc, yc) is the center of the log-polar transform in the cartesian space. * Please note that this center can NOT be represented in log-polar. * * \sa InverseLogPolarTransform diff --git a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h index 41031bef1867e282e37bca021bae0aa46769c369..0ff6e7668a0426f1dacdb41da68b5089cdd681c5 100644 --- a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h +++ b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h @@ -157,7 +157,7 @@ protected: * due to limited thread-safety of FFTW plan creation. */ void GenerateData(); - // void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,int threadId); + // void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId); private: OverlapSaveConvolutionImageFilter(const Self &); //purposely not implemented diff --git a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx index 759d23bb811333e32d0beb9cd497363105d7e90a..e98f6d5f55ba7c5143612bc96752933c0fe58bf5 100644 --- a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx +++ b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx @@ -104,7 +104,7 @@ template<class TInputImage, class TOutputImage, class TBoundaryCondition> void OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage, TBoundaryCondition> /* TODO commented out since multi-threading is not supported for the moment - * ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,int threadId) */ + * ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId) */ ::GenerateData() { #if defined USE_FFTWD diff --git a/Code/BasicFilters/otbPointSetExtractROI.txx b/Code/BasicFilters/otbPointSetExtractROI.txx index 2d8df65104a46c5945fe5efad3e01ed26dd5a526..faec29cd0d84f6b42e6dd9a861bb58e2c96325af 100644 --- a/Code/BasicFilters/otbPointSetExtractROI.txx +++ b/Code/BasicFilters/otbPointSetExtractROI.txx @@ -108,7 +108,7 @@ PointSetExtractROI<TInputPointSet, TOutputPointSet> outPoints->push_back(point); // Get & Add the data typename InputPointSetType::PixelType data; - inputPointSet->GetPointData(inputPoint.Index(),&data); + inputPointSet->GetPointData(inputPoint.Index(), &data); outData->push_back(data/*inputData.Value()*/); } diff --git a/Code/BasicFilters/otbPointSetFunction.txx b/Code/BasicFilters/otbPointSetFunction.txx index aeb5e7a81af4a58de0257551bb8abff06989f241..e99cfa80e2ca73c38e04b2654715c23625d99513 100644 --- a/Code/BasicFilters/otbPointSetFunction.txx +++ b/Code/BasicFilters/otbPointSetFunction.txx @@ -64,7 +64,7 @@ PointSetFunction<TPointSet, TOutput> // */ // template <class TPointSet, class TOutput > // const -// typename PointSetFunction< TPointSet,TOutput> +// typename PointSetFunction< TPointSet, TOutput> // ::PointSetType * // PointSetFunction< TPointSet, TOutput> // ::GetPointSet() const diff --git a/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h b/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h index 11c7f27ffed54e86b583c0c72fdec64dbbceb9e1..2fcebe3a3f0574ee3d188d045122fc9a5d634fbf 100644 --- a/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h +++ b/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h @@ -34,7 +34,7 @@ namespace otb * and the type of the output image. It is also parameterized by the * operation to be applied, using a Functor style. * - * \sa TernaryFunctorImageFilter,BinaryFunctorImageFilter UnaryFunctorImageFilter + * \sa TernaryFunctorImageFilter, BinaryFunctorImageFilter UnaryFunctorImageFilter * * \ingroup IntensityImageFilters Multithreaded */ diff --git a/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilter.h b/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilter.h index 668e207c9b420a0d8d7f8b1d3e658cb9bc57d6af..c89bb1bf21daf049cc5a6ef27d0ffbf3d33ed033 100644 --- a/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilter.h +++ b/Code/BasicFilters/otbRealAndImaginaryImageToComplexImageFilter.h @@ -52,7 +52,7 @@ public: inline TOutput operator()( const TInputImageRealPart & real, const TInputImageImaginaryPart & imaginary ) const { - return TOutput(static_cast<OutputValueType>(real),static_cast<OutputValueType>(imaginary)); + return TOutput(static_cast<OutputValueType>(real), static_cast<OutputValueType>(imaginary)); } }; } @@ -60,7 +60,7 @@ public: template <class TInputImageRealPart, class TInputImageImaginaryPart, class TOutputImage> class ITK_EXPORT RealAndImaginaryImageToComplexImageFilter : public itk::BinaryFunctorImageFilter<TInputImageRealPart, - TInputImageImaginaryPart,TOutputImage, + TInputImageImaginaryPart, TOutputImage, Function::RealAndImaginaryToComplex< typename TInputImageRealPart::PixelType, typename TInputImageImaginaryPart::PixelType, @@ -70,7 +70,7 @@ public: /** Standard class typedefs. */ typedef RealAndImaginaryImageToComplexImageFilter Self; typedef itk::BinaryFunctorImageFilter< - TInputImageRealPart, TInputImageImaginaryPart,TOutputImage, + TInputImageRealPart, TInputImageImaginaryPart, TOutputImage, Function::RealAndImaginaryToComplex< typename TInputImageRealPart::PixelType, typename TInputImageImaginaryPart::PixelType, typename TOutputImage::PixelType> > @@ -95,7 +95,7 @@ public: // itkConceptMacro(InputConvertibleToOutputCheck, // (Concept::Convertible<InputRealPartPixelType, OutputPixelValueType>)); // itkConceptMacro(InputConvertibleToOutputCheck, -// (Concept::Convertible<InputImaginaryPartPixelType,OutputPixelValueType>)); +// (Concept::Convertible<InputImaginaryPartPixelType, OutputPixelValueType>)); /** End concept checking */ //#endif diff --git a/Code/BasicFilters/otbRealImageToComplexImageFilter.h b/Code/BasicFilters/otbRealImageToComplexImageFilter.h index 271d8fba3745586e73e014f9345c048e003c7b54..481f7e2f3bec3c6676658ec0504bd98d230afe54 100644 --- a/Code/BasicFilters/otbRealImageToComplexImageFilter.h +++ b/Code/BasicFilters/otbRealImageToComplexImageFilter.h @@ -51,14 +51,14 @@ public: } inline TOutput operator()( const TInputImageRealPart & real) const { - return TOutput(static_cast<OutputValueType>(real),static_cast<OutputValueType>(0.0)); + return TOutput(static_cast<OutputValueType>(real), static_cast<OutputValueType>(0.0)); } }; } template <class TInputImageRealPart, class TOutputImage> class ITK_EXPORT RealImageToComplexImageFilter : - public itk::UnaryFunctorImageFilter<TInputImageRealPart,TOutputImage, + public itk::UnaryFunctorImageFilter<TInputImageRealPart, TOutputImage, Function::RealToComplex< typename TInputImageRealPart::PixelType, typename TOutputImage::PixelType> > diff --git a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h index 01ead3b510f029607db8086f2b8f9733db36a010..dd15cde8ccd1aa521ac15a2e52747dda31d53851 100644 --- a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h +++ b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h @@ -104,7 +104,7 @@ public: itkGetMacro(OutsideValue, ValueType); /** The origin of the output image. The origin is the geometric - * coordinates of the index (0,0,...,0). It is stored internally + * coordinates of the index (0, 0, ..., 0). It is stored internally * as double but may be set from float. * \sa GetOrigin() */ virtual void SetOrigin(const PointType& origin); diff --git a/Code/BasicFilters/otbStreamingCompareImageFilter.txx b/Code/BasicFilters/otbStreamingCompareImageFilter.txx index fda5dd00f26ca0d09458d1f7c8ac24f56cef7914..9123e9db038e63532a847b09b85f68f41235ee2f 100644 --- a/Code/BasicFilters/otbStreamingCompareImageFilter.txx +++ b/Code/BasicFilters/otbStreamingCompareImageFilter.txx @@ -291,7 +291,7 @@ PersistentCompareImageFilter<TInputImage> itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels()); RealType realValue1, realValue2; - PixelType value1,value2; + PixelType value1, value2; itk::ImageRegionConstIterator<TInputImage> it1(inputPtr1, outputRegionForThread); itk::ImageRegionConstIterator<TInputImage> it2(inputPtr2, outputRegionForThread); diff --git a/Code/BasicFilters/otbStreamingResampleImageFilter.h b/Code/BasicFilters/otbStreamingResampleImageFilter.h index fc0e81c73490c0584c2630ae58302c5e9f599a61..0af576beed9ad8e9c4cf5098557286cee93db074 100644 --- a/Code/BasicFilters/otbStreamingResampleImageFilter.h +++ b/Code/BasicFilters/otbStreamingResampleImageFilter.h @@ -67,7 +67,7 @@ public: itkNewMacro(Self); /** Run-time type information (and related methods). */ - itkTypeMacro(StreamingResampleImageFilter,itk::ImageToImageFilter); + itkTypeMacro(StreamingResampleImageFilter, itk::ImageToImageFilter); /** Typedef parameters*/ typedef TInputImage InputImageType; @@ -110,7 +110,7 @@ public: m_DeformationFilter->SetTransform(transform); this->Modified(); } - otbGetObjectMemberConstMacro(DeformationFilter,Transform,const TransformType*); + otbGetObjectMemberConstMacro(DeformationFilter, Transform, const TransformType*); /** The Deformation field spacing & size */ void SetDeformationFieldSpacing(const SpacingType & spacing) @@ -131,19 +131,19 @@ public: m_WarpFilter->SetOutputOrigin(origin); this->Modified(); } - otbGetObjectMemberConstReferenceMacro(WarpFilter,OutputOrigin,OriginType); + otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputOrigin, OriginType); // Output Start index - otbSetObjectMemberMacro(WarpFilter,OutputStartIndex,IndexType); - otbGetObjectMemberConstReferenceMacro(WarpFilter,OutputStartIndex,IndexType); + otbSetObjectMemberMacro(WarpFilter, OutputStartIndex, IndexType); + otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputStartIndex, IndexType); // Output Size - otbSetObjectMemberMacro(WarpFilter,OutputSize,SizeType); - otbGetObjectMemberConstReferenceMacro(WarpFilter,OutputSize,SizeType); + otbSetObjectMemberMacro(WarpFilter, OutputSize, SizeType); + otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputSize, SizeType); // Output Spacing - otbSetObjectMemberMacro(WarpFilter,OutputSpacing,SpacingType); - otbGetObjectMemberConstReferenceMacro(WarpFilter,OutputSpacing,SpacingType); + otbSetObjectMemberMacro(WarpFilter, OutputSpacing, SpacingType); + otbGetObjectMemberConstReferenceMacro(WarpFilter, OutputSpacing, SpacingType); /** Methods to Set/Get the interpolator */ void SetInterpolator(InterpolatorType * interpolator) diff --git a/Code/BasicFilters/otbStreamingResampleImageFilter.txx b/Code/BasicFilters/otbStreamingResampleImageFilter.txx index 71fa213b175f77ceccf7c248e423f85e1e241ad3..c77dba2c4165adc45e86024719bcfceb60b7a7e5 100644 --- a/Code/BasicFilters/otbStreamingResampleImageFilter.txx +++ b/Code/BasicFilters/otbStreamingResampleImageFilter.txx @@ -49,7 +49,7 @@ StreamingResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionTy // Set up progress reporting typename itk::ProgressAccumulator::Pointer progress = itk::ProgressAccumulator::New(); progress->SetMiniPipelineFilter(this); - progress->RegisterInternalFilter(m_WarpFilter,1.f); + progress->RegisterInternalFilter(m_WarpFilter, 1.f); m_WarpFilter->GraftOutput(this->GetOutput()); m_WarpFilter->Update(); @@ -103,7 +103,7 @@ StreamingResampleImageFilter<TInputImage, TOutputImage, TInterpolatorPrecisionTy // Set up deformation field filter SizeType deformationFieldLargestSize; - for(unsigned int dim = 0; dim < InputImageType::ImageDimension;++dim) + for(unsigned int dim = 0; dim < InputImageType::ImageDimension; ++dim) { // vcl_ceil to avoid numerical problems due to division of // spacings diff --git a/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h b/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h index 320a0572987a743efa0bda3e3ede793c385204b7..49f9dadf9728639e4b711b417360ec582dcda0fa 100644 --- a/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h +++ b/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h @@ -184,7 +184,7 @@ private: /** \class VectorRescaleIntensityImageFilter * \brief This filter performs a rescaling of a vector image on a per band basis. * - * This filter rescales each band to match the [OutputMinimum,OutputMaximum] range. + * This filter rescales each band to match the [OutputMinimum, OutputMaximum] range. * In order to avoid odd values to alter the intensity extent, one can set a clamp percentage. * * Values lower than the first quantile of this percentage are set to the OutputMinimum. diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h b/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h index 89d8fd6d30a1bbb3174ca43c60e4d1b5a532c152..3a069971a6680c21370e7942904df71b30a26ef4 100644 --- a/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h +++ b/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h @@ -49,19 +49,19 @@ namespace otb * * \par * In this work, several 'windows' are estimated. In two dimensions, the - * interpolation at a position (x,y) is given by the following + * interpolation at a position (x, y) is given by the following * expression: * * \par * \f[ - * I(x,y) = + * I(x, y) = * \sum_{i = \lfloor x \rfloor + 1 - m}^{\lfloor x \rfloor + m} * \sum_{j = \lfloor y \rfloor + 1 - m}^{\lfloor y \rfloor + m} - * I_{i,j} K(x-i) K(y-j), + * I_{i, j} K(x-i) K(y-j), * \f] * * \par - * where m is the 'radius' of the window, (3,4 are reasonable numbers), + * where m is the 'radius' of the window, (3, 4 are reasonable numbers), * and K(t) is the kernel function, composed of the sinc function and * one of several possible window functions: * @@ -73,7 +73,7 @@ namespace otb * \par * Several window functions are provided here in the itk::Function * namespace. The conclusions of the referenced paper suggest to use the - * Welch, Cosine, Kaiser, and Lanczos windows for m = 4,5. These are based + * Welch, Cosine, Kaiser, and Lanczos windows for m = 4, 5. These are based * on error in rotating medical images w.r.t. the linear interpolation * method. In some cases the results achieve a 20-fold improvement in * accuracy. @@ -113,7 +113,7 @@ namespace otb * window by the kernel weights. The first is done more or less * efficiently in \f$ 2 m d \f$ operations (where d is the * dimensionality of the image). The second can be done - * better. Presently, each pixel \f$ I(i,j,k) \f$ is multiplied by the + * better. Presently, each pixel \f$ I(i, j, k) \f$ is multiplied by the * weights \f$ K(x-i), K(y-j), K(z-k) \f$ and added to the running * total. This results in \f$ d (2m)^d \f$ multiplication * operations. However, by keeping intermediate sums, it would be diff --git a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h index 995fb6aa6f567e1cfe1f819b079e59f6aa3750b9..4dcb86cf4b884ac8eeffc4233048f1552c320c5e 100644 --- a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h +++ b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h @@ -116,7 +116,7 @@ public: itkSetMacro(Radius, RadiusSizeType); /** Typedefs for histogram. This should have been defined as - Histogram<RealType,2> but a bug in VC++7 produced an internal compiler + Histogram<RealType, 2> but a bug in VC++7 produced an internal compiler error with such declaration. */ typedef typename itk::Statistics::Histogram<double, 2> HistogramType; typedef typename HistogramType::MeasurementVectorType MeasurementVectorType; diff --git a/Code/ChangeDetection/otbJoinHistogramMI.h b/Code/ChangeDetection/otbJoinHistogramMI.h index 075dbc43b36b7795375c249d2f0f8ada0af94721..57f9a9f3c04e68b274e3112bbcb56e1da2317c1b 100644 --- a/Code/ChangeDetection/otbJoinHistogramMI.h +++ b/Code/ChangeDetection/otbJoinHistogramMI.h @@ -80,7 +80,7 @@ public: jointEntropy = -jointEntropy/static_cast<TOutput>(totalFreq) + vcl_log(totalFreq); - return entropyX + entropyY - jointEntropy;*/ + return entropyX + entropyY - jointEntropy; */ typename HistogramType::MeasurementVectorType sample; for (unsigned long pos = 0; pos < itA.Size(); ++pos) @@ -125,7 +125,7 @@ public: } protected: - HistogramType::Pointer m_Histogram;*/ + HistogramType::Pointer m_Histogram; */ }; } } // end namespace otb diff --git a/Code/Common/otbCommandLineArgumentParser.cxx b/Code/Common/otbCommandLineArgumentParser.cxx index 328162eded363a69d9140922a559151789a2b807..cfb2d305189a163e8a908f0b2c4b234c59d4d79f 100644 --- a/Code/Common/otbCommandLineArgumentParser.cxx +++ b/Code/Common/otbCommandLineArgumentParser.cxx @@ -175,23 +175,23 @@ void CommandLineArgumentParser ::ParseGUI(CommandLineArgumentParseResult * /*outResult*/, bool /*failOnUnknownTrailingParameters*/) { /* OTB Comment : Todo : use OTB_USE_VISU_GUI cmake option for generate this method - Fl_Window *window = new Fl_Window(320,(m_OptionList.size()+2)*50); + Fl_Window *window = new Fl_Window(320, (m_OptionList.size()+2)*50); std::vector<Fl_Input*> myInputs; unsigned int pos = 1; - for(ListOptionType::iterator it = m_OptionList.begin();it!=m_OptionList.end();++it,++pos) + for(ListOptionType::iterator it = m_OptionList.begin(); it!=m_OptionList.end(); ++it, ++pos) { - Fl_Input * tmpInput = new Fl_Input(50,pos*50,200,30,it->CommonName.c_str()); + Fl_Input * tmpInput = new Fl_Input(50, pos*50, 200, 30, it->CommonName.c_str()); tmpInput->tooltip(it->Description.c_str()); } - Fl_Button * button = new Fl_Button(50,pos*50 , 130, 30, "Ok"); + Fl_Button * button = new Fl_Button(50, pos*50 , 130, 30, "Ok"); button->tooltip("Validate parameters and exit."); window->end(); window->show(); Fl::run(); - for(std::vector<Fl_Input * >::iterator flIt =myInputs.begin();flIt!=myInputs.end();++flIt) + for(std::vector<Fl_Input * >::iterator flIt =myInputs.begin(); flIt!=myInputs.end(); ++flIt) { delete (*flIt); } diff --git a/Code/Common/otbCommandLineArgumentParser.h b/Code/Common/otbCommandLineArgumentParser.h index ca0eb07a94e2f1a8f069dc38ff73160d68d08eb5..fa3ff77289ef350d7d3f695a5a196e937d6d080a 100644 --- a/Code/Common/otbCommandLineArgumentParser.h +++ b/Code/Common/otbCommandLineArgumentParser.h @@ -195,16 +195,16 @@ private: * CommandLineArgumentParser parser; * parser.SetProgramDescription("This program is an example"); * parser.AddInputImage(); - * parser.AddOption("-f",1); + * parser.AddOption("-f", 1); * parser.AddSynonim("-f","--filename"); - * parser.AddOption("-v",0); + * parser.AddOption("-v", 0); * parser.AddSynonim("-v","--verbose"); * parser.AddOption("--DetailledName","Help explanation","-d", 1, false); * \endcode * - Use the parser: * \code * CommandLineArgumentParseResult result; - * if(parser.TryParseCommandLine(argc,argv,result)) + * if(parser.TryParseCommandLine(argc, argv, result)) * { * if(result.IsOptionPresent("--DetailledName")) * { diff --git a/Code/Common/otbDataNode.h b/Code/Common/otbDataNode.h index 189282dc3e75083b70fba3822ecd2bf5557cd0f4..6e24ae7db1a469687f7461976cd24971a87edf5f 100644 --- a/Code/Common/otbDataNode.h +++ b/Code/Common/otbDataNode.h @@ -98,8 +98,8 @@ public: typedef typename PolygonListType::ConstPointer PolygonListConstPointerType; /** Fields typedef */ -// typedef std::map<std::string,std::string> FieldMapType; -// typedef std::pair<std::string,std::string> FieldType; +// typedef std::map<std::string, std::string> FieldMapType; +// typedef std::pair<std::string, std::string> FieldType; /** Accessors */ itkGetMacro(NodeType, NodeType); @@ -235,7 +235,7 @@ public: bool HasField(std::string key) const; /** - * \return the nth field of the node as a std::pair of (key,value). + * \return the nth field of the node as a std::pair of (key, value). * \param index the index of the field to return. */ // FieldType GetNthField(unsigned int index) const; diff --git a/Code/Common/otbDataNode.txx b/Code/Common/otbDataNode.txx index 94502e58a5ede32053b639df116f32634fc606da..2035ba895b06798527cfaa25292be9a673f8b205 100644 --- a/Code/Common/otbDataNode.txx +++ b/Code/Common/otbDataNode.txx @@ -235,7 +235,7 @@ DataNode<TPrecision, VDimension, TValuePrecision> /* template <class TPrecision, unsigned int VDimension, class TValuePrecision> void -DataNode<TPrecision,VDimension,TValuePrecision> +DataNode<TPrecision, VDimension, TValuePrecision> ::SetField(std::string key, std::string value) { m_FieldMap[key] = value; @@ -277,7 +277,7 @@ DataNode<TPrecision, VDimension, TValuePrecision> /* template <class TPrecision, unsigned int VDimension, class TValuePrecision> std::string -DataNode<TPrecision,VDimension,TValuePrecision> +DataNode<TPrecision, VDimension, TValuePrecision> ::GetField(std::string key) const { if (HasField(key)) @@ -326,14 +326,14 @@ DataNode<TPrecision, VDimension, TValuePrecision> /* template <class TPrecision, unsigned int VDimension, class TValuePrecision> void -DataNode<TPrecision,VDimension,TValuePrecision> +DataNode<TPrecision, VDimension, TValuePrecision> ::RemoveField(std::string key) { m_FieldMap.erase(key); } template <class TPrecision, unsigned int VDimension, class TValuePrecision> bool -DataNode<TPrecision,VDimension,TValuePrecision> +DataNode<TPrecision, VDimension, TValuePrecision> ::HasField(std::string key) const { return (m_FieldMap.find(key)!=m_FieldMap.end()); @@ -357,16 +357,16 @@ DataNode<TPrecision, VDimension, TValuePrecision> /* template <class TPrecision, unsigned int VDimension, class TValuePrecision> -typename DataNode<TPrecision,VDimension,TValuePrecision> +typename DataNode<TPrecision, VDimension, TValuePrecision> ::FieldType -DataNode<TPrecision,VDimension,TValuePrecision> +DataNode<TPrecision, VDimension, TValuePrecision> ::GetNthField(unsigned int index) const { if (index<GetNumberOfFields()) { FieldMapType::iterator it = m_FieldMap.begin(); - for (unsigned int i = 0;i<index;++i) + for (unsigned int i = 0; i<index; ++i) { ++it; } @@ -376,7 +376,7 @@ DataNode<TPrecision,VDimension,TValuePrecision> } template <class TPrecision, unsigned int VDimension, class TValuePrecision> unsigned int -DataNode<TPrecision,VDimension,TValuePrecision> +DataNode<TPrecision, VDimension, TValuePrecision> ::GetNumberOfFields() const { return m_FieldMap.size(); @@ -402,7 +402,7 @@ DataNode<TPrecision, VDimension, TValuePrecision> /* template <class TPrecision, unsigned int VDimension, class TValuePrecision> void -DataNode<TPrecision,VDimension,TValuePrecision> +DataNode<TPrecision, VDimension, TValuePrecision> ::ClearFields() { m_FieldMap.clear(); diff --git a/Code/Common/otbExtractROI.txx b/Code/Common/otbExtractROI.txx index 0f1c0b302ac9d69e9470b8d543b5973f0a5b3dee..0ddb457e5016703768f7d0c2d65d7336e31a37bf 100644 --- a/Code/Common/otbExtractROI.txx +++ b/Code/Common/otbExtractROI.txx @@ -31,7 +31,7 @@ namespace otb */ template <class TInputPixel, class TOutputPixel> ExtractROI<TInputPixel, TOutputPixel> -::ExtractROI() //: ExtractROIBase< itk::Image<TInputPixel,VImageDimension> , itk::Image<TOutputPixel,VImageDimension> >() +::ExtractROI() //: ExtractROIBase< itk::Image<TInputPixel, VImageDimension> , itk::Image<TOutputPixel, VImageDimension> >() { } diff --git a/Code/Common/otbGISTableToLabelMapFilter.txx b/Code/Common/otbGISTableToLabelMapFilter.txx index ca80d36b990bd12332157d8aab59a218a8b9415a..96c8e942a7f71e721158be6c77a8a9a579c3f435 100644 --- a/Code/Common/otbGISTableToLabelMapFilter.txx +++ b/Code/Common/otbGISTableToLabelMapFilter.txx @@ -89,7 +89,7 @@ GISTableToLabelMapFilter<TGISTable, TLabelMap> InputImagePointer input = const_cast<InputImageType *>(this->GetInput()); if ( !input ) { return; } - input->SetRequestedRegion( input->GetLargestPossibleRegion() );*/ + input->SetRequestedRegion( input->GetLargestPossibleRegion() ); */ } /* diff --git a/Code/Common/otbGISTableToVectorDataFilter.txx b/Code/Common/otbGISTableToVectorDataFilter.txx index a8d75d73ebf7d0bc4abb3e8139f22476f2689831..99a7e2f4d47b5716a6cbf0c426cc9270b9639db7 100644 --- a/Code/Common/otbGISTableToVectorDataFilter.txx +++ b/Code/Common/otbGISTableToVectorDataFilter.txx @@ -30,7 +30,7 @@ template<class TGISTable, class TVectorData> GISTableToVectorDataFilter<TGISTable, TVectorData> ::GISTableToVectorDataFilter() { /* - m_BackgroundValue = NumericTraits<OutputImagePixelType>::NonpositiveMin();*/ + m_BackgroundValue = NumericTraits<OutputImagePixelType>::NonpositiveMin(); */ m_Reader = VectorDataFileReaderType::New(); } @@ -89,7 +89,7 @@ GISTableToVectorDataFilter<TGISTable, TVectorData> InputImagePointer input = const_cast<InputImageType *>(this->GetInput()); if ( !input ) { return; } - input->SetRequestedRegion( input->GetLargestPossibleRegion() );*/ + input->SetRequestedRegion( input->GetLargestPossibleRegion() ); */ } /* @@ -124,8 +124,8 @@ GISTableToVectorDataFilter<TGISTable, TVectorData> // // DataNodePointerType root = output->GetDataTree()->GetRoot()->Get(); // -// output->GetDataTree()->Add(document,root); -// output->GetDataTree()->Add(folder1,document); +// output->GetDataTree()->Add(document, root); +// output->GetDataTree()->Add(folder1, document); OGRVectorDataIOPointerType gisReader = OGRVectorDataIOType::New(); @@ -142,7 +142,7 @@ GISTableToVectorDataFilter<TGISTable, TVectorData> } else { - itkExceptionMacro(<< "The OGR connection is not valid;ogrconnection = " << inputOGRConnStr); + itkExceptionMacro(<< "The OGR connection is not valid; ogrconnection = " << inputOGRConnStr); } // const std::string inputOGRConnStr=input->GetOGRStrConnection(); diff --git a/Code/Common/otbGenericInterpolateImageFunction.h b/Code/Common/otbGenericInterpolateImageFunction.h index 6727884fc4f6dbc2c0fb145365a55d4d6b7f6b04..0095557a0297d2e0f58d4ea75f7484d0538c4650 100644 --- a/Code/Common/otbGenericInterpolateImageFunction.h +++ b/Code/Common/otbGenericInterpolateImageFunction.h @@ -59,7 +59,7 @@ public: typedef typename Superclass::InputImageType InputImageType; /** Dimension underlying input image. */ - //itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension); + //itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension); /** Index and typedef support. */ typedef typename Superclass::IndexType IndexType; @@ -90,7 +90,7 @@ public: { return m_Function.GetRadius(); } - //unsigned int GetRadius() { return this->GetFunction().GetRadius();}; + //unsigned int GetRadius() { return this->GetFunction().GetRadius(); }; /** Set/Get the window radius*/ // Don't have to be used here, just declared for the inheritance classes. diff --git a/Code/Common/otbGenericInterpolateImageFunction.txx b/Code/Common/otbGenericInterpolateImageFunction.txx index c49f93cb1bdf4bd1b8a90373f6508ca11133d25b..99e97e4977fc3b2e523b8591e76d045f28d6098d 100644 --- a/Code/Common/otbGenericInterpolateImageFunction.txx +++ b/Code/Common/otbGenericInterpolateImageFunction.txx @@ -230,7 +230,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo nit.SetLocation(baseIndex); const unsigned int twiceRadius = static_cast<const unsigned int>(2 * this->GetRadius()); - /* double xWeight[ImageDimension][ twiceRadius];*/ + /* double xWeight[ImageDimension][ twiceRadius]; */ std::vector<std::vector<double> > xWeight; xWeight.resize(ImageDimension); for (unsigned int cpt = 0; cpt < xWeight.size(); cpt++) @@ -292,7 +292,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo // Iterate over the neighborhood, taking the correct set // of weights in each dimension RealType xPixelValue; - itk::PixelBuilder<RealType>::Zero(xPixelValue,this->GetInputImage()->GetNumberOfComponentsPerPixel()); + itk::PixelBuilder<RealType>::Zero(xPixelValue, this->GetInputImage()->GetNumberOfComponentsPerPixel()); for (unsigned int j = 0; j < m_OffsetTableSize; ++j) { // Get the offset for this neighbor diff --git a/Code/Common/otbGeoInformationConversion.cxx b/Code/Common/otbGeoInformationConversion.cxx index b0343b9025cb013236f7d86a67f6679e0f542b94..aac0ef44ac307f25d3927f5ca55c9d0002630fa7 100644 --- a/Code/Common/otbGeoInformationConversion.cxx +++ b/Code/Common/otbGeoInformationConversion.cxx @@ -32,7 +32,7 @@ std::string GeoInformationConversion::ToWKT(int srid) OGRSpatialReferenceH hSRS = NULL; hSRS = OSRNewSpatialReference(NULL); - if (OSRImportFromEPSG(hSRS,srid ) == OGRERR_NONE) + if (OSRImportFromEPSG(hSRS, srid ) == OGRERR_NONE) { // Get the wkt if ( OSRExportToWkt(hSRS, &wkt) == OGRERR_NONE) diff --git a/Code/Common/otbMacro.h b/Code/Common/otbMacro.h index 92fcd42aa8d99d45cf68698e0c2f9406b8c0389f..1c9e41faab9eec90738ae74506e86a9e5de2b276 100644 --- a/Code/Common/otbMacro.h +++ b/Code/Common/otbMacro.h @@ -47,7 +47,7 @@ namespace otb itkmsg << "Debug: In " __FILE__ ", line " << __LINE__ << "\n" \ << this->GetNameOfClass() << " (" << this << "): " x \ << "\n\n"; \ - ::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str());} \ + ::itk::OutputWindowDisplayDebugText(itkmsg.str().c_str()); } \ }*/ #define otbMsgDebugMacro(x) \ diff --git a/Code/Common/otbMultiToMonoChannelExtractROI.h b/Code/Common/otbMultiToMonoChannelExtractROI.h index 501e37b6679404694c2aad151c0563904925c455..be4506bd12a5d13ff6ad4fef568f1ea0697047af 100644 --- a/Code/Common/otbMultiToMonoChannelExtractROI.h +++ b/Code/Common/otbMultiToMonoChannelExtractROI.h @@ -38,13 +38,13 @@ namespace otb */ template <class TInputPixelType, class TOutputPixelType> class ITK_EXPORT MultiToMonoChannelExtractROI : -// public ExtractROIBase< itk::VectorImage<TInputPixelType,2> , itk::Image<TOutputPixelType,2> > +// public ExtractROIBase< itk::VectorImage<TInputPixelType, 2> , itk::Image<TOutputPixelType, 2> > public ExtractROIBase<VectorImage<TInputPixelType, 2>, Image<TOutputPixelType, 2> > { public: /** Standard class typedefs. */ typedef MultiToMonoChannelExtractROI Self; -// typedef ExtractROIBase< itk::VectorImage<TInputPixelType,2> , itk::Image<TOutputPixelType,2> > Superclass; +// typedef ExtractROIBase< itk::VectorImage<TInputPixelType, 2> , itk::Image<TOutputPixelType, 2> > Superclass; typedef ExtractROIBase<VectorImage<TInputPixelType, 2>, Image<TOutputPixelType, 2> > Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; diff --git a/Code/Common/otbObjectList.txx b/Code/Common/otbObjectList.txx index 48fca8cf9ae0d3ce3a5fbae332b6f7477510259a..34f99b6a620125096aec8896f34cad3f8697d504 100644 --- a/Code/Common/otbObjectList.txx +++ b/Code/Common/otbObjectList.txx @@ -374,8 +374,8 @@ ObjectList<TObject> { os << indent.GetNextIndent() << iter.Get().GetPointer() << std::endl; os << indent.GetNextIndent() << iter.Get() << std::endl; -// iter.Get()->PrintSelf(os,indent.GetNextIndent()); -// iter.Get()->Print(os,indent.GetNextIndent()); +// iter.Get()->PrintSelf(os, indent.GetNextIndent()); +// iter.Get()->Print(os, indent.GetNextIndent()); ++iter; } } diff --git a/Code/Common/otbParser.h b/Code/Common/otbParser.h index 13f49b37006b8f5a9364917d5d44f6ca88c1f27e..3ca74d094965ef5ea510742929e6b9c982ed3cfc 100644 --- a/Code/Common/otbParser.h +++ b/Code/Common/otbParser.h @@ -98,7 +98,7 @@ private: //---------- User Defined Functions ----------//END -};// end class +}; // end class }//end namespace otb diff --git a/Code/Common/otbPipelineMemoryPrintCalculator.cxx b/Code/Common/otbPipelineMemoryPrintCalculator.cxx index 78505e3f1d24bfb44e3c9180cb6e929976dd6be8..87a8986856c540cbc4aa94aff756c40a662ab2b8 100644 --- a/Code/Common/otbPipelineMemoryPrintCalculator.cxx +++ b/Code/Common/otbPipelineMemoryPrintCalculator.cxx @@ -41,7 +41,7 @@ PipelineMemoryPrintCalculator ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); // Display parameters os<<indent<<"Data to write: "<<m_DataToWrite<<std::endl; @@ -132,15 +132,15 @@ PipelineMemoryPrintCalculator { #define OTB_IMAGE_SIZE_BLOCK(type) \ - if(dynamic_cast<itk::Image<type,2> *>(data) != NULL) \ + if(dynamic_cast<itk::Image<type, 2> *>(data) != NULL) \ { \ - itk::Image<type,2> * image = dynamic_cast<itk::Image<type,2> *>(data); \ + itk::Image<type, 2> * image = dynamic_cast<itk::Image<type, 2> *>(data); \ return image->GetRequestedRegion().GetNumberOfPixels() \ * image->GetNumberOfComponentsPerPixel() * sizeof(type); \ } \ - if(dynamic_cast<itk::VectorImage<type,2> * >(data) != NULL) \ + if(dynamic_cast<itk::VectorImage<type, 2> * >(data) != NULL) \ { \ - itk::VectorImage<type,2> * image = dynamic_cast<itk::VectorImage<type,2> *>(data); \ + itk::VectorImage<type, 2> * image = dynamic_cast<itk::VectorImage<type, 2> *>(data); \ return image->GetRequestedRegion().GetNumberOfPixels() \ * image->GetNumberOfComponentsPerPixel() * sizeof(type); \ } \ @@ -158,8 +158,8 @@ PipelineMemoryPrintCalculator OTB_IMAGE_SIZE_BLOCK(double) OTB_IMAGE_SIZE_BLOCK(std::complex<float>) OTB_IMAGE_SIZE_BLOCK(std::complex<double>) - typedef itk::FixedArray<float,2> FloatFixedArray2Type; - typedef itk::FixedArray<float,2> DoubleFixedArray2Type; + typedef itk::FixedArray<float, 2> FloatFixedArray2Type; + typedef itk::FixedArray<float, 2> DoubleFixedArray2Type; OTB_IMAGE_SIZE_BLOCK(FloatFixedArray2Type) OTB_IMAGE_SIZE_BLOCK(DoubleFixedArray2Type) diff --git a/Code/Common/otbPolygon.txx b/Code/Common/otbPolygon.txx index f9bc3cfcf85ac2d28a31800b7544aee10bc1dba2..824cf8f2557be6e22a4eb289ced298f56d55cbbe 100644 --- a/Code/Common/otbPolygon.txx +++ b/Code/Common/otbPolygon.txx @@ -218,7 +218,7 @@ Polygon<TValue> ++it; while (it != it_end) { - //std::cout<<"Testing Is crossing "<<a<<" "<<b<<current<<it.Value()<<" = "<<IsCrossing(a,b,current,it.Value())<<std::endl; + //std::cout<<"Testing Is crossing "<<a<<" "<<b<<current<<it.Value()<<" = "<<IsCrossing(a, b, current, it.Value())<<std::endl; if (IsCrossing(a, b, current, it.Value())) { ++resp; @@ -226,7 +226,7 @@ Polygon<TValue> current = it.Value(); ++it; } - //std::cout<<"Testing Is crossing "<<a<<" "<<b<<current<<first<<" = "<<IsCrossing(a,b,current,first)<<std::endl; + //std::cout<<"Testing Is crossing "<<a<<" "<<b<<current<<first<<" = "<<IsCrossing(a, b, current, first)<<std::endl; if (IsCrossing(a, b, current, first)) { ++resp; @@ -252,7 +252,7 @@ Polygon<TValue> ++it; while (it != it_end) { - //std::cout<<"IsTouching "<<a<<" "<<b<<", "<<current<<" "<<it.Value()<<" -> "<<IsTouching(a,b,current,it.Value())<<std::endl; + //std::cout<<"IsTouching "<<a<<" "<<b<<", "<<current<<" "<<it.Value()<<" -> "<<IsTouching(a, b, current, it.Value())<<std::endl; if (IsTouching(a, b, current, it.Value())) { ++resp; @@ -260,7 +260,7 @@ Polygon<TValue> current = it.Value(); ++it; } - //std::cout<<"IsTouching "<<a<<" "<<b<<", "<<current<<" "<<first<<" -> "<<IsTouching(a,b,current,first)<<std::endl; + //std::cout<<"IsTouching "<<a<<" "<<b<<", "<<current<<" "<<first<<" -> "<<IsTouching(a, b, current, first)<<std::endl; if (IsTouching(a, b, current, first)) { ++resp; diff --git a/Code/Common/otbPostGISTable.txx b/Code/Common/otbPostGISTable.txx index bef4e1f160ef46d51e36faada52860244fa744d5..f445b28e8a7ac7885c2dce7677b197719d5d46a8 100644 --- a/Code/Common/otbPostGISTable.txx +++ b/Code/Common/otbPostGISTable.txx @@ -144,7 +144,7 @@ PostGISTable<TConnectionImplementation, TPrecision, TSpatialDimension> //std::cout << "sizeof ext poly: " << polygonExtRing->GetVertexList()->Size()<< std::endl; while (itVertex != correctPolygonExtRing->GetVertexList()->End()) { - //polygon->line_to(itVertex.Value()[0],m_SensorModelFlip*itVertex.Value()[1]); + //polygon->line_to(itVertex.Value()[0], m_SensorModelFlip*itVertex.Value()[1]); //std::cout << "vertex: " << itVertex.Value()<< std::endl; for (unsigned int i = 0; i < TSpatialDimension; ++i) { @@ -180,7 +180,7 @@ PostGISTable<TConnectionImplementation, TPrecision, TSpatialDimension> itVertex = correctCurrentPolygonIntRing->GetVertexList()->Begin(); while (itVertex != correctCurrentPolygonIntRing->GetVertexList()->End()) { - //polygon->line_to(itVertex.Value()[0],m_SensorModelFlip*itVertex.Value()[1]); + //polygon->line_to(itVertex.Value()[0], m_SensorModelFlip*itVertex.Value()[1]); for (unsigned int i = 0; i < TSpatialDimension; i++) { sqlCmd << itVertex.Value()[i] << " "; diff --git a/Code/Common/otbStreamingTraits.h b/Code/Common/otbStreamingTraits.h index 1edd0e516da6a581c5b18db8ec9222d6c8c07bf1..cc7eb71ed6a7f82a9d70c02c51788be4cb196fe2 100644 --- a/Code/Common/otbStreamingTraits.h +++ b/Code/Common/otbStreamingTraits.h @@ -168,14 +168,14 @@ public: * \sa StreamingResampleImageFilter */ template <typename TPixel, unsigned int VImageDimension> -class ITK_EXPORT StreamingTraits< otb::VectorImage<TPixel,VImageDimension> > - : public StreamingTraitsBase<otb::VectorImage<TPixel,VImageDimension> > +class ITK_EXPORT StreamingTraits< otb::VectorImage<TPixel, VImageDimension> > + : public StreamingTraitsBase<otb::VectorImage<TPixel, VImageDimension> > { public: /** Standard class typedefs. */ typedef StreamingTraits Self; typedef StreamingTraitsBase - < otb::VectorImage<TPixel,VImageDimension> > Superclass; + < otb::VectorImage<TPixel, VImageDimension> > Superclass; typedef typename Superclass::ImageType ImageType; typedef typename Superclass::ImagePointerType ImagePointerType; diff --git a/Code/Common/otbStreamingTraits.txx b/Code/Common/otbStreamingTraits.txx index 57aef4d9fd1cab73eaa7f0e89bb78f344b5ebff2..1da709f73139dd0e361625b6a0e354b51a3fbb73 100644 --- a/Code/Common/otbStreamingTraits.txx +++ b/Code/Common/otbStreamingTraits.txx @@ -312,7 +312,7 @@ unsigned int StreamingTraits<TImage> } template <typename TPixel, unsigned int VImageDimension> -unsigned int StreamingTraits< otb::VectorImage<TPixel,VImageDimension> > +unsigned int StreamingTraits< otb::VectorImage<TPixel, VImageDimension> > ::CalculateNeededRadiusForInterpolator(const InterpolationType* interpolator) { unsigned int neededRadius = 0; diff --git a/Code/Common/otbVectorDataExtractROI.h b/Code/Common/otbVectorDataExtractROI.h index 0a22c8ebc4a0939f61ba3613def27c6a314b9ed4..e0047945eb4d75c5d79ee28fa089f7a08ccead18 100644 --- a/Code/Common/otbVectorDataExtractROI.h +++ b/Code/Common/otbVectorDataExtractROI.h @@ -132,7 +132,7 @@ private: VectorDataExtractROI(const Self &); //purposely not implemented void operator =(const Self&); //purposely not implemented - int CounterClockWise(PointType firstPoint,PointType secondPoint,PointType thirdPoint); + int CounterClockWise(PointType firstPoint, PointType secondPoint, PointType thirdPoint); bool IsSegementIntersectSegment(LinePointerType segmentLineAB, LinePointerType segmentLineCD); bool m_ProjectionNeeded; diff --git a/Code/Common/otbVectorDataExtractROI.txx b/Code/Common/otbVectorDataExtractROI.txx index e6b5818d2fd932991df99b5a3ca5ef293ab071b3..9954aa9481c99ee35a69b3276773f7bc68a24d75 100644 --- a/Code/Common/otbVectorDataExtractROI.txx +++ b/Code/Common/otbVectorDataExtractROI.txx @@ -301,7 +301,7 @@ VectorDataExtractROI<TVectorData> // ------------------- // Case 1 : Check if one of the two points are in the region - PointType firstPoint,secondPoint; + PointType firstPoint, secondPoint; firstPoint[0] = firstVertex[0]; firstPoint[1] = firstVertex[1]; @@ -348,7 +348,7 @@ VectorDataExtractROI<TVectorData> ::IsSegementIntersectSegment(LinePointerType segmentLineAB, LinePointerType segmentLineCD) { - PointType vertexA,vertexB, vertexC, vertexD; + PointType vertexA, vertexB, vertexC, vertexD; vertexA = segmentLineAB->GetVertexList()->GetElement(0); vertexB = segmentLineAB->GetVertexList()->GetElement(1); @@ -377,7 +377,7 @@ VectorDataExtractROI<TVectorData> template <class TVectorData> int VectorDataExtractROI<TVectorData> -::CounterClockWise(PointType firstPoint,PointType secondPoint,PointType thirdPoint) +::CounterClockWise(PointType firstPoint, PointType secondPoint, PointType thirdPoint) { PointType SecondMinusFirstPoint; PointType ThirdMinusFirstPoint; diff --git a/Code/Common/otbVectorDataToGISTableFilter.txx b/Code/Common/otbVectorDataToGISTableFilter.txx index 4534015094aed9272e361825ea13b0046f5a6769..5772a580a7fb3663695cbfb549b7c8e6924bb733 100644 --- a/Code/Common/otbVectorDataToGISTableFilter.txx +++ b/Code/Common/otbVectorDataToGISTableFilter.txx @@ -87,7 +87,7 @@ VectorDataToGISTableFilter<TVectorData, TGISTable> InputImagePointer input = const_cast<InputImageType *>(this->GetInput()); if ( !input ) { return; } - input->SetRequestedRegion( input->GetLargestPossibleRegion() );*/ + input->SetRequestedRegion( input->GetLargestPossibleRegion() ); */ } /* diff --git a/Code/Common/otbVectorDataToImageFilter.h b/Code/Common/otbVectorDataToImageFilter.h index 0b76d07387421019a7ad71592fc949bd48e275f9..be9ea88041408e73ec8fbb52e97e0359096329b6 100644 --- a/Code/Common/otbVectorDataToImageFilter.h +++ b/Code/Common/otbVectorDataToImageFilter.h @@ -95,7 +95,7 @@ public: /** Image index typedef. */ typedef typename TImage::IndexType IndexType; - /** Image spacing,origin and direction typedef */ + /** Image spacing, origin and direction typedef */ typedef typename TImage::SpacingType SpacingType; typedef typename TImage::PointType OriginType; typedef typename TImage::DirectionType DirectionType; diff --git a/Code/Common/otbVectorImageToASImageAdaptor.h b/Code/Common/otbVectorImageToASImageAdaptor.h index 55f821a2d1c3e1b86c24ef3cde38a06e6ac3c777..879777e8dbcbe0dcc4a6bc095f6c88f79a61e523 100644 --- a/Code/Common/otbVectorImageToASImageAdaptor.h +++ b/Code/Common/otbVectorImageToASImageAdaptor.h @@ -27,7 +27,7 @@ namespace otb /** \class VectorImageToASImageAdaptor * \brief Presents an image of pixel type Vector as being and image of - * FixelArray<unsigned short,3> type. + * FixelArray<unsigned short, 3> type. * * \ingroup ImageAdaptors * diff --git a/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx b/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx index 84d64203168dd3e13699944b79f24492e973bfb7..6ccc35b9be9cef9cec878fed4e224b7949551e44 100644 --- a/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx +++ b/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx @@ -104,7 +104,7 @@ BSplinesInterpolateDeformationFieldGenerator<TPointSet, TDeformationField> ImageIteratorType inIt(deformer->GetOutput(), outputPtr->GetRequestedRegion()); OutputIteratorType outIt(outputPtr, outputPtr->GetRequestedRegion()); int i = 0; - // Casting otb::Image<itt::Vector<ValueType,2>,2> to otb::VectorImage<ValueType,2> + // Casting otb::Image<itt::Vector<ValueType, 2>, 2> to otb::VectorImage<ValueType, 2> for (inIt.GoToBegin(), outIt.GoToBegin(); (!inIt.IsAtEnd()) && (!outIt.IsAtEnd()); ++inIt, ++outIt, ++i) { typename ImageType::PixelType inPixel; diff --git a/Code/DisparityMap/otbFineRegistrationImageFilter.h b/Code/DisparityMap/otbFineRegistrationImageFilter.h index e90b1b730e88f94a3f61099a66d81f23667d9793..58e98c36cdeed5ee91718216897f2c25a4494afa 100644 --- a/Code/DisparityMap/otbFineRegistrationImageFilter.h +++ b/Code/DisparityMap/otbFineRegistrationImageFilter.h @@ -66,12 +66,12 @@ namespace otb * \ingroup IntensityImageFilters, Streamed */ template <class TInputImage, class T0utputCorrelation, class TOutputDeformationField> -class ITK_EXPORT FineRegistrationImageFilter : public itk::ImageToImageFilter<TInputImage,T0utputCorrelation> +class ITK_EXPORT FineRegistrationImageFilter : public itk::ImageToImageFilter<TInputImage, T0utputCorrelation> { public: /** Standard class typedefs. */ typedef FineRegistrationImageFilter Self; - typedef itk::ImageToImageFilter<TInputImage,T0utputCorrelation> Superclass; + typedef itk::ImageToImageFilter<TInputImage, T0utputCorrelation> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -96,18 +96,18 @@ public: typedef itk::ContinuousIndex<double, 2> ContinuousIndexType; typedef itk::ImageToImageMetric<TInputImage, TInputImage> MetricType; typedef typename MetricType::Pointer MetricPointerType; - typedef itk::TranslationTransform<double,2> TranslationType; + typedef itk::TranslationTransform<double, 2> TranslationType; typedef typename TranslationType::Pointer TranslationPointerType; - typedef typename itk::Transform<double,2,2> TransformType; + typedef typename itk::Transform<double, 2, 2> TransformType; typedef typename TransformType::Pointer TransformPointerType; /** Set/Get the Metric used to compare images */ - itkSetObjectMacro(Metric,MetricType); - itkGetObjectMacro(Metric,MetricType); + itkSetObjectMacro(Metric, MetricType); + itkGetObjectMacro(Metric, MetricType); /** Set/Get the interpolator used to interpolate moving image at non-grid positions */ - itkSetObjectMacro(Interpolator,InterpolatorType); - itkGetObjectMacro(Interpolator,InterpolatorType); + itkSetObjectMacro(Interpolator, InterpolatorType); + itkGetObjectMacro(Interpolator, InterpolatorType); /** Connect one of the operands for pixel-wise addition */ void SetFixedInput( const TInputImage * image); @@ -127,28 +127,28 @@ public: itkGetMacro(Radius, SizeType); /** Set the searh radius */ - itkSetMacro(SearchRadius,SizeType); - itkGetMacro(SearchRadius,SizeType); + itkSetMacro(SearchRadius, SizeType); + itkGetMacro(SearchRadius, SizeType); /** Set/Get subpixel accuracy */ - itkSetMacro(SubPixelAccuracy,double); - itkGetMacro(SubPixelAccuracy,double); + itkSetMacro(SubPixelAccuracy, double); + itkGetMacro(SubPixelAccuracy, double); /** True if metric should be minimized. False otherwise */ - itkSetMacro(Minimize,bool); + itkSetMacro(Minimize, bool); itkBooleanMacro(Minimize); /** True if deformation field takes spacing into account. False otherwise */ - itkSetMacro(UseSpacing,bool); + itkSetMacro(UseSpacing, bool); itkBooleanMacro(UseSpacing); /** Set default offset between the two images */ - itkSetMacro(InitialOffset,SpacingType); - itkGetConstReferenceMacro(InitialOffset,SpacingType); + itkSetMacro(InitialOffset, SpacingType); + itkGetConstReferenceMacro(InitialOffset, SpacingType); /** Set the grid step */ - itkSetMacro(GridStep,OffsetType); - itkGetConstReferenceMacro(GridStep,OffsetType); + itkSetMacro(GridStep, OffsetType); + itkGetConstReferenceMacro(GridStep, OffsetType); /** Set unsigned int radius */ void SetRadius(unsigned int radius) diff --git a/Code/DisparityMap/otbFineRegistrationImageFilter.txx b/Code/DisparityMap/otbFineRegistrationImageFilter.txx index 97224c6cfdfa9c642a02c55c103aa4c2083a46dc..88fcbda87915200ea3e9383f973459a2b24b4495 100644 --- a/Code/DisparityMap/otbFineRegistrationImageFilter.txx +++ b/Code/DisparityMap/otbFineRegistrationImageFilter.txx @@ -32,12 +32,12 @@ namespace otb * Constructor */ template <class TInputImage, class T0utputCorrelation, class TOutputDeformationField> -FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDeformationField> ::FineRegistrationImageFilter() { this->SetNumberOfRequiredInputs( 2 ); this->SetNumberOfOutputs(2); - this->SetNthOutput(1,TOutputDeformationField::New()); + this->SetNthOutput(1, TOutputDeformationField::New()); // Default radius m_Radius.Fill(2); @@ -52,10 +52,10 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie // Default currentMetric m_Metric = itk::NormalizedCorrelationImageToImageMetric - <TInputImage,TInputImage>::New(); + <TInputImage, TInputImage>::New(); // Default interpolator - m_Interpolator = itk::LinearInterpolateImageFunction<TInputImage,double>::New(); + m_Interpolator = itk::LinearInterpolateImageFunction<TInputImage, double>::New(); // Translation m_Translation = TranslationType::New(); @@ -71,7 +71,7 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie template <class TInputImage, class T0utputCorrelation, class TOutputDeformationField> void -FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDeformationField> ::SetFixedInput( const TInputImage * image ) { // Process object is not const-correct so the const casting is required. @@ -80,7 +80,7 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie template <class TInputImage, class T0utputCorrelation, class TOutputDeformationField> void -FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDeformationField> ::SetMovingInput( const TInputImage * image) { // Process object is not const-correct so the const casting is required. @@ -89,7 +89,7 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie template <class TInputImage, class T0utputCorrelation, class TOutputDeformationField> const TInputImage * -FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDeformationField> ::GetFixedInput() { if (this->GetNumberOfInputs()<1) @@ -101,7 +101,7 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie template <class TInputImage, class T0utputCorrelation, class TOutputDeformationField> const TInputImage * -FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDeformationField> ::GetMovingInput() { if (this->GetNumberOfInputs()<2) @@ -113,7 +113,7 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie template <class TInputImage, class T0utputCorrelation, class TOutputDeformationField> TOutputDeformationField * -FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, T0utputCorrelation, TOutputDeformationField> ::GetOutputDeformationField() { if (this->GetNumberOfOutputs()<2) @@ -125,7 +125,7 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie template <class TInputImage, class TOutputCorrelation, class TOutputDeformationField> void -FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, TOutputCorrelation, TOutputDeformationField> ::GenerateOutputInformation() { // Call superclass implementation @@ -140,7 +140,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie SizeType outputSize = largestRegion.GetSize(); SpacingType outputSpacing = outputPtr->GetSpacing(); - for(unsigned int dim = 0; dim < TOutputCorrelation::ImageDimension;++dim) + for(unsigned int dim = 0; dim < TOutputCorrelation::ImageDimension; ++dim) { outputSize[dim] /= m_GridStep[dim]; outputSpacing[dim] *= m_GridStep[dim]; @@ -158,7 +158,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie template <class TInputImage, class TOutputCorrelation, class TOutputDeformationField> void -FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, TOutputCorrelation, TOutputDeformationField> ::GenerateInputRequestedRegion() { // call the superclass' implementation of this method @@ -184,7 +184,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie SizeType fixedRequestedSize = fixedRequestedRegion.GetSize(); IndexType fixedRequestedIndex = fixedRequestedRegion.GetIndex(); - for(unsigned int dim = 0; dim < TOutputCorrelation::ImageDimension;++dim) + for(unsigned int dim = 0; dim < TOutputCorrelation::ImageDimension; ++dim) { fixedRequestedSize [dim] *= m_GridStep[dim]; fixedRequestedIndex[dim] *= m_GridStep[dim]; @@ -207,7 +207,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie IndexType ulIndex = searchFixedRequestedRegion.GetIndex(); IndexType lrIndex; - for(unsigned int dim = 0; dim < TInputImage::ImageDimension;++dim) + for(unsigned int dim = 0; dim < TInputImage::ImageDimension; ++dim) { lrIndex[dim]= searchFixedRequestedRegion.GetIndex()[dim] + searchFixedRequestedRegion.GetSize()[dim]-1; @@ -215,8 +215,8 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie // Transform to physical space PointType ulPoint, lrPoint; - fixedPtr->TransformIndexToPhysicalPoint(lrIndex,lrPoint); - fixedPtr->TransformIndexToPhysicalPoint(ulIndex,ulPoint); + fixedPtr->TransformIndexToPhysicalPoint(lrIndex, lrPoint); + fixedPtr->TransformIndexToPhysicalPoint(ulIndex, ulPoint); // Apply default offset lrPoint += m_InitialOffset; @@ -224,16 +224,16 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie // Transform back into moving region index space IndexType movingIndex1, movingIndex2, movingIndex; - movingPtr->TransformPhysicalPointToIndex(ulPoint,movingIndex1); - movingPtr->TransformPhysicalPointToIndex(lrPoint,movingIndex2); + movingPtr->TransformPhysicalPointToIndex(ulPoint, movingIndex1); + movingPtr->TransformPhysicalPointToIndex(lrPoint, movingIndex2); // Find requested region SizeType movingSize; - for(unsigned int dim = 0; dim < TInputImage::ImageDimension;++dim) + for(unsigned int dim = 0; dim < TInputImage::ImageDimension; ++dim) { - movingIndex[dim] = std::min(movingIndex1[dim],movingIndex2[dim]); - movingSize[dim] = std::max(movingIndex1[dim],movingIndex2[dim]) - movingIndex[dim] + 1; + movingIndex[dim] = std::min(movingIndex1[dim], movingIndex2[dim]); + movingSize[dim] = std::max(movingIndex1[dim], movingIndex2[dim]) - movingIndex[dim] + 1; } movingRequestedRegion.SetIndex(movingIndex); @@ -285,7 +285,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie template <class TInputImage, class TOutputCorrelation, class TOutputDeformationField> void -FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationField> +FineRegistrationImageFilter<TInputImage, TOutputCorrelation, TOutputDeformationField> ::GenerateData() { // Allocate outputs @@ -306,8 +306,8 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie m_Metric->SetComputeGradient(false); /** Output iterators */ - itk::ImageRegionIteratorWithIndex<TOutputCorrelation> outputIt(outputPtr,outputPtr->GetRequestedRegion()); - itk::ImageRegionIterator<TOutputDeformationField> outputDfIt(outputDfPtr,outputPtr->GetRequestedRegion()); + itk::ImageRegionIteratorWithIndex<TOutputCorrelation> outputIt(outputPtr, outputPtr->GetRequestedRegion()); + itk::ImageRegionIterator<TOutputDeformationField> outputDfIt(outputDfPtr, outputPtr->GetRequestedRegion()); outputIt.GoToBegin(); outputDfIt.GoToBegin(); @@ -378,7 +378,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie outputPoint = m_Transform->TransformPoint(inputPoint); for(unsigned int dim = 0; dim < TInputImage::ImageDimension; ++dim) { - localOffset[dim] = outputPoint[dim] - inputPoint[dim];//FIXME check the direction + localOffset[dim] = outputPoint[dim] - inputPoint[dim]; //FIXME check the direction } } diff --git a/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx b/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx index 5f3e3199103da5f52dff6390421cd4b9bf21fd4c..14ea8632181ef24ad7558d8258765dbccbeebf68 100644 --- a/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx +++ b/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx @@ -137,7 +137,7 @@ PointSetToDeformationFieldGenerator<TPointSet, TDeformationField> { PointType pprime; // our point are expressed in index and not in physical coordinates - //this->GetOutput()->TransformIndexToPhysicalPoint(index,pprime); + //this->GetOutput()->TransformIndexToPhysicalPoint(index, pprime); return vcl_sqrt(vcl_pow(index[0] - p[0], 2) + vcl_pow(index[1] - p[1], 2)); } /** diff --git a/Code/DisparityMap/otbStreamingWarpImageFilter.txx b/Code/DisparityMap/otbStreamingWarpImageFilter.txx index 2775bd58c6e33e446b68ab92e983534e989368d3..b2d063193f36376bcfd4145d7c8938028b39986e 100644 --- a/Code/DisparityMap/otbStreamingWarpImageFilter.txx +++ b/Code/DisparityMap/otbStreamingWarpImageFilter.txx @@ -62,23 +62,23 @@ StreamingWarpImageFilter<TInputImage, TOutputImage, TDeformationField> typename OutputImageType::RegionType outputRequestedRegion = outputPtr->GetRequestedRegion(); typename OutputImageType::IndexType outIndexStart = outputRequestedRegion.GetIndex(); typename OutputImageType::IndexType outIndexEnd; - for(unsigned int dim = 0; dim<OutputImageType::ImageDimension;++dim) + for(unsigned int dim = 0; dim<OutputImageType::ImageDimension; ++dim) outIndexEnd[dim]= outIndexStart[dim] + outputRequestedRegion.GetSize()[dim]-1; - typename OutputImageType::PointType outPointStart,outPointEnd; - outputPtr->TransformIndexToPhysicalPoint(outIndexStart,outPointStart); - outputPtr->TransformIndexToPhysicalPoint(outIndexEnd,outPointEnd); + typename OutputImageType::PointType outPointStart, outPointEnd; + outputPtr->TransformIndexToPhysicalPoint(outIndexStart, outPointStart); + outputPtr->TransformIndexToPhysicalPoint(outIndexEnd, outPointEnd); - typename DeformationFieldType::IndexType defIndexStart,defIndexEnd; - deformationPtr->TransformPhysicalPointToIndex(outPointStart,defIndexStart); - deformationPtr->TransformPhysicalPointToIndex(outPointEnd,defIndexEnd); + typename DeformationFieldType::IndexType defIndexStart, defIndexEnd; + deformationPtr->TransformPhysicalPointToIndex(outPointStart, defIndexStart); + deformationPtr->TransformPhysicalPointToIndex(outPointEnd, defIndexEnd); typename DeformationFieldType::SizeType defRequestedSize; typename DeformationFieldType::IndexType defRequestedIndex; - for(unsigned int dim = 0; dim<OutputImageType::ImageDimension;++dim) + for(unsigned int dim = 0; dim<OutputImageType::ImageDimension; ++dim) { - defRequestedIndex[dim] = std::min(defIndexStart[dim],defIndexEnd[dim]); - defRequestedSize[dim] = std::max(defIndexStart[dim],defIndexEnd[dim]) - defRequestedIndex[dim] + 1; + defRequestedIndex[dim] = std::min(defIndexStart[dim], defIndexEnd[dim]); + defRequestedSize[dim] = std::max(defIndexStart[dim], defIndexEnd[dim]) - defRequestedIndex[dim] + 1; } // Finally, build the deformation field requested region @@ -120,15 +120,15 @@ StreamingWarpImageFilter<TInputImage, TOutputImage, TDeformationField> deformationPtr->UpdateOutputData(); // Walk the loaded deformation field to derive maximum and minimum - itk::ImageRegionIteratorWithIndex<DeformationFieldType> defIt(deformationPtr,deformationRequestedRegion); + itk::ImageRegionIteratorWithIndex<DeformationFieldType> defIt(deformationPtr, deformationRequestedRegion); defIt.GoToBegin(); typename InputImageType::PointType currentPoint; typename InputImageType::PointType inputStartPoint, inputEndPoint; // Initialise start and end points - deformationPtr->TransformIndexToPhysicalPoint(defIt.GetIndex(),currentPoint); - for(unsigned int dim = 0; dim<DeformationFieldType::ImageDimension;++dim) + deformationPtr->TransformIndexToPhysicalPoint(defIt.GetIndex(), currentPoint); + for(unsigned int dim = 0; dim<DeformationFieldType::ImageDimension; ++dim) { currentPoint[dim]+=defIt.Get()[dim]; } @@ -140,8 +140,8 @@ StreamingWarpImageFilter<TInputImage, TOutputImage, TDeformationField> // 3) Now Walk the field and compute the physical bounding box while(!defIt.IsAtEnd()) { - deformationPtr->TransformIndexToPhysicalPoint(defIt.GetIndex(),currentPoint); - for(unsigned int dim = 0; dim<DeformationFieldType::ImageDimension;++dim) + deformationPtr->TransformIndexToPhysicalPoint(defIt.GetIndex(), currentPoint); + for(unsigned int dim = 0; dim<DeformationFieldType::ImageDimension; ++dim) { currentPoint[dim]+=defIt.Get()[dim]; if(inputStartPoint[dim] > currentPoint[dim]) @@ -153,17 +153,17 @@ StreamingWarpImageFilter<TInputImage, TOutputImage, TDeformationField> } // Convert physical bouding box to requested region - typename InputImageType::IndexType inputStartIndex,inputEndIndex; - inputPtr->TransformPhysicalPointToIndex(inputStartPoint,inputStartIndex); - inputPtr->TransformPhysicalPointToIndex(inputEndPoint,inputEndIndex); + typename InputImageType::IndexType inputStartIndex, inputEndIndex; + inputPtr->TransformPhysicalPointToIndex(inputStartPoint, inputStartIndex); + inputPtr->TransformPhysicalPointToIndex(inputEndPoint, inputEndIndex); typename InputImageType::SizeType inputFinalSize; typename InputImageType::IndexType inputFinalIndex; - for(unsigned int dim = 0; dim<DeformationFieldType::ImageDimension;++dim) + for(unsigned int dim = 0; dim<DeformationFieldType::ImageDimension; ++dim) { - inputFinalIndex[dim] = std::min(inputStartIndex[dim],inputEndIndex[dim]); - inputFinalSize[dim] = std::max(inputStartIndex[dim],inputEndIndex[dim])-inputFinalIndex[dim]+1; + inputFinalIndex[dim] = std::min(inputStartIndex[dim], inputEndIndex[dim]); + inputFinalSize[dim] = std::max(inputStartIndex[dim], inputEndIndex[dim])-inputFinalIndex[dim]+1; } typename InputImageType::RegionType inputRequestedRegion; diff --git a/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h b/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h index 89ff4107992800bb2e9d84c911538a49f6b1aae4..76d6f316b6cfe838c2a40900d24eadf43b51f333 100644 --- a/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h +++ b/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h @@ -29,9 +29,9 @@ namespace otb * This class implements a fusion of the output images of * otb::LineRatioDetector and otb::LineCorrelationDetector * - * The associative symmetrical sum \f$ \sigma(x,y) \f$ is used to merge information from the + * The associative symmetrical sum \f$ \sigma(x, y) \f$ is used to merge information from the * two detectors: - \f[ \sigma(x,y)=\frac{xy}{1-x-y+2xy} \f] with \f$ x,y \in [0,1] \f$. + \f[ \sigma(x, y)=\frac{xy}{1-x-y+2xy} \f] with \f$ x, y \in [0, 1] \f$. * * */ diff --git a/Code/FeatureExtraction/otbCloudEstimatorFunctor.h b/Code/FeatureExtraction/otbCloudEstimatorFunctor.h index b1def37a6d28a3f15014be3d5d123dfdd65dfe86..d6ec9c2805a090dfd4683e524031514c13604739 100644 --- a/Code/FeatureExtraction/otbCloudEstimatorFunctor.h +++ b/Code/FeatureExtraction/otbCloudEstimatorFunctor.h @@ -65,7 +65,7 @@ public: lCurPixNorm = vcl_sqrt(static_cast<double>(lCurPixNorm)); lGaussianCoef = vcl_exp(-vcl_pow((lCurPixNorm - m_RefNorm), 2) / m_Denom); - // Reverse the SpectralAngle values and set them between [0;1] + // Reverse the SpectralAngle values and set them between [0; 1] lRes = lGaussianCoef * ((CONST_PI - m_SpectralAngleFunctor(inPix)) / CONST_PI); lOut = static_cast<TOutputValue>(lRes); diff --git a/Code/FeatureExtraction/otbComplexMomentImageFunction.h b/Code/FeatureExtraction/otbComplexMomentImageFunction.h index 48edbe3287d9d31645da226225fae130227186e4..579353d04e6b4bff3910ee035330df022424c7ac 100644 --- a/Code/FeatureExtraction/otbComplexMomentImageFunction.h +++ b/Code/FeatureExtraction/otbComplexMomentImageFunction.h @@ -37,13 +37,13 @@ namespace otb * Calculate the complex moment value over an image. * The implemented equation is: * - * \f[ c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot + * \f[ c_{p, q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot dx \cdot dy \f] * * With: * - * - \f$ (x,y) \f$ pixel localization; - * - \f$ f(x,y) \f$ the pixel value over the \f$(x,y) \f$ coordinate. + * - \f$ (x, y) \f$ pixel localization; + * - \f$ f(x, y) \f$ the pixel value over the \f$(x, y) \f$ coordinate. * * This class is templated over the input image type and the * coordinate representation type (e.g. float or double). diff --git a/Code/FeatureExtraction/otbComplexMomentPathFunction.h b/Code/FeatureExtraction/otbComplexMomentPathFunction.h index c197ac438f327d715330414bee99b25cd50545ac..0862b672865268480c3c377128d406328bc5e8d8 100644 --- a/Code/FeatureExtraction/otbComplexMomentPathFunction.h +++ b/Code/FeatureExtraction/otbComplexMomentPathFunction.h @@ -30,12 +30,12 @@ namespace otb * * The implemented equation is: * - * \f[ c_{p,q}=\int\int_{D} (x+iy)^{p} \cdot (x-iy)^{q} \cdot + * \f[ c_{p, q}=\int\int_{D} (x+iy)^{p} \cdot (x-iy)^{q} \cdot dx \cdot dy \f] * * With: * - * - \f$ (x,y) \f$ pixel localization; + * - \f$ (x, y) \f$ pixel localization; * - \f$ D \f$ the contour domain. * * This class is templated over : diff --git a/Code/FeatureExtraction/otbComplexMomentsImageFunction.h b/Code/FeatureExtraction/otbComplexMomentsImageFunction.h index 7dab300f09a24bd37a2273e9cdb3b046ed41524f..01ae2e3410641f7075d83a73665c03443890092e 100644 --- a/Code/FeatureExtraction/otbComplexMomentsImageFunction.h +++ b/Code/FeatureExtraction/otbComplexMomentsImageFunction.h @@ -33,13 +33,13 @@ namespace otb * Calculate the complex moment values over a specified neighborhood. * The implemented equation is: * - * \f[ c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot + * \f[ c_{p, q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot dx \cdot dy \f] * * With: * - * - \f$ (x,y) \f$ pixel localization; - * - \f$ f(x,y) \f$ the pixel value over the \f$(x,y) \f$ coordinate. + * - \f$ (x, y) \f$ pixel localization; + * - \f$ f(x, y) \f$ the pixel value over the \f$(x, y) \f$ coordinate. * * This class is templated over the input image type and the * coordinate representation type (e.g. float or double). diff --git a/Code/FeatureExtraction/otbComplexMomentsImageFunction.txx b/Code/FeatureExtraction/otbComplexMomentsImageFunction.txx index 4831a11a648d7993fa31ee965a00ffd8e621a7df..1044de95703c7453b149ac1d0976c9de3b86374e 100644 --- a/Code/FeatureExtraction/otbComplexMomentsImageFunction.txx +++ b/Code/FeatureExtraction/otbComplexMomentsImageFunction.txx @@ -64,7 +64,7 @@ ComplexMomentsImageFunction<TInputImage, TCoordRep> moments.at(p).resize(m_Qmax+1); for (unsigned int q = 0; q <= m_Qmax; q++) { - moments.at(p).at(q) = ScalarComplexType(0.0,0.0); + moments.at(p).at(q) = ScalarComplexType(0.0, 0.0); } } @@ -100,14 +100,14 @@ ComplexMomentsImageFunction<TInputImage, TCoordRep> ScalarRealType y = static_cast<ScalarRealType>(it.GetOffset(i)[1])/(2*m_NeighborhoodRadius+1); // Build complex value - ScalarComplexType xpy(x,y),xqy(x,-y); + ScalarComplexType xpy(x, y), xqy(x, -y); // Update cumulants for (unsigned int p = 0; p <= m_Pmax; p++) { for (unsigned int q= 0; q <= m_Qmax; q++) { - moments.at(p).at(q) += vcl_pow(xpy,p) * vcl_pow(xqy,q) * value; + moments.at(p).at(q) += vcl_pow(xpy, p) * vcl_pow(xqy, q) * value; } } } diff --git a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx index e1218c07c866a781ee344d104a8a8dc35391a0db..58ffb39fe6041fb9e95effc349d441d86ecc2fb5 100644 --- a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx +++ b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx @@ -244,7 +244,7 @@ ExtractSegmentsImageFilter<TInputImage, TOutput> { Superclass::PrintSelf(os, indent); /* os << indent << "Length: " << m_LengthLine << std::endl; - os << indent << "Width: " << m_WidthLine << std::endl;*/ + os << indent << "Width: " << m_WidthLine << std::endl; */ } diff --git a/Code/FeatureExtraction/otbFillGapsFilter.cxx b/Code/FeatureExtraction/otbFillGapsFilter.cxx index fcc538166e582546079fcc15d0478e0fea2ab6c5..914a2f3040fa09b82c76c7df5ebf91f4aafebe3a 100644 --- a/Code/FeatureExtraction/otbFillGapsFilter.cxx +++ b/Code/FeatureExtraction/otbFillGapsFilter.cxx @@ -188,7 +188,7 @@ FillGapsFilter } //Estimate the norm each line - /* double Norm12,Norm23,Norm34; + /* double Norm12, Norm23, Norm34; Norm12 = vcl_sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) ); Norm23 = vcl_sqrt( (x2-x3)*(x2-x3) + (y2-y3)*(y2-y3) ); Norm34 = vcl_sqrt( (x3-x4)*(x3-x4) + (y3-y4)*(y3-y4) ); @@ -199,7 +199,7 @@ FillGapsFilter Angle12_23 = Angle12_23 / Norm12 / Norm23; Angle12_34 = (x2-x1)*(x4-x3) + (y2-y1)*(y4-y3); - Angle12_34 = Angle12_34 / Norm12 / Norm34;*/ + Angle12_34 = Angle12_34 / Norm12 / Norm34; */ Angle12_23 = vcl_cos(vcl_atan2((y2 - y1), (x2 - x1)) - vcl_atan2((y3 - y2), (x3 - x2))); Angle12_34 = vcl_cos(vcl_atan2((y2 - y1), (x2 - x1)) - vcl_atan2((y4 - y3), (x4 - x3))); diff --git a/Code/FeatureExtraction/otbFlusserImageFunction.h b/Code/FeatureExtraction/otbFlusserImageFunction.h index ed035b276ba7842af38c70765e907cfb7c9d28a9..5de6e65eb45e522f8dc1c038e48aac88591c40e9 100644 --- a/Code/FeatureExtraction/otbFlusserImageFunction.h +++ b/Code/FeatureExtraction/otbFlusserImageFunction.h @@ -50,12 +50,12 @@ namespace otb * * With : * - * \f[ c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot + * \f[ c_{p, q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot dx \cdot dy \f] * * And: - * - \f$(x,y)\f$ pixel localization; - * - \f$ f(x,y)\f$ the pixel value over the \f$(x,y)\f$ coordinate. + * - \f$(x, y)\f$ pixel localization; + * - \f$ f(x, y)\f$ the pixel value over the \f$(x, y)\f$ coordinate. * * This class is templated over the input image type and the * coordinate representation type (e.g. float or double). diff --git a/Code/FeatureExtraction/otbFlusserMomentsImageFunction.h b/Code/FeatureExtraction/otbFlusserMomentsImageFunction.h index d865ecedbc5fd6b5a69dd74e05df9f5e9a4c75dd..bc47dd0f06c023727e976d1802c86575e65ba09a 100644 --- a/Code/FeatureExtraction/otbFlusserMomentsImageFunction.h +++ b/Code/FeatureExtraction/otbFlusserMomentsImageFunction.h @@ -1,148 +1,148 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbFlusserMomentsImageFunction_h -#define __otbFlusserMomentsImageFunction_h - -#include "itkImageFunction.h" -#include "itkFixedArray.h" - -namespace otb -{ - -/** - * \class FlusserMomentsImageFunction - * \brief Calculate the Flusser's invariant parameters. - * - * Calculate the Flusser's invariants over a specified neighborhood - * defined as : - * - * - \f$ \psi_{1} = c_{11} \f$ - * - \f$ \psi_{2} = c_{21} c_{12} \f$ - * - \f$ \psi_{3} = Re (c_{20} c_{12}^{2} )\f$ - * - \f$ \psi_{4} = Im (c_{20} c_{12}^{2} )\f$ - * - \f$ \psi_{5} = Re (c_{30} c_{12}^{3} )\f$ - * - \f$ \psi_{6} = Im (c_{30} c_{12}^{3} )\f$ - * - \f$ \psi_{7} = c_{22} \f$ - * - \f$ \psi_{8} = Re (c_{31} c_{12}^{2} )\f$ - * - \f$ \psi_{9} = Im (c_{31} c_{12}^{2} )\f$ - * - \f$ \psi_{10} = Re (c_{40} c_{12}^{4} )\f$ - * - \f$ \psi_{11} = Im (c_{40} c_{12}^{4} )\f$ - * - * With : - * - * \f[ c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot - dx \cdot dy \f] - * - * And: - * - \f$(x,y)\f$ pixel localization; - * - \f$ f(x,y)\f$ the pixel value over the \f$(x,y)\f$ coordinate. - * - * Note that the output is defined as: - * \f$ \psi_{i} = output[i-1] \f$ - * - * This class is templated over the input image type and the - * coordinate representation type (e.g. float or double). - * - * \ingroup ImageFunctions - */ - -template <class TInputImage, class TCoordRep = double > -class ITK_EXPORT FlusserMomentsImageFunction : - public itk::ImageFunction< TInputImage, - itk::FixedArray< - ITK_TYPENAME itk::NumericTraits<typename TInputImage::PixelType>::RealType, - 11 >, - TCoordRep > -{ -public: - /** Standard class typedefs. */ - typedef FlusserMomentsImageFunction Self; - typedef itk::ImageFunction< TInputImage, - itk::FixedArray< - ITK_TYPENAME itk::NumericTraits< - typename TInputImage::PixelType>::RealType, - 11 >, - TCoordRep > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Run-time type information (and related methods). */ - itkTypeMacro(FlusserMomentsImageFunction, ImageFunction); - - /** Method for creation through the object factory. */ - itkNewMacro(Self); - - /** InputImageType typedef support. */ - typedef TInputImage InputImageType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::ContinuousIndexType ContinuousIndexType; - typedef typename Superclass::PointType PointType; - - typedef typename Superclass::OutputType OutputType; - typedef typename OutputType::ValueType ScalarRealType; - - typedef TCoordRep CoordRepType; - - /** Dimension of the underlying image. */ - itkStaticConstMacro(ImageDimension, unsigned int, - InputImageType::ImageDimension); - - /** Evalulate the function at specified index */ - virtual OutputType EvaluateAtIndex(const IndexType& index) const; - - /** Evaluate the function at non-integer positions */ - virtual OutputType Evaluate(const PointType& point) const - { - IndexType index; - this->ConvertPointToNearestIndex(point, index); - return this->EvaluateAtIndex(index); - } - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType& cindex) const - { - IndexType index; - this->ConvertContinuousIndexToNearestIndex(cindex, index); - return this->EvaluateAtIndex(index); - } - - /** Get/Set the radius of the neighborhood over which the - * statistics are evaluated - */ - itkSetMacro( NeighborhoodRadius, unsigned int ); - itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); - -protected: - FlusserMomentsImageFunction(); - virtual ~FlusserMomentsImageFunction() {} - void PrintSelf(std::ostream& os, itk::Indent indent) const; - -private: - FlusserMomentsImageFunction(const Self &); //purposely not implemented - void operator =(const Self&); //purposely not implemented - - unsigned int m_NeighborhoodRadius; -}; - -} // namespace otb - -#ifndef OTB_MANUAL_INSTANTIATION -#include "otbFlusserMomentsImageFunction.txx" -#endif - -#endif - +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbFlusserMomentsImageFunction_h +#define __otbFlusserMomentsImageFunction_h + +#include "itkImageFunction.h" +#include "itkFixedArray.h" + +namespace otb +{ + +/** + * \class FlusserMomentsImageFunction + * \brief Calculate the Flusser's invariant parameters. + * + * Calculate the Flusser's invariants over a specified neighborhood + * defined as : + * + * - \f$ \psi_{1} = c_{11} \f$ + * - \f$ \psi_{2} = c_{21} c_{12} \f$ + * - \f$ \psi_{3} = Re (c_{20} c_{12}^{2} )\f$ + * - \f$ \psi_{4} = Im (c_{20} c_{12}^{2} )\f$ + * - \f$ \psi_{5} = Re (c_{30} c_{12}^{3} )\f$ + * - \f$ \psi_{6} = Im (c_{30} c_{12}^{3} )\f$ + * - \f$ \psi_{7} = c_{22} \f$ + * - \f$ \psi_{8} = Re (c_{31} c_{12}^{2} )\f$ + * - \f$ \psi_{9} = Im (c_{31} c_{12}^{2} )\f$ + * - \f$ \psi_{10} = Re (c_{40} c_{12}^{4} )\f$ + * - \f$ \psi_{11} = Im (c_{40} c_{12}^{4} )\f$ + * + * With : + * + * \f[ c_{p, q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot + dx \cdot dy \f] + * + * And: + * - \f$(x, y)\f$ pixel localization; + * - \f$ f(x, y)\f$ the pixel value over the \f$(x, y)\f$ coordinate. + * + * Note that the output is defined as: + * \f$ \psi_{i} = output[i-1] \f$ + * + * This class is templated over the input image type and the + * coordinate representation type (e.g. float or double). + * + * \ingroup ImageFunctions + */ + +template <class TInputImage, class TCoordRep = double > +class ITK_EXPORT FlusserMomentsImageFunction : + public itk::ImageFunction< TInputImage, + itk::FixedArray< + ITK_TYPENAME itk::NumericTraits<typename TInputImage::PixelType>::RealType, + 11 >, + TCoordRep > +{ +public: + /** Standard class typedefs. */ + typedef FlusserMomentsImageFunction Self; + typedef itk::ImageFunction< TInputImage, + itk::FixedArray< + ITK_TYPENAME itk::NumericTraits< + typename TInputImage::PixelType>::RealType, + 11 >, + TCoordRep > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Run-time type information (and related methods). */ + itkTypeMacro(FlusserMomentsImageFunction, ImageFunction); + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** InputImageType typedef support. */ + typedef TInputImage InputImageType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::ContinuousIndexType ContinuousIndexType; + typedef typename Superclass::PointType PointType; + + typedef typename Superclass::OutputType OutputType; + typedef typename OutputType::ValueType ScalarRealType; + + typedef TCoordRep CoordRepType; + + /** Dimension of the underlying image. */ + itkStaticConstMacro(ImageDimension, unsigned int, + InputImageType::ImageDimension); + + /** Evalulate the function at specified index */ + virtual OutputType EvaluateAtIndex(const IndexType& index) const; + + /** Evaluate the function at non-integer positions */ + virtual OutputType Evaluate(const PointType& point) const + { + IndexType index; + this->ConvertPointToNearestIndex(point, index); + return this->EvaluateAtIndex(index); + } + virtual OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType& cindex) const + { + IndexType index; + this->ConvertContinuousIndexToNearestIndex(cindex, index); + return this->EvaluateAtIndex(index); + } + + /** Get/Set the radius of the neighborhood over which the + * statistics are evaluated + */ + itkSetMacro( NeighborhoodRadius, unsigned int ); + itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); + +protected: + FlusserMomentsImageFunction(); + virtual ~FlusserMomentsImageFunction() {} + void PrintSelf(std::ostream& os, itk::Indent indent) const; + +private: + FlusserMomentsImageFunction(const Self &); //purposely not implemented + void operator =(const Self&); //purposely not implemented + + unsigned int m_NeighborhoodRadius; +}; + +} // namespace otb + +#ifndef OTB_MANUAL_INSTANTIATION +#include "otbFlusserMomentsImageFunction.txx" +#endif + +#endif + diff --git a/Code/FeatureExtraction/otbFlusserMomentsImageFunction.txx b/Code/FeatureExtraction/otbFlusserMomentsImageFunction.txx index 94623b4a0e58910e07d9f77f74ad60d4f76352f8..92cf4e9e6245b0c37f9fdec9ba52beb3375c5dcc 100644 --- a/Code/FeatureExtraction/otbFlusserMomentsImageFunction.txx +++ b/Code/FeatureExtraction/otbFlusserMomentsImageFunction.txx @@ -1,151 +1,151 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbFlusserMomentsImageFunction_txx -#define __otbFlusserMomentsImageFunction_txx - -#include "otbFlusserMomentsImageFunction.h" -#include "itkConstNeighborhoodIterator.h" -#include "itkNumericTraits.h" -#include "itkMacro.h" -#include <complex> - -namespace otb -{ - -/** - * Constructor - */ -template <class TInputImage, class TCoordRep> -FlusserMomentsImageFunction<TInputImage, TCoordRep> -::FlusserMomentsImageFunction() -{ - m_NeighborhoodRadius = 1; -} - -template <class TInputImage, class TCoordRep> -void -FlusserMomentsImageFunction<TInputImage, TCoordRep> -::PrintSelf(std::ostream& os, itk::Indent indent) const -{ - this->Superclass::PrintSelf(os, indent); - os << indent << " Neighborhood radius value : " << m_NeighborhoodRadius << std::endl; -} - -template <class TInputImage, class TCoordRep> -typename FlusserMomentsImageFunction<TInputImage,TCoordRep>::OutputType -FlusserMomentsImageFunction<TInputImage,TCoordRep> -::EvaluateAtIndex(const IndexType& index) const -{ - // Build moments vector - OutputType moments; - - // Initialize moments - moments.Fill( itk::NumericTraits< ScalarRealType >::Zero ); - - // Check for input image - if( !this->GetInputImage() ) - { - return moments; - } - - // Check for out of buffer - if ( !this->IsInsideBuffer( index ) ) - { - return moments; - } - - // Define complex type - typedef std::complex<ScalarRealType> ComplexType; - - // Define and intialize cumulants for complex moments - ComplexType c11, c12, c21,c20, c30, c22, c31, c40; - c11 = itk::NumericTraits<ComplexType>::Zero; - c12 = itk::NumericTraits<ComplexType>::Zero; - c21 = itk::NumericTraits<ComplexType>::Zero; - c20 = itk::NumericTraits<ComplexType>::Zero; - c30 = itk::NumericTraits<ComplexType>::Zero; - c22 = itk::NumericTraits<ComplexType>::Zero; - c31 = itk::NumericTraits<ComplexType>::Zero; - c40 = itk::NumericTraits<ComplexType>::Zero; - - ScalarRealType c00 = itk::NumericTraits<ScalarRealType>::Zero; - - // Create an N-d neighborhood kernel, using a zeroflux boundary condition - typename InputImageType::SizeType kernelSize; - kernelSize.Fill( m_NeighborhoodRadius ); - - itk::ConstNeighborhoodIterator<InputImageType> - it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); - - // Set the iterator at the desired location - it.SetLocation(index); - - // Walk the neighborhood - const unsigned int size = it.Size(); - for (unsigned int i = 0; i < size; ++i) - { - // Retrieve value, and centered-reduced position - ScalarRealType value = static_cast<ScalarRealType>(it.GetPixel(i)); - ScalarRealType x = static_cast<ScalarRealType>(it.GetOffset(i)[0])/(2*m_NeighborhoodRadius+1); - ScalarRealType y = static_cast<ScalarRealType>(it.GetOffset(i)[1])/(2*m_NeighborhoodRadius+1); - - // Build complex value - ComplexType xpy(x,y),xqy(x,-y); - - // Update cumulants - c00 += value; - c11 += xpy*xqy*value; - c12 += xpy*xqy*xqy*value; - c21 += xpy*xpy*xqy*value; - c20 += xpy*xpy*value; - c30 += xpy*xpy*xpy*value; - c22 += xpy*xpy*xqy*xqy*value; - c31 += xpy*xpy*xpy*xqy*value; - c40 += xpy*xpy*xpy*xpy*value; - } - - // Nomalisation - c11 /= c00; - c12 /= c00; - c21 /= c00; - c20 /= c00; - c30 /= c00; - c22 /= c00; - c31 /= c00; - c40 /= c00; - - // Compute moments combinations - moments[0] = static_cast<ScalarRealType>(c11.real()); - moments[1] = static_cast<ScalarRealType>((c21*c12).real()); - moments[2] = static_cast<ScalarRealType>((c20*c12*c12).real()); - moments[3] = static_cast<ScalarRealType>((c20*c12*c12).imag()); - moments[4] = static_cast<ScalarRealType>((c30*c12*c12*c12).real()); - moments[5] = static_cast<ScalarRealType>((c30*c12*c12*c12).imag()); - moments[6] = static_cast<ScalarRealType>(c22.real()); - moments[7] = static_cast<ScalarRealType>((c31*c12*c12).real()); - moments[8] = static_cast<ScalarRealType>((c31*c12*c12).imag()); - moments[9] = static_cast<ScalarRealType>((c40*c12*c12*c12*c12).real()); - moments[10] = static_cast<ScalarRealType>((c40*c12*c12*c12*c12).imag()); - - // Return result - return moments; -} - -} // namespace otb - -#endif +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbFlusserMomentsImageFunction_txx +#define __otbFlusserMomentsImageFunction_txx + +#include "otbFlusserMomentsImageFunction.h" +#include "itkConstNeighborhoodIterator.h" +#include "itkNumericTraits.h" +#include "itkMacro.h" +#include <complex> + +namespace otb +{ + +/** + * Constructor + */ +template <class TInputImage, class TCoordRep> +FlusserMomentsImageFunction<TInputImage, TCoordRep> +::FlusserMomentsImageFunction() +{ + m_NeighborhoodRadius = 1; +} + +template <class TInputImage, class TCoordRep> +void +FlusserMomentsImageFunction<TInputImage, TCoordRep> +::PrintSelf(std::ostream& os, itk::Indent indent) const +{ + this->Superclass::PrintSelf(os, indent); + os << indent << " Neighborhood radius value : " << m_NeighborhoodRadius << std::endl; +} + +template <class TInputImage, class TCoordRep> +typename FlusserMomentsImageFunction<TInputImage, TCoordRep>::OutputType +FlusserMomentsImageFunction<TInputImage, TCoordRep> +::EvaluateAtIndex(const IndexType& index) const +{ + // Build moments vector + OutputType moments; + + // Initialize moments + moments.Fill( itk::NumericTraits< ScalarRealType >::Zero ); + + // Check for input image + if( !this->GetInputImage() ) + { + return moments; + } + + // Check for out of buffer + if ( !this->IsInsideBuffer( index ) ) + { + return moments; + } + + // Define complex type + typedef std::complex<ScalarRealType> ComplexType; + + // Define and intialize cumulants for complex moments + ComplexType c11, c12, c21, c20, c30, c22, c31, c40; + c11 = itk::NumericTraits<ComplexType>::Zero; + c12 = itk::NumericTraits<ComplexType>::Zero; + c21 = itk::NumericTraits<ComplexType>::Zero; + c20 = itk::NumericTraits<ComplexType>::Zero; + c30 = itk::NumericTraits<ComplexType>::Zero; + c22 = itk::NumericTraits<ComplexType>::Zero; + c31 = itk::NumericTraits<ComplexType>::Zero; + c40 = itk::NumericTraits<ComplexType>::Zero; + + ScalarRealType c00 = itk::NumericTraits<ScalarRealType>::Zero; + + // Create an N-d neighborhood kernel, using a zeroflux boundary condition + typename InputImageType::SizeType kernelSize; + kernelSize.Fill( m_NeighborhoodRadius ); + + itk::ConstNeighborhoodIterator<InputImageType> + it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); + + // Set the iterator at the desired location + it.SetLocation(index); + + // Walk the neighborhood + const unsigned int size = it.Size(); + for (unsigned int i = 0; i < size; ++i) + { + // Retrieve value, and centered-reduced position + ScalarRealType value = static_cast<ScalarRealType>(it.GetPixel(i)); + ScalarRealType x = static_cast<ScalarRealType>(it.GetOffset(i)[0])/(2*m_NeighborhoodRadius+1); + ScalarRealType y = static_cast<ScalarRealType>(it.GetOffset(i)[1])/(2*m_NeighborhoodRadius+1); + + // Build complex value + ComplexType xpy(x, y), xqy(x, -y); + + // Update cumulants + c00 += value; + c11 += xpy*xqy*value; + c12 += xpy*xqy*xqy*value; + c21 += xpy*xpy*xqy*value; + c20 += xpy*xpy*value; + c30 += xpy*xpy*xpy*value; + c22 += xpy*xpy*xqy*xqy*value; + c31 += xpy*xpy*xpy*xqy*value; + c40 += xpy*xpy*xpy*xpy*value; + } + + // Nomalisation + c11 /= c00; + c12 /= c00; + c21 /= c00; + c20 /= c00; + c30 /= c00; + c22 /= c00; + c31 /= c00; + c40 /= c00; + + // Compute moments combinations + moments[0] = static_cast<ScalarRealType>(c11.real()); + moments[1] = static_cast<ScalarRealType>((c21*c12).real()); + moments[2] = static_cast<ScalarRealType>((c20*c12*c12).real()); + moments[3] = static_cast<ScalarRealType>((c20*c12*c12).imag()); + moments[4] = static_cast<ScalarRealType>((c30*c12*c12*c12).real()); + moments[5] = static_cast<ScalarRealType>((c30*c12*c12*c12).imag()); + moments[6] = static_cast<ScalarRealType>(c22.real()); + moments[7] = static_cast<ScalarRealType>((c31*c12*c12).real()); + moments[8] = static_cast<ScalarRealType>((c31*c12*c12).imag()); + moments[9] = static_cast<ScalarRealType>((c40*c12*c12*c12*c12).real()); + moments[10] = static_cast<ScalarRealType>((c40*c12*c12*c12*c12).imag()); + + // Return result + return moments; +} + +} // namespace otb + +#endif diff --git a/Code/FeatureExtraction/otbFlusserPathFunction.h b/Code/FeatureExtraction/otbFlusserPathFunction.h index 2ff7e767a32d1ce785ffe3d481b37a48cd9b3ac5..60fc6f2b62e945c86ef7dab6b3cfaba76d011f82 100644 --- a/Code/FeatureExtraction/otbFlusserPathFunction.h +++ b/Code/FeatureExtraction/otbFlusserPathFunction.h @@ -43,12 +43,12 @@ namespace otb * * With : * - * \f[ c_{p,q}=\int \int (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot + * \f[ c_{p, q}=\int \int (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot dx \cdot dy \f] * * And: - * - \f$(x,y)\f$ pixel localization; - * - \f$ f(x,y)\f$ the pixel value over the \f$(x,y)\f$ coordinate. + * - \f$(x, y)\f$ pixel localization; + * - \f$ f(x, y)\f$ the pixel value over the \f$(x, y)\f$ coordinate. * * This class is templated over the input image type and the * coordinate representation type (e.g. float or double). diff --git a/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.h b/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.h index 45689ee754d93e0401b3284b573b920e723a21ff..50a0dd5f8b80be8fd3de7bc94a06052985f8cffa 100644 --- a/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.h +++ b/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.h @@ -36,16 +36,16 @@ namespace otb * Calculate the Fourier-Mellin descriptors over a specified neighborhood. * The implemented equation is: * - * D_{p,q}=|M_{p,q}| + * D_{p, q}=|M_{p, q}| * * With: * - * \f[ M_{p,q}=\frac{1}{2\pi} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot - (x^{2}+y^{2})^{\frac{p-2+\sigma-iq}{2}} \cdot f(x,y) \cdot dx \cdot dy \f] + * \f[ M_{p, q}=\frac{1}{2\pi} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot + (x^{2}+y^{2})^{\frac{p-2+\sigma-iq}{2}} \cdot f(x, y) \cdot dx \cdot dy \f] * * And: - * - \f$(x,y)\f$ pixel localization; - * - \f$ f(x,y)\f$ the pixel value over the \f$(x,y)\f$ coordinate. + * - \f$(x, y)\f$ pixel localization; + * - \f$ f(x, y)\f$ the pixel value over the \f$(x, y)\f$ coordinate. * * This class is templated over the input image type and the * coordinate representation type (e.g. float or double). diff --git a/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.txx b/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.txx index fce6df474e479e07b911d93ec897734c8dce674f..d9f8b2c7c991435634a4dac675bcb08d4bf9cf03 100644 --- a/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.txx +++ b/Code/FeatureExtraction/otbFourierMellinDescriptorsImageFunction.txx @@ -106,7 +106,7 @@ FourierMellinDescriptorsImageFunction<TInputImage, TCoordRep> ScalarRealType y = static_cast<ScalarRealType>(it.GetOffset(i)[1])/(2*m_NeighborhoodRadius+1); // Build complex value - ScalarComplexType xplusiy(x,y),x2plusy2(x*x+y*y,0.0); + ScalarComplexType xplusiy(x, y), x2plusy2(x*x+y*y, 0.0); // Update cumulants for (unsigned int p = 0; p <= m_Pmax; p++) @@ -117,7 +117,7 @@ FourierMellinDescriptorsImageFunction<TInputImage, TCoordRep> if (x!=0 || y!=0) // vcl_pow limitations { - coefs.at(p).at(q) += vcl_pow(xplusiy,-p) * vcl_pow(x2plusy2,power) * value; + coefs.at(p).at(q) += vcl_pow(xplusiy, -p) * vcl_pow(x2plusy2, power) * value; } } } diff --git a/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h b/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h index 984db6033fd818b1f095b15e729a8388d2c00442..453503366f0b4ffe4f0ff98b8ca24ce57fb6ac35 100644 --- a/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h +++ b/Code/FeatureExtraction/otbGreyLevelCooccurrenceMatrixAdvancedTextureCoefficientsCalculator.h @@ -34,9 +34,9 @@ namespace otb { * The features calculated are as follows (where \f$ g(i, j) \f$ is the element in * cell i, j of a a normalized GLCM): * - * "Mean" \f$ = \sum_{i,j}i g(i,j) \f$ + * "Mean" \f$ = \sum_{i, j}i g(i, j) \f$ * - * "Sum of squares: Variance" \f$ = f_4 = \sum_{i,j}(i -mu)^2 g(i,j) \f$ + * "Sum of squares: Variance" \f$ = f_4 = \sum_{i, j}(i -mu)^2 g(i, j) \f$ * * "Sum average" \f$ = f_6 = -\sum_{i}i g_{x+y}(i) * @@ -52,12 +52,12 @@ namespace otb { * * "Information Measures of Correlation IC2" \f$ = f_13 = \sqrt{1 - \exp{-2}|HXY2 - f_9|} \f$ * - * Above, \f$ \mu = \f$ (weighted pixel average) \f$ = \sum_{i,j}i \cdot g(i, j) = - * \sum_{i,j}j \cdot g(i, j) \f$ (due to matrix summetry), and + * Above, \f$ \mu = \f$ (weighted pixel average) \f$ = \sum_{i, j}i \cdot g(i, j) = + * \sum_{i, j}j \cdot g(i, j) \f$ (due to matrix summetry), and * - * \f$ \g_{x+y}(k) = \sum_{i}\sum_{j}g(i)\f$ where \f$ i+j=k \f$ and \f$ k = 2,3,..,2N_[g} \f$ and + * \f$ \g_{x+y}(k) = \sum_{i}\sum_{j}g(i)\f$ where \f$ i+j=k \f$ and \f$ k = 2, 3, .., 2N_[g} \f$ and * - * \f$ \g_{x-y}(k) = \sum_{i}\sum_{j}g(i)\f$ where \f$ i-j=k \f$ and \f$ k = 0,1,..,N_[g}-1 \f$ + * \f$ \g_{x-y}(k) = \sum_{i}\sum_{j}g(i)\f$ where \f$ i-j=k \f$ and \f$ k = 0, 1, .., N_[g}-1 \f$ * * NOTA BENE: The input histogram will be forcably normalized! * This algorithm takes three passes through the input diff --git a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h index e36b5847c1abcc2d6804c80e2e97086ef6391a33..509edc8f2cccf06e228db3435034af3aed1ea11d 100644 --- a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h +++ b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.h @@ -1,215 +1,215 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbHaralickTexturesImageFunction_h -#define __otbHaralickTexturesImageFunction_h - -#include "itkImageFunction.h" -#include "itkFixedArray.h" -#include "otbMaskedScalarImageToGreyLevelCoocurenceMatrixGenerator.h" -#include "itkGreyLevelCooccurrenceMatrixTextureCoefficientsCalculator.h" - -namespace otb -{ -/** - * \class HaralickTexturesImageFunction - * \brief Compute the 8 Haralick texture indices on the neighborhood of the point - * - * This class computes the 8 Haralick texture indices on the neighborhood of the point - * (where \f$ g(i, j) \f$ is the element in - * cell i, j of a normalized GLCM): - * - * "Energy" \f$ = f_1 = \sum_{i,j}g(i, j)^2 \f$ - * - * "Entropy" \f$ = f_2 = -\sum_{i,j}g(i, j) \log_2 g(i, j)\f$, or 0 if \f$g(i, j) = 0\f$ - * - * "Correlation" \f$ = f_3 = \sum_{i,j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} \f$ - * - * "Difference Moment" \f$= f_4 = \sum_{i,j}\frac{1}{1 + (i - j)^2}g(i, j) \f$ - * - * "Inertia" \f$ = f_5 = \sum_{i,j}(i - j)^2g(i, j) \f$ (sometimes called "contrast") - * - * "Cluster Shade" \f$ = f_6 = \sum_{i,j}((i - \mu) + (j - \mu))^3 g(i, j) \f$ - * - * "Cluster Prominence" \f$ = f_7 = \sum_{i,j}((i - \mu) + (j - \mu))^4 g(i, j) \f$ - * - * "Haralick's Correlation" \f$ = f_8 = \frac{\sum_{i,j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} \f$ - * where \f$\mu_t\f$ and \f$\sigma_t\f$ are the mean and standard deviation of the row - * (or column, due to symmetry) sums. - * - * Above, \f$ \mu = \f$ (weighted pixel average) \f$ = \sum_{i,j}i \cdot g(i, j) = - * \sum_{i,j}j \cdot g(i, j) \f$ (due to matrix summetry), and - * - * \f$ \sigma = \f$ (weighted pixel variance) \f$ = \sum_{i,j}(i - \mu)^2 \cdot g(i, j) = - * \sum_{i,j}(j - \mu)^2 \cdot g(i, j) \f$ (due to matrix summetry) - * This class is templated over the input image type and the - * coordinate representation type (e.g. float or double). - * - * \sa otb::MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator - * \sa itk::GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator - * - * \ingroup ImageFunctions - */ - -template <class TInputImage, class TCoordRep = double > -class ITK_EXPORT HaralickTexturesImageFunction : - public itk::ImageFunction< TInputImage, - itk::FixedArray< - ITK_TYPENAME itk::NumericTraits<typename TInputImage::PixelType>::RealType, - 8 >, - TCoordRep > -{ -public: - /** Standard class typedefs. */ - typedef HaralickTexturesImageFunction Self; - typedef itk::ImageFunction< TInputImage, - itk::FixedArray< - ITK_TYPENAME itk::NumericTraits< - typename TInputImage::PixelType>::RealType, - 8 >, - TCoordRep > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Run-time type information (and related methods). */ - itkTypeMacro(HaralickTexturesImageFunction, ImageFunction); - - /** Method for creation through the object factory. */ - itkNewMacro(Self); - - /** InputImageType typedef support. */ - typedef TInputImage InputImageType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::ContinuousIndexType ContinuousIndexType; - typedef typename Superclass::PointType PointType; - typedef typename InputImageType::Pointer InputImagePointerType; - typedef typename InputImageType::PixelType InputPixelType; - typedef typename InputImageType::RegionType InputRegionType; - typedef typename InputRegionType::SizeType SizeType; - - // Textures tools - /** Co-occurence matrix and textures calculator */ - typedef otb::MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator - <InputImageType> CoocurrenceMatrixGeneratorType; - typedef typename CoocurrenceMatrixGeneratorType - ::Pointer CoocurrenceMatrixGeneratorPointerType; - typedef typename CoocurrenceMatrixGeneratorType - ::OffsetType OffsetType; - typedef typename CoocurrenceMatrixGeneratorType - ::HistogramType HistogramType; - typedef itk::Statistics::GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator - <HistogramType> TextureCoefficientsCalculatorType; - typedef typename TextureCoefficientsCalculatorType - ::Pointer TextureCoefficientsCalculatorPointerType; - - // Output typedef support - typedef typename Superclass::OutputType OutputType; - typedef typename OutputType::ValueType ScalarRealType; - - // Coord rep - typedef TCoordRep CoordRepType; - - /** Dimension of the underlying image. */ - itkStaticConstMacro(ImageDimension, unsigned int, - InputImageType::ImageDimension); - - /** Evalulate the function at specified index */ - virtual OutputType EvaluateAtIndex(const IndexType& index) const; - - /** Evaluate the function at non-integer positions */ - virtual OutputType Evaluate(const PointType& point) const - { - IndexType index; - this->ConvertPointToNearestIndex(point, index); - return this->EvaluateAtIndex(index); - } - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType& cindex) const - { - IndexType index; - this->ConvertContinuousIndexToNearestIndex(cindex, index); - return this->EvaluateAtIndex(index); - } - - /** - * Set the radius of the neighborhood over which the - * statistics are evaluated - */ - itkSetMacro( NeighborhoodRadius, unsigned int ); - /** - * Get the radius of the neighborhood over which the - * statistics are evaluated - */ - itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); - - /** Set the offset for co-occurence computation */ - itkSetMacro(Offset, OffsetType); - - /** Get the offset for co-occurence computation */ - itkGetMacro(Offset, OffsetType); - - /** Set the number of bin per axis for histogram generation */ - itkSetMacro(NumberOfBinsPerAxis, unsigned int); - - /** Get the number of bin per axis for histogram generation */ - itkGetMacro(NumberOfBinsPerAxis, unsigned int); - - /** Set the input image minimum */ - itkSetMacro(InputImageMinimum, InputPixelType); - - /** Get the input image minimum */ - itkGetMacro(InputImageMinimum, InputPixelType); - - /** Set the input image maximum */ - itkSetMacro(InputImageMaximum, InputPixelType); - - /** Get the input image maximum */ - itkGetMacro(InputImageMaximum, InputPixelType); - -protected: - HaralickTexturesImageFunction(); - virtual ~HaralickTexturesImageFunction() {} - void PrintSelf(std::ostream& os, itk::Indent indent) const; - -private: - HaralickTexturesImageFunction(const Self &); //purposely not implemented - void operator =(const Self&); //purposely not implemented - - /** Radius of the neighborhood over which to compute the textures */ - unsigned int m_NeighborhoodRadius; - - /** Offset for co-occurences generation */ - OffsetType m_Offset; - - /** Number of bins per axis for histogram generation */ - unsigned int m_NumberOfBinsPerAxis; - - /** Input image minimum */ - InputPixelType m_InputImageMinimum; - - /** Input image maximum */ - InputPixelType m_InputImageMaximum; -}; - -} // namespace otb - -#ifndef OTB_MANUAL_INSTANTIATION -#include "otbHaralickTexturesImageFunction.txx" -#endif - -#endif - +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbHaralickTexturesImageFunction_h +#define __otbHaralickTexturesImageFunction_h + +#include "itkImageFunction.h" +#include "itkFixedArray.h" +#include "otbMaskedScalarImageToGreyLevelCoocurenceMatrixGenerator.h" +#include "itkGreyLevelCooccurrenceMatrixTextureCoefficientsCalculator.h" + +namespace otb +{ +/** + * \class HaralickTexturesImageFunction + * \brief Compute the 8 Haralick texture indices on the neighborhood of the point + * + * This class computes the 8 Haralick texture indices on the neighborhood of the point + * (where \f$ g(i, j) \f$ is the element in + * cell i, j of a normalized GLCM): + * + * "Energy" \f$ = f_1 = \sum_{i, j}g(i, j)^2 \f$ + * + * "Entropy" \f$ = f_2 = -\sum_{i, j}g(i, j) \log_2 g(i, j)\f$, or 0 if \f$g(i, j) = 0\f$ + * + * "Correlation" \f$ = f_3 = \sum_{i, j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} \f$ + * + * "Difference Moment" \f$= f_4 = \sum_{i, j}\frac{1}{1 + (i - j)^2}g(i, j) \f$ + * + * "Inertia" \f$ = f_5 = \sum_{i, j}(i - j)^2g(i, j) \f$ (sometimes called "contrast") + * + * "Cluster Shade" \f$ = f_6 = \sum_{i, j}((i - \mu) + (j - \mu))^3 g(i, j) \f$ + * + * "Cluster Prominence" \f$ = f_7 = \sum_{i, j}((i - \mu) + (j - \mu))^4 g(i, j) \f$ + * + * "Haralick's Correlation" \f$ = f_8 = \frac{\sum_{i, j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} \f$ + * where \f$\mu_t\f$ and \f$\sigma_t\f$ are the mean and standard deviation of the row + * (or column, due to symmetry) sums. + * + * Above, \f$ \mu = \f$ (weighted pixel average) \f$ = \sum_{i, j}i \cdot g(i, j) = + * \sum_{i, j}j \cdot g(i, j) \f$ (due to matrix summetry), and + * + * \f$ \sigma = \f$ (weighted pixel variance) \f$ = \sum_{i, j}(i - \mu)^2 \cdot g(i, j) = + * \sum_{i, j}(j - \mu)^2 \cdot g(i, j) \f$ (due to matrix summetry) + * This class is templated over the input image type and the + * coordinate representation type (e.g. float or double). + * + * \sa otb::MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator + * \sa itk::GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator + * + * \ingroup ImageFunctions + */ + +template <class TInputImage, class TCoordRep = double > +class ITK_EXPORT HaralickTexturesImageFunction : + public itk::ImageFunction< TInputImage, + itk::FixedArray< + ITK_TYPENAME itk::NumericTraits<typename TInputImage::PixelType>::RealType, + 8 >, + TCoordRep > +{ +public: + /** Standard class typedefs. */ + typedef HaralickTexturesImageFunction Self; + typedef itk::ImageFunction< TInputImage, + itk::FixedArray< + ITK_TYPENAME itk::NumericTraits< + typename TInputImage::PixelType>::RealType, + 8 >, + TCoordRep > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Run-time type information (and related methods). */ + itkTypeMacro(HaralickTexturesImageFunction, ImageFunction); + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** InputImageType typedef support. */ + typedef TInputImage InputImageType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::ContinuousIndexType ContinuousIndexType; + typedef typename Superclass::PointType PointType; + typedef typename InputImageType::Pointer InputImagePointerType; + typedef typename InputImageType::PixelType InputPixelType; + typedef typename InputImageType::RegionType InputRegionType; + typedef typename InputRegionType::SizeType SizeType; + + // Textures tools + /** Co-occurence matrix and textures calculator */ + typedef otb::MaskedScalarImageToGreyLevelCooccurrenceMatrixGenerator + <InputImageType> CoocurrenceMatrixGeneratorType; + typedef typename CoocurrenceMatrixGeneratorType + ::Pointer CoocurrenceMatrixGeneratorPointerType; + typedef typename CoocurrenceMatrixGeneratorType + ::OffsetType OffsetType; + typedef typename CoocurrenceMatrixGeneratorType + ::HistogramType HistogramType; + typedef itk::Statistics::GreyLevelCooccurrenceMatrixTextureCoefficientsCalculator + <HistogramType> TextureCoefficientsCalculatorType; + typedef typename TextureCoefficientsCalculatorType + ::Pointer TextureCoefficientsCalculatorPointerType; + + // Output typedef support + typedef typename Superclass::OutputType OutputType; + typedef typename OutputType::ValueType ScalarRealType; + + // Coord rep + typedef TCoordRep CoordRepType; + + /** Dimension of the underlying image. */ + itkStaticConstMacro(ImageDimension, unsigned int, + InputImageType::ImageDimension); + + /** Evalulate the function at specified index */ + virtual OutputType EvaluateAtIndex(const IndexType& index) const; + + /** Evaluate the function at non-integer positions */ + virtual OutputType Evaluate(const PointType& point) const + { + IndexType index; + this->ConvertPointToNearestIndex(point, index); + return this->EvaluateAtIndex(index); + } + virtual OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType& cindex) const + { + IndexType index; + this->ConvertContinuousIndexToNearestIndex(cindex, index); + return this->EvaluateAtIndex(index); + } + + /** + * Set the radius of the neighborhood over which the + * statistics are evaluated + */ + itkSetMacro( NeighborhoodRadius, unsigned int ); + /** + * Get the radius of the neighborhood over which the + * statistics are evaluated + */ + itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); + + /** Set the offset for co-occurence computation */ + itkSetMacro(Offset, OffsetType); + + /** Get the offset for co-occurence computation */ + itkGetMacro(Offset, OffsetType); + + /** Set the number of bin per axis for histogram generation */ + itkSetMacro(NumberOfBinsPerAxis, unsigned int); + + /** Get the number of bin per axis for histogram generation */ + itkGetMacro(NumberOfBinsPerAxis, unsigned int); + + /** Set the input image minimum */ + itkSetMacro(InputImageMinimum, InputPixelType); + + /** Get the input image minimum */ + itkGetMacro(InputImageMinimum, InputPixelType); + + /** Set the input image maximum */ + itkSetMacro(InputImageMaximum, InputPixelType); + + /** Get the input image maximum */ + itkGetMacro(InputImageMaximum, InputPixelType); + +protected: + HaralickTexturesImageFunction(); + virtual ~HaralickTexturesImageFunction() {} + void PrintSelf(std::ostream& os, itk::Indent indent) const; + +private: + HaralickTexturesImageFunction(const Self &); //purposely not implemented + void operator =(const Self&); //purposely not implemented + + /** Radius of the neighborhood over which to compute the textures */ + unsigned int m_NeighborhoodRadius; + + /** Offset for co-occurences generation */ + OffsetType m_Offset; + + /** Number of bins per axis for histogram generation */ + unsigned int m_NumberOfBinsPerAxis; + + /** Input image minimum */ + InputPixelType m_InputImageMinimum; + + /** Input image maximum */ + InputPixelType m_InputImageMaximum; +}; + +} // namespace otb + +#ifndef OTB_MANUAL_INSTANTIATION +#include "otbHaralickTexturesImageFunction.txx" +#endif + +#endif + diff --git a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx index 7c2d2f8de33834e6c2118905cf3c559136a356b0..3d5a5059fd0d63b44a7128378eaf86e519d205cd 100644 --- a/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx +++ b/Code/FeatureExtraction/otbHaralickTexturesImageFunction.txx @@ -1,128 +1,128 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbHaralickTexturesImageFunction_txx -#define __otbHaralickTexturesImageFunction_txx - -#include "otbHaralickTexturesImageFunction.h" -#include "itkConstNeighborhoodIterator.h" -#include "itkNumericTraits.h" -#include "itkMacro.h" -#include <complex> - -namespace otb -{ - -/** - * Constructor - */ -template <class TInputImage, class TCoordRep> -HaralickTexturesImageFunction<TInputImage, TCoordRep> -::HaralickTexturesImageFunction() : - m_NeighborhoodRadius(10), - m_Offset(), - m_NumberOfBinsPerAxis(8), - m_InputImageMinimum(0), - m_InputImageMaximum(256) -{} - -template <class TInputImage, class TCoordRep> -void -HaralickTexturesImageFunction<TInputImage, TCoordRep> -::PrintSelf(std::ostream& os, itk::Indent indent) const -{ - this->Superclass::PrintSelf(os, indent); - os << indent << " Neighborhood radius value : " << m_NeighborhoodRadius << std::endl; - os << indent << " Input image minimum value : " << m_InputImageMinimum << std::endl; - os << indent << " Input Image maximum value : " << m_InputImageMaximum << std::endl; - os << indent << " Number of bins per axis : " << m_NumberOfBinsPerAxis << std::endl; - os << indent << " Offset : " << m_Offset << std::endl; -} - -template <class TInputImage, class TCoordRep> -typename HaralickTexturesImageFunction<TInputImage,TCoordRep>::OutputType -HaralickTexturesImageFunction<TInputImage,TCoordRep> -::EvaluateAtIndex(const IndexType& index) const -{ - // Build textures vector - OutputType textures; - - // Initialize textures - textures.Fill( itk::NumericTraits< ScalarRealType >::Zero ); - - // Check for input image - if( !this->GetInputImage() ) - { - return textures; - } - - // Check for out of buffer - if ( !this->IsInsideBuffer( index ) ) - { - return textures; - } - - // Build the co-occurence matrix generator - CoocurrenceMatrixGeneratorPointerType coOccurenceMatrixGenerator = CoocurrenceMatrixGeneratorType::New(); - coOccurenceMatrixGenerator->SetInput(this->GetInputImage()); - coOccurenceMatrixGenerator->SetOffset(m_Offset); - coOccurenceMatrixGenerator->SetNumberOfBinsPerAxis(m_NumberOfBinsPerAxis); - coOccurenceMatrixGenerator->SetPixelValueMinMax(m_InputImageMinimum, m_InputImageMaximum); - - // Compute the region on which co-occurence will be estimated - typename InputRegionType::IndexType inputIndex = index; - for(unsigned int dim = 0; dim<InputImageType::ImageDimension;++dim) - { - inputIndex[dim]-= m_NeighborhoodRadius; - } - typename InputRegionType::SizeType inputSize; - inputSize.Fill(2*m_NeighborhoodRadius+1); - - // Build the input region - InputRegionType inputRegion; - inputRegion.SetIndex(inputIndex); - inputRegion.SetSize(inputSize); - - // Compute the co-occurence matrix - coOccurenceMatrixGenerator->SetRegion(inputRegion); - coOccurenceMatrixGenerator->SetNormalize(true); - coOccurenceMatrixGenerator->Compute(); - - // Build the texture calculator - TextureCoefficientsCalculatorPointerType texturesCalculator = TextureCoefficientsCalculatorType::New(); - - // Compute textures indices - texturesCalculator->SetHistogram(coOccurenceMatrixGenerator->GetOutput()); - texturesCalculator->Compute(); - - // Fill the output vector - textures[0]=texturesCalculator->GetEnergy(); - textures[1]=texturesCalculator->GetEntropy(); - textures[2]=texturesCalculator->GetCorrelation(); - textures[3]=texturesCalculator->GetInverseDifferenceMoment(); - textures[4]=texturesCalculator->GetInertia(); - textures[5]=texturesCalculator->GetClusterShade(); - textures[6]=texturesCalculator->GetClusterProminence(); - textures[7]=texturesCalculator->GetHaralickCorrelation(); - - // Return result - return textures; -} - -} // namespace otb - -#endif +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbHaralickTexturesImageFunction_txx +#define __otbHaralickTexturesImageFunction_txx + +#include "otbHaralickTexturesImageFunction.h" +#include "itkConstNeighborhoodIterator.h" +#include "itkNumericTraits.h" +#include "itkMacro.h" +#include <complex> + +namespace otb +{ + +/** + * Constructor + */ +template <class TInputImage, class TCoordRep> +HaralickTexturesImageFunction<TInputImage, TCoordRep> +::HaralickTexturesImageFunction() : + m_NeighborhoodRadius(10), + m_Offset(), + m_NumberOfBinsPerAxis(8), + m_InputImageMinimum(0), + m_InputImageMaximum(256) +{} + +template <class TInputImage, class TCoordRep> +void +HaralickTexturesImageFunction<TInputImage, TCoordRep> +::PrintSelf(std::ostream& os, itk::Indent indent) const +{ + this->Superclass::PrintSelf(os, indent); + os << indent << " Neighborhood radius value : " << m_NeighborhoodRadius << std::endl; + os << indent << " Input image minimum value : " << m_InputImageMinimum << std::endl; + os << indent << " Input Image maximum value : " << m_InputImageMaximum << std::endl; + os << indent << " Number of bins per axis : " << m_NumberOfBinsPerAxis << std::endl; + os << indent << " Offset : " << m_Offset << std::endl; +} + +template <class TInputImage, class TCoordRep> +typename HaralickTexturesImageFunction<TInputImage, TCoordRep>::OutputType +HaralickTexturesImageFunction<TInputImage, TCoordRep> +::EvaluateAtIndex(const IndexType& index) const +{ + // Build textures vector + OutputType textures; + + // Initialize textures + textures.Fill( itk::NumericTraits< ScalarRealType >::Zero ); + + // Check for input image + if( !this->GetInputImage() ) + { + return textures; + } + + // Check for out of buffer + if ( !this->IsInsideBuffer( index ) ) + { + return textures; + } + + // Build the co-occurence matrix generator + CoocurrenceMatrixGeneratorPointerType coOccurenceMatrixGenerator = CoocurrenceMatrixGeneratorType::New(); + coOccurenceMatrixGenerator->SetInput(this->GetInputImage()); + coOccurenceMatrixGenerator->SetOffset(m_Offset); + coOccurenceMatrixGenerator->SetNumberOfBinsPerAxis(m_NumberOfBinsPerAxis); + coOccurenceMatrixGenerator->SetPixelValueMinMax(m_InputImageMinimum, m_InputImageMaximum); + + // Compute the region on which co-occurence will be estimated + typename InputRegionType::IndexType inputIndex = index; + for(unsigned int dim = 0; dim<InputImageType::ImageDimension; ++dim) + { + inputIndex[dim]-= m_NeighborhoodRadius; + } + typename InputRegionType::SizeType inputSize; + inputSize.Fill(2*m_NeighborhoodRadius+1); + + // Build the input region + InputRegionType inputRegion; + inputRegion.SetIndex(inputIndex); + inputRegion.SetSize(inputSize); + + // Compute the co-occurence matrix + coOccurenceMatrixGenerator->SetRegion(inputRegion); + coOccurenceMatrixGenerator->SetNormalize(true); + coOccurenceMatrixGenerator->Compute(); + + // Build the texture calculator + TextureCoefficientsCalculatorPointerType texturesCalculator = TextureCoefficientsCalculatorType::New(); + + // Compute textures indices + texturesCalculator->SetHistogram(coOccurenceMatrixGenerator->GetOutput()); + texturesCalculator->Compute(); + + // Fill the output vector + textures[0]=texturesCalculator->GetEnergy(); + textures[1]=texturesCalculator->GetEntropy(); + textures[2]=texturesCalculator->GetCorrelation(); + textures[3]=texturesCalculator->GetInverseDifferenceMoment(); + textures[4]=texturesCalculator->GetInertia(); + textures[5]=texturesCalculator->GetClusterShade(); + textures[6]=texturesCalculator->GetClusterProminence(); + textures[7]=texturesCalculator->GetHaralickCorrelation(); + + // Return result + return textures; +} + +} // namespace otb + +#endif diff --git a/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.h b/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.h index d0563e9211631a26b61e95a25e92585b5109e5cc..dc864dfa6d596e1cf9e79ed7183ba81692fe6c5f 100644 --- a/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.h +++ b/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.h @@ -1,153 +1,153 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbHistogramOfOrientedGradientCovariantImageFunction_h -#define __otbHistogramOfOrientedGradientCovariantImageFunction_h - -#include "itkImageFunction.h" -#include "itkFixedArray.h" - -namespace otb -{ - -/** - * \class HistogramOfOrientedGradientCovariantImageFunction - * \brief Calculate the centered HOG features - * - * This filter implements the centered histogram of gradient - * feature. It expects a gradient covariant image as input, such as - * the output of the itk::GradientImageFilter. Steps of the algorithm - * are as follows. - * - * In order to make the C-HOG descriptor rotation-invariant, a - * principal gradient orientation is first looked for. Within the - * m_NeighborhoodRadius ($r$), an histogram of the local orientation is - * computed with m_NumberOfOrientationBins bins. Values cumulated in - * this histogram are the gradient magnitude weighted by a gaussian - * kernel of $\sigma = 0.5 * r$. - * - * From this orientation histogram, the principal orientation is - * computed by looking for the maximum valued bin. - * - * Once principal orientation is computed, - * gradient magnitude values weighted by the gaussian kernel are - * cumulated in five different histograms corresponding to five - * distinct spatial areas : the center area (radius of the center area - * is computed using $r_{c}=log_{2}(r)$), and the upper-left, - * upper-right, lower-left and lower-right radial areas. Orientation - * of these radial areas is shifted to match the principal - * orientation, and gradient orientations to determine histogram bins - * are also compensated with the principal orientation. Last, each - * histogram is normalized by its $L_2$ norm, ensuring that they - * all lie in the range $[0,1]$. - * - * This class is templated over the input image type, the output - * precision (e.g. float ou double) and the - * coordinate representation type (e.g. float or double). - - * \ingroup ImageFunctions - */ - -template <class TInputImage, class TOutputPrecision = double, class TCoordRep = double > -class ITK_EXPORT HistogramOfOrientedGradientCovariantImageFunction : - public itk::ImageFunction< TInputImage,std::vector< std::vector< - TOutputPrecision > >, TCoordRep > -{ -public: - /** Standard class typedefs. */ - typedef HistogramOfOrientedGradientCovariantImageFunction Self; - typedef itk::ImageFunction< TInputImage,std::vector<std::vector - <TOutputPrecision> >, TCoordRep > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Run-time type information (and related methods). */ - itkTypeMacro(HistogramOfOrientedGradientCovariantImageFunction, ImageFunction); - - /** Method for creation through the object factory. */ - itkNewMacro(Self); - - /** InputImageType typedef support. */ - typedef TInputImage InputImageType; - typedef typename InputImageType::PixelType InputPixelType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::ContinuousIndexType ContinuousIndexType; - typedef typename Superclass::PointType PointType; - - typedef TOutputPrecision OutputPrecisionType; - typedef typename Superclass::OutputType OutputType; - - typedef TCoordRep CoordRepType; - - /** Dimension of the underlying image. */ - itkStaticConstMacro(ImageDimension, unsigned int, - InputImageType::ImageDimension); - - /** Evalulate the function at specified index */ - virtual OutputType EvaluateAtIndex(const IndexType& index) const; - - /** Evaluate the function at non-integer positions */ - virtual OutputType Evaluate(const PointType& point) const - { - IndexType index; - this->ConvertPointToNearestIndex(point, index); - return this->EvaluateAtIndex(index); - } - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType& cindex) const - { - IndexType index; - this->ConvertContinuousIndexToNearestIndex(cindex, index); - return this->EvaluateAtIndex(index); - } - - /** Get/Set the radius of the neighborhood over which the - * statistics are evaluated - */ - itkSetMacro( NeighborhoodRadius, unsigned int ); - itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); - - /** Get/Set the number of bins of the orientation histograms - */ - itkSetMacro( NumberOfOrientationBins, unsigned int ); - itkGetConstReferenceMacro( NumberOfOrientationBins, unsigned int ); - - -protected: - HistogramOfOrientedGradientCovariantImageFunction(); - virtual ~HistogramOfOrientedGradientCovariantImageFunction() {} - void PrintSelf(std::ostream& os, itk::Indent indent) const; - -private: - HistogramOfOrientedGradientCovariantImageFunction(const Self &); //purposely not implemented - void operator =(const Self&); //purposely not implemented - - // Radius over which the principal orientation will be computed - unsigned int m_NeighborhoodRadius; - - // Number of bins in the orientation - unsigned int m_NumberOfOrientationBins; -}; - -} // namespace otb - -#ifndef OTB_MANUAL_INSTANTIATION -#include "otbHistogramOfOrientedGradientCovariantImageFunction.txx" -#endif - -#endif - +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbHistogramOfOrientedGradientCovariantImageFunction_h +#define __otbHistogramOfOrientedGradientCovariantImageFunction_h + +#include "itkImageFunction.h" +#include "itkFixedArray.h" + +namespace otb +{ + +/** + * \class HistogramOfOrientedGradientCovariantImageFunction + * \brief Calculate the centered HOG features + * + * This filter implements the centered histogram of gradient + * feature. It expects a gradient covariant image as input, such as + * the output of the itk::GradientImageFilter. Steps of the algorithm + * are as follows. + * + * In order to make the C-HOG descriptor rotation-invariant, a + * principal gradient orientation is first looked for. Within the + * m_NeighborhoodRadius ($r$), an histogram of the local orientation is + * computed with m_NumberOfOrientationBins bins. Values cumulated in + * this histogram are the gradient magnitude weighted by a gaussian + * kernel of $\sigma = 0.5 * r$. + * + * From this orientation histogram, the principal orientation is + * computed by looking for the maximum valued bin. + * + * Once principal orientation is computed, + * gradient magnitude values weighted by the gaussian kernel are + * cumulated in five different histograms corresponding to five + * distinct spatial areas : the center area (radius of the center area + * is computed using $r_{c}=log_{2}(r)$), and the upper-left, + * upper-right, lower-left and lower-right radial areas. Orientation + * of these radial areas is shifted to match the principal + * orientation, and gradient orientations to determine histogram bins + * are also compensated with the principal orientation. Last, each + * histogram is normalized by its $L_2$ norm, ensuring that they + * all lie in the range $[0, 1]$. + * + * This class is templated over the input image type, the output + * precision (e.g. float ou double) and the + * coordinate representation type (e.g. float or double). + + * \ingroup ImageFunctions + */ + +template <class TInputImage, class TOutputPrecision = double, class TCoordRep = double > +class ITK_EXPORT HistogramOfOrientedGradientCovariantImageFunction : + public itk::ImageFunction< TInputImage, std::vector< std::vector< + TOutputPrecision > >, TCoordRep > +{ +public: + /** Standard class typedefs. */ + typedef HistogramOfOrientedGradientCovariantImageFunction Self; + typedef itk::ImageFunction< TInputImage, std::vector<std::vector + <TOutputPrecision> >, TCoordRep > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Run-time type information (and related methods). */ + itkTypeMacro(HistogramOfOrientedGradientCovariantImageFunction, ImageFunction); + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** InputImageType typedef support. */ + typedef TInputImage InputImageType; + typedef typename InputImageType::PixelType InputPixelType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::ContinuousIndexType ContinuousIndexType; + typedef typename Superclass::PointType PointType; + + typedef TOutputPrecision OutputPrecisionType; + typedef typename Superclass::OutputType OutputType; + + typedef TCoordRep CoordRepType; + + /** Dimension of the underlying image. */ + itkStaticConstMacro(ImageDimension, unsigned int, + InputImageType::ImageDimension); + + /** Evalulate the function at specified index */ + virtual OutputType EvaluateAtIndex(const IndexType& index) const; + + /** Evaluate the function at non-integer positions */ + virtual OutputType Evaluate(const PointType& point) const + { + IndexType index; + this->ConvertPointToNearestIndex(point, index); + return this->EvaluateAtIndex(index); + } + virtual OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType& cindex) const + { + IndexType index; + this->ConvertContinuousIndexToNearestIndex(cindex, index); + return this->EvaluateAtIndex(index); + } + + /** Get/Set the radius of the neighborhood over which the + * statistics are evaluated + */ + itkSetMacro( NeighborhoodRadius, unsigned int ); + itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); + + /** Get/Set the number of bins of the orientation histograms + */ + itkSetMacro( NumberOfOrientationBins, unsigned int ); + itkGetConstReferenceMacro( NumberOfOrientationBins, unsigned int ); + + +protected: + HistogramOfOrientedGradientCovariantImageFunction(); + virtual ~HistogramOfOrientedGradientCovariantImageFunction() {} + void PrintSelf(std::ostream& os, itk::Indent indent) const; + +private: + HistogramOfOrientedGradientCovariantImageFunction(const Self &); //purposely not implemented + void operator =(const Self&); //purposely not implemented + + // Radius over which the principal orientation will be computed + unsigned int m_NeighborhoodRadius; + + // Number of bins in the orientation + unsigned int m_NumberOfOrientationBins; +}; + +} // namespace otb + +#ifndef OTB_MANUAL_INSTANTIATION +#include "otbHistogramOfOrientedGradientCovariantImageFunction.txx" +#endif + +#endif + diff --git a/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.txx b/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.txx index de5fa6e088bf002b8c67ac24ae2ed5da2ba4c5d3..ce7e7a4ba5114201deaf1b1ee5c6e9ce6f05c3e7 100644 --- a/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.txx +++ b/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.txx @@ -1,280 +1,280 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbHistogramOfOrientedGradientCovariantImageFunction_txx -#define __otbHistogramOfOrientedGradientCovariantImageFunction_txx - -#include "otbHistogramOfOrientedGradientCovariantImageFunction.h" -#include "itkConstNeighborhoodIterator.h" -#include "itkNumericTraits.h" -#include "itkMacro.h" - -namespace otb -{ - -/** - * Constructor - */ -template <class TInputImage, class TOutputPrecision, class TCoordRep> -HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision, TCoordRep> -::HistogramOfOrientedGradientCovariantImageFunction() : m_NeighborhoodRadius(8), - m_NumberOfOrientationBins(18) -{} - -template <class TInputImage, class TOutputPrecision, class TCoordRep> -void -HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision, TCoordRep> -::PrintSelf(std::ostream& os, itk::Indent indent) const -{ - this->Superclass::PrintSelf(os, indent); - os << indent << " Neighborhood radius value : " << m_NeighborhoodRadius << std::endl; -} - -template <class TInputImage, class TOutputPrecision, class TCoordRep> -typename HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision,TCoordRep>::OutputType -HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision,TCoordRep> -::EvaluateAtIndex(const IndexType& index) const -{ - // Build output vector - OutputType hog; - - // Check for input image - if( !this->GetInputImage() ) - { - return hog; - } - - // Check for out of buffer - if ( !this->IsInsideBuffer( index ) ) - { - return hog; - } - - // Create an N-d neighborhood kernel, using a zeroflux boundary condition - typename InputImageType::SizeType kernelSize; - kernelSize.Fill( m_NeighborhoodRadius ); - - itk::ConstNeighborhoodIterator<InputImageType> - it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); - - // Set the iterator at the desired location - it.SetLocation(index); - - // Offset to be used in the loops - typename InputImageType::OffsetType offset; - - // Compute the center bin radius - double centerBinRadius = static_cast<double>(m_NeighborhoodRadius)/2; - - // Define a gaussian kernel around the center location - double squaredRadius = m_NeighborhoodRadius * m_NeighborhoodRadius; - double squaredCenterBinRadius = centerBinRadius * centerBinRadius; - double squaredSigma = 0.25 * squaredRadius; - - // Build a global orientation histogram - std::vector<TOutputPrecision> globalOrientationHistogram(m_NumberOfOrientationBins,0.); - - // Compute the orientation bin width - double orientationBinWidth = 2 * M_PI / m_NumberOfOrientationBins; - - // Build the global orientation histogram - for(int i = -(int)m_NeighborhoodRadius;i< (int)m_NeighborhoodRadius;++i) - { - for(int j = -(int)m_NeighborhoodRadius;j< (int)m_NeighborhoodRadius;++j) - { - // Check if the current pixel lies within a disc of radius m_NeighborhoodRadius - double currentSquaredRadius = i*i+j*j; - if(currentSquaredRadius < squaredRadius) - { - // If so, compute the gaussian weighting (this could be - // computed once for all for the sake of optimisation) - double gWeight = (1/vcl_sqrt(2*M_PI*squaredSigma)) * vcl_exp(- currentSquaredRadius/(2*squaredSigma)); - - // Compute pixel location - offset[0]=i; - offset[1]=j; - - // Get the current gradient covariant value - InputPixelType gradient = it.GetPixel(offset); - - // Then, compute the gradient orientation - double angle = vcl_atan2(gradient[1],gradient[0]); - - // Also compute its magnitude - TOutputPrecision magnitude = vcl_sqrt(gradient[0]*gradient[0]+gradient[1]*gradient[1]); - - // Determine the bin index (shift of M_PI since atan2 values - // lies in [-pi,pi] - unsigned int binIndex = vcl_floor((M_PI + angle)/orientationBinWidth); - - // Cumulate values - globalOrientationHistogram[binIndex]+= magnitude * gWeight; - } - } - } - - // Compute principal orientation - // TODO: Replace this with a stl algorithm - double maxOrientationHistogramValue = globalOrientationHistogram[0]; - unsigned int maxOrientationHistogramBin = 0; - - for(unsigned int i = 1; i < m_NumberOfOrientationBins;++i) - { - // Retrieve current value - double currentValue = globalOrientationHistogram[i]; - - // Look for new maximum - if(maxOrientationHistogramValue<currentValue) - { - maxOrientationHistogramValue = currentValue; - maxOrientationHistogramBin = i; - } - } - - // Derive principal orientation - double principalOrientation = maxOrientationHistogramBin * orientationBinWidth - M_PI; - - // Initialize the five spatial bins - std::vector<TOutputPrecision> centerHistogram(m_NumberOfOrientationBins,0.); - std::vector<TOutputPrecision> upperLeftHistogram(m_NumberOfOrientationBins,0.); - std::vector<TOutputPrecision> upperRightHistogram(m_NumberOfOrientationBins,0.); - std::vector<TOutputPrecision> lowerLeftHistogram(m_NumberOfOrientationBins,0.); - std::vector<TOutputPrecision> lowerRightHistogram(m_NumberOfOrientationBins,0.); - - // Walk the image once more to fill the spatial bins - for(int i = -(int)m_NeighborhoodRadius;i< (int)m_NeighborhoodRadius;++i) - { - for(int j = -(int)m_NeighborhoodRadius;j< (int)m_NeighborhoodRadius;++j) - { - // Check if the current pixel lies within a disc of radius m_NeighborhoodRadius - double currentSquaredRadius = i*i+j*j; - if(currentSquaredRadius < squaredRadius) - { - // If so, compute the gaussian weighting (this could be - // computed once for all for the sake of optimisation) - double gWeight = (1/vcl_sqrt(2*M_PI*squaredSigma)) * vcl_exp(- currentSquaredRadius/(2*squaredSigma)); - - // Compute pixel location - offset[0]=i; - offset[1]=j; - - // Get the current gradient covariant value - InputPixelType gradient = it.GetPixel(offset); - - // Then, compute the compensated gradient orientation - double angle = vcl_atan2(gradient[1],gradient[0]) - principalOrientation; - - // Angle is supposed to lie with [-pi,pi], so we ensure that - // compenstation did not introduce out-of-range values - if(angle > M_PI) - { - angle -= 2*M_PI; - } - else if(angle < -M_PI) - { - angle += 2*M_PI; - } - - // Also compute its magnitude - TOutputPrecision magnitude = vcl_sqrt(gradient[0]*gradient[0]+gradient[1]*gradient[1]); - - // Determine the bin index (shift of M_PI since atan2 values - // lies in [-pi,pi] - unsigned int binIndex = vcl_floor((M_PI + angle)/orientationBinWidth); - - // Compute the angular position - double angularPosition = vcl_atan2((double)j,(double)i) - principalOrientation; - - // Angle is supposed to lie within [-pi,pi], so we ensure that - // the compensation did not introduce out-of-range values - if(angularPosition > M_PI) - { - angularPosition -= 2*M_PI; - } - else if(angularPosition < -M_PI) - { - angularPosition += 2*M_PI; - } - - // Check if we lie in center bin - if(currentSquaredRadius < squaredCenterBinRadius) - { - centerHistogram[binIndex]+= magnitude * gWeight; - } - else if(angularPosition > 0) - { - if(angularPosition < M_PI/2) - { - upperRightHistogram[binIndex]+= magnitude * gWeight; - } - else - { - upperLeftHistogram[binIndex]+= magnitude * gWeight; - } - } - else - { - if(angularPosition > -M_PI/2) - { - lowerRightHistogram[binIndex]+= magnitude * gWeight; - } - else - { - lowerLeftHistogram[binIndex]+= magnitude * gWeight; - } - } - - // Cumulate values - globalOrientationHistogram[binIndex]+= magnitude * gWeight; - } - } - } - - // Build the final output - hog.push_back(centerHistogram); - hog.push_back(upperLeftHistogram); - hog.push_back(upperRightHistogram); - hog.push_back(lowerRightHistogram); - hog.push_back(lowerLeftHistogram); - - // Normalize each histogram - for(typename OutputType::iterator oIt = hog.begin(); oIt!=hog.end();++oIt) - { - // Compute L2 norm - double squaredCumul = 1e-10; - for(typename std::vector<TOutputPrecision>::const_iterator vIt = oIt->begin(); - vIt!=oIt->end(); ++vIt) - { - squaredCumul += (*vIt)*(*vIt); - } - double scale = 1/vcl_sqrt(squaredCumul); - // Apply normalisation factor - for(typename std::vector<TOutputPrecision>::iterator vIt = oIt->begin(); - vIt!=oIt->end(); ++vIt) - { - (*vIt)*=scale; - } - } - - - // Return result - return hog; -} - -} // namespace otb - -#endif +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbHistogramOfOrientedGradientCovariantImageFunction_txx +#define __otbHistogramOfOrientedGradientCovariantImageFunction_txx + +#include "otbHistogramOfOrientedGradientCovariantImageFunction.h" +#include "itkConstNeighborhoodIterator.h" +#include "itkNumericTraits.h" +#include "itkMacro.h" + +namespace otb +{ + +/** + * Constructor + */ +template <class TInputImage, class TOutputPrecision, class TCoordRep> +HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision, TCoordRep> +::HistogramOfOrientedGradientCovariantImageFunction() : m_NeighborhoodRadius(8), + m_NumberOfOrientationBins(18) +{} + +template <class TInputImage, class TOutputPrecision, class TCoordRep> +void +HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision, TCoordRep> +::PrintSelf(std::ostream& os, itk::Indent indent) const +{ + this->Superclass::PrintSelf(os, indent); + os << indent << " Neighborhood radius value : " << m_NeighborhoodRadius << std::endl; +} + +template <class TInputImage, class TOutputPrecision, class TCoordRep> +typename HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision, TCoordRep>::OutputType +HistogramOfOrientedGradientCovariantImageFunction<TInputImage, TOutputPrecision, TCoordRep> +::EvaluateAtIndex(const IndexType& index) const +{ + // Build output vector + OutputType hog; + + // Check for input image + if( !this->GetInputImage() ) + { + return hog; + } + + // Check for out of buffer + if ( !this->IsInsideBuffer( index ) ) + { + return hog; + } + + // Create an N-d neighborhood kernel, using a zeroflux boundary condition + typename InputImageType::SizeType kernelSize; + kernelSize.Fill( m_NeighborhoodRadius ); + + itk::ConstNeighborhoodIterator<InputImageType> + it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); + + // Set the iterator at the desired location + it.SetLocation(index); + + // Offset to be used in the loops + typename InputImageType::OffsetType offset; + + // Compute the center bin radius + double centerBinRadius = static_cast<double>(m_NeighborhoodRadius)/2; + + // Define a gaussian kernel around the center location + double squaredRadius = m_NeighborhoodRadius * m_NeighborhoodRadius; + double squaredCenterBinRadius = centerBinRadius * centerBinRadius; + double squaredSigma = 0.25 * squaredRadius; + + // Build a global orientation histogram + std::vector<TOutputPrecision> globalOrientationHistogram(m_NumberOfOrientationBins, 0.); + + // Compute the orientation bin width + double orientationBinWidth = 2 * M_PI / m_NumberOfOrientationBins; + + // Build the global orientation histogram + for(int i = -(int)m_NeighborhoodRadius; i< (int)m_NeighborhoodRadius; ++i) + { + for(int j = -(int)m_NeighborhoodRadius; j< (int)m_NeighborhoodRadius; ++j) + { + // Check if the current pixel lies within a disc of radius m_NeighborhoodRadius + double currentSquaredRadius = i*i+j*j; + if(currentSquaredRadius < squaredRadius) + { + // If so, compute the gaussian weighting (this could be + // computed once for all for the sake of optimisation) + double gWeight = (1/vcl_sqrt(2*M_PI*squaredSigma)) * vcl_exp(- currentSquaredRadius/(2*squaredSigma)); + + // Compute pixel location + offset[0]=i; + offset[1]=j; + + // Get the current gradient covariant value + InputPixelType gradient = it.GetPixel(offset); + + // Then, compute the gradient orientation + double angle = vcl_atan2(gradient[1], gradient[0]); + + // Also compute its magnitude + TOutputPrecision magnitude = vcl_sqrt(gradient[0]*gradient[0]+gradient[1]*gradient[1]); + + // Determine the bin index (shift of M_PI since atan2 values + // lies in [-pi, pi] + unsigned int binIndex = vcl_floor((M_PI + angle)/orientationBinWidth); + + // Cumulate values + globalOrientationHistogram[binIndex]+= magnitude * gWeight; + } + } + } + + // Compute principal orientation + // TODO: Replace this with a stl algorithm + double maxOrientationHistogramValue = globalOrientationHistogram[0]; + unsigned int maxOrientationHistogramBin = 0; + + for(unsigned int i = 1; i < m_NumberOfOrientationBins; ++i) + { + // Retrieve current value + double currentValue = globalOrientationHistogram[i]; + + // Look for new maximum + if(maxOrientationHistogramValue<currentValue) + { + maxOrientationHistogramValue = currentValue; + maxOrientationHistogramBin = i; + } + } + + // Derive principal orientation + double principalOrientation = maxOrientationHistogramBin * orientationBinWidth - M_PI; + + // Initialize the five spatial bins + std::vector<TOutputPrecision> centerHistogram(m_NumberOfOrientationBins, 0.); + std::vector<TOutputPrecision> upperLeftHistogram(m_NumberOfOrientationBins, 0.); + std::vector<TOutputPrecision> upperRightHistogram(m_NumberOfOrientationBins, 0.); + std::vector<TOutputPrecision> lowerLeftHistogram(m_NumberOfOrientationBins, 0.); + std::vector<TOutputPrecision> lowerRightHistogram(m_NumberOfOrientationBins, 0.); + + // Walk the image once more to fill the spatial bins + for(int i = -(int)m_NeighborhoodRadius; i< (int)m_NeighborhoodRadius; ++i) + { + for(int j = -(int)m_NeighborhoodRadius; j< (int)m_NeighborhoodRadius; ++j) + { + // Check if the current pixel lies within a disc of radius m_NeighborhoodRadius + double currentSquaredRadius = i*i+j*j; + if(currentSquaredRadius < squaredRadius) + { + // If so, compute the gaussian weighting (this could be + // computed once for all for the sake of optimisation) + double gWeight = (1/vcl_sqrt(2*M_PI*squaredSigma)) * vcl_exp(- currentSquaredRadius/(2*squaredSigma)); + + // Compute pixel location + offset[0]=i; + offset[1]=j; + + // Get the current gradient covariant value + InputPixelType gradient = it.GetPixel(offset); + + // Then, compute the compensated gradient orientation + double angle = vcl_atan2(gradient[1], gradient[0]) - principalOrientation; + + // Angle is supposed to lie with [-pi, pi], so we ensure that + // compenstation did not introduce out-of-range values + if(angle > M_PI) + { + angle -= 2*M_PI; + } + else if(angle < -M_PI) + { + angle += 2*M_PI; + } + + // Also compute its magnitude + TOutputPrecision magnitude = vcl_sqrt(gradient[0]*gradient[0]+gradient[1]*gradient[1]); + + // Determine the bin index (shift of M_PI since atan2 values + // lies in [-pi, pi] + unsigned int binIndex = vcl_floor((M_PI + angle)/orientationBinWidth); + + // Compute the angular position + double angularPosition = vcl_atan2((double)j, (double)i) - principalOrientation; + + // Angle is supposed to lie within [-pi, pi], so we ensure that + // the compensation did not introduce out-of-range values + if(angularPosition > M_PI) + { + angularPosition -= 2*M_PI; + } + else if(angularPosition < -M_PI) + { + angularPosition += 2*M_PI; + } + + // Check if we lie in center bin + if(currentSquaredRadius < squaredCenterBinRadius) + { + centerHistogram[binIndex]+= magnitude * gWeight; + } + else if(angularPosition > 0) + { + if(angularPosition < M_PI/2) + { + upperRightHistogram[binIndex]+= magnitude * gWeight; + } + else + { + upperLeftHistogram[binIndex]+= magnitude * gWeight; + } + } + else + { + if(angularPosition > -M_PI/2) + { + lowerRightHistogram[binIndex]+= magnitude * gWeight; + } + else + { + lowerLeftHistogram[binIndex]+= magnitude * gWeight; + } + } + + // Cumulate values + globalOrientationHistogram[binIndex]+= magnitude * gWeight; + } + } + } + + // Build the final output + hog.push_back(centerHistogram); + hog.push_back(upperLeftHistogram); + hog.push_back(upperRightHistogram); + hog.push_back(lowerRightHistogram); + hog.push_back(lowerLeftHistogram); + + // Normalize each histogram + for(typename OutputType::iterator oIt = hog.begin(); oIt!=hog.end(); ++oIt) + { + // Compute L2 norm + double squaredCumul = 1e-10; + for(typename std::vector<TOutputPrecision>::const_iterator vIt = oIt->begin(); + vIt!=oIt->end(); ++vIt) + { + squaredCumul += (*vIt)*(*vIt); + } + double scale = 1/vcl_sqrt(squaredCumul); + // Apply normalisation factor + for(typename std::vector<TOutputPrecision>::iterator vIt = oIt->begin(); + vIt!=oIt->end(); ++vIt) + { + (*vIt)*=scale; + } + } + + + // Return result + return hog; +} + +} // namespace otb + +#endif diff --git a/Code/FeatureExtraction/otbHoughTransform2DLinesImageFilter.h b/Code/FeatureExtraction/otbHoughTransform2DLinesImageFilter.h index 537386f126ecb8fb5d23aa95f542ee78b6fa156c..ef3a9ca9e8dbdd899cb7e8465e2ce2da3597317e 100644 --- a/Code/FeatureExtraction/otbHoughTransform2DLinesImageFilter.h +++ b/Code/FeatureExtraction/otbHoughTransform2DLinesImageFilter.h @@ -115,7 +115,7 @@ public: /** Accessors for the parameters of the angle axis. The Hough space describes (in the angle direction) - [AngleAxisMinimum,AngleAxisMaximum[ with AngleAxisSize values */ + [AngleAxisMinimum, AngleAxisMaximum[ with AngleAxisSize values */ /** Accessors for the size of the angle axis */ itkSetMacro(AngleAxisSize, unsigned int); itkGetMacro(AngleAxisSize, unsigned int); @@ -130,7 +130,7 @@ public: /** Accessors for the parameters of the distance axis. The Hough space describes (in the distance direction) - [DistanceAxisMinimum,DistanceAxisMaximum[ with DistanceAxisSize values */ + [DistanceAxisMinimum, DistanceAxisMaximum[ with DistanceAxisSize values */ /** Accessors for the actual size of the Distance axis */ itkSetMacro(DistanceAxisSize, unsigned int); itkGetMacro(DistanceAxisSize, unsigned int); diff --git a/Code/FeatureExtraction/otbHuImageFunction.h b/Code/FeatureExtraction/otbHuImageFunction.h index e968fdd4520cf763f2e0a7889cc9c9d54ad67e1b..d5316cd05537b0ef97eeb12ebea27b5ca8f60592 100644 --- a/Code/FeatureExtraction/otbHuImageFunction.h +++ b/Code/FeatureExtraction/otbHuImageFunction.h @@ -45,19 +45,19 @@ namespace otb * * With : * - * \f[ c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot + * \f[ c_{p, q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot dx \cdot dy \f] * * And: - * - \f$(x,y)\f$ pixel localization; - * - \f$ f(x,y)\f$ the pixel value over the \f$(x,y)\f$ coordinate. + * - \f$(x, y)\f$ pixel localization; + * - \f$ f(x, y)\f$ the pixel value over the \f$(x, y)\f$ coordinate. * * This class is templated over the input image type and the * coordinate representation type (e.g. float or double). * * \ingroup ImageFunctions */ -// public itk::ImageFunction< TInput, TOutput,TCoordRep > +// public itk::ImageFunction< TInput, TOutput, TCoordRep > template <class TInput, class TOutput = double, diff --git a/Code/FeatureExtraction/otbHuMomentsImageFunction.h b/Code/FeatureExtraction/otbHuMomentsImageFunction.h index 9d6bf16ae648d91d3a4460df199446e39c69c7fb..69467409eb2b7cc4a19a9639fb62448dd5edc426 100644 --- a/Code/FeatureExtraction/otbHuMomentsImageFunction.h +++ b/Code/FeatureExtraction/otbHuMomentsImageFunction.h @@ -41,12 +41,12 @@ namespace otb * * With : * - * \f[ c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot + * \f[ c_{p, q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot dx \cdot dy \f] * * And: - * - \f$(x,y)\f$ pixel localization; - * - \f$ f(x,y)\f$ the pixel value over the \f$(x,y)\f$ coordinate. + * - \f$(x, y)\f$ pixel localization; + * - \f$ f(x, y)\f$ the pixel value over the \f$(x, y)\f$ coordinate. * * Note that the output is defined as: * \f$ \phi_{i} = output[i-1] \f$ diff --git a/Code/FeatureExtraction/otbHuMomentsImageFunction.txx b/Code/FeatureExtraction/otbHuMomentsImageFunction.txx index ca7140aa6d9c2c98bf03001b87dadf5bd08ca780..1a75904cc63faa71efcfe0f2bdb3288ffebcfc63 100644 --- a/Code/FeatureExtraction/otbHuMomentsImageFunction.txx +++ b/Code/FeatureExtraction/otbHuMomentsImageFunction.txx @@ -73,7 +73,7 @@ HuMomentsImageFunction<TInputImage, TCoordRep> typedef std::complex<ScalarRealType> ComplexType; // Define and intialize cumulants for complex moments - ComplexType c11, c20, c02,c30, c03, c21, c12; + ComplexType c11, c20, c02, c30, c03, c21, c12; c11 = itk::NumericTraits<ComplexType>::Zero; c20 = itk::NumericTraits<ComplexType>::Zero; c02 = itk::NumericTraits<ComplexType>::Zero; @@ -103,7 +103,7 @@ HuMomentsImageFunction<TInputImage, TCoordRep> ScalarRealType x = static_cast<ScalarRealType>(it.GetOffset(i)[0])/(2*m_NeighborhoodRadius+1); ScalarRealType y = static_cast<ScalarRealType>(it.GetOffset(i)[1])/(2*m_NeighborhoodRadius+1); // Build complex value - ComplexType xpy(x,y),xqy(x,-y); + ComplexType xpy(x, y), xqy(x, -y); // Update cumulants c00 += value; diff --git a/Code/FeatureExtraction/otbHuPathFunction.h b/Code/FeatureExtraction/otbHuPathFunction.h index a363944c541c79233cf296d094e4c7d99139366c..96168a3b1c9f1796dd312015c80c182a6aa7732c 100644 --- a/Code/FeatureExtraction/otbHuPathFunction.h +++ b/Code/FeatureExtraction/otbHuPathFunction.h @@ -39,12 +39,12 @@ namespace otb * * With : * - * \f[ c_{p,q}=\int \int (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot + * \f[ c_{p, q}=\int \int (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x, y) \cdot dx \cdot dy \f] * * And: - * - \f$(x,y)\f$ pixel localization; - * - \f$ f(x,y)\f$ the pixel value over the \f$(x,y)\f$ coordinate. + * - \f$(x, y)\f$ pixel localization; + * - \f$ f(x, y)\f$ the pixel value over the \f$(x, y)\f$ coordinate. * * This class is templated over the input image type and the * path type (e.g. PolyLineParametricPath<2> ). diff --git a/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx b/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx index 3161cf9fe83313d7fb663fcec3cc676fe0702bc0..0424fc87950ee0f8440afe1cab02be74ae171aa5 100644 --- a/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx +++ b/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx @@ -86,10 +86,10 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath> const typename IteratorType::OffsetType UP = {{0, -1}}; const typename IteratorType::OffsetType DOWN = {{0, 1}}; const typename IteratorType::OffsetType LEFTUP = {{-1, -1}}; -// const typename IteratorType::OffsetType RIGHTDOWN ={{1,1}}; +// const typename IteratorType::OffsetType RIGHTDOWN ={{1, 1}}; const typename IteratorType::OffsetType RIGHTUP = {{1, -1}}; const typename IteratorType::OffsetType LEFTDOWN = {{-1, 1}}; -// const typename IteratorType::OffsetType CENTER ={{0,0}}; +// const typename IteratorType::OffsetType CENTER ={{0, 0}}; if (m_Direction == 0) { diff --git a/Code/FeatureExtraction/otbImageToPathListAlignFilter.h b/Code/FeatureExtraction/otbImageToPathListAlignFilter.h index c64ebb121a344e763f5c253bfbe57825bfd10c58..d1f258f67c99d7106498f4d77be5eebffc2ab7ab 100644 --- a/Code/FeatureExtraction/otbImageToPathListAlignFilter.h +++ b/Code/FeatureExtraction/otbImageToPathListAlignFilter.h @@ -46,7 +46,7 @@ public: /** Run-time type information (and related methods). */ itkTypeMacro(ImageToPathListAlignFilter, ImageToPathListFilter); -// itkTypeMacro(ImageToPathListAlignFilter,itk::ImageSource); +// itkTypeMacro(ImageToPathListAlignFilter, itk::ImageSource); /** ImageDimension constants */ itkStaticConstMacro(InputImageDimension, unsigned int, @@ -71,7 +71,7 @@ public: // typedef float RealType; //typedef typename itk::NumericTraits<PixelType>::RealType RealType; typedef double RealType; -// typedef typename itk::Image<RealType,InputImageDimension> RealImageType; +// typedef typename itk::Image<RealType, InputImageDimension> RealImageType; typedef typename otb::Image<RealType, InputImageDimension> RealImageType; typedef typename RealImageType::Pointer RealImageTypePointer; typedef typename RealImageType::IndexType RealImageTypeIndexType; @@ -92,7 +92,7 @@ public: itkGetMacro(BackgroundValue, ValueType); /** The origin of the output image. The origin is the geometric - * coordinates of the index (0,0,...,0). It is stored internally + * coordinates of the index (0, 0, ..., 0). It is stored internally * as double but may be set from float. * \sa GetOrigin() */ virtual void SetOrigin(const double* origin); diff --git a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx index 6dc37a99b8f6ac7be589ef5d205fa786ee39271a..bbcd9711bd8ad21a5c396171a0e8623b432e1522 100644 --- a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx +++ b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx @@ -357,7 +357,7 @@ ImageToPathListAlignFilter<TInputImage, TOutputPath> m_AngleImage = static_cast<RealImageType*>(lAngleImagePointer.GetPointer()); this->AngleCalculate(InputImage); - /*** compute P(k,l) ***/ + /*** compute P(k, l) ***/ test = tab(n, 1.0 / (double) (m_NbGradDirection), (double) (nx * ny) * (double) (nx * ny)); /*** initialization ***/ @@ -482,7 +482,7 @@ ImageToPathListAlignFilter<TInputImage, TOutputPath> size_seg = (size_seg * 3) / 2; seg.resize(size_seg); // if (!seg) -// mwerror(FATAL,1,"Not enough memory."); +// mwerror(FATAL, 1,"Not enough memory."); } } } @@ -520,7 +520,7 @@ ImageToPathListAlignFilter<TInputImage, TOutputPath> size_seglist = (size_seglist * 3) / 2; seglist.resize(size_seglist); // if (!seglist) -// mwerror(FATAL,1,"Not enough memory."); +// mwerror(FATAL, 1,"Not enough memory."); } } } diff --git a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h index 98fc3cd3ee977d8f424a82200ac5e0c748892eb5..057b9895e0d390a6fb4980088768a0587fd8505f 100644 --- a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h +++ b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h @@ -100,7 +100,7 @@ public: * Data points contains a list of (magnitude, main orientation) for each level * of the pyramidal decomposition. * - * Orientation is expressed in degree in the range [0,360] with a precision of 10 degrees. + * Orientation is expressed in degree in the range [0, 360] with a precision of 10 degrees. * * \example FeatureExtraction/SIFTExample.cxx * diff --git a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h index df141e2459d0ee37d47dc4ae3bf5ea59b35f8178..6b829cf170bf637ec118224e97b3a2b3410d07b7 100644 --- a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h +++ b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h @@ -52,7 +52,7 @@ namespace otb * DataPoints contain the values of the 64 element descriptor for each key point * detected through the pyramidal analysis. * - * Orientation is expressed in degree in the range of [0,360] + * Orientation is expressed in degree in the range of [0, 360] * * \sa otb::ImageToDeterminantHessianImage */ diff --git a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx index 9bb755d6c3af9f4d8a976f545a323e9617b09290..a8aee21cb2e9da9cfc8731a3d0fbd7b6f0f4e7dd 100644 --- a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx +++ b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx @@ -175,7 +175,7 @@ ImageToSURFKeyPointSetFilter<TInputImage, TOutputPointSet> keyPoint[0] = it.GetIndex()[0]; keyPoint[1] = it.GetIndex()[1]; - //keyPoint[2] = sigma_in/pow(k,(double)jj)*pow(2.,(double)i); + //keyPoint[2] = sigma_in/pow(k, (double)jj)*pow(2., (double)i); double sigmaDetected = sigma_in / pow(k, (double) jj) * pow(2., (double) i); radius.Fill(GetMin((int) (this->GetInput()->GetLargestPossibleRegion().GetSize()[0] - keyPoint[0]), @@ -191,7 +191,7 @@ ImageToSURFKeyPointSetFilter<TInputImage, TOutputPointSet> itNeighOrientation.SetLocation(it.GetIndex()); /** TO DO*/ - //keyPoint[3] = AssignOrientation( itNeighOrientation.GetNeighborhood() ,keyPoint[2] ); + //keyPoint[3] = AssignOrientation( itNeighOrientation.GetNeighborhood() , keyPoint[2] ); double orientationDetected = AssignOrientation(itNeighOrientation.GetNeighborhood(), sigmaDetected); /*Filling the Point pointSet Part*/ @@ -210,7 +210,7 @@ ImageToSURFKeyPointSetFilter<TInputImage, TOutputPointSet> itNeighDescriptor.SetLocation(it.GetIndex()); VectorType descriptor; descriptor.resize(64); - //descriptor = ComputeDescriptor(itNeighDescriptor.GetNeighborhood(),keyPoint[3],keyPoint[2]); + //descriptor = ComputeDescriptor(itNeighDescriptor.GetNeighborhood(), keyPoint[3], keyPoint[2]); descriptor = ComputeDescriptor(itNeighDescriptor.GetNeighborhood(), orientationDetected, sigmaDetected); /*Updating the pointset data with values of the descriptor*/ diff --git a/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.h b/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.h index 0231a8c78f879e15fb42f7093a105b6bea2d352e..032aadb3621ab4d3e7323e424af8f77bf59840b4 100644 --- a/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.h +++ b/Code/FeatureExtraction/otbKeyPointSetsMatchingFilter.h @@ -107,7 +107,7 @@ protected: /** * Find the nearest neighbor of data1 in pointset. - * \return a pair of (index,distance). + * \return a pair of (index, distance). */ NeighborSearchResultType NearestNeighbor(const PointDataType& data1, const PointSetType * pointset); diff --git a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx index 85585e5497d5acb0ff6d7bf9bc84cd8b1430d1d5..897de2b57af09b112cdd511b73105c74f8602d3b 100644 --- a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx +++ b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx @@ -52,8 +52,8 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In m_NumberOfDirections = 4; m_FaceList.Fill(0); // THOMAS : donc contructeur de base -// this->SetNthOutput(0,OutputImageType::New()); -// this->SetNthOutput(1,OutputImageType::New()); +// this->SetNthOutput(0, OutputImageType::New()); +// this->SetNthOutput(1, OutputImageType::New()); } template <class TInputImage, class TOutputImage, class TOutputImageDirection, class InterpolatorType> @@ -193,7 +193,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In /* if(Theta[i]>CONST_PI) Theta[i] = Theta[i]-CONST_PI; if((i/double(NB_DIR))==0.5) - Theta[i]=0.;*/ + Theta[i]=0.; */ } // Number of the zone @@ -319,7 +319,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In else if ((Yc12 < Y) && (Y < Yc13)) zone = 0; else if (Y > Yc13) zone = 2; else continue; - //otbMsgDevMacro( << "\t\tPoint traite (i,j)=("<<i<<","<<j<<") -> X,Y="<<X<<","<<Y<<" zone="<<zone); + //otbMsgDevMacro( << "\t\tPoint traite (i, j)=("<<i<<","<<j<<") -> X, Y="<<X<<","<<Y<<" zone="<<zone); // Loop on the directions for (unsigned int dir = 0; dir < NB_DIR; ++dir) { @@ -353,7 +353,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In } // end of the loop on the directions - //otbMsgDevMacro( << "\t\tR,Direction : "<<R<<","<<Direction); + //otbMsgDevMacro( << "\t\tR, Direction : "<<R<<","<<Direction); if (R >= this->GetThreshold()) { diff --git a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h index fa3c763e0d0b782d8dc43281c9930ed162564810..c4debb7dde7a1180fb8aa9d01ea9ae7ec6975cc7 100644 --- a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h +++ b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h @@ -52,7 +52,7 @@ namespace otb * Finally, the intensity of detection formed by the two parallel lines * is determined by the minimum response of a ration edge detector on both sides * of the linear structure: - * \f[ R = \min (R_{12};R_{13}) \f] + * \f[ R = \min (R_{12}; R_{13}) \f] * where \f$ R_{12} \f$ and \f$ R_{13}\f$ are the maximum response of the ratio edge * detector of \f$ R(\theta_{i}) \f$. The intensity of detection lies in * the interval \f$ [0, 1] \f$. diff --git a/Code/FeatureExtraction/otbLineSegmentDetector.h b/Code/FeatureExtraction/otbLineSegmentDetector.h index e847acfdf7ab229d6fb0e09efa1355e2b03c3b7a..0d11d2d61efec9c95877bc538cd632cc5d514964 100644 --- a/Code/FeatureExtraction/otbLineSegmentDetector.h +++ b/Code/FeatureExtraction/otbLineSegmentDetector.h @@ -147,7 +147,7 @@ public: typedef otb::Image<unsigned char, 2> LabelImageType; typedef typename LabelImageType::Pointer LabelImagePointerType; - /** Vector to store the rectangle characteization center, width, orientation ,( begin ,end ) of the central line*/ + /** Vector to store the rectangle characteization center, width, orientation , ( begin , end ) of the central line*/ typedef std::vector<double> RectangleType; typedef typename RectangleType::iterator RectangleIteratorType; typedef std::vector<RectangleType> RectangleListType; diff --git a/Code/FeatureExtraction/otbLineSegmentDetector.txx b/Code/FeatureExtraction/otbLineSegmentDetector.txx index 430dab7e639c0ef6b1e920b6f0413d5c693e8e5c..84315aacd404c60eaec0fc3069ed867824ff3b57 100644 --- a/Code/FeatureExtraction/otbLineSegmentDetector.txx +++ b/Code/FeatureExtraction/otbLineSegmentDetector.txx @@ -659,7 +659,7 @@ LineSegmentDetector<TInputImage, TPrecision> /**************************************************************************************************************/ /** - * The method atan2 gives values of angles modulo PI, put the angle in a rang [0,Pi] + * The method atan2 gives values of angles modulo PI, put the angle in a rang [0, Pi] */ template <class TInputImage, class TPrecision> bool @@ -956,10 +956,10 @@ LineSegmentDetector<TInputImage, TPrecision> /**************************************************************************************************************/ /* compute logarithm of binomial NFA - NFA = NT.b(n,k,p) + NFA = NT.b(n, k, p) log10 NFA = log10( NFA ) - n,k,p - binomial parameters. + n, k, p - binomial parameters. logNT - logarithm of Number of Tests */ template <class TInputImage, class TPrecision> diff --git a/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.txx b/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.txx index 103c0214df761558cbc1302529a07a0346583a39..506d73744f45a9521c0c17ba35a92bffbf939cda 100644 --- a/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.txx +++ b/Code/FeatureExtraction/otbLineSpatialObjectListToRightAnglePointSetFilter.txx @@ -122,8 +122,8 @@ LineSpatialObjectListToRightAnglePointSetFilter<TImage, TLinesList, TPointSet> /** Use Pythagore to compute the distance between the two segments*/ double SegmentDistance = vcl_sqrt(dist1 * dist1 + dist2 * dist2); -// if(this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListTest) <m_ThresholdDistance && -// this->ComputeDistanceFromPointToSegment(RightAngleCoordinate,*itLinesListCur) <m_ThresholdDistance) +// if(this->ComputeDistanceFromPointToSegment(RightAngleCoordinate, *itLinesListTest) <m_ThresholdDistance && +// this->ComputeDistanceFromPointToSegment(RightAngleCoordinate, *itLinesListCur) <m_ThresholdDistance) if (SegmentDistance < m_ThresholdDistance) { /** If Right Angle & not so far from segments: Add it to the pointSet*/ diff --git a/Code/FeatureExtraction/otbLocalHistogramImageFunction.h b/Code/FeatureExtraction/otbLocalHistogramImageFunction.h index 96cbe511d1304dbbf0ae1849a5208e14263141ef..4bff9e326dd6a84de83f674f44032f607101d2f6 100644 --- a/Code/FeatureExtraction/otbLocalHistogramImageFunction.h +++ b/Code/FeatureExtraction/otbLocalHistogramImageFunction.h @@ -1,148 +1,148 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbLocalHistogramImageFunction_h -#define __otbLocalHistogramImageFunction_h - -#include "itkImageFunction.h" -#include "itkFixedArray.h" -#include "itkHistogram.h" -#include "itkNumericTraits.h" - -namespace otb -{ - -/** - * \class LocalHistogramImageFunction - * \brief Calculate a local histogram over a specified circular neighborhood - * - * This image function computes the local histogram of the pixels lying - * in a circular neighborhood around the given position. - * - * Pixel count can be optionnaly weighted by a gaussian kernel with - * $\sigma = 0.5 radius$ so that pixel far from the center position - * account less in the histogram than pixel near the center position. - * This option can be deactivated using the GaussianSmoothing flag. - * - * Histogram mininimum value, maximum value and number of bins can be - * set using the Setters/Getters. - * - * This class is templated over the input image type and the - * coordinate representation type (e.g. float or double). - * - * \ingroup ImageFunctions - */ - -template <class TInputImage, class TCoordRep = double > -class ITK_EXPORT LocalHistogramImageFunction : - public itk::ImageFunction< TInputImage, - typename itk::Statistics::Histogram<typename TInputImage::PixelType>::Pointer, - TCoordRep > -{ -public: - /** Standard class typedefs. */ - typedef LocalHistogramImageFunction Self; - typedef itk::ImageFunction< TInputImage, - typename itk::Statistics::Histogram<typename TInputImage::PixelType>::Pointer, - TCoordRep > Superclass; - typedef itk::SmartPointer<Self> Pointer; - typedef itk::SmartPointer<const Self> ConstPointer; - - /** Run-time type information (and related methods). */ - itkTypeMacro(LocalHistogramImageFunction, ImageFunction); - - /** Method for creation through the object factory. */ - itkNewMacro(Self); - - /** InputImageType typedef support. */ - typedef TInputImage InputImageType; - typedef typename Superclass::IndexType IndexType; - typedef typename Superclass::ContinuousIndexType ContinuousIndexType; - typedef typename Superclass::PointType PointType; - - typedef typename Superclass::OutputType OutputType; - typedef itk::Statistics::Histogram<typename TInputImage::PixelType> HistogramType; - typedef typename HistogramType::Pointer HistogramPointer; - - typedef TCoordRep CoordRepType; - - /** Dimension of the underlying image. */ - itkStaticConstMacro(ImageDimension, unsigned int, - InputImageType::ImageDimension); - - /** Evalulate the function at specified index */ - virtual OutputType EvaluateAtIndex(const IndexType& index) const; - - /** Evaluate the function at non-integer positions */ - virtual OutputType Evaluate(const PointType& point) const - { - IndexType index; - this->ConvertPointToNearestIndex(point, index); - return this->EvaluateAtIndex(index); - } - virtual OutputType EvaluateAtContinuousIndex( - const ContinuousIndexType& cindex) const - { - IndexType index; - this->ConvertContinuousIndexToNearestIndex(cindex, index); - return this->EvaluateAtIndex(index); - } - - /** Get/Set the radius of the neighborhood over which the - * statistics are evaluated - */ - itkSetMacro( NeighborhoodRadius, unsigned int ); - itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); - - /** Set/Get the number of histogram bins. Default is 128. */ - itkSetClampMacro( NumberOfHistogramBins, unsigned long, 1, itk::NumericTraits<unsigned long>::max() ); - itkGetConstMacro( NumberOfHistogramBins, unsigned long ); - - itkSetMacro( HistogramMin, double ); - itkGetConstReferenceMacro( HistogramMin, double ); - - itkSetMacro( HistogramMax, double ); - itkGetConstReferenceMacro( HistogramMax, double ); - - itkSetMacro(GaussianSmoothing,bool); - itkGetConstReferenceMacro(GaussianSmoothing,bool); - itkBooleanMacro(GaussianSmoothing); - -protected: - LocalHistogramImageFunction(); - virtual ~LocalHistogramImageFunction() {} - void PrintSelf(std::ostream& os, itk::Indent indent) const; - -private: - LocalHistogramImageFunction(const Self &); //purposely not implemented - void operator =(const Self&); //purposely not implemented - - unsigned int m_NeighborhoodRadius; - unsigned long m_NumberOfHistogramBins; - double m_HistogramMin; - double m_HistogramMax; - bool m_GaussianSmoothing; -}; - -} // namespace otb - -#ifndef OTB_MANUAL_INSTANTIATION -#include "otbLocalHistogramImageFunction.txx" -#endif - -#endif - +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbLocalHistogramImageFunction_h +#define __otbLocalHistogramImageFunction_h + +#include "itkImageFunction.h" +#include "itkFixedArray.h" +#include "itkHistogram.h" +#include "itkNumericTraits.h" + +namespace otb +{ + +/** + * \class LocalHistogramImageFunction + * \brief Calculate a local histogram over a specified circular neighborhood + * + * This image function computes the local histogram of the pixels lying + * in a circular neighborhood around the given position. + * + * Pixel count can be optionnaly weighted by a gaussian kernel with + * $\sigma = 0.5 radius$ so that pixel far from the center position + * account less in the histogram than pixel near the center position. + * This option can be deactivated using the GaussianSmoothing flag. + * + * Histogram mininimum value, maximum value and number of bins can be + * set using the Setters/Getters. + * + * This class is templated over the input image type and the + * coordinate representation type (e.g. float or double). + * + * \ingroup ImageFunctions + */ + +template <class TInputImage, class TCoordRep = double > +class ITK_EXPORT LocalHistogramImageFunction : + public itk::ImageFunction< TInputImage, + typename itk::Statistics::Histogram<typename TInputImage::PixelType>::Pointer, + TCoordRep > +{ +public: + /** Standard class typedefs. */ + typedef LocalHistogramImageFunction Self; + typedef itk::ImageFunction< TInputImage, + typename itk::Statistics::Histogram<typename TInputImage::PixelType>::Pointer, + TCoordRep > Superclass; + typedef itk::SmartPointer<Self> Pointer; + typedef itk::SmartPointer<const Self> ConstPointer; + + /** Run-time type information (and related methods). */ + itkTypeMacro(LocalHistogramImageFunction, ImageFunction); + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** InputImageType typedef support. */ + typedef TInputImage InputImageType; + typedef typename Superclass::IndexType IndexType; + typedef typename Superclass::ContinuousIndexType ContinuousIndexType; + typedef typename Superclass::PointType PointType; + + typedef typename Superclass::OutputType OutputType; + typedef itk::Statistics::Histogram<typename TInputImage::PixelType> HistogramType; + typedef typename HistogramType::Pointer HistogramPointer; + + typedef TCoordRep CoordRepType; + + /** Dimension of the underlying image. */ + itkStaticConstMacro(ImageDimension, unsigned int, + InputImageType::ImageDimension); + + /** Evalulate the function at specified index */ + virtual OutputType EvaluateAtIndex(const IndexType& index) const; + + /** Evaluate the function at non-integer positions */ + virtual OutputType Evaluate(const PointType& point) const + { + IndexType index; + this->ConvertPointToNearestIndex(point, index); + return this->EvaluateAtIndex(index); + } + virtual OutputType EvaluateAtContinuousIndex( + const ContinuousIndexType& cindex) const + { + IndexType index; + this->ConvertContinuousIndexToNearestIndex(cindex, index); + return this->EvaluateAtIndex(index); + } + + /** Get/Set the radius of the neighborhood over which the + * statistics are evaluated + */ + itkSetMacro( NeighborhoodRadius, unsigned int ); + itkGetConstReferenceMacro( NeighborhoodRadius, unsigned int ); + + /** Set/Get the number of histogram bins. Default is 128. */ + itkSetClampMacro( NumberOfHistogramBins, unsigned long, 1, itk::NumericTraits<unsigned long>::max() ); + itkGetConstMacro( NumberOfHistogramBins, unsigned long ); + + itkSetMacro( HistogramMin, double ); + itkGetConstReferenceMacro( HistogramMin, double ); + + itkSetMacro( HistogramMax, double ); + itkGetConstReferenceMacro( HistogramMax, double ); + + itkSetMacro(GaussianSmoothing, bool); + itkGetConstReferenceMacro(GaussianSmoothing, bool); + itkBooleanMacro(GaussianSmoothing); + +protected: + LocalHistogramImageFunction(); + virtual ~LocalHistogramImageFunction() {} + void PrintSelf(std::ostream& os, itk::Indent indent) const; + +private: + LocalHistogramImageFunction(const Self &); //purposely not implemented + void operator =(const Self&); //purposely not implemented + + unsigned int m_NeighborhoodRadius; + unsigned long m_NumberOfHistogramBins; + double m_HistogramMin; + double m_HistogramMax; + bool m_GaussianSmoothing; +}; + +} // namespace otb + +#ifndef OTB_MANUAL_INSTANTIATION +#include "otbLocalHistogramImageFunction.txx" +#endif + +#endif + diff --git a/Code/FeatureExtraction/otbLocalHistogramImageFunction.txx b/Code/FeatureExtraction/otbLocalHistogramImageFunction.txx index 6fb80aba82056d633e8d65976de7cecc8741da22..980ae0d88e5c40e49a0ce791abcadee2b2385b25 100644 --- a/Code/FeatureExtraction/otbLocalHistogramImageFunction.txx +++ b/Code/FeatureExtraction/otbLocalHistogramImageFunction.txx @@ -1,136 +1,136 @@ -/*========================================================================= - - Program: ORFEO Toolbox - Language: C++ - Date: $Date$ - Version: $Revision$ - - - Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. - See OTBCopyright.txt for details. - - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef __otbLocalHistogramImageFunction_txx -#define __otbLocalHistogramImageFunction_txx - -#include "otbLocalHistogramImageFunction.h" -#include "itkConstNeighborhoodIterator.h" -#include "itkNumericTraits.h" -#include "itkMacro.h" -#include "itkExtractImageFilter.h" - -namespace otb -{ - -/** - * Constructor - */ -template <class TInputImage, class TCoordRep> -LocalHistogramImageFunction<TInputImage, TCoordRep> -::LocalHistogramImageFunction() : - m_NeighborhoodRadius(1), m_NumberOfHistogramBins(128), m_HistogramMin(0), m_HistogramMax(1), m_GaussianSmoothing(true) -{ -} - -template <class TInputImage, class TCoordRep> -void -LocalHistogramImageFunction<TInputImage, TCoordRep> -::PrintSelf(std::ostream& os, itk::Indent indent) const -{ - this->Superclass::PrintSelf(os, indent); - os << indent << " Neighborhood radius value : " << this->GetNeighborhoodRadius() << std::endl; - os << indent << " Number Of Histogram Bins : " << this->GetNumberOfHistogramBins() << std::endl; - os << indent << " Histogram Minimum : " << this->GetHistogramMin() << std::endl; - os << indent << " Histogram Maximum : " << this->GetHistogramMax() << std::endl; -} - -template <class TInputImage, class TCoordRep> -typename LocalHistogramImageFunction<TInputImage,TCoordRep>::OutputType -LocalHistogramImageFunction<TInputImage,TCoordRep> -::EvaluateAtIndex(const IndexType& index) const -{ - - typename HistogramType::Pointer histogram = HistogramType::New(); - - typename HistogramType::SizeType size; - size.Fill( this->GetNumberOfHistogramBins() ); - - typename HistogramType::MeasurementVectorType lowerBound; - typename HistogramType::MeasurementVectorType upperBound; - - lowerBound.Fill( static_cast<typename HistogramType::MeasurementType>(this->GetHistogramMin()) ); - upperBound.Fill( static_cast<typename HistogramType::MeasurementType>(this->GetHistogramMax()) ); - - histogram->Initialize(size, lowerBound, upperBound ); - histogram->SetToZero(); - - // Check for input image - if( !this->GetInputImage() ) - { - return histogram; - } - - // Check for out of buffer - if ( !this->IsInsideBuffer( index ) ) - { - return histogram; - } - - // Create an N-d neighborhood kernel, using a zeroflux boundary condition - typename InputImageType::SizeType kernelSize; - kernelSize.Fill( m_NeighborhoodRadius ); - - itk::ConstNeighborhoodIterator<InputImageType> - it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); - - // Set the iterator at the desired location - it.SetLocation(index); - - // Define a gaussian kernel around the center location - double squaredRadius = m_NeighborhoodRadius * m_NeighborhoodRadius; - double squaredSigma = 0.25 * squaredRadius; - - // Offset to be used in the loops - typename InputImageType::OffsetType offset; - - // Fill the histogram - for(int i = -(int)m_NeighborhoodRadius;i< (int)m_NeighborhoodRadius;++i) - { - for(int j = -(int)m_NeighborhoodRadius;j< (int)m_NeighborhoodRadius;++j) - { - // Check if the current pixel lies within a disc of radius m_NeighborhoodRadius - double currentSquaredRadius = i*i+j*j; - if(currentSquaredRadius < squaredRadius) - { - // If so, compute the gaussian weighting (this could be - // computed once for all for the sake of optimisation) if necessary - double gWeight = 1.; - if(m_GaussianSmoothing) - { - gWeight = (1/vcl_sqrt(2*M_PI*squaredSigma)) * vcl_exp(- currentSquaredRadius/(2*squaredSigma)); - } - - // Compute pixel location - offset[0]=i; - offset[1]=j; - - // Get the current value - typename HistogramType::MeasurementVectorType sample; - sample[0] = it.GetPixel(offset); - - // Populate histogram - histogram->IncreaseFrequency(sample,gWeight); - } - } - } - return histogram; -} - -} // namespace otb - -#endif +/*========================================================================= + + Program: ORFEO Toolbox + Language: C++ + Date: $Date$ + Version: $Revision$ + + + Copyright (c) Centre National d'Etudes Spatiales. All rights reserved. + See OTBCopyright.txt for details. + + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ +#ifndef __otbLocalHistogramImageFunction_txx +#define __otbLocalHistogramImageFunction_txx + +#include "otbLocalHistogramImageFunction.h" +#include "itkConstNeighborhoodIterator.h" +#include "itkNumericTraits.h" +#include "itkMacro.h" +#include "itkExtractImageFilter.h" + +namespace otb +{ + +/** + * Constructor + */ +template <class TInputImage, class TCoordRep> +LocalHistogramImageFunction<TInputImage, TCoordRep> +::LocalHistogramImageFunction() : + m_NeighborhoodRadius(1), m_NumberOfHistogramBins(128), m_HistogramMin(0), m_HistogramMax(1), m_GaussianSmoothing(true) +{ +} + +template <class TInputImage, class TCoordRep> +void +LocalHistogramImageFunction<TInputImage, TCoordRep> +::PrintSelf(std::ostream& os, itk::Indent indent) const +{ + this->Superclass::PrintSelf(os, indent); + os << indent << " Neighborhood radius value : " << this->GetNeighborhoodRadius() << std::endl; + os << indent << " Number Of Histogram Bins : " << this->GetNumberOfHistogramBins() << std::endl; + os << indent << " Histogram Minimum : " << this->GetHistogramMin() << std::endl; + os << indent << " Histogram Maximum : " << this->GetHistogramMax() << std::endl; +} + +template <class TInputImage, class TCoordRep> +typename LocalHistogramImageFunction<TInputImage, TCoordRep>::OutputType +LocalHistogramImageFunction<TInputImage, TCoordRep> +::EvaluateAtIndex(const IndexType& index) const +{ + + typename HistogramType::Pointer histogram = HistogramType::New(); + + typename HistogramType::SizeType size; + size.Fill( this->GetNumberOfHistogramBins() ); + + typename HistogramType::MeasurementVectorType lowerBound; + typename HistogramType::MeasurementVectorType upperBound; + + lowerBound.Fill( static_cast<typename HistogramType::MeasurementType>(this->GetHistogramMin()) ); + upperBound.Fill( static_cast<typename HistogramType::MeasurementType>(this->GetHistogramMax()) ); + + histogram->Initialize(size, lowerBound, upperBound ); + histogram->SetToZero(); + + // Check for input image + if( !this->GetInputImage() ) + { + return histogram; + } + + // Check for out of buffer + if ( !this->IsInsideBuffer( index ) ) + { + return histogram; + } + + // Create an N-d neighborhood kernel, using a zeroflux boundary condition + typename InputImageType::SizeType kernelSize; + kernelSize.Fill( m_NeighborhoodRadius ); + + itk::ConstNeighborhoodIterator<InputImageType> + it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion()); + + // Set the iterator at the desired location + it.SetLocation(index); + + // Define a gaussian kernel around the center location + double squaredRadius = m_NeighborhoodRadius * m_NeighborhoodRadius; + double squaredSigma = 0.25 * squaredRadius; + + // Offset to be used in the loops + typename InputImageType::OffsetType offset; + + // Fill the histogram + for(int i = -(int)m_NeighborhoodRadius; i< (int)m_NeighborhoodRadius; ++i) + { + for(int j = -(int)m_NeighborhoodRadius; j< (int)m_NeighborhoodRadius; ++j) + { + // Check if the current pixel lies within a disc of radius m_NeighborhoodRadius + double currentSquaredRadius = i*i+j*j; + if(currentSquaredRadius < squaredRadius) + { + // If so, compute the gaussian weighting (this could be + // computed once for all for the sake of optimisation) if necessary + double gWeight = 1.; + if(m_GaussianSmoothing) + { + gWeight = (1/vcl_sqrt(2*M_PI*squaredSigma)) * vcl_exp(- currentSquaredRadius/(2*squaredSigma)); + } + + // Compute pixel location + offset[0]=i; + offset[1]=j; + + // Get the current value + typename HistogramType::MeasurementVectorType sample; + sample[0] = it.GetPixel(offset); + + // Populate histogram + histogram->IncreaseFrequency(sample, gWeight); + } + } + } + return histogram; +} + +} // namespace otb + +#endif diff --git a/Code/FeatureExtraction/otbLocalHoughFilter.txx b/Code/FeatureExtraction/otbLocalHoughFilter.txx index c416668997e0b6f8e4bcd050ec7b3a7079556b51..8c672c23407bcd5d69db3873b47defd1c09f379b 100644 --- a/Code/FeatureExtraction/otbLocalHoughFilter.txx +++ b/Code/FeatureExtraction/otbLocalHoughFilter.txx @@ -181,7 +181,7 @@ LocalHoughFilter<TInputImage> filterImage = ROIfilter->GetOutput(); // Create a new image from the extracted region. The starting - // index is the corner of the newly generated image (0,0) + // index is the corner of the newly generated image (0, 0) typename InputImageType::RegionType region; diff --git a/Code/FeatureExtraction/otbMetaImageFunction.h b/Code/FeatureExtraction/otbMetaImageFunction.h index 2d056fa826ca98d388f9e29b7e93dd5a627ab9bd..deca40ce79ae3de1d6eb3a2fe53c589f4ef4f6f8 100644 --- a/Code/FeatureExtraction/otbMetaImageFunction.h +++ b/Code/FeatureExtraction/otbMetaImageFunction.h @@ -56,11 +56,11 @@ public: itkNewMacro(Self); // RTTI typeinfo - itkTypeMacro(MetaImageFunction,itk::FunctionBase); + itkTypeMacro(MetaImageFunction, itk::FunctionBase); // Input and output typedef typedef TCoordRep CoordRepType; - typedef itk::Point<CoordRepType,2> PointType; + typedef itk::Point<CoordRepType, 2> PointType; typedef TOutputPrecision ValueType; typedef itk::VariableLengthVector<ValueType> OutputType; @@ -76,7 +76,7 @@ public: void AddFunction(FunctionType * function); /** Add a new function the functions vector (compatibility via adapters) */ -// template <typename T1, typename T2> void AddFunction(itk::ImageFunction<T1,T2,TCoordRep> * function); +// template <typename T1, typename T2> void AddFunction(itk::ImageFunction<T1, T2, TCoordRep> * function); /** Clear functions vector */ void ClearFunctions(); diff --git a/Code/FeatureExtraction/otbMetaImageFunction.txx b/Code/FeatureExtraction/otbMetaImageFunction.txx index 197c08faba0ad2597994febd79468023035b69db..448cde0b32a53a58c82d4cde9587587f9e948ff2 100644 --- a/Code/FeatureExtraction/otbMetaImageFunction.txx +++ b/Code/FeatureExtraction/otbMetaImageFunction.txx @@ -26,14 +26,14 @@ namespace otb { template <class TOutputPrecision, class TCoordRep> -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::MetaImageFunction() : m_FunctionContainer() { } template <class TOutputPrecision, class TCoordRep> -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::~MetaImageFunction() { this->ClearFunctions(); @@ -41,7 +41,7 @@ MetaImageFunction<TOutputPrecision,TCoordRep> template <class TOutputPrecision, class TCoordRep> void -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::AddFunction(FunctionType * function) { m_FunctionContainer.push_back(function); @@ -49,12 +49,12 @@ MetaImageFunction<TOutputPrecision,TCoordRep> //template <class TOutputPrecision, class TCoordRep, typename T1, typename T2> //void -//MetaImageFunction<TOutputPrecision,TCoordRep> -//::AddFunction(itk::ImageFunction<T1,T2,TCoordRep> * function) +//MetaImageFunction<TOutputPrecision, TCoordRep> +//::AddFunction(itk::ImageFunction<T1, T2, TCoordRep> * function) // { // // Define the adapter -// typedef itk::ImageFunction<T1,T2,TCoordRep> ImageFunctionType; -// typedef otb::ImageFunctionAdapter<T1,ImageFunctionType,TCoordRep > AdapterType; +// typedef itk::ImageFunction<T1, T2, TCoordRep> ImageFunctionType; +// typedef otb::ImageFunctionAdapter<T1, ImageFunctionType, TCoordRep > AdapterType; // // typename AdapterType::Pointer adapter = AdapterType::New(); // adapte @@ -63,7 +63,7 @@ MetaImageFunction<TOutputPrecision,TCoordRep> template <class TOutputPrecision, class TCoordRep> void -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::ClearFunctions() { m_FunctionContainer.clear(); @@ -71,16 +71,16 @@ MetaImageFunction<TOutputPrecision,TCoordRep> template <class TOutputPrecision, class TCoordRep> unsigned int -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::GetNumberOfFunctions() const { return m_FunctionContainer.size(); } template <class TOutputPrecision, class TCoordRep> -typename MetaImageFunction<TOutputPrecision,TCoordRep> +typename MetaImageFunction<TOutputPrecision, TCoordRep> ::FunctionType * -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::GetNthFunction(unsigned int index) { return m_FunctionContainer.at(index); @@ -88,7 +88,7 @@ MetaImageFunction<TOutputPrecision,TCoordRep> template <class TOutputPrecision, class TCoordRep> void - MetaImageFunction<TOutputPrecision,TCoordRep> + MetaImageFunction<TOutputPrecision, TCoordRep> ::RemoveNthFunction(unsigned int index) { typename FunctionContainerType::iterator fIt = m_FunctionContainer.begin()+index; @@ -96,9 +96,9 @@ MetaImageFunction<TOutputPrecision,TCoordRep> } template <class TOutputPrecision, class TCoordRep> -typename MetaImageFunction<TOutputPrecision,TCoordRep> +typename MetaImageFunction<TOutputPrecision, TCoordRep> ::OutputType -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::Evaluate(const PointType & point) const { // Build output @@ -118,12 +118,12 @@ MetaImageFunction<TOutputPrecision,TCoordRep> unsigned int currentVectorSize = static_cast<unsigned int>(currentVector.GetSize()); // Enlarge the output vector - resp.SetSize(currentSize + currentVectorSize,false); + resp.SetSize(currentSize + currentVectorSize, false); // Fill the output for(unsigned int i = 0; i < currentVectorSize; ++i) { - resp.SetElement(currentSize+i,static_cast<ValueType>(currentVector[i])); + resp.SetElement(currentSize+i, static_cast<ValueType>(currentVector[i])); } // Go to next function @@ -136,7 +136,7 @@ MetaImageFunction<TOutputPrecision,TCoordRep> template <class TOutputPrecision, class TCoordRep> void -MetaImageFunction<TOutputPrecision,TCoordRep> +MetaImageFunction<TOutputPrecision, TCoordRep> ::PrintSelf(std::ostream& os, itk::Indent indent) const { Superclass::PrintSelf(os, indent); diff --git a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx index 5dacce1c13a27bd1f1b1a0cae65c1bf5a3e26d7c..387e3b0bce4ac276bc2b904bbf3c92763ac3c013 100644 --- a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx +++ b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx @@ -236,12 +236,12 @@ void PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::Threaded // No calculation on the central pixel if ((x == 0) && (y == 0)) continue; - Thetaxtyt = vcl_atan2(static_cast<double>(y), static_cast<double>(x)); //result is [-PI,PI] + Thetaxtyt = vcl_atan2(static_cast<double>(y), static_cast<double>(x)); //result is [-PI, PI] while (Thetaxtyt < 0) - Thetaxtyt = CONST_PI + Thetaxtyt; // Theta is now [0,PI] as is + Thetaxtyt = CONST_PI + Thetaxtyt; // Theta is now [0, PI] as is // the result of detectors while (Thetaxtyt > CONST_PI_2) - Thetaxtyt = Thetaxtyt - CONST_PI; // Theta is now [-PI/2,PI/2] + Thetaxtyt = Thetaxtyt - CONST_PI; // Theta is now [-PI/2, PI/2] if ((vcl_abs(vcl_cos(Thetaxtyt - ThetaXcYc)) >= vcl_cos(m_AngularBeam)) // this // pixel diff --git a/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.txx b/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.txx index 70b2d8badcb75a510266147252337710cb772ce8..b4bd6755696b8fae6049cd0c0e709c2570715839 100644 --- a/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.txx +++ b/Code/FeatureExtraction/otbRadiometricMomentsImageFunction.txx @@ -47,8 +47,8 @@ RadiometricMomentsImageFunction<TInputImage, TCoordRep> } template <class TInputImage, class TCoordRep> -typename RadiometricMomentsImageFunction<TInputImage,TCoordRep>::OutputType -RadiometricMomentsImageFunction<TInputImage,TCoordRep> +typename RadiometricMomentsImageFunction<TInputImage, TCoordRep>::OutputType +RadiometricMomentsImageFunction<TInputImage, TCoordRep> ::EvaluateAtIndex(const IndexType& index) const { // Build moments vector diff --git a/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.h b/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.h index 68d94a7ef1c90cc8c48f5ca64429412a09a26615..84aa6763d01cbb40834cec4ac738241945a4f922 100644 --- a/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.h +++ b/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.h @@ -50,7 +50,7 @@ public: /** Run-time type information (and related methods). */ itkTypeMacro(RegionImageToRectangularPathListFilter, ImageToPathListFilter); -// itkTypeMacro(ImageToPathListAlignFilter,itk::ImageSource); +// itkTypeMacro(ImageToPathListAlignFilter, itk::ImageSource); /** ImageDimension constants */ itkStaticConstMacro(InputImageDimension, unsigned int, @@ -75,7 +75,7 @@ public: // typedef float RealType; //typedef typename itk::NumericTraits<PixelType>::RealType RealType; typedef double RealType; -// typedef typename itk::Image<RealType,InputImageDimension> RealImageType; +// typedef typename itk::Image<RealType, InputImageDimension> RealImageType; typedef typename otb::Image<RealType, InputImageDimension> RealImageType; typedef typename RealImageType::Pointer RealImageTypePointer; typedef typename RealImageType::IndexType RealImageTypeIndexType; diff --git a/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.txx b/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.txx index c65bf412c33202287fb6a0629cfca735ed9c4618..0cde12fdeffb0828fffe24ae450c9c30555b02ee 100644 --- a/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.txx +++ b/Code/FeatureExtraction/otbRegionImageToRectangularPathListFilter.txx @@ -326,7 +326,7 @@ RegionImageToRectangularPathListFilter<TInputImage, TOutputPath> } // Count the proportion of region pixels contained within rectangle model, to evaluate rectangular fit, or "rectangularity" - // Rectangle model uses [x1,y1] and [x2,y2] for direction (angle), and size derived from adev matrix + // Rectangle model uses [x1, y1] and [x2, y2] for direction (angle), and size derived from adev matrix double vx, vy; // x-y coordinates relative to rectangle center double halfLength = length / 2, halfWidth = width / 2; // to write formulas more easily int countWithin = 0; // number of pixels contained within rectangle diff --git a/Code/FeatureExtraction/otbSFSTexturesFunctor.h b/Code/FeatureExtraction/otbSFSTexturesFunctor.h index fff36845635f177417fe4b1d04d9e6a1d054e169..f8e120c51a8b969448c999bfc4152e7d94f420bd 100644 --- a/Code/FeatureExtraction/otbSFSTexturesFunctor.h +++ b/Code/FeatureExtraction/otbSFSTexturesFunctor.h @@ -33,8 +33,8 @@ namespace otb * From \f$ \mathit{d_{i}} \f$, histograms are defined : * \f$ \mathit{H(c) : \{c \in I \mid \lbrack d_{1}(c), \ldots , d_{i}(c), \ldots , d_{D}(c)\rbrack \}} \f$ * Thus, 6 textures are defined : - * \f$ \mathit{length = \max_{i \in \lbrack1;D\rbrack}(d_{i}(c)} \f$ - * \f$ \mathit{width = \min_{i \in \lbrack1;D\rbrack}(d_{i}(c)} \f$ + * \f$ \mathit{length = \max_{i \in \lbrack1; D\rbrack}(d_{i}(c)} \f$ + * \f$ \mathit{width = \min_{i \in \lbrack1; D\rbrack}(d_{i}(c)} \f$ * \f$ \mathit{PSI = \frac{1}{D}\sum_{1=1}^{D}d_{i}(c)} \f$ * \f$ \mathit{\omega-mean = \frac{1}{D}\sum_{1=1}^{D}\frac{\alpha.(k_{i}-1)}{st_{i}}d_{i}(c)} \f$ * \f$ \mathit{ratio = \arctan{\frac{\sum_{j=1}^{n}{sort_{min}^{j}(H(c))}}{\sum_{j=1}^{n}{sort_{max}^{j}(H(c))}}}} \f$ @@ -130,7 +130,7 @@ public: off[1] = static_cast<int>(vcl_floor(SpatialThresholdDouble * vcl_sin(angle) + 0.5)); // last indices in the diration respecting spectral threshold OffsetType offEnd = this->FindLastOffset(it, off); - // computes distance = dist between the 2 segment point. One of them is the center pixel -> (0,0) + // computes distance = dist between the 2 segment point. One of them is the center pixel -> (0, 0) dist = vcl_sqrt(vcl_pow(static_cast<double>(offEnd[0]), 2) + vcl_pow(static_cast<double>(offEnd[1]), 2)); // for length computation diff --git a/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.h b/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.h index 544c0c9e31775a8138ac5c1062186d634e6f1dac..dcf2b8332177341708044b783e0772a2e0c60fcf 100644 --- a/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.h +++ b/Code/FeatureExtraction/otbScalarImageToHigherOrderTexturesFilter.h @@ -36,9 +36,9 @@ namespace otb * \f$n_r\f$ is the total number of runs * and \f$n_p\f$ is the total number of pixels ): * - * "Short Run Emphasis" \f$ = SRE = \frac{1}{n_r} \sum_{i,j}\frac{p(i, j)}{j^2} \f$ + * "Short Run Emphasis" \f$ = SRE = \frac{1}{n_r} \sum_{i, j}\frac{p(i, j)}{j^2} \f$ * - * "Long Run Emphasis" \f$ = LRE = \frac{1}{n_r} \sum_{i,j}p(i, j) * j^2 \f$ + * "Long Run Emphasis" \f$ = LRE = \frac{1}{n_r} \sum_{i, j}p(i, j) * j^2 \f$ * * "Grey-Level Nonuniformity" \f$ = GLN = \frac{1}{n_r} \sum_{i} \left( \sum_{j}{p(i, j)} \right)^2 \f$ * @@ -46,17 +46,17 @@ namespace otb * * "Run Percentage" \f$ = RP = \frac{n_r}{n_p} \f$ * - * "Low Grey-Level Run Emphasis" \f$ = LGRE = \frac{1}{n_r} \sum_{i,j}\frac{p(i, j)}{i^2} \f$ + * "Low Grey-Level Run Emphasis" \f$ = LGRE = \frac{1}{n_r} \sum_{i, j}\frac{p(i, j)}{i^2} \f$ * - * "High Grey-Level Run Emphasis" \f$ = HGRE = \frac{1}{n_r} \sum_{i,j}p(i, j) * i^2 \f$ + * "High Grey-Level Run Emphasis" \f$ = HGRE = \frac{1}{n_r} \sum_{i, j}p(i, j) * i^2 \f$ * - * "Short Run Low Grey-Level Emphasis" \f$ = SRLGE = \frac{1}{n_r} \sum_{i,j}\frac{p(i, j)}{i^2 j^2} \f$ + * "Short Run Low Grey-Level Emphasis" \f$ = SRLGE = \frac{1}{n_r} \sum_{i, j}\frac{p(i, j)}{i^2 j^2} \f$ * - * "Short Run High Grey-Level Emphasis" \f$ = SRHGE = \frac{1}{n_r} \sum_{i,j}\frac{p(i, j) * i^2}{j^2} \f$ + * "Short Run High Grey-Level Emphasis" \f$ = SRHGE = \frac{1}{n_r} \sum_{i, j}\frac{p(i, j) * i^2}{j^2} \f$ * - * "Long Run Low Grey-Level Emphasis" \f$ = LRLGE = \frac{1}{n_r} \sum_{i,j}\frac{p(i, j) * j^2}{i^2} \f$ + * "Long Run Low Grey-Level Emphasis" \f$ = LRLGE = \frac{1}{n_r} \sum_{i, j}\frac{p(i, j) * j^2}{i^2} \f$ * - * "Long Run High Grey-Level Emphasis" \f$ = LRHGE = \frac{1}{n_r} \sum_{i,j} p(i, j) i^2 j^2 \f$ + * "Long Run High Grey-Level Emphasis" \f$ = LRHGE = \frac{1}{n_r} \sum_{i, j} p(i, j) i^2 j^2 \f$ * * Neighborhood size can be set using the SetRadius() method. Offset for co-occurence estimation * is set using the SetOffset() method. diff --git a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h index 19b1775b0a2c02af48beb9c29043bc9991c6d87a..dc873e8e7e0d30f4069971137a06c06b9b2eb7cf 100644 --- a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h +++ b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.h @@ -35,7 +35,7 @@ namespace otb * Pesari, M., A. Gerhardinger, F. Kayitakire. 2008. A robust built-up area precense * index by anisotropic rotation-invariant textural measure. * IEEE Journal of selected topics in applied earth observations and remote sensing. - * Vol1,NO3. + * Vol1, NO3. * * * \sa ScalarImageToGreyLevelCooccurrenceMatrixGenerator diff --git a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx index ae844a897d5a538aeb0399a3d900a5bfbf648e5d..0a9a6b25d371f843d46ee6cd37ecf8bc4bbbd245 100644 --- a/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx +++ b/Code/FeatureExtraction/otbScalarImageToPanTexTextureFilter.txx @@ -39,27 +39,27 @@ ScalarImageToPanTexTextureFilter<TInputImage, TOutputImage> OffsetType off; off[0] = 0; off[1] = 1; - m_OffsetList.push_back(off); //(0,1) + m_OffsetList.push_back(off); //(0, 1) off[1] = 2; - m_OffsetList.push_back(off); //(0,2) + m_OffsetList.push_back(off); //(0, 2) off[0] = 1; off[1] = -2; - m_OffsetList.push_back(off); //(1,-2) + m_OffsetList.push_back(off); //(1, -2) off[1] = -1; - m_OffsetList.push_back(off); //(1,-1) + m_OffsetList.push_back(off); //(1, -1) off[1] = 0; - m_OffsetList.push_back(off); //(1,0) + m_OffsetList.push_back(off); //(1, 0) off[1] = 1; - m_OffsetList.push_back(off); //(1,1) + m_OffsetList.push_back(off); //(1, 1) off[1] = 2; - m_OffsetList.push_back(off); //(1,2) + m_OffsetList.push_back(off); //(1, 2) off[0] = 2; off[1] = -1; - m_OffsetList.push_back(off); //(2,-1) + m_OffsetList.push_back(off); //(2, -1) off[1] = 0; - m_OffsetList.push_back(off); //(2,0) + m_OffsetList.push_back(off); //(2, 0) off[1] = 1; - m_OffsetList.push_back(off); //(2,1) + m_OffsetList.push_back(off); //(2, 1) } template <class TInputImage, class TOutputImage> diff --git a/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h b/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h index f7ac1d852166f1e8f9fc985f6e1dcb81e62ee896..f6479e82d9b5bab32e215339e37fa0a0e90aa13d 100644 --- a/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h +++ b/Code/FeatureExtraction/otbScalarImageToTexturesFilter.h @@ -33,29 +33,29 @@ namespace otb * (where \f$ g(i, j) \f$ is the element in * cell i, j of a normalized GLCM): * - * "Energy" \f$ = f_1 = \sum_{i,j}g(i, j)^2 \f$ + * "Energy" \f$ = f_1 = \sum_{i, j}g(i, j)^2 \f$ * - * "Entropy" \f$ = f_2 = -\sum_{i,j}g(i, j) \log_2 g(i, j)\f$, or 0 if \f$g(i, j) = 0\f$ + * "Entropy" \f$ = f_2 = -\sum_{i, j}g(i, j) \log_2 g(i, j)\f$, or 0 if \f$g(i, j) = 0\f$ * - * "Correlation" \f$ = f_3 = \sum_{i,j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} \f$ + * "Correlation" \f$ = f_3 = \sum_{i, j}\frac{(i - \mu)(j - \mu)g(i, j)}{\sigma^2} \f$ * - * "Difference Moment" \f$= f_4 = \sum_{i,j}\frac{1}{1 + (i - j)^2}g(i, j) \f$ + * "Difference Moment" \f$= f_4 = \sum_{i, j}\frac{1}{1 + (i - j)^2}g(i, j) \f$ * - * "Inertia" \f$ = f_5 = \sum_{i,j}(i - j)^2g(i, j) \f$ (sometimes called "contrast") + * "Inertia" \f$ = f_5 = \sum_{i, j}(i - j)^2g(i, j) \f$ (sometimes called "contrast") * - * "Cluster Shade" \f$ = f_6 = \sum_{i,j}((i - \mu) + (j - \mu))^3 g(i, j) \f$ + * "Cluster Shade" \f$ = f_6 = \sum_{i, j}((i - \mu) + (j - \mu))^3 g(i, j) \f$ * - * "Cluster Prominence" \f$ = f_7 = \sum_{i,j}((i - \mu) + (j - \mu))^4 g(i, j) \f$ + * "Cluster Prominence" \f$ = f_7 = \sum_{i, j}((i - \mu) + (j - \mu))^4 g(i, j) \f$ * - * "Haralick's Correlation" \f$ = f_8 = \frac{\sum_{i,j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} \f$ + * "Haralick's Correlation" \f$ = f_8 = \frac{\sum_{i, j}(i, j) g(i, j) -\mu_t^2}{\sigma_t^2} \f$ * where \f$\mu_t\f$ and \f$\sigma_t\f$ are the mean and standard deviation of the row * (or column, due to symmetry) sums. * - * Above, \f$ \mu = \f$ (weighted pixel average) \f$ = \sum_{i,j}i \cdot g(i, j) = - * \sum_{i,j}j \cdot g(i, j) \f$ (due to matrix summetry), and + * Above, \f$ \mu = \f$ (weighted pixel average) \f$ = \sum_{i, j}i \cdot g(i, j) = + * \sum_{i, j}j \cdot g(i, j) \f$ (due to matrix summetry), and * - * \f$ \sigma = \f$ (weighted pixel variance) \f$ = \sum_{i,j}(i - \mu)^2 \cdot g(i, j) = - * \sum_{i,j}(j - \mu)^2 \cdot g(i, j) \f$ (due to matrix summetry) + * \f$ \sigma = \f$ (weighted pixel variance) \f$ = \sum_{i, j}(i - \mu)^2 \cdot g(i, j) = + * \sum_{i, j}(j - \mu)^2 \cdot g(i, j) \f$ (due to matrix summetry) * * Neighborhood size can be set using the SetRadius() method. Offset for co-occurence estimation * is set using the SetOffset() method. diff --git a/Code/FeatureExtraction/otbVectorizationPathListFilter.txx b/Code/FeatureExtraction/otbVectorizationPathListFilter.txx index 5114ddee507860f81026b3ddfe2c0b9826786f55..7ebb8ff435964d2992a907b9d8cc2837e4ec43c3 100644 --- a/Code/FeatureExtraction/otbVectorizationPathListFilter.txx +++ b/Code/FeatureExtraction/otbVectorizationPathListFilter.txx @@ -272,14 +272,14 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath> offset.reserve(8); if (direction > 0) { - //find the direction in terms of 0,1,2,3 + //find the direction in terms of 0, 1, 2, 3 neighborhoodNumber = (int) (direction / (CONST_PI_4) -1); } else { neighborhoodNumber = (int) ((direction + CONST_PI) / (CONST_PI_4) -1); neighborhoodNumber = (neighborhoodNumber + 4); - //if the direction was <0 need to convert to 4,5,6,7 + //if the direction was <0 need to convert to 4, 5, 6, 7 } if (flagReverse) { @@ -534,14 +534,14 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath> offset.reserve(3); if (direction > 0) { - //find the direction in terms of 0,1,2,3 + //find the direction in terms of 0, 1, 2, 3 neighborhoodNumber = (int) (direction / (CONST_PI_4) -1); } else { neighborhoodNumber = (int) ((direction + CONST_PI) / (CONST_PI_4) -1); neighborhoodNumber = (neighborhoodNumber + 4); - //if the direction was <0 need to convert to 4,5,6,7 + //if the direction was <0 need to convert to 4, 5, 6, 7 } if (flagReverse) { diff --git a/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx b/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx index 6449156c2c21e8bf96ecc076bc6e0570019ff07a..c9f330186daf94755de99eec376919f729358fd9 100644 --- a/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx +++ b/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx @@ -49,8 +49,8 @@ SimpleRcsPanSharpeningFusionImageFilter // Set-up progress reporting m_ProgressAccumulator = itk::ProgressAccumulator::New(); m_ProgressAccumulator->SetMiniPipelineFilter(this); - m_ProgressAccumulator->RegisterInternalFilter(m_ConvolutionFilter,0.9); - m_ProgressAccumulator->RegisterInternalFilter(m_FusionFilter,0.1); + m_ProgressAccumulator->RegisterInternalFilter(m_ConvolutionFilter, 0.9); + m_ProgressAccumulator->RegisterInternalFilter(m_FusionFilter, 0.1); } template <class TPanImageType, class TXsImageType, class TOutputImageType, class TInternalPrecision> diff --git a/Code/IO/otbBSQImageIO.h b/Code/IO/otbBSQImageIO.h index 9bc5d143074ed39e950e3b0cd9d1fd0f150dcf9a..f5b106b8d1ca218d3bb758a61ef50162ac9a6496 100644 --- a/Code/IO/otbBSQImageIO.h +++ b/Code/IO/otbBSQImageIO.h @@ -95,7 +95,7 @@ public: virtual void Write(const void* buffer); // JULIEN: NOT USED, NOT IMPLEMENTED - // void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); + // void SampleImage(void* buffer, int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); protected: /** Constructor.*/ diff --git a/Code/IO/otbGDALImageIO.cxx b/Code/IO/otbGDALImageIO.cxx index 30a9be995378028f47d3b21476df1dbb4ac80199..7a6599f3840553d9fe4ce4e80fb57fb3227a4ccc 100644 --- a/Code/IO/otbGDALImageIO.cxx +++ b/Code/IO/otbGDALImageIO.cxx @@ -152,7 +152,7 @@ private : { GDALDestroyDriverManager(); } -};// end of GDALDriverManagerWrapper +}; // end of GDALDriverManagerWrapper GDALImageIO::GDALImageIO() { @@ -334,7 +334,7 @@ void GDALImageIO::Read(void* buffer) << ", sizeY = " << lNbLines \ << ", GDAL Data Type = " << GDALGetDataTypeName(m_PxType) \ << ", nb Band to read = " << m_NbBands \ - << ", nb BytePerPixel = " << m_BytePerPixel <<std::endl;*/ + << ", nb BytePerPixel = " << m_BytePerPixel <<std::endl; */ CPLErr lCrGdal = m_Dataset->GetDataSet()->RasterIO(GF_Read, lFirstColumn, @@ -612,7 +612,7 @@ void GDALImageIO::InternalReadImageInformation() std::cout << " Number of band in file = " << m_NbBands << std::endl; std::cout << " Number of component otb = " << this->GetNumberOfComponents() << std::endl; std::cout << " Byte per pixel = " << m_BytePerPixel << std::endl; - std::cout << " Component Type otb = " << GetComponentTypeAsString(this->GetComponentType()) <<std::endl;*/ + std::cout << " Component Type otb = " << GetComponentTypeAsString(this->GetComponentType()) <<std::endl; */ /*----------------------------------------------------------------------*/ /*-------------------------- METADATA ----------------------------------*/ @@ -657,10 +657,10 @@ void GDALImageIO::InternalReadImageInformation() const char * pszProjection = NULL; pszProjection = dataset->GetProjectionRef(); - if (OSRImportFromWkt(pSR,(char **) (&pszProjection)) == OGRERR_NONE) + if (OSRImportFromWkt(pSR, (char **) (&pszProjection)) == OGRERR_NONE) { char * pszPrettyWkt = NULL; - OSRExportToPrettyWkt(pSR,&pszPrettyWkt,FALSE); + OSRExportToPrettyWkt(pSR, &pszPrettyWkt, FALSE); itk::EncapsulateMetaData<std::string> (dict, MetaDataKey::ProjectionRefKey, static_cast<std::string>(pszPrettyWkt)); @@ -746,8 +746,8 @@ void GDALImageIO::InternalReadImageInformation() if (projRef.empty()) { projRef = - "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]]," - "PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]"; + "GEOGCS[\"GCS_WGS_1984\", DATUM[\"D_WGS_1984\", SPHEROID[\"WGS_1984\", 6378137, 298.257223563]]," + "PRIMEM[\"Greenwich\", 0], UNIT[\"Degree\", 0.017453292519943295]]"; itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projRef); } @@ -1142,7 +1142,7 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) m_Dataset = GDALDriverManagerWrapper::GetInstance().Create( driverShortName, GetGdalWriteImageFileName(driverShortName, m_FileName), - m_Dimensions[0],m_Dimensions[1], + m_Dimensions[0], m_Dimensions[1], m_NbBands, m_PxType, papszOptions); } diff --git a/Code/IO/otbImage.h b/Code/IO/otbImage.h index 94a1bf4b2157fbbc82091bd3b5f5f6269e279b0a..107f3d27121780d1e06f0f8de97871704e785ea8 100644 --- a/Code/IO/otbImage.h +++ b/Code/IO/otbImage.h @@ -108,7 +108,7 @@ public: typedef typename Superclass::SpacingType SpacingType; /** Origin typedef support. The origin is the geometric coordinates - * of the index (0,0). */ + * of the index (0, 0). */ typedef typename Superclass::PointType PointType; /** A pointer to the pixel container. */ diff --git a/Code/IO/otbImageFileReader.txx b/Code/IO/otbImageFileReader.txx index 318173a8e48f0886824473cdbcb385f0e64ed119..5513e72fb63b8d09c83ca4b85b38374744018f86 100644 --- a/Code/IO/otbImageFileReader.txx +++ b/Code/IO/otbImageFileReader.txx @@ -178,7 +178,7 @@ ImageFileReader<TOutputImage> std::cout<< "size of Buffer to GDALImageIO::read = " << nbBytes << " = " \ << "ComponentSize ("<< this->m_ImageIO->GetComponentSize() << ") x " \ << "Nb of Component (" << this->m_ImageIO->GetNumberOfComponents() << ") x " \ - << "Nb of Pixel to read (" << region.GetNumberOfPixels() << ")" << std::endl;*/ + << "Nb of Pixel to read (" << region.GetNumberOfPixels() << ")" << std::endl; */ this->m_ImageIO->Read(loadBuffer); this->DoConvertBuffer(loadBuffer, region.GetNumberOfPixels()); @@ -563,7 +563,7 @@ ImageFileReader<TOutputImage> listFileSearch.push_back("IMAGERY.TIF"); listFileSearch.push_back("imagery.tif"); //For format SPOT5TIF // Not recognized as a supported file format by GDAL. -// listFileSearch.push_back("IMAGERY.BIL");listFileSearch.push_back("imagery.bil");//For format SPOT5BIL +// listFileSearch.push_back("IMAGERY.BIL"); listFileSearch.push_back("imagery.bil"); //For format SPOT5BIL listFileSearch.push_back("IMAG_01.DAT"); listFileSearch.push_back("imag_01.dat"); //For format SPOT4 diff --git a/Code/IO/otbImageKeywordlist.h b/Code/IO/otbImageKeywordlist.h index a5a916fed0ea4edbf2cac9e0bb3400100650dd2c..de2ee711cd73e4d72b414cb2c93e897b340cad3c 100644 --- a/Code/IO/otbImageKeywordlist.h +++ b/Code/IO/otbImageKeywordlist.h @@ -48,7 +48,7 @@ public: typedef ImageKeywordlist Self; //virtual const char *GetNameOfClass() const - //{return "ImageKeywordlist";} + //{return "ImageKeywordlist"; } typedef std::map<ossimString, ossimString> KeywordlistMap; diff --git a/Code/IO/otbJPEG2000ImageIO.cxx b/Code/IO/otbJPEG2000ImageIO.cxx index 89aab8ab81c3191ff0b028029eda4ae187f44c31..b7dd3067d6f302d8c1052151ebef4a447114c7aa 100644 --- a/Code/IO/otbJPEG2000ImageIO.cxx +++ b/Code/IO/otbJPEG2000ImageIO.cxx @@ -281,8 +281,8 @@ void JPEG2000ImageIO::Read(void* buffer) otbMsgDebugMacro(<< "=========================="); otbMsgDebugMacro(<< "Tile index: " << tile_index); otbMsgDebugMacro(<< "Data size: " << data_size); - otbMsgDebugMacro(<< "Tile (x0,y0): " << tile_x0 << " " << tile_y0); - otbMsgDebugMacro(<< "Tile (x1,y1): " << tile_x1 << " " << tile_y1); + otbMsgDebugMacro(<< "Tile (x0, y0): " << tile_x0 << " " << tile_y0); + otbMsgDebugMacro(<< "Tile (x1, y1): " << tile_x1 << " " << tile_y1); otbMsgDebugMacro(<< "Tile number of component: " << nb_comps); otbMsgDebugMacro(<< "Goes on: " << goesOn); otbMsgDevMacro(<< "--------------------------"); @@ -478,7 +478,7 @@ void JPEG2000ImageIO::ReadImageInformation() otbMsgDebugMacro(<< "=========================="); otbMsgDebugMacro(<< "ReadImageInformation: "); - otbMsgDebugMacro(<< "Tile (x0,y0): " << tile_x0 << " " << tile_y0); + otbMsgDebugMacro(<< "Tile (x0, y0): " << tile_x0 << " " << tile_y0); otbMsgDebugMacro(<< "Tile size: " << tile_width << " x " << tile_height); otbMsgDebugMacro(<< "Number of tiles: " << nb_tiles_x << " " << nb_tiles_y); otbMsgDebugMacro(<< "Precision: " << precision); @@ -602,20 +602,20 @@ void JPEG2000ImageIO::Write(const void* /*buffer*/) // m_Parameters.irreversible = 1; // /* do not bother with mct, the rsiz is set when calling opj_set_MCT*/ -// /*m_Parameters.cp_rsiz = STD_RSIZ;*/ +// /*m_Parameters.cp_rsiz = STD_RSIZ; */ // /* no cinema */ -// /*m_Parameters.cp_cinema = 0;*/ +// /*m_Parameters.cp_cinema = 0; */ // /* no not bother using SOP or EPH markers, do not use custom size precinct */ // /* number of precincts to specify */ -// /* m_Parameters.csty = 0;*/ +// /* m_Parameters.csty = 0; */ // /* m_Parameters.res_spec = ... */ // /* m_Parameters.prch_init[i] = .. */ // /* m_Parameters.prcw_init[i] = .. */ // /* do not use progression order changes */ -// /*m_Parameters.numpocs = 0;*/ +// /*m_Parameters.numpocs = 0; */ // /* m_Parameters.POC[i].... */ // /* do not restrain the size for a component.*/ @@ -623,7 +623,7 @@ void JPEG2000ImageIO::Write(const void* /*buffer*/) // /** block encoding style for each component, do not use at the moment */ // /** J2K_CCP_CBLKSTY_TERMALL, J2K_CCP_CBLKSTY_LAZY, J2K_CCP_CBLKSTY_VSC, J2K_CCP_CBLKSTY_SEGSYM, J2K_CCP_CBLKSTY_RESET */ -// /* m_Parameters.mode = 0;*/ +// /* m_Parameters.mode = 0; */ // /** number of resolutions */ // m_Parameters.numresolution = 6; @@ -641,15 +641,15 @@ void JPEG2000ImageIO::Write(const void* /*buffer*/) // /* m_Parameters.tp_flag = 0; */ // /* if we are using mct */ -// /* opj_set_MCT(&m_Parameters,l_mct,l_offsets,NUM_COMPS); */ +// /* opj_set_MCT(&m_Parameters, l_mct, l_offsets, NUM_COMPS); */ // /* image definition */ // l_current_param_ptr = m_Parameters; // for -// (i=0;i<NUM_COMPS;++i) +// (i=0; i<NUM_COMPS; ++i) // { // /* do not bother bpp useless */ -// /*l_current_param_ptr->bpp = COMP_PREC;*/ +// /*l_current_param_ptr->bpp = COMP_PREC; */ // l_current_param_ptr->dx = 1; // l_current_param_ptr->dy = 1; // l_current_param_ptr->h = m_Dimensions[1]; @@ -662,16 +662,16 @@ void JPEG2000ImageIO::Write(const void* /*buffer*/) // } // m_Codec = opj_create_compress(CODEC_JP2); -// opj_set_info_handler(m_Codec, info_callback,00); -// opj_set_warning_handler(m_Codec, warning_callback,00); -// opj_set_error_handler(m_Codec, error_callback,00); +// opj_set_info_handler(m_Codec, info_callback, 00); +// opj_set_warning_handler(m_Codec, warning_callback, 00); +// opj_set_error_handler(m_Codec, error_callback, 00); // if(!m_Codec) // { // itkExceptionMacro(<<"Failed to create openjpeg codec."); // } -// m_OpenJpegImage = opj_image_tile_create(m_NbBands,m_Parameters,CLRSPC_SRGB); +// m_OpenJpegImage = opj_image_tile_create(m_NbBands, m_Parameters, CLRSPC_SRGB); // m_OpenJpegImage->x0 = 0; // m_OpenJpegImage->y0 = 0; @@ -689,7 +689,7 @@ void JPEG2000ImageIO::Write(const void* /*buffer*/) // opj_set_default_encoder_parameters(&m_Parameters); // // TODO: add custom parameters here -// if(!opj_setup_encoder(m_Codec,&m_Parameters,m_OpenJpegImage)) +// if(!opj_setup_encoder(m_Codec, &m_Parameters, m_OpenJpegImage)) // { // itkExceptionMacro(<<"Failed to set up decoder parameters."); // } @@ -701,7 +701,7 @@ void JPEG2000ImageIO::Write(const void* /*buffer*/) // itkExceptionMacro(<<"Failed to open file: "<<m_FileName); // } -// m_OpenJpegStream = opj_stream_create_default_file_stream(m_File,true); +// m_OpenJpegStream = opj_stream_create_default_file_stream(m_File, true); // if(!m_OpenJpegStream) // { @@ -726,12 +726,12 @@ void JPEG2000ImageIO::Write(const void* /*buffer*/) // std::streamsize component_size = new -// for(comp = 0;comp<m_NbBands;++comp) +// for(comp = 0; comp<m_NbBands; ++comp) // { // } -// if(! opj_write_tile(m_Codec,tile_index,charstarbuffer,buffer_size,m_OpenJpegStream)) +// if(! opj_write_tile(m_Codec, tile_index, charstarbuffer, buffer_size, m_OpenJpegStream)) // { // } diff --git a/Code/IO/otbKMLVectorDataIO.txx b/Code/IO/otbKMLVectorDataIO.txx index 74c12c077fb4ff3b712c639397992afd59d6299d..6a2fd27fbb134ebf58b7dc8c815ef9206a7b1fa2 100644 --- a/Code/IO/otbKMLVectorDataIO.txx +++ b/Code/IO/otbKMLVectorDataIO.txx @@ -484,7 +484,7 @@ KMLVectorDataIO<TData> //for KML files, this is geographic coordinates std::string projectionRef = - "GEOGCS[\"GCS_WGS_1984\", DATUM[\"WGS_1984\", SPHEROID[\"WGS_1984\",6378137,298.257223563]], PRIMEM[\"Greenwich\",0], UNIT[\"Degree\",0.017453292519943295]]"; + "GEOGCS[\"GCS_WGS_1984\", DATUM[\"WGS_1984\", SPHEROID[\"WGS_1984\", 6378137, 298.257223563]], PRIMEM[\"Greenwich\", 0], UNIT[\"Degree\", 0.017453292519943295]]"; itk::MetaDataDictionary& dict = data->GetMetaDataDictionary(); itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projectionRef); @@ -576,7 +576,7 @@ void KMLVectorDataIO<TData>::Write(const VectorDataConstPointerType data, char * std::string xml = kmldom::SerializePretty(kml); // Write it -// kmlbase::File::WriteStringToFile(xml,this->m_FileName); +// kmlbase::File::WriteStringToFile(xml, this->m_FileName); kmlengine::KmlFilePtr kml_file = kmlengine::KmlFile::CreateFromString(xml); diff --git a/Code/IO/otbKmzProductWriter.h b/Code/IO/otbKmzProductWriter.h index efbd18235d7ca8ff46905212729cfc2bbd4d9528..7726979d43b7e7d7db759945fe20c19cd8a4d16f 100644 --- a/Code/IO/otbKmzProductWriter.h +++ b/Code/IO/otbKmzProductWriter.h @@ -84,7 +84,7 @@ public: typedef typename InputImageType::Pointer InputImagePointer; typedef typename InputImageType::PixelType InputImagePixelType; - typedef VectorData<double,2> VectorDataType; + typedef VectorData<double, 2> VectorDataType; typedef typename VectorDataType::DataNodeType DataNodeType; typedef typename DataNodeType::PolygonType PolygonType; typedef typename PolygonType::VertexType VertexType; @@ -99,7 +99,7 @@ public: typedef ImageFileWriter< VectorImage<OutputPixelType> > VectorWriterType; // Resampler - typedef StreamingShrinkImageFilter<InputImageType,InputImageType > StreamingShrinkImageFilterType; + typedef StreamingShrinkImageFilter<InputImageType, InputImageType > StreamingShrinkImageFilterType; // Intensity Rescale typedef VectorRescaleIntensityImageFilter<InputImageType, @@ -114,7 +114,7 @@ public: typedef itk::CastImageFilter<InputImageType, VectorImage<OutputPixelType> > CastFilterType; // std::pair description <-> legend (image) - typedef std::pair<std::string,InputImagePointer> LegendPairType; + typedef std::pair<std::string, InputImagePointer> LegendPairType; typedef std::vector<LegendPairType> LegendVectorType; /** Dimension of input image. */ @@ -135,7 +135,7 @@ public: } // Public method to Add Logo - itkSetMacro(Logo,InputImagePointer); + itkSetMacro(Logo, InputImagePointer); // Public method to store the legend and their description in the // legendVector @@ -150,11 +150,11 @@ public: void AddLegend(const InputImagePointer legend) { std::string emptyString =""; - this->AddLegend(emptyString,legend); + this->AddLegend(emptyString, legend); } // Set the size of the tiles to produce - itkSetMacro(TileSize,int); + itkSetMacro(TileSize, int); protected: KmzProductWriter(); diff --git a/Code/IO/otbKmzProductWriter.txx b/Code/IO/otbKmzProductWriter.txx index 8093af76aba0ae919932db88459c9d45d6870395..0dc8870d5e75bb52071086282a75dd60fe730619 100644 --- a/Code/IO/otbKmzProductWriter.txx +++ b/Code/IO/otbKmzProductWriter.txx @@ -414,9 +414,9 @@ KmzProductWriter<TInputImage> m_VectorImageExtractROIFilter->SetSizeY(extractSize[1]); // Set Channel to extract - m_VectorImageExtractROIFilter->SetChannel(1);//m_ProductVector[m_CurrentProduct].m_Composition[0] + 1); - m_VectorImageExtractROIFilter->SetChannel(2);//m_ProductVector[m_CurrentProduct].m_Composition[1] + 1); - m_VectorImageExtractROIFilter->SetChannel(3);//m_ProductVector[m_CurrentProduct].m_Composition[2] + 1); + m_VectorImageExtractROIFilter->SetChannel(1); //m_ProductVector[m_CurrentProduct].m_Composition[0] + 1); + m_VectorImageExtractROIFilter->SetChannel(2); //m_ProductVector[m_CurrentProduct].m_Composition[1] + 1); + m_VectorImageExtractROIFilter->SetChannel(3); //m_ProductVector[m_CurrentProduct].m_Composition[2] + 1); // Set extract roi input m_VectorImageExtractROIFilter->SetInput(m_ResampleVectorImage); diff --git a/Code/IO/otbLUMImageIO.h b/Code/IO/otbLUMImageIO.h index 003767b879b73f1232afc8909bbda41ccdc254e1..40c8a26764291346e999cff48be35ace6924d42f 100644 --- a/Code/IO/otbLUMImageIO.h +++ b/Code/IO/otbLUMImageIO.h @@ -94,7 +94,7 @@ public: * that the IORegion has been set properly. */ virtual void Write(const void* buffer); // JULIEN: NOT USED, NOT IMPLEMENTED - //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); + //void SampleImage(void* buffer, int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); protected: /** Constructor.*/ diff --git a/Code/IO/otbMWImageIO.cxx b/Code/IO/otbMWImageIO.cxx index 1058f1c48337eafdab483b56577978fe237f3e9b..d7f0007753baa61a4aa09c9a6a7e9811b4965a4d 100644 --- a/Code/IO/otbMWImageIO.cxx +++ b/Code/IO/otbMWImageIO.cxx @@ -290,7 +290,7 @@ void MWImageIO::Write(const void* buffer) // std::streamsize counter = 0; // std::cout << "begin conversion" << std::endl; -// for (unsigned int i=0;i<m_Dimensions[0]*m_Dimensions[1];++i) +// for (unsigned int i=0; i<m_Dimensions[0]*m_Dimensions[1]; ++i) // { // floatImage[i] = static_cast< float > ( *(p+counter) ); // std::cout << "float " << floatImage[i] << std::endl; diff --git a/Code/IO/otbMWImageIO.h b/Code/IO/otbMWImageIO.h index 42cdb438bae3418092e246d75a7f40ff8c4cc75e..3bedae12efafea5c6fc58c3f3816c6ee383bec9b 100644 --- a/Code/IO/otbMWImageIO.h +++ b/Code/IO/otbMWImageIO.h @@ -94,7 +94,7 @@ public: * that the IORegion has been set properly. */ virtual void Write(const void* buffer); // JULIEN: NOT USED, NOT IMPLEMENTED - //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); + //void SampleImage(void* buffer, int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); protected: /** Constructor.*/ diff --git a/Code/IO/otbMapFileProductWriter.h b/Code/IO/otbMapFileProductWriter.h index a6734654f54042c7d05486f768b44e2d787e3ae4..db54cff7a7bf90889d6c364552c2800c7c47ec2c 100644 --- a/Code/IO/otbMapFileProductWriter.h +++ b/Code/IO/otbMapFileProductWriter.h @@ -90,7 +90,7 @@ public: typedef unsigned char OutputPixelType; typedef VectorImage<OutputPixelType> OutputImageType; - typedef VectorData<double,2> VectorDataType; + typedef VectorData<double, 2> VectorDataType; typedef typename VectorDataType::DataNodeType DataNodeType; typedef typename DataNodeType::PolygonType PolygonType; typedef typename PolygonType::VertexType VertexType; @@ -107,14 +107,14 @@ public: // Resampler typedef StreamingShrinkImageFilter - <InputImageType,InputImageType > StreamingShrinkImageFilterType; + <InputImageType, InputImageType > StreamingShrinkImageFilterType; // Intensity Rescale typedef VectorRescaleIntensityImageFilter - <InputImageType,InputImageType> VectorRescaleIntensityImageFilterType; + <InputImageType, InputImageType> VectorRescaleIntensityImageFilterType; // Project filter - typedef GenericRSResampleImageFilter<InputImageType,InputImageType> GenericRSResamplerType; + typedef GenericRSResampleImageFilter<InputImageType, InputImageType> GenericRSResamplerType; typedef typename GenericRSResamplerType::Pointer GenericRSResamplerPointerType; // Transformer @@ -136,8 +136,8 @@ public: itkGetStringMacro(FileName); /** Set/Get the size of each tile*/ - itkSetMacro(TileSize,unsigned int); - itkGetMacro(TileSize,unsigned int); + itkSetMacro(TileSize, unsigned int); + itkGetMacro(TileSize, unsigned int); /** Set CGI filename path */ itkSetStringMacro(CGIPath); @@ -154,7 +154,7 @@ public: } /** Macro to set the SRID we want to project Data in*/ - itkSetMacro(SRID,int); + itkSetMacro(SRID, int); protected: MapFileProductWriter(); diff --git a/Code/IO/otbMapFileProductWriter.txx b/Code/IO/otbMapFileProductWriter.txx index 21677337f810e4d98fcadba79507dda95bec5b77..1463bb05def7feb40c1bb7f8079eb38dcff4f9b0 100644 --- a/Code/IO/otbMapFileProductWriter.txx +++ b/Code/IO/otbMapFileProductWriter.txx @@ -29,7 +29,7 @@ namespace otb */ template <class TInputImage> MapFileProductWriter<TInputImage> -::MapFileProductWriter(): m_TileSize(256),m_SRID(26918) +::MapFileProductWriter(): m_TileSize(256), m_SRID(26918) { m_GenericRSResampler = GenericRSResamplerType::New(); @@ -436,7 +436,7 @@ MapFileProductWriter<TInputImage> unsigned int x, unsigned int y) { // From PointType to VertexType - VertexType pLL,pLR,pUR,pUL; + VertexType pLL, pLR, pUR, pUL; pLL[0]=lowerLeftCorner[0]; pLL[1]=lowerLeftCorner[1]; @@ -469,10 +469,10 @@ MapFileProductWriter<TInputImage> // Add the field "LOCATION" used in mapserver clients // to get the path to tiles - m_Polygon->SetFieldAsString("LOCATION",oss.str()); + m_Polygon->SetFieldAsString("LOCATION", oss.str()); // Add the to vectordata - m_VectorDataIndexTile->GetDataTree()->Add(m_Polygon,m_Folder); + m_VectorDataIndexTile->GetDataTree()->Add(m_Polygon, m_Folder); } /** diff --git a/Code/IO/otbMetaDataKey.cxx b/Code/IO/otbMetaDataKey.cxx index 3ac3e906345e3ba7b13532aff2bfa35f79cf9f0b..9ac30682493c76700f0389ad2380340eb9adb94b 100644 --- a/Code/IO/otbMetaDataKey.cxx +++ b/Code/IO/otbMetaDataKey.cxx @@ -105,7 +105,7 @@ MetaDataKey::KeyType MetaDataKey::GetKeyType(std::string name) for (unsigned int i = 0; i < NBKEYS; ++i) { -// if ( strcmp(name.c_str(),Types[i].keyname.c_str()) == 0 ) +// if ( strcmp(name.c_str(), Types[i].keyname.c_str()) == 0 ) if ((name.find(Types[i].keyname) >= 0) && (name.find(Types[i].keyname) <= name.size())) diff --git a/Code/IO/otbMetaDataKey.h b/Code/IO/otbMetaDataKey.h index 774b778a813f88ec2f9c32fde0929a2f36dc990d..46ee54693a0b6ecbbf4b92532ac2967f3040e8e6 100644 --- a/Code/IO/otbMetaDataKey.h +++ b/Code/IO/otbMetaDataKey.h @@ -91,7 +91,7 @@ public: { std::string keyname; KeyType type; - } KeyTypeDef;*/ + } KeyTypeDef; */ struct KeyTypeDef { @@ -188,8 +188,8 @@ public: { os << " GCP Id = " << this->m_Id << std::endl; os << " GCP Info = " << this->m_Info << std::endl; - os << " GCP (Row,Col) = (" << this->m_GCPRow << "," << this->m_GCPCol << ")" << std::endl; - os << " GCP (X,Y,Z) = (" << this->m_GCPX << "," << this->m_GCPY << "," << this->m_GCPZ << ")" << std::endl; + os << " GCP (Row, Col) = (" << this->m_GCPRow << "," << this->m_GCPCol << ")" << std::endl; + os << " GCP (X, Y, Z) = (" << this->m_GCPX << "," << this->m_GCPY << "," << this->m_GCPZ << ")" << std::endl; } }; diff --git a/Code/IO/otbOGRVectorDataIO.txx b/Code/IO/otbOGRVectorDataIO.txx index 9b2caefe0f06310f982815ddfe9a0510a2829981..53ad3faddcd383ffec1f5d6c06c47641d3eee1dc 100644 --- a/Code/IO/otbOGRVectorDataIO.txx +++ b/Code/IO/otbOGRVectorDataIO.txx @@ -148,10 +148,10 @@ OGRVectorDataIO<TData> /** Retrieving the fields types */ // OGRFieldDefn * field; -// for (int fieldIndex = 0; fieldIndex<dfn->GetFieldCount();++fieldIndex) +// for (int fieldIndex = 0; fieldIndex<dfn->GetFieldCount(); ++fieldIndex) // { // field = dfn->GetFieldDefn(fieldIndex); -// document->SetField(field->GetNameRef(),OGRFieldDefn::GetFieldTypeName(field->GetType())); +// document->SetField(field->GetNameRef(), OGRFieldDefn::GetFieldTypeName(field->GetType())); // // std::cout<<"Document "<<document->GetNodeId()<<": Adding field "<<field->GetNameRef()<<" "<<OGRFieldDefn::GetFieldTypeName(field->GetType())<<std::endl; // } @@ -315,7 +315,7 @@ OGRVectorDataIO<TData>::GetOGRDriverName(std::string name) const // driverOGR="KML"; else driverOGR = "NOT-FOUND"; } - //std::cout << name << " " << driverOGR <<" "<<upperName<< " "<< upperName.substr(0,3) << std::endl; + //std::cout << name << " " << driverOGR <<" "<<upperName<< " "<< upperName.substr(0, 3) << std::endl; return driverOGR; } diff --git a/Code/IO/otbONERAImageIO.h b/Code/IO/otbONERAImageIO.h index 3ed455447053670dea82e6a2a7dcc3a8d9a5a240..7959c5b70fe03859c9fbf2346207638e7ad7761e 100644 --- a/Code/IO/otbONERAImageIO.h +++ b/Code/IO/otbONERAImageIO.h @@ -92,7 +92,7 @@ public: * that the IORegion has been set properly. */ virtual void Write(const void* buffer); // JULIEN: NOT USED, NOT IMPLEMENTED - //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); + //void SampleImage(void* buffer, int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); protected: /** Constructor.*/ diff --git a/Code/IO/otbRADImageIO.h b/Code/IO/otbRADImageIO.h index 7712784e88f352c65d62a723661138a765ab9f70..fbb01f2016aa829c32c9d0b74a444f6f678aa7a1 100644 --- a/Code/IO/otbRADImageIO.h +++ b/Code/IO/otbRADImageIO.h @@ -95,7 +95,7 @@ public: virtual void Write(const void* buffer); // JULIEN: NOT USED, NOT IMPLEMENTED - // void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); + // void SampleImage(void* buffer, int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample); protected: /** Constructor.*/ diff --git a/Code/IO/otbStreamingImageFileWriter.txx b/Code/IO/otbStreamingImageFileWriter.txx index 3fa74288fcb90685168e5fd9138e33d17d0cc1f8..5420a7f192c023420f89aec919f4206f76684fbf 100644 --- a/Code/IO/otbStreamingImageFileWriter.txx +++ b/Code/IO/otbStreamingImageFileWriter.txx @@ -356,7 +356,7 @@ StreamingImageFileWriter<TInputImage> itk::ImageIOFactory::WriteMode)); /* m_ImageIO = ImageIOFactory::CreateImageIO( m_FileName.c_str(), - itk::ImageIOFactory::WriteMode );*/ + itk::ImageIOFactory::WriteMode ); */ m_FactorySpecifiedImageIO = true; } else diff --git a/Code/IO/otbTileMapImageIOHelper.cxx b/Code/IO/otbTileMapImageIOHelper.cxx index 4f69d789757675ba00195359a4fe71919a2138be..c638db66fbba47246b5a878b8b5e6424256d8c05 100644 --- a/Code/IO/otbTileMapImageIOHelper.cxx +++ b/Code/IO/otbTileMapImageIOHelper.cxx @@ -57,34 +57,34 @@ const std::string TileMapImageIOHelper::ConvertDepthToScale(const unsigned int d res += "2 million)"; break; case 9: - res += "867,000)"; + res += "867, 000)"; break; case 10: - res += "433,000)"; + res += "433, 000)"; break; case 11: - res += "217,000)"; + res += "217, 000)"; break; case 12: - res += "108,000)"; + res += "108, 000)"; break; case 13: - res += "54,000)"; + res += "54, 000)"; break; case 14: - res += "27,000)"; + res += "27, 000)"; break; case 15: - res += "14,000)"; + res += "14, 000)"; break; case 16: - res += "6,771)"; + res += "6, 771)"; break; case 17: - res += "3,385)"; + res += "3, 385)"; break; case 18: - res += "1,693)"; + res += "1, 693)"; break; default: res += "222 million)"; diff --git a/Code/IO/otbVectorDataKeywordlist.h b/Code/IO/otbVectorDataKeywordlist.h index 8be523d627dc3d5f567ae0421260fcfc73452c45..abfdfb4baee304c49bc9b2d061e23ad4d86ea3ab 100644 --- a/Code/IO/otbVectorDataKeywordlist.h +++ b/Code/IO/otbVectorDataKeywordlist.h @@ -78,7 +78,7 @@ public: void SetFieldAsString(std::string key, std::string value); /** - * \return the nth field of the node as a std::pair of (key,value). + * \return the nth field of the node as a std::pair of (key, value). * \param index the index of the field to return. */ FieldType GetNthField(unsigned int index) const; diff --git a/Code/IO/otbVectorImage.h b/Code/IO/otbVectorImage.h index 060c370d98c6220cd9058a27302c3a2681770c0f..2e2dc813b322932c0e8cf5d64f4a9873bea43a8d 100644 --- a/Code/IO/otbVectorImage.h +++ b/Code/IO/otbVectorImage.h @@ -111,7 +111,7 @@ public: typedef typename Superclass::SpacingType SpacingType; /** Origin typedef support. The origin is the geometric coordinates - * of the index (0,0). */ + * of the index (0, 0). */ typedef typename Superclass::PointType PointType; /** Get the projection coordinate system of the image. */ diff --git a/Code/Learning/otbConcatenateSampleListFilter.h b/Code/Learning/otbConcatenateSampleListFilter.h index 22b57ef7a963b8f5aa8fdd2b416079a21327356b..72447e236075f9b283241218292cdc34dad3ba0d 100644 --- a/Code/Learning/otbConcatenateSampleListFilter.h +++ b/Code/Learning/otbConcatenateSampleListFilter.h @@ -33,18 +33,18 @@ namespace Statistics { */ template < class TSampleList > class ITK_EXPORT ConcatenateSampleListFilter : - public otb::Statistics::ListSampleToListSampleFilter<TSampleList,TSampleList> + public otb::Statistics::ListSampleToListSampleFilter<TSampleList, TSampleList> { public: /** Standard class typedefs */ typedef ConcatenateSampleListFilter Self; typedef otb::Statistics::ListSampleToListSampleFilter - <TSampleList,TSampleList> Superclass; + <TSampleList, TSampleList> Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(ConcatenateSampleListFilter,otb::Statistics::ListSampleToListSampleFilter); + itkTypeMacro(ConcatenateSampleListFilter, otb::Statistics::ListSampleToListSampleFilter); /** Method for creation through the object factory. */ itkNewMacro(Self); diff --git a/Code/Learning/otbConcatenateSampleListFilter.txx b/Code/Learning/otbConcatenateSampleListFilter.txx index a18636143c484ca926bacde383d115c0e0401e34..1e54e036784389eb34b62099d66e2f2582a2ebe5 100644 --- a/Code/Learning/otbConcatenateSampleListFilter.txx +++ b/Code/Learning/otbConcatenateSampleListFilter.txx @@ -64,7 +64,7 @@ ConcatenateSampleListFilter<TSampleList> // Evaluate the total number of samples for progress reporting unsigned long totalNumberOfSamples = 0; - for(unsigned int inputIndex = 0; inputIndex<this->GetNumberOfInputs();++inputIndex) + for(unsigned int inputIndex = 0; inputIndex<this->GetNumberOfInputs(); ++inputIndex) { // Retrieve the ListSample typename SampleListObjectType::ConstPointer inputPtr = @@ -73,9 +73,9 @@ ConcatenateSampleListFilter<TSampleList> } // Set-up progress reporting - itk::ProgressReporter progress(this,0,totalNumberOfSamples); + itk::ProgressReporter progress(this, 0, totalNumberOfSamples); - for(unsigned int inputIndex = 0; inputIndex<this->GetNumberOfInputs();++inputIndex) + for(unsigned int inputIndex = 0; inputIndex<this->GetNumberOfInputs(); ++inputIndex) { // Retrieve the ListSample typename SampleListObjectType::ConstPointer inputPtr = @@ -104,7 +104,7 @@ ConcatenateSampleListFilter<TSampleList> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); os<<indent<<"Number of input SampleList: "<<this->GetNumberOfInputs(); } diff --git a/Code/Learning/otbConfusionMatrixCalculator.h b/Code/Learning/otbConfusionMatrixCalculator.h index 841bf748e70f11b9971e2fdd04b1d8e39f9ef0da..c5c918adf799fd4c2b2d9369ab90f78031414302 100644 --- a/Code/Learning/otbConfusionMatrixCalculator.h +++ b/Code/Learning/otbConfusionMatrixCalculator.h @@ -34,7 +34,7 @@ namespace otb * \f[ \left( \begin{array}{cc} True positives & False positives \\ False negatives & true Negatives \end{array} \right) \f] * * Please note that when accessing the confusion matrix values, the first index is the row index, and the second is the column index, - * so that accessing the false positive rate is done by calling GetConfusionMatrix()[1,0]. + * so that accessing the false positive rate is done by calling GetConfusionMatrix()[1, 0]. * */ template <class TRefListLabel, class TProdListLabel> diff --git a/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h b/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h index 16557db88a68501a8f608753cea668b7807cca3a..7cbb30a68023dfb3d8be6a88f0b9b7bbff33e553 100644 --- a/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h +++ b/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h @@ -35,7 +35,7 @@ namespace Functor * "Compression d'images et analyse de contenu par quantification vectorielle" * PhD dissertation, University of Rennes I, Rennes, France. May 5th, 1999. * -* The behavior of the radius r (\em ie. \code SizeType \endcode component 0, 1,...) is given by: +* The behavior of the radius r (\em ie. \code SizeType \endcode component 0, 1, ...) is given by: * \f$ r = r_{\textrm{init}} \left( 1 - \frac{t}{t_{\textrm{end}}} \right)^2 \f$ diff --git a/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.h b/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.h index b54f949ea6747736d0e5a24fb0c04700e4bbe38d..7e8ab174c5a3bf8a61189d1f8e8f50621ea914e7 100644 --- a/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.h +++ b/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.h @@ -39,18 +39,18 @@ namespace Statistics { */ template < class TInputSampleList, class TOutputSampleList = TInputSampleList > class ITK_EXPORT GaussianAdditiveNoiseSampleListFilter : - public otb::Statistics::ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> + public otb::Statistics::ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> { public: /** Standard class typedefs */ typedef GaussianAdditiveNoiseSampleListFilter Self; typedef otb::Statistics::ListSampleToListSampleFilter - <TInputSampleList,TOutputSampleList> Superclass; + <TInputSampleList, TOutputSampleList> Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(GaussianAdditiveNoiseSampleListFilter,otb::Statistics::ListSampleToListSampleFilter); + itkTypeMacro(GaussianAdditiveNoiseSampleListFilter, otb::Statistics::ListSampleToListSampleFilter); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -73,16 +73,16 @@ public: typedef typename Superclass::OutputSampleListObjectType OutputSampleListObjectType; /** Set/Get the Shifts for this sample list */ - itkSetMacro(Mean,double); - itkGetMacro(Mean,double); + itkSetMacro(Mean, double); + itkGetMacro(Mean, double); /** Set/Get the Scales for this sample list */ - itkSetMacro(Variance,double); - itkGetMacro(Variance,double); + itkSetMacro(Variance, double); + itkGetMacro(Variance, double); /** Set how many times the ListSample must be noised */ - itkSetMacro(NumberOfIteration,unsigned int); - itkGetMacro(NumberOfIteration,unsigned int); + itkSetMacro(NumberOfIteration, unsigned int); + itkGetMacro(NumberOfIteration, unsigned int); protected: /** This method causes the filter to generate its output. */ diff --git a/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.txx b/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.txx index 45aaffcf2eb42ad961cd8425f28a9fcef29800cd..9cffcc89ef4da90756a140e7fbf03d356fa7bfb0 100644 --- a/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.txx +++ b/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.txx @@ -26,7 +26,7 @@ namespace otb { namespace Statistics { template < class TInputSampleList, class TOutputSampleList > -GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> +GaussianAdditiveNoiseSampleListFilter<TInputSampleList, TOutputSampleList> ::GaussianAdditiveNoiseSampleListFilter() { m_Mean = 0.; @@ -36,7 +36,7 @@ GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> template < class TInputSampleList, class TOutputSampleList > void -GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> +GaussianAdditiveNoiseSampleListFilter<TInputSampleList, TOutputSampleList> ::GenerateRandomSequence() { typedef itk::Statistics::MersenneTwisterRandomVariateGenerator GeneratorType; @@ -54,14 +54,14 @@ GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> else for(unsigned int i = 0; i <size; i++) { - double ran = generator->GetNormalVariate(m_Mean,m_Variance); + double ran = generator->GetNormalVariate(m_Mean, m_Variance); m_WhiteGaussianNoiseCoefficients.push_back(ran); } } template < class TInputSampleList, class TOutputSampleList > void -GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> +GaussianAdditiveNoiseSampleListFilter<TInputSampleList, TOutputSampleList> ::GenerateData() { // Retrieve input and output pointers @@ -76,7 +76,7 @@ GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> outputSampleListPtr->Clear(); // Set-up progress reporting - itk::ProgressReporter progress(this,0,inputSampleListPtr->Size()*m_NumberOfIteration); + itk::ProgressReporter progress(this, 0, inputSampleListPtr->Size()*m_NumberOfIteration); // Iterate m_NumberOfIteration-times the noising process for (unsigned int currIteration = 0; currIteration< m_NumberOfIteration; currIteration++) @@ -97,7 +97,7 @@ GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> currentOutputMeasurement.SetSize(currentInputMeasurement.GetSize()); // Add the white noise to each component of the sample - for(unsigned int idx = 0;idx < inputSampleListPtr->GetMeasurementVectorSize();++idx) + for(unsigned int idx = 0; idx < inputSampleListPtr->GetMeasurementVectorSize(); ++idx) { currentOutputMeasurement[idx] = static_cast<OutputValueType>( (static_cast<double>(currentInputMeasurement[idx])+m_WhiteGaussianNoiseCoefficients[idx])); @@ -116,11 +116,11 @@ GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> template < class TInputSampleList, class TOutputSampleList > void -GaussianAdditiveNoiseSampleListFilter<TInputSampleList,TOutputSampleList> +GaussianAdditiveNoiseSampleListFilter<TInputSampleList, TOutputSampleList> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } } // End namespace Statistics diff --git a/Code/Learning/otbListSampleGenerator.txx b/Code/Learning/otbListSampleGenerator.txx index f534db151dcca6c412e7235ddb4f31a7d89294e7..74a62fdcf4b1c74523de911e85989f6260eb8eef 100644 --- a/Code/Learning/otbListSampleGenerator.txx +++ b/Code/Learning/otbListSampleGenerator.txx @@ -93,8 +93,8 @@ ListSampleGenerator<TImage, TVectorData> * */ //template < class TImage, class TVectorData > -//typename ListSampleGenerator<TImage,TVectorData>::DataObjectPointer -//ListSampleGenerator<TImage,TVectorData> +//typename ListSampleGenerator<TImage, TVectorData>::DataObjectPointer +//ListSampleGenerator<TImage, TVectorData> //::MakeOutput(unsigned int itkNotUsed(idx)) //{ // typename ListSampleType::Pointer listSample = ListSampleType::New(); diff --git a/Code/Learning/otbListSampleSource.h b/Code/Learning/otbListSampleSource.h index 705b58add1e58f4265ab0aed565b9caac3f5b9bd..caa9a7c81891d04d722eab6851585f5e3688be96 100644 --- a/Code/Learning/otbListSampleSource.h +++ b/Code/Learning/otbListSampleSource.h @@ -46,7 +46,7 @@ public: typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(ListSampleSource,itk::ProcessObject); + itkTypeMacro(ListSampleSource, itk::ProcessObject); /** Method for creation through the object factory. */ itkNewMacro(Self); diff --git a/Code/Learning/otbListSampleSource.txx b/Code/Learning/otbListSampleSource.txx index 784955efe1527464f74760a51859d80670b4c5a1..12ce6b28bb30eb9e39fe78e72fccb8f0a3406634 100644 --- a/Code/Learning/otbListSampleSource.txx +++ b/Code/Learning/otbListSampleSource.txx @@ -24,7 +24,7 @@ namespace otb { namespace Statistics { template < class TInputSampleList, class TOutputSampleList > -ListSampleSource<TInputSampleList,TOutputSampleList> +ListSampleSource<TInputSampleList, TOutputSampleList> ::ListSampleSource() { this->SetNumberOfRequiredOutputs(1); @@ -36,9 +36,9 @@ ListSampleSource<TInputSampleList,TOutputSampleList> } template < class TInputSampleList, class TOutputSampleList > -typename ListSampleSource<TInputSampleList,TOutputSampleList> +typename ListSampleSource<TInputSampleList, TOutputSampleList> ::DataObjectPointer -ListSampleSource<TInputSampleList,TOutputSampleList> +ListSampleSource<TInputSampleList, TOutputSampleList> ::MakeOutput(unsigned int itkNotUsed(idx)) { typename OutputSampleListObjectType::Pointer outputPtr = OutputSampleListObjectType::New(); @@ -48,9 +48,9 @@ ListSampleSource<TInputSampleList,TOutputSampleList> } template < class TInputSampleList, class TOutputSampleList > -typename ListSampleSource<TInputSampleList,TOutputSampleList> +typename ListSampleSource<TInputSampleList, TOutputSampleList> ::OutputSampleListType * -ListSampleSource<TInputSampleList,TOutputSampleList> +ListSampleSource<TInputSampleList, TOutputSampleList> ::GetOutputSampleList() { typename OutputSampleListObjectType::Pointer dataObjectPointer = static_cast<OutputSampleListObjectType * > @@ -59,9 +59,9 @@ ListSampleSource<TInputSampleList,TOutputSampleList> } template < class TInputSampleList, class TOutputSampleList > -typename ListSampleSource<TInputSampleList,TOutputSampleList> +typename ListSampleSource<TInputSampleList, TOutputSampleList> ::OutputSampleListObjectType * -ListSampleSource<TInputSampleList,TOutputSampleList> +ListSampleSource<TInputSampleList, TOutputSampleList> ::GetOutput() { return static_cast<OutputSampleListObjectType * > @@ -70,11 +70,11 @@ ListSampleSource<TInputSampleList,TOutputSampleList> template < class TInputSampleList, class TOutputSampleList > void -ListSampleSource<TInputSampleList,TOutputSampleList> +ListSampleSource<TInputSampleList, TOutputSampleList> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } } // End namespace Statistics diff --git a/Code/Learning/otbListSampleToBalancedListSampleFilter.h b/Code/Learning/otbListSampleToBalancedListSampleFilter.h index 0f4d5441f11292813806d34ce4f2e69e054edb9a..f7ff83fd1912e047466805fd0beab3dd41d578b2 100644 --- a/Code/Learning/otbListSampleToBalancedListSampleFilter.h +++ b/Code/Learning/otbListSampleToBalancedListSampleFilter.h @@ -49,12 +49,12 @@ public: /** Standard class typedefs */ typedef ListSampleToBalancedListSampleFilter Self; typedef otb::Statistics::ListSampleToListSampleFilter - <TInputSampleList,TOutputSampleList> Superclass; + <TInputSampleList, TOutputSampleList> Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(ListSampleToBalancedListSampleFilter,otb::Statistics::ListSampleToListSampleFilter); + itkTypeMacro(ListSampleToBalancedListSampleFilter, otb::Statistics::ListSampleToListSampleFilter); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -90,7 +90,7 @@ public: /** Filter adding noise to a ListSample */ typedef otb::Statistics::GaussianAdditiveNoiseSampleListFilter - <InputSampleListType,OutputSampleListType> GaussianAdditiveNoiseType; + <InputSampleListType, OutputSampleListType> GaussianAdditiveNoiseType; typedef typename GaussianAdditiveNoiseType::Pointer GaussianAdditiveNoisePointerType; /** Get/Set the label sample list */ @@ -110,19 +110,19 @@ public: LabelSampleListObjectType * GetOutputLabel(); /** Set/Get the mean for the white gaussian noise to generate */ - otbSetObjectMemberMacro(AddGaussianNoiseFilter,Mean,double); - otbGetObjectMemberConstMacro(AddGaussianNoiseFilter,Mean,double); + otbSetObjectMemberMacro(AddGaussianNoiseFilter, Mean, double); + otbGetObjectMemberConstMacro(AddGaussianNoiseFilter, Mean, double); /** Set/Get the variance for the white gaussian noise to generate */ - otbSetObjectMemberMacro(AddGaussianNoiseFilter,Variance,double); - otbGetObjectMemberConstMacro(AddGaussianNoiseFilter,Variance,double); + otbSetObjectMemberMacro(AddGaussianNoiseFilter, Variance, double); + otbGetObjectMemberConstMacro(AddGaussianNoiseFilter, Variance, double); /** Set/Get the multiplicative factor : this value is used to * determine the maximum number of samples in each label in order * to reach a balanced output ListSample */ - itkSetMacro(BalancingFactor,unsigned int); - itkGetMacro(BalancingFactor,unsigned int); + itkSetMacro(BalancingFactor, unsigned int); + itkGetMacro(BalancingFactor, unsigned int); protected: /** This method causes the filter to generate its output. */ diff --git a/Code/Learning/otbListSampleToBalancedListSampleFilter.txx b/Code/Learning/otbListSampleToBalancedListSampleFilter.txx index a552ef5392fbdfb98b2f86cb9e7cbe4afd536e34..fd81a66f7aa60c2a23b2ee77394ab36176cebc8d 100644 --- a/Code/Learning/otbListSampleToBalancedListSampleFilter.txx +++ b/Code/Learning/otbListSampleToBalancedListSampleFilter.txx @@ -28,7 +28,7 @@ namespace Statistics { // constructor template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::ListSampleToBalancedListSampleFilter() { this->SetNumberOfRequiredInputs(2); @@ -43,9 +43,9 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa } template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > -typename ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +typename ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::DataObjectPointer -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::MakeOutput(unsigned int idx) { DataObjectPointer output; @@ -71,7 +71,7 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa // Method to set the SampleList template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > void -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::SetInputLabel( const LabelSampleListType * label ) { typename LabelSampleListObjectType::Pointer labelPtr = LabelSampleListObjectType::New(); @@ -82,7 +82,7 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa // Method to set the SampleList as DataObject template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > void -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::SetInputLabel( const LabelSampleListObjectType * labelPtr ) { // Process object is not const-correct so the const_cast is required here @@ -92,9 +92,9 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa // Method to get the SampleList as DataObject template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > -const typename ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +const typename ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::LabelSampleListObjectType * -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::GetInputLabel() const { if (this->GetNumberOfInputs() < 2) @@ -108,9 +108,9 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa // Method to get the SampleList template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > -const typename ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +const typename ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::LabelSampleListType * -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::GetLabelSampleList() const { if (this->GetNumberOfInputs() < 2) @@ -125,9 +125,9 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa // Get the output label SampleList template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > -typename ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +typename ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::LabelSampleListType * -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::GetOutputLabelSampleList() { return const_cast<LabelSampleListType*>(this->GetOutputLabel()->Get()); @@ -135,9 +135,9 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa // Get the output label SampleList as DataObject template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > -typename ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +typename ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::LabelSampleListObjectType * -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::GetOutputLabel() { return dynamic_cast<LabelSampleListObjectType*>(this->itk::ProcessObject::GetOutput(1)); @@ -147,7 +147,7 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa // Get the max sample number having the same label template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > void -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::ComputeMaxSampleFrequency() { // Iterate on the labelSampleList to get the min and max label @@ -221,7 +221,7 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > void -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::GenerateData() { // Get the how much each sample must be expanded @@ -248,7 +248,7 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa typename LabelSampleListType::ConstIterator labelIt = labelSampleListPtr->Begin(); // Set-up progress reporting - itk::ProgressReporter progress(this,0,inputSampleListPtr->Size()); + itk::ProgressReporter progress(this, 0, inputSampleListPtr->Size()); // Iterate on the InputSampleList while(inputIt != inputSampleListPtr->End() && labelIt != labelSampleListPtr->End()) @@ -278,7 +278,7 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa currentOutputMeasurement.SetSize(currentInputMeasurement.GetSize()); // Cast the current sample in outputSampleValue - for(unsigned int idx = 0;idx < inputSampleListPtr->GetMeasurementVectorSize();++idx) + for(unsigned int idx = 0; idx < inputSampleListPtr->GetMeasurementVectorSize(); ++idx) currentOutputMeasurement[idx] = static_cast<OutputValueType>(currentInputMeasurement[idx]); // Add the current input casted sample to the output SampleList @@ -313,11 +313,11 @@ ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSa template < class TInputSampleList, class TLabelSampleList, class TOutputSampleList > void -ListSampleToBalancedListSampleFilter<TInputSampleList,TLabelSampleList,TOutputSampleList> +ListSampleToBalancedListSampleFilter<TInputSampleList, TLabelSampleList, TOutputSampleList> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } } // End namespace Statistics diff --git a/Code/Learning/otbListSampleToListSampleFilter.h b/Code/Learning/otbListSampleToListSampleFilter.h index 3a65f90f4809672c36e5c8a8fa3a3ad75c7830ea..f885d7f527c57d6e9f22e6624736b8c738e0f0ba 100644 --- a/Code/Learning/otbListSampleToListSampleFilter.h +++ b/Code/Learning/otbListSampleToListSampleFilter.h @@ -44,7 +44,7 @@ public: typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(ListSampleToListSampleFilter,ListSampleSource); + itkTypeMacro(ListSampleToListSampleFilter, ListSampleSource); /** Method for creation through the object factory. */ itkNewMacro(Self); diff --git a/Code/Learning/otbListSampleToListSampleFilter.txx b/Code/Learning/otbListSampleToListSampleFilter.txx index 619c9ed2ccf9745854fd834f6d1d26a8e97bb491..86c4d6d17a7092806081253d8e0c217f45e6c2e6 100644 --- a/Code/Learning/otbListSampleToListSampleFilter.txx +++ b/Code/Learning/otbListSampleToListSampleFilter.txx @@ -25,7 +25,7 @@ namespace otb { namespace Statistics { template < class TInputSampleList, class TOutputSampleList > -ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::ListSampleToListSampleFilter() { this->SetNumberOfRequiredInputs(1); @@ -33,7 +33,7 @@ ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> template < class TInputSampleList, class TOutputSampleList > void -ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::SetInput( const InputSampleListType * input ) { typename InputSampleListObjectType::Pointer inputPtr = InputSampleListObjectType::New(); @@ -43,7 +43,7 @@ ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> template < class TInputSampleList, class TOutputSampleList > void -ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::SetInput( const InputSampleListObjectType * inputPtr ) { // Process object is not const-correct so the const_cast is required here @@ -52,9 +52,9 @@ ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> } template < class TInputSampleList, class TOutputSampleList > -const typename ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +const typename ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::InputSampleListObjectType * -ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::GetInput() const { if (this->GetNumberOfInputs() < 1) @@ -67,9 +67,9 @@ ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> } template < class TInputSampleList, class TOutputSampleList > -const typename ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +const typename ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::InputSampleListType * -ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::GetInputSampleList() const { if (this->GetNumberOfInputs() < 1) @@ -84,11 +84,11 @@ ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> template < class TInputSampleList, class TOutputSampleList > void -ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> +ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } } // End namespace Statistics diff --git a/Code/Learning/otbMixturePolyRBFKernelFunctor.h b/Code/Learning/otbMixturePolyRBFKernelFunctor.h index 38a1287048ac9fee762ef6eee7669010f43fb3fe..c72ca73491e12bf61100be4cc07a81c219f5c081 100644 --- a/Code/Learning/otbMixturePolyRBFKernelFunctor.h +++ b/Code/Learning/otbMixturePolyRBFKernelFunctor.h @@ -28,10 +28,10 @@ namespace otb /** \class MixturePolyRBFKernelFunctor * \brief Mixture of kernels. * - * Performs the mixture of kind: \f$ \mu k_1(x,y) + (1-\mu) k_2(x,y) \f$ - * with \f$ k_1(x,y)=\left( \gamma_1 x\cdot y + c_0 \right) ^d \f$ a + * Performs the mixture of kind: \f$ \mu k_1(x, y) + (1-\mu) k_2(x, y) \f$ + * with \f$ k_1(x, y)=\left( \gamma_1 x\cdot y + c_0 \right) ^d \f$ a * polynomial kernel and - * \f$ k_2(x,y) = \exp\left( - \gamma_2 \| x-y\-^2 \right) \f$ an RBF one. + * \f$ k_2(x, y) = \exp\left( - \gamma_2 \| x-y\-^2 \right) \f$ an RBF one. * * Variable to be instanciated (through \code SetValue \endcode) are: * Mixture (def=0.5), GammaPoly (def=1.0), CoefPoly (def=1.0), diff --git a/Code/Learning/otbSOMMap.h b/Code/Learning/otbSOMMap.h index 211b6fb57493c866e9bf1ef4e2448cb717f8cb85..4e067ba24df19aba8c1ef75e95acf0b3139b52ec 100644 --- a/Code/Learning/otbSOMMap.h +++ b/Code/Learning/otbSOMMap.h @@ -63,7 +63,7 @@ public: /** * There is no runtime informations macro since * this class has to be considered to as a simple VectorImage - * // itkTypeMacro(SOMMap,VectorImage); + * // itkTypeMacro(SOMMap, VectorImage); * */ /** Template parameters related typedefs */ diff --git a/Code/Learning/otbSVMMarginSampler.h b/Code/Learning/otbSVMMarginSampler.h index e57df1e9675efea856bafaf7a7cb0849b7b23a2e..da9b57394a6cea4ffb9e3b446576a4b5699c34df 100644 --- a/Code/Learning/otbSVMMarginSampler.h +++ b/Code/Learning/otbSVMMarginSampler.h @@ -50,7 +50,7 @@ public: /** typedefs from TSample object */ typedef typename TSample::MeasurementType MeasurementType; typedef typename TSample::MeasurementVectorType MeasurementVectorType; - typedef std::pair<unsigned int,double> IndexAndDistanceType; + typedef std::pair<unsigned int, double> IndexAndDistanceType; typedef std::vector<IndexAndDistanceType> IndexAndDistanceVectorType; typedef std::vector<unsigned int> IndexVectorType; @@ -75,11 +75,11 @@ public: typedef typename SVMModelType::Pointer SVMModelPointer; typedef typename SVMModelType::DistancesVectorType DistancesVectorType; - itkSetMacro(NumberOfCandidates,unsigned int); - itkGetMacro(NumberOfCandidates,unsigned int); + itkSetMacro(NumberOfCandidates, unsigned int); + itkGetMacro(NumberOfCandidates, unsigned int); /** Set the model */ - itkSetObjectMacro(Model,SVMModelType); + itkSetObjectMacro(Model, SVMModelType); /** Get the number of classes. */ itkGetObjectMacro(Model, SVMModelType); diff --git a/Code/Learning/otbSVMMarginSampler.txx b/Code/Learning/otbSVMMarginSampler.txx index 66d8a1a08a194732c54a460f661fc127d2e49706..167f561ab0bf7c468810c373a9f285e50833c2f0 100644 --- a/Code/Learning/otbSVMMarginSampler.txx +++ b/Code/Learning/otbSVMMarginSampler.txx @@ -37,7 +37,7 @@ void SVMMarginSampler< TSample, TModel > ::PrintSelf(std::ostream& os, itk::Indent indent) const { - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } template< class TSample, class TModel > @@ -125,7 +125,7 @@ SVMMarginSampler< TSample, TModel > double minDistance = vcl_abs(hdistances[0]); // Compute th min distances - for(unsigned int i = 1; i<hdistances.Size();++i) + for(unsigned int i = 1; i<hdistances.Size(); ++i) { if(vcl_abs(hdistances[i])<minDistance) { @@ -133,7 +133,7 @@ SVMMarginSampler< TSample, TModel > } } // Keep index and min distance - IndexAndDistanceType value(iter.GetInstanceIdentifier(),minDistance); + IndexAndDistanceType value(iter.GetInstanceIdentifier(), minDistance); idDistVector.push_back(value); ++iter; @@ -141,7 +141,7 @@ SVMMarginSampler< TSample, TModel > } // Sort index by increasing distances - sort(idDistVector.begin(),idDistVector.end(),&Compare); + sort(idDistVector.begin(), idDistVector.end(), &Compare); // Display the first 10 values std::cout <<" Margin Sampling: "<<std::endl; @@ -149,7 +149,7 @@ SVMMarginSampler< TSample, TModel > // Clear previous margin samples m_MarginSamples.clear(); - for(unsigned int i = 0;i<m_NumberOfCandidates && i<idDistVector.size();++i) + for(unsigned int i = 0; i<m_NumberOfCandidates && i<idDistVector.size(); ++i) { std::cout<<"Sample "<<idDistVector[i].first<<" (distance= "<<idDistVector[i].second<<")"<<std::endl; m_MarginSamples.push_back(idDistVector[i].first); diff --git a/Code/Learning/otbSVMModel.txx b/Code/Learning/otbSVMModel.txx index 56f3a8790b6efc2edc105027e994aca8230ac78f..20d09342d204c01ca326ddfc3799918aacd87a97 100644 --- a/Code/Learning/otbSVMModel.txx +++ b/Code/Learning/otbSVMModel.txx @@ -366,7 +366,7 @@ SVMModel<TValue, TLabel>::EvaluateLabel(const MeasurementType& measure) const { otbMsgDevMacro( << - "Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma=" + "Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma), sigma=" << svm_get_svr_probability(m_Model)); } else diff --git a/Code/Learning/otbShiftScaleSampleListFilter.h b/Code/Learning/otbShiftScaleSampleListFilter.h index ed8386f0175e9a0bb52db6025fc343c0de6fe205..7cd28df8915523938058f7a6620e4b9516095d60 100644 --- a/Code/Learning/otbShiftScaleSampleListFilter.h +++ b/Code/Learning/otbShiftScaleSampleListFilter.h @@ -39,18 +39,18 @@ namespace Statistics { */ template < class TInputSampleList, class TOutputSampleList = TInputSampleList > class ITK_EXPORT ShiftScaleSampleListFilter : - public otb::Statistics::ListSampleToListSampleFilter<TInputSampleList,TOutputSampleList> + public otb::Statistics::ListSampleToListSampleFilter<TInputSampleList, TOutputSampleList> { public: /** Standard class typedefs */ typedef ShiftScaleSampleListFilter Self; typedef otb::Statistics::ListSampleToListSampleFilter - <TInputSampleList,TOutputSampleList> Superclass; + <TInputSampleList, TOutputSampleList> Superclass; typedef itk::SmartPointer< Self > Pointer; typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(ShiftScaleSampleListFilter,otb::Statistics::ListSampleToListSampleFilter); + itkTypeMacro(ShiftScaleSampleListFilter, otb::Statistics::ListSampleToListSampleFilter); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -73,12 +73,12 @@ public: typedef typename Superclass::OutputSampleListObjectType OutputSampleListObjectType; /** Set/Get the Shifts for this sample list */ - itkSetMacro(Shifts,InputMeasurementVectorType); - itkGetMacro(Shifts,InputMeasurementVectorType); + itkSetMacro(Shifts, InputMeasurementVectorType); + itkGetMacro(Shifts, InputMeasurementVectorType); /** Set/Get the Scales for this sample list */ - itkSetMacro(Scales,InputMeasurementVectorType); - itkGetMacro(Scales,InputMeasurementVectorType); + itkSetMacro(Scales, InputMeasurementVectorType); + itkGetMacro(Scales, InputMeasurementVectorType); protected: /** This method causes the filter to generate its output. */ diff --git a/Code/Learning/otbShiftScaleSampleListFilter.txx b/Code/Learning/otbShiftScaleSampleListFilter.txx index 5b123276cd93534dc4b75e5b96262c3f63705960..f3d4a13e9cfe2ee7b07487280f9b5a7bdcf748a5 100644 --- a/Code/Learning/otbShiftScaleSampleListFilter.txx +++ b/Code/Learning/otbShiftScaleSampleListFilter.txx @@ -25,12 +25,12 @@ namespace otb { namespace Statistics { template < class TInputSampleList, class TOutputSampleList > -ShiftScaleSampleListFilter<TInputSampleList,TOutputSampleList> +ShiftScaleSampleListFilter<TInputSampleList, TOutputSampleList> ::ShiftScaleSampleListFilter(){} template < class TInputSampleList, class TOutputSampleList > void -ShiftScaleSampleListFilter<TInputSampleList,TOutputSampleList> +ShiftScaleSampleListFilter<TInputSampleList, TOutputSampleList> ::GenerateData() { // Retrieve input and output pointers @@ -58,7 +58,7 @@ ShiftScaleSampleListFilter<TInputSampleList,TOutputSampleList> // Compute the 1/(sigma) vector InputMeasurementVectorType invertedScales = m_Scales; - for(unsigned int idx = 0;idx < invertedScales.Size();++idx) + for(unsigned int idx = 0; idx < invertedScales.Size(); ++idx) { if(m_Scales[idx]-1e-10 < 0.) invertedScales[idx] = 0.; @@ -72,7 +72,7 @@ ShiftScaleSampleListFilter<TInputSampleList,TOutputSampleList> typename InputSampleListType::ConstIterator inputIt = inputSampleListPtr->Begin(); // Set-up progress reporting - itk::ProgressReporter progress(this,0,inputSampleListPtr->Size()); + itk::ProgressReporter progress(this, 0, inputSampleListPtr->Size()); // Iterate on the InputSampleList while(inputIt != inputSampleListPtr->End()) @@ -85,7 +85,7 @@ ShiftScaleSampleListFilter<TInputSampleList,TOutputSampleList> currentOutputMeasurement.SetSize(currentInputMeasurement.GetSize()); // Center and reduce each component - for(unsigned int idx = 0;idx < invertedScales.Size();++idx) + for(unsigned int idx = 0; idx < invertedScales.Size(); ++idx) { currentOutputMeasurement[idx] = static_cast<OutputValueType>( (currentInputMeasurement[idx]-m_Shifts[idx])*invertedScales[idx]); @@ -103,11 +103,11 @@ ShiftScaleSampleListFilter<TInputSampleList,TOutputSampleList> template < class TInputSampleList, class TOutputSampleList > void -ShiftScaleSampleListFilter<TInputSampleList,TOutputSampleList> +ShiftScaleSampleListFilter<TInputSampleList, TOutputSampleList> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } } // End namespace Statistics diff --git a/Code/Learning/otbSpectralAngleKernelFunctor.h b/Code/Learning/otbSpectralAngleKernelFunctor.h index ea31df6c403cfeaae418ab8ced3251b0cf4c2269..c4ffafcecd6b0b536e3e8e2f940082f2d8c6e605 100644 --- a/Code/Learning/otbSpectralAngleKernelFunctor.h +++ b/Code/Learning/otbSpectralAngleKernelFunctor.h @@ -33,9 +33,9 @@ namespace otb * * It is of kind: * - * \f$ frac{1}{\sqrt{ c_0 + \cos\textrm{SAM(x,y)} }} \f$ where \f$ \textrm{SAM(x,y)} \f$ is + * \f$ frac{1}{\sqrt{ c_0 + \cos\textrm{SAM(x, y)} }} \f$ where \f$ \textrm{SAM(x, y)} \f$ is * Spectral Angle Measure: - * \f$ \textrm{SAM}(x,y) = \cos^{-1}\left( \frac{x \cdot y}{\|x\| \|y\|} \right) \f$. + * \f$ \textrm{SAM}(x, y) = \cos^{-1}\left( \frac{x \cdot y}{\|x\| \|y\|} \right) \f$. * * The only parameter \f$ c_0 \f$ is to be fixed by the \code SetValue \endcode * interface with keyword Coef (def 2.0). diff --git a/Code/Markov/otbMRFEnergyEdgeFidelity.h b/Code/Markov/otbMRFEnergyEdgeFidelity.h index b8e73174929a08004f6080357d2590eeb5c57163..63fb2c94d14d927ebd2807719170c23f947f17e3 100644 --- a/Code/Markov/otbMRFEnergyEdgeFidelity.h +++ b/Code/Markov/otbMRFEnergyEdgeFidelity.h @@ -29,7 +29,7 @@ namespace otb * * This is the implementation of an edge fidelity model for Markov denoising, to be used for * regularization. Energy is: - * \f[ \sum_{t \in \mathcal{V}_s} U(x_s,x_t) = \Phi(x_s-x_t) \f] + * \f[ \sum_{t \in \mathcal{V}_s} U(x_s, x_t) = \Phi(x_s-x_t) \f] * with * - \f$ x_s \f$ the label on site s * - \f$ x_t \f$ the label on site t, a neighbor of s diff --git a/Code/Markov/otbMRFEnergyGaussian.h b/Code/Markov/otbMRFEnergyGaussian.h index 2e50d26c849bdf70c93235c1ca18304be42e088f..edf854a12e53551fd45a489aa7a61aca4f919da5 100644 --- a/Code/Markov/otbMRFEnergyGaussian.h +++ b/Code/Markov/otbMRFEnergyGaussian.h @@ -32,7 +32,7 @@ namespace otb * This is the implementation of the Gaussian model for Markov classification, * to be used for data fidelity. Energy is: * - * \f[ U(x_s,x_t) = (x_s-x_t)^2 \f] + * \f[ U(x_s, x_t) = (x_s-x_t)^2 \f] * * with * - \f$ x_s \f$ the label on site s diff --git a/Code/Markov/otbMRFEnergyPotts.h b/Code/Markov/otbMRFEnergyPotts.h index f675ec4041f28714c3c3d97c0a9ff51d5bfe7f80..c6fdc3a847a9293b9440f1730a354a49da0a103a 100644 --- a/Code/Markov/otbMRFEnergyPotts.h +++ b/Code/Markov/otbMRFEnergyPotts.h @@ -29,8 +29,8 @@ namespace otb * * This is the implementation of the Potts model for Markov classification, to be used for * regularization. Energy is: - * \f[ U(x_s,x_t) = -\beta \textrm{ if } x_s = x_t \f] - * \f[ U(x_s,x_t) = +\beta \textrm{ if } x_s \neq x_t \f] + * \f[ U(x_s, x_t) = -\beta \textrm{ if } x_s = x_t \f] + * \f[ U(x_s, x_t) = +\beta \textrm{ if } x_s \neq x_t \f] * with * - \f$ x_s \f$ the label on site s * - \f$ y_s \f$ the value on the reference image diff --git a/Code/Markov/otbMarkovRandomFieldFilter.txx b/Code/Markov/otbMarkovRandomFieldFilter.txx index 79463595ab4ec489785cd3c6a17f838fb8356ca7..950b6abbd917a20983738a2fee5d745b4f6ae19d 100644 --- a/Code/Markov/otbMarkovRandomFieldFilter.txx +++ b/Code/Markov/otbMarkovRandomFieldFilter.txx @@ -356,7 +356,7 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage> { //Note: error should be defined according to the number of valid pixel in the output - int maxNumPixelError = itk::Math::Round<int,double> (m_ErrorTolerance * + int maxNumPixelError = itk::Math::Round<int, double> (m_ErrorTolerance * m_TotalNumberOfPixelsInInputImage); m_NumberOfIterations = 0; diff --git a/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h b/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h index fdf862a5fd9934d6b509cd90b92a588f8fa3bd89..c482d1add66990cf0254a74338c073852d86f570 100644 --- a/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h +++ b/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h @@ -40,7 +40,7 @@ namespace otb * the convex membership function, \f$ \stackrel{\frown}{\mu}_{N}(f) \f$ denote the concave * membership function and \f$\psi_{N}(f)\f$ denote the leveling function, for a given radius \f$ N \f$ * as defined in the documentation of the GeodesicMorphologyDecompositionImageFilter . - * Let \f$[N_{1},\ldots,N_{n}]\f$ denote a range of increasing radius (or scales). The iterative + * Let \f$[N_{1},\ldots, N_{n}]\f$ denote a range of increasing radius (or scales). The iterative * decomposition is defined as follows: * * \f[ diff --git a/Code/MultiScale/otbImageToProfileFilter.h b/Code/MultiScale/otbImageToProfileFilter.h index d3ba48a41baca09e0bf7b47ef6b3b0e8f03cae1f..0eb1a0c9297190e48814486530fbb465cb0439da 100644 --- a/Code/MultiScale/otbImageToProfileFilter.h +++ b/Code/MultiScale/otbImageToProfileFilter.h @@ -28,10 +28,10 @@ namespace otb * Let \f$ f \f$ denote an image, and \f$ \phi_{N}\f$ an image operator with the parameter \f$ N \f$ . * A profile \f$ \Pi_{\phi}(f)\f$ of \f$ f \f$ by \f$ \phi \f$ is defined as follows: * \f[ - * \Pi_{\phi}(f)= \{\phi_{n}(f), n \in \{n_{1},\ldots,n_{N}\} \} + * \Pi_{\phi}(f)= \{\phi_{n}(f), n \in \{n_{1},\ldots, n_{N}\} \} * \f] * - * with \f$ \{n_{1},\ldots,n_{N}\} \f$ beeing a range of parameter. This class is a base class templated + * with \f$ \{n_{1},\ldots, n_{N}\} \f$ beeing a range of parameter. This class is a base class templated * by the type of the filter \f$ \phi \f$. The SetProfileParameter() is a virtual method meant to be * rewritten so that the filter can be correctly set up in sub-classes. * diff --git a/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h b/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h index 98baa11d438b27de2d74394440b226c3b054709c..02eea1d24ed2a73e0bfff52fb471a1b7aac3d08b 100644 --- a/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h +++ b/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h @@ -43,7 +43,7 @@ namespace otb * computing the details lost in the down-sampling. * * \ingroup MultiScale - * \sa MorphologicalPyramidSynthesisFilter,OpeningClosingMorphologicalFilter, + * \sa MorphologicalPyramidSynthesisFilter, OpeningClosingMorphologicalFilter, * ClosingOpeningMorphologicalFilter */ template <class TInputImage, class TOutputImage, class TMorphoFilter> diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h index 1404bebcd44088c91c76b9f00beab63ae3180c03..940c18594a19400e79dc3a44d4ab33e32e6393fb 100644 --- a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h +++ b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h @@ -49,7 +49,7 @@ namespace otb * unless the user has a very good reason to think that a less precise type will be sufficient. * * \ingroup MultiScale - * \sa MorphologicalPyramidSynthesisFilter,OpeningClosingMorphologicalFilter, + * \sa MorphologicalPyramidSynthesisFilter, OpeningClosingMorphologicalFilter, * ClosingOpeningMorphologicalFilter, Segmenter, MRToMSConverter, Resampler */ template <class TInputImage, class TOutputImage> diff --git a/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h b/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h index 959f732e7e8d39fb4ffeb2534acc65ea4bcc99e6..296f92994cf1e38e61daed42bea4504d1aac2f59 100644 --- a/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h +++ b/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h @@ -35,7 +35,7 @@ namespace Functor * NO. 2, February 2001, p. 309-320. * \par * - * Given \f$x_1\f$ and \f$x_2\f$ two membership values, \f$L_1,L_2\f$ two labels associated, + * Given \f$x_1\f$ and \f$x_2\f$ two membership values, \f$L_1, L_2\f$ two labels associated, * and \f$\sigma\f$ a tolerance value, the following decision rule is applied: * * \f[ diff --git a/Code/MultiScale/otbProfileToProfileDerivativeFilter.h b/Code/MultiScale/otbProfileToProfileDerivativeFilter.h index 9961bffe38c5623eded8ea46b2c82702cf73aea6..a65b9d2b5b39597daf4858d3bf17804cc78c89c6 100644 --- a/Code/MultiScale/otbProfileToProfileDerivativeFilter.h +++ b/Code/MultiScale/otbProfileToProfileDerivativeFilter.h @@ -27,11 +27,11 @@ namespace otb /** \class ProfileToProfileDerivativeFilter * \brief This filter computes the derivative of a given profile. * - * For the profile \f$ \Pi_{\phi}(f)= \{\phi_{n}(f), n \in \{n_{1},\ldots,n_{N}\}\}\f$, the + * For the profile \f$ \Pi_{\phi}(f)= \{\phi_{n}(f), n \in \{n_{1},\ldots, n_{N}\}\}\f$, the * profile derivative is defined by: * * \f[ - * \Delta\Pi_{\phi}(f)= \{\Delta\phi_{n}(f), n \in \{n_{1},\ldots,n_{N}\}\} + * \Delta\Pi_{\phi}(f)= \{\Delta\phi_{n}(f), n \in \{n_{1},\ldots, n_{N}\}\} * \f] * * with \f$ \Delta\phi_{n}(f) = \mid \Pi_{\phi_{n2}}(f)-\Pi_{\phi_{n1}}(f) \mid \f$ diff --git a/Code/OBIA/otbAttributesMapLabelObject.h b/Code/OBIA/otbAttributesMapLabelObject.h index b85dd3713eb3f7caa854556886a365a8cf9bfb55..f4f8047aa29acef846dc80f089a1271606dd132c 100644 --- a/Code/OBIA/otbAttributesMapLabelObject.h +++ b/Code/OBIA/otbAttributesMapLabelObject.h @@ -83,7 +83,7 @@ private: * * It Allows to select only a subset of the available attributes. */ -template<class TLabelObject,class TMeasurementVector> +template<class TLabelObject, class TMeasurementVector> class AttributesMapMeasurementFunctor { public: @@ -113,7 +113,7 @@ public: /** Remove an attribute from the exported attributes list */ void RemoveAttribute(const char * attr) { - AttributesListType::iterator elt = std::find(m_Attributes.begin(),m_Attributes.end(),attr); + AttributesListType::iterator elt = std::find(m_Attributes.begin(), m_Attributes.end(), attr); if(elt!=m_Attributes.end()) { m_Attributes.erase(elt); @@ -142,7 +142,7 @@ private: * \brief A LabelObject with a generic attributes map * * This class derives from itk::LabelObject and extends it to - * store pairs of key,value (of type TAttributesValue) in an internal + * store pairs of key, value (of type TAttributesValue) in an internal * map container. * * As such it allows to store any custom attributes as necessary. diff --git a/Code/OBIA/otbAttributesMapLabelObjectWithClassLabel.h b/Code/OBIA/otbAttributesMapLabelObjectWithClassLabel.h index 5ab635c51e6c7a05a809822624dd273c63f80905..ac7472bce1f60f1f0dcbd4c97427801f5bee621f 100644 --- a/Code/OBIA/otbAttributesMapLabelObjectWithClassLabel.h +++ b/Code/OBIA/otbAttributesMapLabelObjectWithClassLabel.h @@ -53,7 +53,7 @@ public: typedef AttributesMapLabelObjectWithClassLabel Self; typedef AttributesMapLabelObject<TLabel, VImageDimension, TAttributesValue> Superclass; - typedef itk::LabelObject<TLabel,VImageDimension> LabelObjectType; + typedef itk::LabelObject<TLabel, VImageDimension> LabelObjectType; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; typedef itk::WeakPointer <const Self> ConstWeakPointer; diff --git a/Code/OBIA/otbImageToLabelMapWithAttributesFilter.h b/Code/OBIA/otbImageToLabelMapWithAttributesFilter.h index 65e25d3f558928708f480f1dc613218619f31dc3..4fb3fd6522842d18e48237b0d9d5a1b3ee14ea5b 100644 --- a/Code/OBIA/otbImageToLabelMapWithAttributesFilter.h +++ b/Code/OBIA/otbImageToLabelMapWithAttributesFilter.h @@ -56,7 +56,7 @@ public: typedef itk::LabelMapFilter< LabelMapWithAdjacency<TLabelObject >, LabelMapWithAdjacency<TLabelObject > > Superclass; /** Standard type macro */ - itkTypeMacro(ImageToLabelMapWithAttributesFilter,itk::LabelMapFilter); + itkTypeMacro(ImageToLabelMapWithAttributesFilter, itk::LabelMapFilter); /** New macro*/ itkNewMacro(Self); @@ -69,9 +69,9 @@ public: typedef LabelMapWithAdjacency<LabelObjectType> LabelMapType; typedef typename LabelMapType::AdjacentLabelsContainerType AdjacentLabelsContainerType; - typedef LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType,LabelMapType> LabelMapFilterType; + typedef LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapType> LabelMapFilterType; typedef ShapeAttributesLabelMapFilter<LabelMapType> ShapeLabelMapFilterType; - typedef BandsStatisticsAttributesLabelMapFilter<LabelMapType,InputImageType> BandStatisticsLabelMapFilterType; + typedef BandsStatisticsAttributesLabelMapFilter<LabelMapType, InputImageType> BandStatisticsLabelMapFilterType; virtual void SetInput( const InputImageType *image); virtual void SetLabeledImage( const LabeledImageType * image); diff --git a/Code/OBIA/otbImageToLabelMapWithAttributesFilter.txx b/Code/OBIA/otbImageToLabelMapWithAttributesFilter.txx index e4c0ed709fe8a044485463cff97f9abf493a682a..f06c511194c768d439d51edffada78abedda682b 100644 --- a/Code/OBIA/otbImageToLabelMapWithAttributesFilter.txx +++ b/Code/OBIA/otbImageToLabelMapWithAttributesFilter.txx @@ -23,7 +23,7 @@ namespace otb { -template <class TInputImage, class TLabeledImage, class TOutputLabel,class TObjectLabel> +template <class TInputImage, class TLabeledImage, class TOutputLabel, class TObjectLabel> ImageToLabelMapWithAttributesFilter<TInputImage, TLabeledImage, TOutputLabel, TObjectLabel> ::ImageToLabelMapWithAttributesFilter() { diff --git a/Code/OBIA/otbKMeansAttributesLabelMapFilter.h b/Code/OBIA/otbKMeansAttributesLabelMapFilter.h index d4453a1fcc1901ce9a824aabde3f486e0b4a6c3d..45ce0866b8ccc145a1a44fe7e0e09b20b6282d5c 100644 --- a/Code/OBIA/otbKMeansAttributesLabelMapFilter.h +++ b/Code/OBIA/otbKMeansAttributesLabelMapFilter.h @@ -57,7 +57,7 @@ public: // LabelMapToSampleList typedef itk::VariableLengthVector<AttributesValueType> VectorType; - typedef itk::FixedArray<ClassLabelType,1> ClassLabelVectorType; + typedef itk::FixedArray<ClassLabelType, 1> ClassLabelVectorType; typedef itk::Statistics::ListSample<VectorType> ListSampleType; typedef itk::Statistics::ListSample<ClassLabelVectorType> TrainingListSampleType; @@ -95,8 +95,8 @@ public: return m_Centroids; } - itkSetObjectMacro(InputLabelMap,InputImageType); - itkGetObjectMacro(InputLabelMap,InputImageType); + itkSetObjectMacro(InputLabelMap, InputImageType); + itkGetObjectMacro(InputLabelMap, InputImageType); /** Set the number of classes of the input sample list. * It will be used to choose the number of centroids. diff --git a/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.h b/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.h index ff180a4cb46000c93111873cfb15338a523aea06..68fdbd142c5bdc73e9cead7e78d61ceaf9079fe0 100644 --- a/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.h +++ b/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.h @@ -100,7 +100,7 @@ protected: // Label unsigned long int label; // Constructor - RLE(const IndexType & w,long unsigned int l, unsigned long int la) + RLE(const IndexType & w, long unsigned int l, unsigned long int la) { where = w; length = l; diff --git a/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.txx b/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.txx index 6b5d4ade17d363b044f5c695d9600adeae286a11..75ed954396a44acd329f05486a9f5f96f8944ee5 100644 --- a/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.txx +++ b/Code/OBIA/otbLabelImageToLabelMapWithAdjacencyFilter.txx @@ -137,7 +137,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> LabelType nextLabel = it->label; // Add the adjacency - this->AddAdjacency(previousLabel,nextLabel,threadId); + this->AddAdjacency(previousLabel, nextLabel, threadId); // Store previous label previousLabel = nextLabel; @@ -154,7 +154,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> long offset = 1; // Iterate on line1 - for(typename RLEVectorType::const_iterator it1 = line1.begin();it1!=line1.end();++it1) + for(typename RLEVectorType::const_iterator it1 = line1.begin(); it1!=line1.end(); ++it1) { // Delimitate RLE1 long start1 = it1->where[0]; @@ -162,7 +162,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> LabelType label1 = it1->label; // Iterate on line2 - for(typename RLEVectorType::const_iterator it2 = line2.begin();it2!=line2.end();++it2) + for(typename RLEVectorType::const_iterator it2 = line2.begin(); it2!=line2.end(); ++it2) { // Delimitate RLE2 long start2 = it2->where[0]; @@ -179,7 +179,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> || ( (end2 +offset >= start1) && (end2 +offset<=end1) )) { // Add the adjacency - this->AddAdjacency(label1,label2,threadId); + this->AddAdjacency(label1, label2, threadId); } } } @@ -227,7 +227,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> } // create the run length object to go in the vector m_TemporaryImages[threadId]->SetLine( idx, length, v ); - currentLine.push_back(RLE(idx,length,v)); + currentLine.push_back(RLE(idx, length, v)); } else { @@ -236,8 +236,8 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> } } // Parse lines for adjacency - this->ParseLine(currentLine,threadId); - this->ParseConsecutiveLines(previousLine,currentLine,threadId); + this->ParseLine(currentLine, threadId); + this->ParseConsecutiveLines(previousLine, currentLine, threadId); // Store previous line previousLine = currentLine; @@ -284,7 +284,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> AdjacencyMapType adjMap = m_TemporaryAdjacencyMaps[0]; // For each remaining thread - for(int threadId = 1; threadId < this->GetNumberOfThreads();++threadId) + for(int threadId = 1; threadId < this->GetNumberOfThreads(); ++threadId) { // For each label in the thread adjacency map for(typename AdjacencyMapType::const_iterator mit = m_TemporaryAdjacencyMaps[threadId].begin(); @@ -297,7 +297,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> // We need to merge AdjacentLabelsContainerType adjLabels1 = adjMap[mit->first]; AdjacentLabelsContainerType adjLabels2 = mit->second; - std::vector<LabelType> mergedLabels(adjLabels1.size()+adjLabels2.size(),0); + std::vector<LabelType> mergedLabels(adjLabels1.size()+adjLabels2.size(), 0); // Merge typename std::vector<LabelType>::const_iterator vend = set_union(adjLabels1.begin(), adjLabels1.end(), adjLabels2.begin(), adjLabels2.end(), mergedLabels.begin()); @@ -305,7 +305,7 @@ LabelImageToLabelMapWithAdjacencyFilter<TInputImage, TOutputImage> AdjacentLabelsContainerType mergedLabelsSet; for(typename std::vector<LabelType>::const_iterator vit = mergedLabels.begin(); - vit!=vend;++vit) + vit!=vend; ++vit) { mergedLabelsSet.insert(*vit); } diff --git a/Code/OBIA/otbLabelMapToGISTableFilter.txx b/Code/OBIA/otbLabelMapToGISTableFilter.txx index e07656ffb5d148d499e56a78363364a025de849e..8a694c676848832714242b5389ebd2c87ba73a8e 100644 --- a/Code/OBIA/otbLabelMapToGISTableFilter.txx +++ b/Code/OBIA/otbLabelMapToGISTableFilter.txx @@ -88,7 +88,7 @@ LabelMapToGISTableFilter<TLabelMap, TGISTable> InputImagePointer input = const_cast<InputImageType *>(this->GetInput()); if ( !input ) { return; } - input->SetRequestedRegion( input->GetLargestPossibleRegion() );*/ + input->SetRequestedRegion( input->GetLargestPossibleRegion() ); */ } /*Distance: 5.19615 diff --git a/Code/OBIA/otbLabelMapToSampleListFilter.h b/Code/OBIA/otbLabelMapToSampleListFilter.h index b3c705ada5c53f774ec1120bd2e234118aa20044..46b22429174c6facdc71474d3b4ed3421e79d8c0 100644 --- a/Code/OBIA/otbLabelMapToSampleListFilter.h +++ b/Code/OBIA/otbLabelMapToSampleListFilter.h @@ -67,9 +67,9 @@ public: typedef TMeasurementFunctor MeasurementFunctorType; /** Set/Get the input label map */ - itkSetConstObjectMacro(InputLabelMap,InputLabelMapType); - itkGetConstObjectMacro(InputLabelMap,InputLabelMapType); - itkGetObjectMacro(OutputSampleList,OutputSampleListType); + itkSetConstObjectMacro(InputLabelMap, InputLabelMapType); + itkGetConstObjectMacro(InputLabelMap, InputLabelMapType); + itkGetObjectMacro(OutputSampleList, OutputSampleListType); /** Get a hook on the functor for settings */ void SetMeasurementFunctor(const MeasurementFunctorType& functor) diff --git a/Code/OBIA/otbLabelMapToSampleListFilter.txx b/Code/OBIA/otbLabelMapToSampleListFilter.txx index ebe2bb0c9c7d93f15f05fa87536f7b933d34d043..dd9ebdf71a97d07b266f966d9e9994e6d77b028d 100644 --- a/Code/OBIA/otbLabelMapToSampleListFilter.txx +++ b/Code/OBIA/otbLabelMapToSampleListFilter.txx @@ -24,20 +24,20 @@ namespace otb { template <class TInputLabelMap, class TOutputListSample, class TMeasurementFunctor> -LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor> +LabelMapToSampleListFilter<TInputLabelMap, TOutputListSample, TMeasurementFunctor> ::LabelMapToSampleListFilter() { } template <class TInputLabelMap, class TOutputListSample, class TMeasurementFunctor> -LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor> +LabelMapToSampleListFilter<TInputLabelMap, TOutputListSample, TMeasurementFunctor> ::~LabelMapToSampleListFilter() { } template <class TInputLabelMap, class TOutputListSample, class TMeasurementFunctor> void -LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor> +LabelMapToSampleListFilter<TInputLabelMap, TOutputListSample, TMeasurementFunctor> ::Compute() { m_OutputSampleList = OutputSampleListType::New(); @@ -55,10 +55,10 @@ LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor> template <class TInputLabelMap, class TOutputListSample, class TMeasurementFunctor> void -LabelMapToSampleListFilter<TInputLabelMap,TOutputListSample,TMeasurementFunctor> +LabelMapToSampleListFilter<TInputLabelMap, TOutputListSample, TMeasurementFunctor> ::PrintSelf(std::ostream& os, itk::Indent indent) const { - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } } // end namespace otb diff --git a/Code/OBIA/otbLabelMapToVectorDataFilter.txx b/Code/OBIA/otbLabelMapToVectorDataFilter.txx index 71dff41cfe51982bc19d6852efa790ef864d5526..f14fb4fbff68f7fe83764e77249282870f156e3e 100644 --- a/Code/OBIA/otbLabelMapToVectorDataFilter.txx +++ b/Code/OBIA/otbLabelMapToVectorDataFilter.txx @@ -26,7 +26,7 @@ template<class TLabelMap, class TVectorData, class TFieldsFunctor> LabelMapToVectorDataFilter<TLabelMap, TVectorData, TFieldsFunctor> ::LabelMapToVectorDataFilter() { /* - m_BackgroundValue = NumericTraits<OutputImagePixelType>::NonpositiveMin();*/ + m_BackgroundValue = NumericTraits<OutputImagePixelType>::NonpositiveMin(); */ } template<class TLabelMap, class TVectorData, class TFieldsFunctor> diff --git a/Code/OBIA/otbLabelMapWithAdjacency.h b/Code/OBIA/otbLabelMapWithAdjacency.h index 6b3d738e0f249558497a50a4dd7de68c82703b2d..31fd2bb7885938c6a962033c214add6cb16d89ff 100644 --- a/Code/OBIA/otbLabelMapWithAdjacency.h +++ b/Code/OBIA/otbLabelMapWithAdjacency.h @@ -65,13 +65,13 @@ public: typedef std::set<LabelType> AdjacentLabelsContainerType; /** A map containing the set of adjacent labels per label */ - typedef std::map<LabelType,AdjacentLabelsContainerType> AdjacencyMapType; + typedef std::map<LabelType, AdjacentLabelsContainerType> AdjacencyMapType; /** The merging functor */ typedef Functor::MergeLabelObjectFunctor<TLabelObject> MergeFunctorType; /** A pair of labels */ - typedef std::pair<LabelType,LabelType> LabelPairType; + typedef std::pair<LabelType, LabelType> LabelPairType; /** A vector of pair of labels */ typedef std::vector<LabelPairType> LabelPairVectorType; @@ -112,7 +112,7 @@ public: } /** Remove the given adjacent label from the given label */ - void RemoveAdjacentLabel(LabelType label1,LabelType label2) + void RemoveAdjacentLabel(LabelType label1, LabelType label2) { if(m_AdjacencyMap.find(label1)!=m_AdjacencyMap.end()) { @@ -156,14 +156,14 @@ public: // Merges label object MergeFunctorType mergeFunctor; - typename LabelObjectType::Pointer loOut = mergeFunctor(lo1,lo2); + typename LabelObjectType::Pointer loOut = mergeFunctor(lo1, lo2); // Remove label2 from adjancency table of label1 m_AdjacencyMap[label1].erase(label2); m_AdjacencyMap.erase(label2); // Move every occurence of label2 to label1 in adjacency map - for(typename AdjacencyMapType::iterator it = m_AdjacencyMap.begin();it!=m_AdjacencyMap.end();++it) + for(typename AdjacencyMapType::iterator it = m_AdjacencyMap.begin(); it!=m_AdjacencyMap.end(); ++it) { // Check if label2 is in the adjacent labels if(it->second.count(label2)) @@ -190,13 +190,13 @@ public: typename LabelPairVectorType::iterator lpit1, lpit2; - for(lpit1 = internalLabelPairs.begin();lpit1 != internalLabelPairs.end();++lpit1) + for(lpit1 = internalLabelPairs.begin(); lpit1 != internalLabelPairs.end(); ++lpit1) { // Merge the current label pair - this->MergeLabels(lpit1->first,lpit1->second); + this->MergeLabels(lpit1->first, lpit1->second); // Update the remaining label pairs - for(lpit2 = lpit1+1; lpit2 != internalLabelPairs.end();++lpit2) + for(lpit2 = lpit1+1; lpit2 != internalLabelPairs.end(); ++lpit2) { if(lpit2->first == lpit1->second) { @@ -218,7 +218,7 @@ protected: /** Printself */ void PrintSelf(std::ostream& os, itk::Indent indent) const { - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } private: diff --git a/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.h b/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.h index 28a8e1a3314ddb6d320614ba8b86888b3ab28ef5..ed45453c2a5a8622919661c93102ebf4baaa1c00 100644 --- a/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.h +++ b/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.h @@ -34,7 +34,7 @@ namespace otb * \sa otb::SVMSampleListModelEstimator */ -template <class TInputLabelMap, class TOutputSampleList,class TOutputTrainingSampleList, +template <class TInputLabelMap, class TOutputSampleList, class TOutputTrainingSampleList, class TMeasurementFunctor = Functor::AttributesMapMeasurementFunctor <typename TInputLabelMap::LabelObjectType, typename TOutputSampleList::MeasurementVectorType > > class ITK_EXPORT LabelMapWithClassLabelToLabeledSampleListFilter : public itk::Object @@ -73,10 +73,10 @@ public: typedef TMeasurementFunctor MeasurementFunctorType; /** Set/Get the input label map */ - itkSetConstObjectMacro(InputLabelMap,InputLabelMapType); - itkGetConstObjectMacro(InputLabelMap,InputLabelMapType); - itkGetObjectMacro(OutputSampleList,OutputSampleListType); - itkGetObjectMacro(OutputTrainingSampleList,OutputTrainingSampleListType); + itkSetConstObjectMacro(InputLabelMap, InputLabelMapType); + itkGetConstObjectMacro(InputLabelMap, InputLabelMapType); + itkGetObjectMacro(OutputSampleList, OutputSampleListType); + itkGetObjectMacro(OutputTrainingSampleList, OutputTrainingSampleListType); /** Get a hook on the functor for settings */ void SetMeasurementFunctor(const MeasurementFunctorType& functor) diff --git a/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.txx b/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.txx index 2080648fe7f516ce22651016ff4d425f218b3e53..fbabad94ad61f6332c5549e50598432133bd8209 100644 --- a/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.txx +++ b/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.txx @@ -24,19 +24,19 @@ namespace otb { template <class TInputLabelMap, class TOutputListSample, class TOutputTrainingListSample, class TMeasurementFunctor> -LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap,TOutputListSample,TOutputTrainingListSample,TMeasurementFunctor> +LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap, TOutputListSample, TOutputTrainingListSample, TMeasurementFunctor> ::LabelMapWithClassLabelToLabeledSampleListFilter() { } template <class TInputLabelMap, class TOutputListSample, class TOutputTrainingListSample, class TMeasurementFunctor> -LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap,TOutputListSample,TOutputTrainingListSample,TMeasurementFunctor> +LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap, TOutputListSample, TOutputTrainingListSample, TMeasurementFunctor> ::~LabelMapWithClassLabelToLabeledSampleListFilter() {} template <class TInputLabelMap, class TOutputListSample, class TOutputTrainingListSample, class TMeasurementFunctor> void -LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap,TOutputListSample,TOutputTrainingListSample,TMeasurementFunctor> +LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap, TOutputListSample, TOutputTrainingListSample, TMeasurementFunctor> ::Compute() { // Clear output sample list @@ -66,10 +66,10 @@ LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap,TOutputListSample template <class TInputLabelMap, class TOutputListSample, class TOutputTrainingListSample, class TMeasurementFunctor> void -LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap,TOutputListSample,TOutputTrainingListSample,TMeasurementFunctor> +LabelMapWithClassLabelToLabeledSampleListFilter<TInputLabelMap, TOutputListSample, TOutputTrainingListSample, TMeasurementFunctor> ::PrintSelf(std::ostream& os, itk::Indent indent) const { - Superclass::PrintSelf(os,indent); + Superclass::PrintSelf(os, indent); } } // end namespace otb diff --git a/Code/OBIA/otbLabelObjectToPolygonFunctor.h b/Code/OBIA/otbLabelObjectToPolygonFunctor.h index 5f749583ee9872ff50ad830acb88330bdcb441dc..0a508d94e7a8b8e681bfa43d70626e4b65e6282c 100644 --- a/Code/OBIA/otbLabelObjectToPolygonFunctor.h +++ b/Code/OBIA/otbLabelObjectToPolygonFunctor.h @@ -144,7 +144,7 @@ private: /// Compare two line in the lexicographical order static bool LexicographicalLineCompare(const LineType& l1, const LineType& l2); - /// Check if the given run index (index in line,line) is valid + /// Check if the given run index (index in line, line) is valid inline bool IsRunIndexValid(const IndexType& index) const; /// Check if the point lies within the range of the line diff --git a/Code/OBIA/otbMergeLabelObjectFunctor.h b/Code/OBIA/otbMergeLabelObjectFunctor.h index ed2773e1691e4f75f5464a545f10913e7d03e736..71c40356fe236c1574f6fabec99b68bfe4f39678 100644 --- a/Code/OBIA/otbMergeLabelObjectFunctor.h +++ b/Code/OBIA/otbMergeLabelObjectFunctor.h @@ -63,12 +63,12 @@ public: LineContainerType lines2 = l2->GetLineContainer(); // Ensure they are sorted according to our criterion - stable_sort(lines1.begin(),lines1.end(),&LexicographicalLineCompare); - stable_sort(lines2.begin(),lines2.end(),&LexicographicalLineCompare); + stable_sort(lines1.begin(), lines1.end(), &LexicographicalLineCompare); + stable_sort(lines2.begin(), lines2.end(), &LexicographicalLineCompare); // Merge the two containers LineContainerType linesOut1(lines1.size()+lines2.size()); - merge(lines1.begin(),lines1.end(),lines2.begin(),lines2.end(),linesOut1.begin(),&LexicographicalLineCompare); + merge(lines1.begin(), lines1.end(), lines2.begin(), lines2.end(), linesOut1.begin(), &LexicographicalLineCompare); // Merge consecutive and overlapping lines LineContainerType linesOut2; @@ -82,10 +82,10 @@ public: while(lit!=linesOut1.end()) { // Test if next line overlaps with current - if(LinesOverlap(linesOut2.back(),*lit)) + if(LinesOverlap(linesOut2.back(), *lit)) { // Merge lines - LineType mline = MergesLines(linesOut2.back(),*lit); + LineType mline = MergesLines(linesOut2.back(), *lit); // Replace the last line by the merged line linesOut2.pop_back(); @@ -139,7 +139,7 @@ private: { LineType resp; resp.SetIndex(l1.GetIndex()); - unsigned long length = max(l1.GetLength(),l2.GetIndex()[0]+l2.GetLength()-l1.GetIndex()[0]); + unsigned long length = max(l1.GetLength(), l2.GetIndex()[0]+l2.GetLength()-l1.GetIndex()[0]); resp.SetLength(length); return resp; } diff --git a/Code/OBIA/otbMinMaxAttributesLabelMapFilter.h b/Code/OBIA/otbMinMaxAttributesLabelMapFilter.h index c035bd501d91ee06698accaee14819c4b9cce273..ada185e8b956fc570bb21bd29dcb84ed4ca1ca48 100644 --- a/Code/OBIA/otbMinMaxAttributesLabelMapFilter.h +++ b/Code/OBIA/otbMinMaxAttributesLabelMapFilter.h @@ -30,12 +30,12 @@ namespace otb { */ template<class TInputImage> class ITK_EXPORT MinMaxAttributesLabelMapFilter : - public itk::LabelMapFilter<TInputImage,TInputImage> + public itk::LabelMapFilter<TInputImage, TInputImage> { public: /** Standard class typedefs. */ typedef MinMaxAttributesLabelMapFilter Self; - typedef itk::LabelMapFilter<TInputImage,TInputImage> Superclass; + typedef itk::LabelMapFilter<TInputImage, TInputImage> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; diff --git a/Code/OBIA/otbNormalizeAttributesLabelMapFilter.h b/Code/OBIA/otbNormalizeAttributesLabelMapFilter.h index 8c9b2d40e3e6f3ca915a7fbecd383f4b306f1d92..bfc1a24d18622d6705d9dbda1530e812d844fe78 100644 --- a/Code/OBIA/otbNormalizeAttributesLabelMapFilter.h +++ b/Code/OBIA/otbNormalizeAttributesLabelMapFilter.h @@ -34,7 +34,7 @@ namespace Functor * * Given the minimum and maximum of all attributes (which can be computed with * MinMaxAttributesLabelMapFilter), this filter rescale the attributes such that -* all attributes are in [0,1] interval +* all attributes are in [0, 1] interval * * \sa MinMaxAttributesLabelMapFilter */ @@ -85,7 +85,7 @@ private: /** \class NormalizeAttributesLabelMapFilter * \brief This class works with AttributesMapLabelObject, and normalizes all attributes * wrt a map of minimal and maximal attribute value, such that the resulting - * attributes are in the [0,1] interval + * attributes are in the [0, 1] interval * * \sa MinMaxAttributesLabelMapFilter */ diff --git a/Code/OBIA/otbShapeAttributesLabelMapFilter.txx b/Code/OBIA/otbShapeAttributesLabelMapFilter.txx index e762507ffefb9584d819e98e0af1b35401f53c92..4ab555c0f2d95d0ec484342ca3234a7b912b4d38 100644 --- a/Code/OBIA/otbShapeAttributesLabelMapFilter.txx +++ b/Code/OBIA/otbShapeAttributesLabelMapFilter.txx @@ -396,7 +396,7 @@ ShapeAttributesLabelObjectFunctor<TLabelObject, TLabelImage> vnl_diag_matrix<double> pm = eigen.D; for (unsigned int i = 0; i < LabelObjectType::ImageDimension; i++) { -// principalMoments[i] = 4 * vcl_sqrt( pm(i,i) ); +// principalMoments[i] = 4 * vcl_sqrt( pm(i, i) ); principalMoments[i] = pm(i, i); } itk::Matrix<double, LabelObjectType::ImageDimension, LabelObjectType::ImageDimension> diff --git a/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx b/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx index 45d0973fe353856f0b4df6bdea3f26764834bd9c..0e7cf7d380f921fe6d55bef134439885dbb13535 100644 --- a/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx +++ b/Code/OBIA/otbStatisticsAttributesLabelMapFilter.txx @@ -215,7 +215,7 @@ StatisticsAttributesLabelObjectFunctor<TLabelObject, TFeatureImage> vnl_diag_matrix<double> pm = eigen.D; for (unsigned int i = 0; i < TFeatureImage::ImageDimension; i++) { - // principalMoments[i] = 4 * vcl_sqrt( pm(i,i) ); + // principalMoments[i] = 4 * vcl_sqrt( pm(i, i) ); principalMoments[i] = pm(i, i); } principalAxes = eigen.V.transpose(); diff --git a/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx b/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx index 097ccdf67db3fedb47226c8ae2563493ecb24da4..10470208800fbd60c7329d741948a557647d0d26 100644 --- a/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx +++ b/Code/ObjectDetection/otbDescriptorsListSampleGenerator.txx @@ -26,7 +26,7 @@ namespace otb { template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::PersistentDescriptorsListSampleGenerator() : m_NeighborhoodRadius(0) { @@ -42,14 +42,14 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::~PersistentDescriptorsListSampleGenerator() { } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::AllocateOutputs() { // This is commented to prevent the streaming of the whole image for the first stream strip @@ -61,7 +61,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GenerateOutputInformation() { Superclass::GenerateOutputInformation(); @@ -79,15 +79,15 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::SetSamplesLocations(VectorDataType* location) { this->SetNthInput(1, location); } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -typename PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>::VectorDataType* -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +typename PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample>::VectorDataType* +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GetSamplesLocations() { @@ -95,48 +95,48 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -typename PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>::ListSampleType* -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +typename PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample>::ListSampleType* +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GetListSample() { return const_cast<ListSampleType*>(this->GetListSampleObject()->Get()); } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -typename PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>::ListSampleObjectType* -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +typename PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample>::ListSampleObjectType* +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GetListSampleObject() { return dynamic_cast<ListSampleObjectType*>( this->itk::ProcessObject::GetOutput(1) ); } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -typename PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>::LabelListSampleType* -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +typename PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample>::LabelListSampleType* +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GetLabelListSample() { return const_cast<LabelListSampleType*>(this->GetLabelListSampleObject()->Get()); } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -typename PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>::LabelListSampleObjectType* -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +typename PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample>::LabelListSampleObjectType* +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GetLabelListSampleObject() { return dynamic_cast<LabelListSampleObjectType*>(this->itk::ProcessObject::GetOutput(2)); } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -typename PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>::SamplesPositionType& -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +typename PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample>::SamplesPositionType& +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GetSamplesPositions() { return this->GetSamplesPositionsObject()->Get(); } template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> -typename PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample>::SamplesPositionObjectType* -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +typename PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample>::SamplesPositionObjectType* +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GetSamplesPositionsObject() { return dynamic_cast<SamplesPositionObjectType*>(this->itk::ProcessObject::GetOutput(3)); @@ -144,7 +144,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> itk::DataObject::Pointer -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::MakeOutput(unsigned int idx) { itk::DataObject::Pointer output; @@ -182,7 +182,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::Reset() { m_ThreadListSample = ListSampleArray(this->GetNumberOfThreads()); @@ -206,7 +206,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::Synthetize() { // Merge the ListSample from all the threads @@ -232,7 +232,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::PrintSelf(std::ostream& os, itk::Indent indent) const { Superclass::PrintSelf(os, indent); @@ -240,7 +240,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::GenerateInputRequestedRegion() { Superclass::GenerateInputRequestedRegion(); @@ -281,14 +281,14 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::BeforeThreadedGenerateData() {} template <class TInputImage, class TVectorData, class TFunctionType, class TListSample, class TLabelListSample> void -PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,TListSample,TLabelListSample> +PersistentDescriptorsListSampleGenerator<TInputImage, TVectorData, TFunctionType, TListSample, TLabelListSample> ::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId) { @@ -304,7 +304,7 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T { VectorDataPointType point = vectorDataIt.Get()->GetPoint(); ContinuousIndexType cidx; - this->GetInput()->TransformPhysicalPointToContinuousIndex(point,cidx); + this->GetInput()->TransformPhysicalPointToContinuousIndex(point, cidx); // OGR convention : vector data are recorded with a 0.5 shift cidx[0] -= 0.5; @@ -329,14 +329,14 @@ PersistentDescriptorsListSampleGenerator<TInputImage,TVectorData,TFunctionType,T template <class TInputImage, class TVectorData, class TListSample, class TLabelListSample, class TOutputPrecision, class TCoordRep> -DescriptorsListSampleGenerator<TInputImage,TVectorData,TListSample,TLabelListSample,TOutputPrecision,TCoordRep> +DescriptorsListSampleGenerator<TInputImage, TVectorData, TListSample, TLabelListSample, TOutputPrecision, TCoordRep> ::DescriptorsListSampleGenerator() { } template <class TInputImage, class TVectorData, class TListSample, class TLabelListSample, class TOutputPrecision, class TCoordRep> -DescriptorsListSampleGenerator<TInputImage,TVectorData,TListSample,TLabelListSample,TOutputPrecision,TCoordRep> +DescriptorsListSampleGenerator<TInputImage, TVectorData, TListSample, TLabelListSample, TOutputPrecision, TCoordRep> ::~DescriptorsListSampleGenerator() { diff --git a/Code/ObjectDetection/otbFlusserMomentsIFFactory.h b/Code/ObjectDetection/otbFlusserMomentsIFFactory.h index b10e42c64811ff1a16a516ff1a9f7b10de835a00..8a05a54696336cc527eb02d00e8ba803f41c6f3d 100644 --- a/Code/ObjectDetection/otbFlusserMomentsIFFactory.h +++ b/Code/ObjectDetection/otbFlusserMomentsIFFactory.h @@ -55,7 +55,7 @@ public: itkNewMacro(Self); // RTTI typeinfo - itkTypeMacro(FlusserMomentsIFFactory,itk::LightObject); + itkTypeMacro(FlusserMomentsIFFactory, itk::LightObject); // Input and output typedef typedef TImageType InputImageType; diff --git a/Code/ObjectDetection/otbFourierMellinDescriptorsIFFactory.h b/Code/ObjectDetection/otbFourierMellinDescriptorsIFFactory.h index 0314e9c6dd35d5735ced51615b4625cb0e6786d5..351f50526c6cc3c78a79f021f56cfdb4d6f089ce 100644 --- a/Code/ObjectDetection/otbFourierMellinDescriptorsIFFactory.h +++ b/Code/ObjectDetection/otbFourierMellinDescriptorsIFFactory.h @@ -55,7 +55,7 @@ public: itkNewMacro(Self); // RTTI typeinfo - itkTypeMacro(FourierMellinDescriptorsIFFactory,itk::LightObject); + itkTypeMacro(FourierMellinDescriptorsIFFactory, itk::LightObject); // Input and output typedef typedef TImageType InputImageType; diff --git a/Code/ObjectDetection/otbHaralickTexturesIFFactory.h b/Code/ObjectDetection/otbHaralickTexturesIFFactory.h index 59401ea2dd465ff1c1bb81d72438ccd6a29d3dda..f79d0830da51644599a2caa4354444e4d271eae5 100644 --- a/Code/ObjectDetection/otbHaralickTexturesIFFactory.h +++ b/Code/ObjectDetection/otbHaralickTexturesIFFactory.h @@ -55,7 +55,7 @@ public: itkNewMacro(Self); // RTTI typeinfo - itkTypeMacro(haralickTexturesIFFactory,itk::LightObject); + itkTypeMacro(haralickTexturesIFFactory, itk::LightObject); // Input and output typedef typedef TImageType InputImageType; diff --git a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h index b821d7041d990930d5183ef3f7df2576c0ea98f1..b3ee15c9ddd0b13dc45743974cda6c1e0af485eb 100644 --- a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h +++ b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.h @@ -102,7 +102,7 @@ public: /** Set the number of samples position to generate inside the inhibition radius window around a positive point */ itkGetConstMacro(NumberOfPositiveSamplesPerPoint, unsigned int); - itkSetMacro(NumberOfPositiveSamplesPerPoint,unsigned int); + itkSetMacro(NumberOfPositiveSamplesPerPoint, unsigned int); /** Set the seed for random number generator */ void SetSeed(unsigned int seed) @@ -118,7 +118,7 @@ protected: /** Triggers the Computation of the sample list */ void GenerateData(void); - std::pair<PointVectorType,PointVectorType> RandomPointsGenerator(DataNodeType * node); + std::pair<PointVectorType, PointVectorType> RandomPointsGenerator(DataNodeType * node); private: LabeledSampleLocalizationGenerator(const Self &); //purposely not implemented diff --git a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx index f622a91ca89a9a9df68d7ea6b0a63b90110c2b13..17273cff619f5b71bc0d008bcd289c4f8a080614 100644 --- a/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx +++ b/Code/ObjectDetection/otbLabeledSampleLocalizationGenerator.txx @@ -83,7 +83,7 @@ LabeledSampleLocalizationGenerator<TVectorData> ::RandomPointsGenerator(DataNodeType * node) { // Output - PointVectorType vPoint,pPoint; + PointVectorType vPoint, pPoint; // Euclidean distance typename EuclideanDistanceType::Pointer euclideanDistance = EuclideanDistanceType::New(); @@ -131,7 +131,7 @@ LabeledSampleLocalizationGenerator<TVectorData> unsigned long int nbIter = this->GetNbMaxIteration(); unsigned int nbPosition = nbMaxPosition; - PointType rangeMin,rangeMax; + PointType rangeMin, rangeMax; for(unsigned int dim = 0; dim < 2; ++dim) { @@ -144,7 +144,7 @@ LabeledSampleLocalizationGenerator<TVectorData> VertexType candidate; for(unsigned int dim = 0; dim < 2; ++dim) { - candidate[dim] = this->m_RandomGenerator->GetUniformVariate(rangeMin[dim],rangeMax[dim]); + candidate[dim] = this->m_RandomGenerator->GetUniformVariate(rangeMin[dim], rangeMax[dim]); } if(node->GetPolygonExteriorRing()->IsInside(candidate)) { @@ -153,7 +153,7 @@ LabeledSampleLocalizationGenerator<TVectorData> while(valid && pit!=insiders.end()) { - valid = (euclideanDistance->Evaluate(candidate,*pit) > this->GetInhibitionRadius()); + valid = (euclideanDistance->Evaluate(candidate, *pit) > this->GetInhibitionRadius()); ++pit; } PointType point; @@ -174,20 +174,20 @@ LabeledSampleLocalizationGenerator<TVectorData> // Densifying positive points - for(typename PointVectorType::const_iterator iIt = insiders.begin(); iIt != insiders.end();++iIt) + for(typename PointVectorType::const_iterator iIt = insiders.begin(); iIt != insiders.end(); ++iIt) { for(unsigned int i = 0; i < m_NumberOfPositiveSamplesPerPoint; ++i) { PointType point; for(unsigned int dim = 0; dim < 2; ++dim) { - point[dim] = (*iIt)[dim]+this->m_RandomGenerator->GetUniformVariate(-m_InhibitionRadius,m_InhibitionRadius); + point[dim] = (*iIt)[dim]+this->m_RandomGenerator->GetUniformVariate(-m_InhibitionRadius, m_InhibitionRadius); } pPoint.push_back(point); } } - std::pair<PointVectorType,PointVectorType> result; + std::pair<PointVectorType, PointVectorType> result; result.first = (vPoint); result.second = (pPoint); return result; @@ -247,7 +247,7 @@ LabeledSampleLocalizationGenerator<TVectorData> { if (itVector.Get()->IsPolygonFeature()) { - std::pair<PointVectorType,PointVectorType> points = RandomPointsGenerator(itVector.Get()); + std::pair<PointVectorType, PointVectorType> points = RandomPointsGenerator(itVector.Get()); PointVectorType vPoint = points.first; PointVectorType pPoint = points.second; diff --git a/Code/ObjectDetection/otbLocalHistogramIFFactory.h b/Code/ObjectDetection/otbLocalHistogramIFFactory.h index 4bda50bd9d66457ee1c68b14335f2053ff9cfa8f..254b07e5dd039bff9ec8b2fb60c52c9c521fb9f0 100644 --- a/Code/ObjectDetection/otbLocalHistogramIFFactory.h +++ b/Code/ObjectDetection/otbLocalHistogramIFFactory.h @@ -55,7 +55,7 @@ public: itkNewMacro(Self); // RTTI typeinfo - itkTypeMacro(LocalHistogramIFFactory,itk::LightObject); + itkTypeMacro(LocalHistogramIFFactory, itk::LightObject); // Input and output typedef typedef TImageType InputImageType; diff --git a/Code/ObjectDetection/otbMultiChannelIFFactory.h b/Code/ObjectDetection/otbMultiChannelIFFactory.h index c96fe6b3944b945df5ea3184150a92e6c688b91f..b1558b2bb416a34b833eff7435025ca34de0890a 100644 --- a/Code/ObjectDetection/otbMultiChannelIFFactory.h +++ b/Code/ObjectDetection/otbMultiChannelIFFactory.h @@ -78,7 +78,7 @@ private: template <class TIFFactory, typename TPixel, unsigned int VImageDimension> -class MultiChannelIFFactory<TIFFactory, otb::VectorImage<TPixel,VImageDimension> > +class MultiChannelIFFactory<TIFFactory, otb::VectorImage<TPixel, VImageDimension> > { public: typedef TIFFactory IFFactoryType; diff --git a/Code/ObjectDetection/otbObjectDetectionClassifier.txx b/Code/ObjectDetection/otbObjectDetectionClassifier.txx index f944bb61744b689dba9019582d42f6ca75b873f8..d8ee42391cc392df4f2f9f012898d0f9121d7973 100644 --- a/Code/ObjectDetection/otbObjectDetectionClassifier.txx +++ b/Code/ObjectDetection/otbObjectDetectionClassifier.txx @@ -26,7 +26,7 @@ namespace otb { template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::PersistentObjectDetectionClassifier() : m_NeighborhoodRadius(0), m_ClassKey("Class"), @@ -42,14 +42,14 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti } template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::~PersistentObjectDetectionClassifier() { } template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::AllocateOutputs() { // This is commented to prevent the streaming of the whole image for the first stream strip @@ -61,7 +61,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::GenerateOutputInformation() { Superclass::GenerateOutputInformation(); @@ -79,15 +79,15 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::SetSVMModel(SVMModelType* model) { this->SetNthInput(1, model); } template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> -typename PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType>::VectorDataType* -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +typename PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType>::VectorDataType* +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::GetOutputVectorData() { return static_cast<VectorDataType*>(this->itk::ProcessObject::GetOutput(1)); @@ -95,7 +95,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> itk::DataObject::Pointer -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::MakeOutput(unsigned int idx) { itk::DataObject::Pointer output; @@ -118,7 +118,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::Reset() { m_ThreadPointArray = PointArrayContainer(this->GetNumberOfThreads()); @@ -127,7 +127,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::Synthetize() { // merge all points in a single vector data @@ -170,7 +170,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::PrintSelf(std::ostream& os, itk::Indent indent) const { Superclass::PrintSelf(os, indent); @@ -178,7 +178,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::GenerateInputRequestedRegion() { Superclass::GenerateInputRequestedRegion(); @@ -219,12 +219,12 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::BeforeThreadedGenerateData() { // Compute the 1/(sigma) vector m_InvertedScales = m_Scales; - for(unsigned int idx = 0;idx < m_Scales.Size();++idx) + for(unsigned int idx = 0; idx < m_Scales.Size(); ++idx) { if(m_Scales[idx]-1e-10 < 0.) m_InvertedScales[idx] = 0.; @@ -236,7 +236,7 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionType> void -PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionType> +PersistentObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionType> ::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId) { @@ -263,13 +263,13 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti if (current[0] % step == 0) { DescriptorsFunctionPointType point; - input->TransformIndexToPhysicalPoint(current,point); + input->TransformIndexToPhysicalPoint(current, point); ContinuousIndexType currentContinuous(current); currentContinuous[0] += 0.5; currentContinuous[1] += 0.5; DescriptorsFunctionPointType pointOGR; - input->TransformContinuousIndexToPhysicalPoint(currentContinuous,pointOGR); + input->TransformContinuousIndexToPhysicalPoint(currentContinuous, pointOGR); DescriptorType descriptor = m_DescriptorsFunction->Evaluate(point); SVMModelMeasurementType modelMeasurement(descriptor.GetSize()); @@ -291,14 +291,14 @@ PersistentObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFuncti template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionPrecision, class TCoordRep> -ObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionPrecision,TCoordRep> +ObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionPrecision, TCoordRep> ::ObjectDetectionClassifier() { } template <class TInputImage, class TOutputVectorData, class TLabel, class TFunctionPrecision, class TCoordRep> -ObjectDetectionClassifier<TInputImage,TOutputVectorData,TLabel,TFunctionPrecision,TCoordRep> +ObjectDetectionClassifier<TInputImage, TOutputVectorData, TLabel, TFunctionPrecision, TCoordRep> ::~ObjectDetectionClassifier() { diff --git a/Code/ObjectDetection/otbRadiometricMomentsIFFactory.h b/Code/ObjectDetection/otbRadiometricMomentsIFFactory.h index 5ab0cbaaca09f383a3c4c9292e3a6d4de623be31..c954fba6589a9e5e2374034c513e1142bca0a74b 100644 --- a/Code/ObjectDetection/otbRadiometricMomentsIFFactory.h +++ b/Code/ObjectDetection/otbRadiometricMomentsIFFactory.h @@ -55,7 +55,7 @@ public: itkNewMacro(Self); // RTTI typeinfo - itkTypeMacro(RadiometricMomentsIFFactory,itk::LightObject); + itkTypeMacro(RadiometricMomentsIFFactory, itk::LightObject); // Input and output typedef typedef TImageType InputImageType; diff --git a/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.h b/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.h index eb8d45d192d2843eaf775c9eb81c484e1d65ccbd..9e5749c81a687376ed3eec1fe3752131a6d24940 100644 --- a/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.h +++ b/Code/ObjectDetection/otbStandardMetaImageFunctionBuilder.h @@ -69,7 +69,7 @@ public: itkNewMacro(Self); // RTTI typeinfo - itkTypeMacro(StandardMetaImageFunctionBuilder,itk::LightObject); + itkTypeMacro(StandardMetaImageFunctionBuilder, itk::LightObject); // Input and output typedef typedef TPrecision ValueType; diff --git a/Code/ObjectDetection/otbStatisticsXMLFileReader.h b/Code/ObjectDetection/otbStatisticsXMLFileReader.h index bd9a42d2fdfe827ba978bc9ce60fc664401b1696..dcfa7e661a22ebba07b43e4fe040aa7748fb22d3 100644 --- a/Code/ObjectDetection/otbStatisticsXMLFileReader.h +++ b/Code/ObjectDetection/otbStatisticsXMLFileReader.h @@ -43,7 +43,7 @@ public: typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(StatisticsXMLFileReader,itk::Object); + itkTypeMacro(StatisticsXMLFileReader, itk::Object); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -53,7 +53,7 @@ public: typedef typename MeasurementVectorType::ValueType InputValueType; /** Convenient typedef */ - typedef std::pair<std::string ,MeasurementVectorType> InputDataType; + typedef std::pair<std::string , MeasurementVectorType> InputDataType; typedef std::vector< InputDataType > MeasurementVectorContainer; virtual void Modified() @@ -66,7 +66,7 @@ public: itkGetStringMacro(FileName); /** Get the number of Outputs*/ - itkGetMacro(NumberOfOutputs,unsigned int); + itkGetMacro(NumberOfOutputs, unsigned int); /** Method to get the MeasurementVector by name */ MeasurementVectorType GetStatisticVectorByName(const char * statisticName); diff --git a/Code/ObjectDetection/otbStatisticsXMLFileReader.txx b/Code/ObjectDetection/otbStatisticsXMLFileReader.txx index 20d9a3d1a937fb84940916b764ad3e08dd6c767d..3e20f6dd5150ef08487f82db105a8118b7a1a438 100644 --- a/Code/ObjectDetection/otbStatisticsXMLFileReader.txx +++ b/Code/ObjectDetection/otbStatisticsXMLFileReader.txx @@ -50,7 +50,7 @@ StatisticsXMLFileReader<TMeasurementVector> unsigned int index = 0; for(unsigned int idx = 0; idx < m_NumberOfOutputs; idx++) { - if(strcmp(m_MeasurementVectorContainer[idx].first.c_str(),statisticName) == 0 ) + if(strcmp(m_MeasurementVectorContainer[idx].first.c_str(), statisticName) == 0 ) { found = true; index = idx; @@ -111,7 +111,7 @@ StatisticsXMLFileReader<TMeasurementVector> { // Get the current value of the statistic vector double value; - sample->QueryDoubleAttribute("value",&value); + sample->QueryDoubleAttribute("value", &value); // Store the value tempMeasurementVector.push_back(value); } @@ -137,7 +137,7 @@ StatisticsXMLFileReader<TMeasurementVector> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - //Superclass::PrintSelf(os,indent); + //Superclass::PrintSelf(os, indent); } } // End namespace otb diff --git a/Code/ObjectDetection/otbStatisticsXMLFileWriter.h b/Code/ObjectDetection/otbStatisticsXMLFileWriter.h index e691de9be4839d690eb5d209834e37987b3e4d65..0ce61fa29d7f0e8f38c246014c2353ba41907402 100644 --- a/Code/ObjectDetection/otbStatisticsXMLFileWriter.h +++ b/Code/ObjectDetection/otbStatisticsXMLFileWriter.h @@ -28,7 +28,7 @@ namespace otb { * \brief Write in a xml file the values stored in a MeasurementVector set as * input * - * The vector can be set as input via AddInput(name,vector) where name + * The vector can be set as input via AddInput(name, vector) where name * is the name of the statistic, and vector the values. * Supported vector types are those implementing the method GetElement(idx) * and defining the type ValueType. @@ -46,7 +46,7 @@ public: typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(StatisticsXMLFileWriter,itk::Object); + itkTypeMacro(StatisticsXMLFileWriter, itk::Object); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -56,7 +56,7 @@ public: typedef typename MeasurementVectorType::ValueType InputValueType; /** Convenient typedef */ - typedef std::pair<std::string ,MeasurementVectorType> InputDataType; + typedef std::pair<std::string , MeasurementVectorType> InputDataType; typedef std::vector< InputDataType > MeasurementVectorContainer; /** Method to set/get the input list sample */ diff --git a/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx b/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx index 174275cc1a19296dd2dd2d9fd43393fc714d084e..7bdf51300d2d746e5c0966f51cf292302636f8d1 100644 --- a/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx +++ b/Code/ObjectDetection/otbStatisticsXMLFileWriter.txx @@ -43,7 +43,7 @@ StatisticsXMLFileWriter<TMeasurementVector> // Check if the statistic name is already added for(unsigned int idx= 0; idx< m_MeasurementVectorContainer.size(); idx++) { - if(strcmp(m_MeasurementVectorContainer[idx].first.c_str(),name) == 0 ) + if(strcmp(m_MeasurementVectorContainer[idx].first.c_str(), name) == 0 ) { itkExceptionMacro(<<"Token selected (" <<name<<") is already added to the XML file"); @@ -95,7 +95,7 @@ StatisticsXMLFileWriter<TMeasurementVector> root->LinkEndChild( feature ); // Store the value for this statistic - for(unsigned int cindex = 0; cindex < currentMeasurementVector.Size();++cindex) + for(unsigned int cindex = 0; cindex < currentMeasurementVector.Size(); ++cindex) { // For each value in Measurementvector TiXmlElement * curStatisticVector = new TiXmlElement("StatisticVector"); @@ -115,7 +115,7 @@ StatisticsXMLFileWriter<TMeasurementVector> ::PrintSelf(std::ostream& os, itk::Indent indent) const { // Call superclass implementation - //Superclass::PrintSelf(os,indent); + //Superclass::PrintSelf(os, indent); } } // End namespace otb diff --git a/Code/Projections/otbCompositeTransform.h b/Code/Projections/otbCompositeTransform.h index c85dfe482c1e1b6d3d52944af017d80ab611f6c7..1dea30a21b8674f5ae9813536d827a2fe5358086 100644 --- a/Code/Projections/otbCompositeTransform.h +++ b/Code/Projections/otbCompositeTransform.h @@ -32,7 +32,7 @@ namespace otb * \brief Class which compose two itk::Transform to obtain one itk::Transform * T1 T2 T3 -* (x,y) -> (x',y') -> (x'',y'') => (x,y) -> (x'',y'') +* (x, y) -> (x', y') -> (x'', y'') => (x, y) -> (x'', y'') * * * \ingroup Transform diff --git a/Code/Projections/otbCompositeTransform.txx b/Code/Projections/otbCompositeTransform.txx index a42ef307b5b8443b11e006fe4089195be8b193e3..b23cd8a2f6339b170de338e49b2307baf2eaba5e 100644 --- a/Code/Projections/otbCompositeTransform.txx +++ b/Code/Projections/otbCompositeTransform.txx @@ -88,7 +88,7 @@ CompositeTransform<TFirstTransform, /*template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVectorType - CompositeTransform<TFirstTransform, TSecondTransform, TScalarType,NInputDimensions, NOutputDimensions> + CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions> ::TransformVector(const InputVectorType &vector1) const { InputVectorType vectorTmp; @@ -102,7 +102,7 @@ CompositeTransform<TFirstTransform, template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVnlVectorType - CompositeTransform<TFirstTransform, TSecondTransform, TScalarType,NInputDimensions, NOutputDimensions> + CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions> ::TransformVector(const InputVnlVectorType &vnlVector1) const { InputVnlVectorType vnlVectorTmp; @@ -116,7 +116,7 @@ CompositeTransform<TFirstTransform, template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputCovariantVectorType - CompositeTransform<TFirstTransform, TSecondTransform, TScalarType,NInputDimensions, NOutputDimensions> + CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions> ::TransformCovariantVector(const InputCovariantVectorType &covariantVector1) const { InputCovariantVectorType covariantVectorTmp; diff --git a/Code/Projections/otbEckert4MapProjection.h b/Code/Projections/otbEckert4MapProjection.h index 1f606b5338b8f2c84d19a04d6d695d49b7798c53..24685e375adcaffeaddf894b7007235ee357c6c7 100644 --- a/Code/Projections/otbEckert4MapProjection.h +++ b/Code/Projections/otbEckert4MapProjection.h @@ -27,7 +27,7 @@ namespace otb /** \class Eckert4MapProjection * \brief This class implements the Eckert4 map projection. * - * It converts coordinates in longitude,latitude (WGS84) to Eckert4 map coordinates. + * It converts coordinates in longitude, latitude (WGS84) to Eckert4 map coordinates. */ template <InverseOrForwardTransformationEnum transform> class ITK_EXPORT Eckert4MapProjection : public MapProjection<ossimEckert4Projection, transform> diff --git a/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.h b/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.h index 20631253f155778a2f10182904212b1fe36ae747..847b247b3b29f677c1b9cd1b9cd3bfcaa96dccde 100644 --- a/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.h +++ b/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.h @@ -71,7 +71,7 @@ public: typedef TCoordRep CoordRepType; /** Point Type. */ - typedef itk::Point<TCoordRep,NPointDimension> PointType; + typedef itk::Point<TCoordRep, NPointDimension> PointType; /** Get the dimension (size) of the point. */ static unsigned int GetPointDimension() diff --git a/Code/Projections/otbForwardSensorModel.h b/Code/Projections/otbForwardSensorModel.h index 8972b4de98e2e0f8a5c93ba789bc68a408f421e5..3ad783eeb738a8c1a9f1a5fff06e714b63b514b2 100644 --- a/Code/Projections/otbForwardSensorModel.h +++ b/Code/Projections/otbForwardSensorModel.h @@ -33,7 +33,7 @@ namespace otb * * Based on ossimProjectionFactoryRegistry and ossimProjection methods. * It takes as input an index and computes the world coordinates. - * (i,j,h) -> (lon,lat). + * (i, j, h) -> (lon, lat). * Notice that the elevation h is optional. * * \ingroup Transform diff --git a/Code/Projections/otbGCPsToRPCSensorModelImageFilter.h b/Code/Projections/otbGCPsToRPCSensorModelImageFilter.h index 88810f3486206ba7f2b2eaba8f839abb82b4e01e..0fecfdc5dd08b5ee051f38bbf77fc784e22506d0 100644 --- a/Code/Projections/otbGCPsToRPCSensorModelImageFilter.h +++ b/Code/Projections/otbGCPsToRPCSensorModelImageFilter.h @@ -72,7 +72,7 @@ namespace otb { */ template <class TImage> class ITK_EXPORT GCPsToRPCSensorModelImageFilter : - public itk::CastImageFilter<TImage,TImage> + public itk::CastImageFilter<TImage, TImage> { public: /** Standard class typedefs. */ @@ -106,8 +106,8 @@ public: TImage::ImageDimension); /** Set/Get/toogle the UseImageGCPs flag */ -// itkSetMacro(UseImageGCPs,bool); -// itkGetMacro(UseImageGCPs,bool); +// itkSetMacro(UseImageGCPs, bool); +// itkGetMacro(UseImageGCPs, bool); // itkBooleanMacro(UseImageGCPs); void SetUseImageGCPs(bool use); void LoadImageGCPs(); diff --git a/Code/Projections/otbGenericRSResampleImageFilter.h b/Code/Projections/otbGenericRSResampleImageFilter.h index 9c70d867ec0fe691c450f837312afd5784987d9d..e207c8779e936a0c9380cd3d58b92406850faf81 100644 --- a/Code/Projections/otbGenericRSResampleImageFilter.h +++ b/Code/Projections/otbGenericRSResampleImageFilter.h @@ -63,7 +63,7 @@ public: itkNewMacro(Self); /** Run-time type information (and related methods). */ - itkTypeMacro(GenericRSResampleImageFilter,itk::ImageToImageFilter); + itkTypeMacro(GenericRSResampleImageFilter, itk::ImageToImageFilter); /** Typedef parameters*/ typedef TInputImage InputImageType; @@ -100,7 +100,7 @@ public: typedef itk::ImageBase<OutputImageType::ImageDimension> ImageBaseType; /** The Deformation field spacing & size */ - otbSetObjectMemberMacro(Resampler,DeformationFieldSpacing, SpacingType); + otbSetObjectMemberMacro(Resampler, DeformationFieldSpacing, SpacingType); otbGetObjectMemberConstReferenceMacro(Resampler, DeformationFieldSpacing, @@ -113,19 +113,19 @@ public: m_Resampler->SetOutputOrigin(origin); this->Modified(); } - otbGetObjectMemberConstReferenceMacro(Resampler,OutputOrigin,OriginType); + otbGetObjectMemberConstReferenceMacro(Resampler, OutputOrigin, OriginType); /** Output Start index */ - otbSetObjectMemberMacro(Resampler,OutputStartIndex,IndexType); - otbGetObjectMemberConstReferenceMacro(Resampler,OutputStartIndex,IndexType); + otbSetObjectMemberMacro(Resampler, OutputStartIndex, IndexType); + otbGetObjectMemberConstReferenceMacro(Resampler, OutputStartIndex, IndexType); /** Output Size */ - otbSetObjectMemberMacro(Resampler,OutputSize,SizeType); - otbGetObjectMemberConstReferenceMacro(Resampler,OutputSize,SizeType); + otbSetObjectMemberMacro(Resampler, OutputSize, SizeType); + otbGetObjectMemberConstReferenceMacro(Resampler, OutputSize, SizeType); /** Output Spacing */ - otbSetObjectMemberMacro(Resampler,OutputSpacing,SpacingType); - otbGetObjectMemberConstReferenceMacro(Resampler,OutputSpacing,SpacingType); + otbSetObjectMemberMacro(Resampler, OutputSpacing, SpacingType); + otbGetObjectMemberConstReferenceMacro(Resampler, OutputSpacing, SpacingType); /** Methods to Set/Get the interpolator */ void SetInterpolator(InterpolatorType * interpolator) @@ -202,7 +202,7 @@ public: m_OutputRpcEstimator->SetDEMDirectory(dem); this->Modified(); } - otbGetObjectMemberConstMacro(Transform,DEMDirectory,std::string); + otbGetObjectMemberConstMacro(Transform, DEMDirectory, std::string); /** Method to Set the Average Elevation used */ void SetAverageElevation(double elevation) @@ -212,7 +212,7 @@ public: m_OutputRpcEstimator->SetAverageElevation(elevation); this->Modified(); } - otbGetObjectMemberConstMacro(Transform,AverageElevation,double); + otbGetObjectMemberConstMacro(Transform, AverageElevation, double); /** Useful to set the output parameters from an existing image*/ void SetOutputParametersFromImage(const ImageBaseType * image); @@ -223,7 +223,7 @@ public: void SetOutputParametersFromMap(const std::string map, const SpacingType& spacing); /** Useful to set the output parameters from a projectionRef, the - * output size,spacing and origin are estimated + * output size, spacing and origin are estimated */ void SetOutputParametersFromMap(const std::string projectionRef); diff --git a/Code/Projections/otbGenericRSResampleImageFilter.txx b/Code/Projections/otbGenericRSResampleImageFilter.txx index 41f9c7e6d5e2395cddd0a1de57211413125919b8..c3d82eafb1970764db4fa70eb07e1b10bf70d56b 100644 --- a/Code/Projections/otbGenericRSResampleImageFilter.txx +++ b/Code/Projections/otbGenericRSResampleImageFilter.txx @@ -63,7 +63,7 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage> // Set up progress reporting typename itk::ProgressAccumulator::Pointer progress = itk::ProgressAccumulator::New(); progress->SetMiniPipelineFilter(this); - progress->RegisterInternalFilter(m_Resampler,1.f); + progress->RegisterInternalFilter(m_Resampler, 1.f); m_Resampler->GraftOutput(this->GetOutput()); m_Resampler->Update(); @@ -285,7 +285,7 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage> // Build the UTM transform : Need the zone & the hemisphere // For this we us the geographic coordinate of the input UL corner typedef ossimRefPtr<ossimUtmProjection> OssimMapProjectionPointerType; - typedef itk::Point<double,2> GeoPointType; + typedef itk::Point<double, 2> GeoPointType; // instanciate the projection to get the utm zone OssimMapProjectionPointerType utmMapProjection = new ossimUtmProjection(); @@ -297,7 +297,7 @@ GenericRSResampleImageFilter<TInputImage, TOutputImage> GeoPointType geoPoint; index[0] = input->GetLargestPossibleRegion().GetIndex()[0]; index[1] = input->GetLargestPossibleRegion().GetIndex()[1]; - input->TransformIndexToPhysicalPoint(index,pSrc); + input->TransformIndexToPhysicalPoint(index, pSrc); // The first transform of the inverse transform : input -> WGS84 geoPoint = invTransform->GetTransform()->GetFirstTransform()->TransformPoint(pSrc); diff --git a/Code/Projections/otbGenericRSTransform.txx b/Code/Projections/otbGenericRSTransform.txx index 11f747fdb4467900b855a35ac01dc2add3bf4850..ae5fa7a45f707e9d13826ffd3e786d1d74ea40d3 100644 --- a/Code/Projections/otbGenericRSTransform.txx +++ b/Code/Projections/otbGenericRSTransform.txx @@ -215,7 +215,7 @@ GenericRSTransform<TScalarType, NInputDimensions, NOutputDimensions> if (firstTransformGiveGeo) { m_OutputProjectionRef = - "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]"; + "GEOGCS[\"GCS_WGS_1984\", DATUM[\"D_WGS_1984\", SPHEROID[\"WGS_1984\", 6378137, 298.257223563]], PRIMEM[\"Greenwich\", 0], UNIT[\"Degree\", 0.017453292519943295]]"; } otbMsgDevMacro(<< "Output projection set to identity"); } diff --git a/Code/Projections/otbGeocentricTransform.h b/Code/Projections/otbGeocentricTransform.h index 4c9f1bce5cb7d57b0673f735bd2af575cca4d691..f0871533622574f002ebe56f644b69b78d44f1bc 100644 --- a/Code/Projections/otbGeocentricTransform.h +++ b/Code/Projections/otbGeocentricTransform.h @@ -27,7 +27,7 @@ namespace otb { /** \class GeocentricTransform * - * \brief Convert coordinates from geocentric (X,Y,Z) to geographic (lon, lat, h) + * \brief Convert coordinates from geocentric (X, Y, Z) to geographic (lon, lat, h) * */ template <InverseOrForwardTransformationEnum TDirectionOfMapping, diff --git a/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx b/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx index 6e9e2794ef92cef8280e7d2a87383d37cc70e484..6ea4c0158099f4e30b73429c0c483b83ba2ac3cb 100644 --- a/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx +++ b/Code/Projections/otbImageToEnvelopeVectorDataFilter.txx @@ -35,7 +35,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData> m_OutputProjectionRef.clear(); // Build output - this->SetNthOutput(0,OutputVectorDataType::New()); + this->SetNthOutput(0, OutputVectorDataType::New()); } template <class TInputImage, class TOutputVectorData> @@ -127,7 +127,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData> OutputVectorDataPointer outputPtr = this->GetOutput(); // Compute corners as index - typename InputImageType::IndexType ul, ur,lr,ll; + typename InputImageType::IndexType ul, ur, lr, ll; ul = inputPtr->GetLargestPossibleRegion().GetIndex(); ur = ul; ll=ul; @@ -139,11 +139,11 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData> lr[1]+=size[1]; // Get corners as physical points - typename InputImageType::PointType ulp,urp,lrp,llp,current; - inputPtr->TransformIndexToPhysicalPoint(ul,ulp); - inputPtr->TransformIndexToPhysicalPoint(ur,urp); - inputPtr->TransformIndexToPhysicalPoint(lr,lrp); - inputPtr->TransformIndexToPhysicalPoint(ll,llp); + typename InputImageType::PointType ulp, urp, lrp, llp, current; + inputPtr->TransformIndexToPhysicalPoint(ul, ulp); + inputPtr->TransformIndexToPhysicalPoint(ur, urp); + inputPtr->TransformIndexToPhysicalPoint(lr, lrp); + inputPtr->TransformIndexToPhysicalPoint(ll, llp); this->InstantiateTransform(); @@ -180,7 +180,7 @@ ImageToEnvelopeVectorDataFilter<TInputImage, TOutputVectorData> OutputDataNodePointerType newDataNode = OutputDataNodeType::New(); newDataNode->SetPolygonExteriorRing(envelope); - tree->Add(newDataNode,document); + tree->Add(newDataNode, document); } } // end namespace otb diff --git a/Code/Projections/otbImageToGenericRSOutputParameters.h b/Code/Projections/otbImageToGenericRSOutputParameters.h index f519a627d18b7db6b9a12e7d0a94f44e29d19539..3777457604bebcb69fcf72c84ba511efdf397afe 100644 --- a/Code/Projections/otbImageToGenericRSOutputParameters.h +++ b/Code/Projections/otbImageToGenericRSOutputParameters.h @@ -57,7 +57,7 @@ public: typedef itk::SmartPointer<const Self> ConstPointer; /** Run-time type information (and related methods). */ - itkTypeMacro(ImageToGenericRSOutputParameters,itk::Object); + itkTypeMacro(ImageToGenericRSOutputParameters, itk::Object); /** Method for creation through the object factory. */ itkNewMacro(Self); @@ -84,20 +84,20 @@ public: }; /** Method to Set/Get the input */ - itkSetConstObjectMacro(Input,ImageType); - itkGetConstObjectMacro(Input,ImageType); + itkSetConstObjectMacro(Input, ImageType); + itkGetConstObjectMacro(Input, ImageType); /** Output Origin */ - itkSetMacro(OutputOrigin,PointType); - itkGetMacro(OutputOrigin,PointType); + itkSetMacro(OutputOrigin, PointType); + itkGetMacro(OutputOrigin, PointType); /** Output Spacing */ - itkSetMacro(OutputSpacing,SpacingType); - itkGetMacro(OutputSpacing,SpacingType); + itkSetMacro(OutputSpacing, SpacingType); + itkGetMacro(OutputSpacing, SpacingType); /** Output Size */ - itkSetMacro(OutputSize,SizeType); - itkGetMacro(OutputSize,SizeType); + itkSetMacro(OutputSize, SizeType); + itkGetMacro(OutputSize, SizeType); /** * Method to Force the use of the spacing selected by the user diff --git a/Code/Projections/otbImageToGenericRSOutputParameters.txx b/Code/Projections/otbImageToGenericRSOutputParameters.txx index 0bf8dc7ea4b3ba807fbcaa278bcb81309494b6b8..17d16b6efa6d0c6669e8be6e6e02312837683ff9 100644 --- a/Code/Projections/otbImageToGenericRSOutputParameters.txx +++ b/Code/Projections/otbImageToGenericRSOutputParameters.txx @@ -185,7 +185,7 @@ ImageToGenericRSOutputParameters<TImage> double sizeCartoX = vcl_abs(m_OutputExtent.maxX - m_OutputExtent.minX); double sizeCartoY = vcl_abs(m_OutputExtent.minY - m_OutputExtent.maxY); - PointType o,oX, oY; + PointType o, oX, oY; o[0] = this->GetOutputOrigin()[0]; o[1] = this->GetOutputOrigin()[1]; diff --git a/Code/Projections/otbInverseSensorModel.h b/Code/Projections/otbInverseSensorModel.h index f5fa472ce592e708e9ad9745177e1f6f656df284..c06f557a5fbb23b6d0e8288928fa860ad8f1b8ab 100644 --- a/Code/Projections/otbInverseSensorModel.h +++ b/Code/Projections/otbInverseSensorModel.h @@ -34,7 +34,7 @@ namespace otb * Based on ossimProjectionFactoryRegistry and ossimProjection methods. * It takes as input a world point and computes the index position of the * corresponding point in the input image. - * (lon,lat,h) -> (i,j). + * (lon, lat, h) -> (i, j). * Notice that the elevation h is optional. * * \ingroup Transform diff --git a/Code/Projections/otbInverseSensorModel.txx b/Code/Projections/otbInverseSensorModel.txx index 59b0148beeddda7ca58887f47b16ef06599523d8..c8ca01b5681d5bbf5df17aab0269c4c14fa3b377 100644 --- a/Code/Projections/otbInverseSensorModel.txx +++ b/Code/Projections/otbInverseSensorModel.txx @@ -54,7 +54,7 @@ InverseSensorModel<TScalarType, NInputDimensions, NOutputDimensions> itk::Point<double, 2> currentPoint; currentPoint[0] = ossimGPoint.lon; currentPoint[1] = ossimGPoint.lat; - double height = this->GetDEMFunction()->Evaluate(currentPoint);; + double height = this->GetDEMFunction()->Evaluate(currentPoint); ; // otbMsgDevMacro(<< "height : " << height); ossimGPoint.height(height); } diff --git a/Code/Projections/otbLambert2EtenduProjection.h b/Code/Projections/otbLambert2EtenduProjection.h index 123b878a718e615ea312d1630f8489ecd2b6a660..572e9a2b0c70c0734021aa199cedb5544f0f102e 100644 --- a/Code/Projections/otbLambert2EtenduProjection.h +++ b/Code/Projections/otbLambert2EtenduProjection.h @@ -26,7 +26,7 @@ namespace otb { /** \class Lambert2EtenduProjection * \brief This class implements the Lambert 2 Etendu map projection. -* It converts coordinates in longitude,latitude (WGS84) to Lambert 2 Etendu map coordinates. +* It converts coordinates in longitude, latitude (WGS84) to Lambert 2 Etendu map coordinates. * */ template <InverseOrForwardTransformationEnum transform> diff --git a/Code/Projections/otbLambert3CartoSudProjection.h b/Code/Projections/otbLambert3CartoSudProjection.h index ee00c07708cf51dc1736073f61b5c938815a6052..8ab4537ea67d010718653749382f94786c32734f 100644 --- a/Code/Projections/otbLambert3CartoSudProjection.h +++ b/Code/Projections/otbLambert3CartoSudProjection.h @@ -26,7 +26,7 @@ namespace otb { /** \class Lambert3CartoSudProjection * \brief This class implements the Lambert3CartoSud map projection (RGF93 french geodesic system). -* It converts coordinates in longitude,latitude (WGS84) to Lambert 3 map coordinates. +* It converts coordinates in longitude, latitude (WGS84) to Lambert 3 map coordinates. * */ template <InverseOrForwardTransformationEnum transform> diff --git a/Code/Projections/otbLambert93Projection.h b/Code/Projections/otbLambert93Projection.h index 46cffa46b4dbf273092c6e3ea3adfdf036ba1930..a9cc2a0a9d280ec94b2f07ea14e7b9a8b1634d3e 100644 --- a/Code/Projections/otbLambert93Projection.h +++ b/Code/Projections/otbLambert93Projection.h @@ -26,7 +26,7 @@ namespace otb { /** \class Lambert93Projection * \brief This class implements the Lambert93 map projection (RGF93 french geodesic system). -* It converts coordinates in longitude,latitude (WGS84) to Lambert 93 map coordinates. +* It converts coordinates in longitude, latitude (WGS84) to Lambert 93 map coordinates. * */ template <InverseOrForwardTransformationEnum transform> diff --git a/Code/Projections/otbLambertConformalConicMapProjection.h b/Code/Projections/otbLambertConformalConicMapProjection.h index 18d2e7e210191c0407661eebc6852e412caad6ed..a584614480cb16a53f7bb753b45725ea616c6c4a 100644 --- a/Code/Projections/otbLambertConformalConicMapProjection.h +++ b/Code/Projections/otbLambertConformalConicMapProjection.h @@ -26,7 +26,7 @@ namespace otb { /** \class LambertConformalConicMapProjection * \brief This class implements the Lambert Conformal Conic map projection. - * It converts coordinates in longitude,latitude (WGS84) to Lambert Conformal Conic map coordinates. + * It converts coordinates in longitude, latitude (WGS84) to Lambert Conformal Conic map coordinates. * */ template <InverseOrForwardTransformationEnum transform> diff --git a/Code/Projections/otbMapProjection.txx b/Code/Projections/otbMapProjection.txx index b29888b9801e0ffbe3a9baf5c056d0dd5c3c75ca..71155c881cbc56a8fe7d6b6eab0aaacd22d76a11 100644 --- a/Code/Projections/otbMapProjection.txx +++ b/Code/Projections/otbMapProjection.txx @@ -164,7 +164,7 @@ MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOu return outputPoint; } -///\return The geographic point corresponding to (0,0) +///\return The geographic point corresponding to (0, 0) template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, diff --git a/Code/Projections/otbMapToMapProjection.txx b/Code/Projections/otbMapToMapProjection.txx index 336ac9863964f7563ac8771c92199c4bb9f10768..2ec3eaec3eba6d88e0151f85a3302f7ed393adf7 100644 --- a/Code/Projections/otbMapToMapProjection.txx +++ b/Code/Projections/otbMapToMapProjection.txx @@ -72,7 +72,7 @@ MapToMapProjection<TInputMapProjection, InputPointType geopoint; OutputPointType point2; - //(lat,lon) projection + //(lat, lon) projection geopoint=m_InputMapProjection->Inverse(point1); //map projection point2=m_OutputMapProjection->Forward(geopoint); @@ -101,7 +101,7 @@ MapToMapProjection<TInputMapProjection, OutputPointType geopoint; InputPointType point1; - //(lat,lon) projection + //(lat, lon) projection geopoint=m_OutputMapProjection->Inverse(point2); //map projection point1=m_InputMapProjection->Forward(geopoint); @@ -130,7 +130,7 @@ TransformPoint(const InputPointType& point) const OutputPointOfInputMapProjectionType geopoint; OutputPointType point2; - //(lat,lon) projection + //(lat, lon) projection geopoint = m_InputMapProjection->TransformPoint(point); //map projection diff --git a/Code/Projections/otbMollweidMapProjection.h b/Code/Projections/otbMollweidMapProjection.h index 32dd440c06938e582260446b9b0494538c6d1555..a974056b2429e2a1f01d7f74651efab5f54aec71 100644 --- a/Code/Projections/otbMollweidMapProjection.h +++ b/Code/Projections/otbMollweidMapProjection.h @@ -26,7 +26,7 @@ namespace otb { /** \class MollweidMapProjection * \brief This class implements the Mollweid map projection. - * It converts coordinates in longitude,latitude (WGS84) to Mollweid map coordinates. + * It converts coordinates in longitude, latitude (WGS84) to Mollweid map coordinates. */ template <InverseOrForwardTransformationEnum transform> class ITK_EXPORT MollweidMapProjection : public MapProjection<ossimMollweidProjection, transform> diff --git a/Code/Projections/otbOrthoRectificationFilter.h b/Code/Projections/otbOrthoRectificationFilter.h index 74a8944c9939abd9eea1432621ffd52b719438b6..cdf7136b960a8c50a3aeb46cc5064d38ed572194 100644 --- a/Code/Projections/otbOrthoRectificationFilter.h +++ b/Code/Projections/otbOrthoRectificationFilter.h @@ -93,7 +93,7 @@ public: * Set the output size. This method is deprecated and is * maintained for backward compatibility only */ - itkLegacyMacro(void SetSize(const SizeType& size){this->SetOutputSize(size);}); + itkLegacyMacro(void SetSize(const SizeType& size){this->SetOutputSize(size); }); protected: OrthoRectificationFilter(); diff --git a/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.h b/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.h index a51151ff3870e742b06be321e3934f5ac86fcad6..80fd80f1597a7215cc803f3ccd0fcf12e56f9660 100644 --- a/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.h +++ b/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.h @@ -55,12 +55,12 @@ namespace otb { */ template <class TImage> class ITK_EXPORT PhysicalToRPCSensorModelImageFilter : - public itk::CastImageFilter<TImage,TImage> + public itk::CastImageFilter<TImage, TImage> { public: /** Standard class typedefs. */ typedef PhysicalToRPCSensorModelImageFilter Self; - typedef itk::CastImageFilter<TImage,TImage> Superclass; + typedef itk::CastImageFilter<TImage, TImage> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; diff --git a/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.txx b/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.txx index ac2b97410b68ed3de4e403118b0b878ad350aa42..f26ac2b419f285e0f377ce8dbf3d2b800a3d2a1f 100644 --- a/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.txx +++ b/Code/Projections/otbPhysicalToRPCSensorModelImageFilter.txx @@ -94,15 +94,15 @@ PhysicalToRPCSensorModelImageFilter<TImage> double gridSpacingX = size[0]/m_GridSize[0]; double gridSpacingY = size[1]/m_GridSize[1]; - for(unsigned int px = 0; px<m_GridSize[0];++px) + for(unsigned int px = 0; px<m_GridSize[0]; ++px) { - for(unsigned int py = 0; py<m_GridSize[1];++py) + for(unsigned int py = 0; py<m_GridSize[1]; ++py) { PointType inputPoint = input->GetOrigin(); inputPoint[0] += (px * gridSpacingX + 0.5) * input->GetSpacing()[0]; inputPoint[1] += (py * gridSpacingY + 0.5) * input->GetSpacing()[1]; PointType outputPoint = rsTransform->TransformPoint(inputPoint); - m_GCPsToSensorModelFilter->AddGCP(inputPoint,outputPoint); + m_GCPsToSensorModelFilter->AddGCP(inputPoint, outputPoint); } } diff --git a/Code/Projections/otbPlaceNameToLonLat.cxx b/Code/Projections/otbPlaceNameToLonLat.cxx index 21ba4642472e8e731f90b4a98325bea2dc6db171..392a5d45b46fcaa1f66f8779f21fbc02bc38a043 100644 --- a/Code/Projections/otbPlaceNameToLonLat.cxx +++ b/Code/Projections/otbPlaceNameToLonLat.cxx @@ -62,7 +62,7 @@ bool PlaceNameToLonLat::Evaluate() std::ostringstream urlStream; urlStream << "http://maps.google.com/maps?q="; urlStream << m_PlaceName; - urlStream << "&sll=38.9594,-95.2655&sspn=119.526,360&output=kml&ie=utf-8&v=2.2&cv=4.2.0180.1134&hl=en"; + urlStream << "&sll=38.9594, -95.2655&sspn=119.526, 360&output=kml&ie=utf-8&v=2.2&cv=4.2.0180.1134&hl=en"; RetrieveXML(urlStream); ParseXMLGoogle(); } diff --git a/Code/Projections/otbSVY21MapProjection.h b/Code/Projections/otbSVY21MapProjection.h index 0f03737cda34f98f97c2ab59b0ee3ddd08616672..bd70feffcf911c0222f03df206906a388d74f8ad 100644 --- a/Code/Projections/otbSVY21MapProjection.h +++ b/Code/Projections/otbSVY21MapProjection.h @@ -26,7 +26,7 @@ namespace otb { /** \class SVY21MapProjection * \brief This class implements the SVY21 map projection (Singapore geodesic system). -* It converts coordinates in longitude,latitude (WGS84) to SVY21 map coordinates. +* It converts coordinates in longitude, latitude (WGS84) to SVY21 map coordinates. * */ template <InverseOrForwardTransformationEnum transform> diff --git a/Code/Projections/otbSensorModelBase.h b/Code/Projections/otbSensorModelBase.h index 78a0615eb3ba156a2ee75b80cebbb5baa0d33310..53ef7072ebfcadd347888d29f6595cdf565375b2 100644 --- a/Code/Projections/otbSensorModelBase.h +++ b/Code/Projections/otbSensorModelBase.h @@ -36,8 +36,8 @@ namespace otb { /** \class SensorModelBase * \brief Base class for the sensor model projection classes. - * This class allows to transform a geographic point in (lat,long) to a point in the sensor geometry. - * (lat,lon) -> (i,j) ou (lat,lon,h) -> (i,j) + * This class allows to transform a geographic point in (lat, long) to a point in the sensor geometry. + * (lat, lon) -> (i, j) ou (lat, lon, h) -> (i, j) * * \ingroup Projection * diff --git a/Code/Projections/otbSinusoidalMapProjection.h b/Code/Projections/otbSinusoidalMapProjection.h index 266b1f2f8812eee4854487a02486bc1bb71cae47..e21e657260c1854a536ee49d00a5306d1ae8cb71 100644 --- a/Code/Projections/otbSinusoidalMapProjection.h +++ b/Code/Projections/otbSinusoidalMapProjection.h @@ -27,7 +27,7 @@ namespace otb /** \class SinusoidalMapProjection * \brief This class implements the Sinusoidal map projection. - * It converts coordinates in longitude,latitude (WGS84) to Sinusoidal map coordinates. + * It converts coordinates in longitude, latitude (WGS84) to Sinusoidal map coordinates. */ template <InverseOrForwardTransformationEnum transform> class ITK_EXPORT SinusoidalMapProjection : public MapProjection<ossimSinusoidalProjection, transform> diff --git a/Code/Projections/otbTileMapTransform.txx b/Code/Projections/otbTileMapTransform.txx index c05fa4fe2d870dc2bd92c2b81bb5ee2314a4ca6e..2ac4b4e48caafaf28876acb8e3fc4515e4b958b6 100644 --- a/Code/Projections/otbTileMapTransform.txx +++ b/Code/Projections/otbTileMapTransform.txx @@ -97,7 +97,7 @@ TileMapTransform<TTransformDirection, TScalarType, NInputDimensions, NOutputDime return outputPoint; } -///\return The geographic point corresponding to (0,0) +///\return The geographic point corresponding to (0, 0) template<InverseOrForwardTransformationEnum TTransformDirection, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> typename TileMapTransform<TTransformDirection, TScalarType, NInputDimensions, NOutputDimensions>::InputPointType diff --git a/Code/Projections/otbTransMercatorMapProjection.h b/Code/Projections/otbTransMercatorMapProjection.h index 325308399bdaefa433387e915ebb3134291444f8..8567d3fc71369ccaa0d9c3b7dcf98b0350708653 100644 --- a/Code/Projections/otbTransMercatorMapProjection.h +++ b/Code/Projections/otbTransMercatorMapProjection.h @@ -26,7 +26,7 @@ namespace otb { /** \class TransMercatorMapProjection * \brief This class implements the TransMercator map projection. - * It converts coordinates in longitude,latitude (WGS84) to TransMercator map coordinates. + * It converts coordinates in longitude, latitude (WGS84) to TransMercator map coordinates. * */ template <InverseOrForwardTransformationEnum transform> diff --git a/Code/Projections/otbUtmMapProjection.h b/Code/Projections/otbUtmMapProjection.h index 2a2e31258f6982bef643418be0005f3f698b76db..78133542761c7acdbb41f2d9da0d438516b26ce8 100644 --- a/Code/Projections/otbUtmMapProjection.h +++ b/Code/Projections/otbUtmMapProjection.h @@ -26,7 +26,7 @@ namespace otb /** \class UtmMapProjection * \brief This class implements the UTM map projection. * - * It converts coordinates in longitude,latitude (WGS84) to UTM map coordinates. + * It converts coordinates in longitude, latitude (WGS84) to UTM map coordinates. * */ template <InverseOrForwardTransformationEnum TTransform> diff --git a/Code/Projections/otbVectorDataProjectionFilter.txx b/Code/Projections/otbVectorDataProjectionFilter.txx index f2b3f2d1784732148557e49953015fd34033ae16..f95424abcb1854fcbcf57faa6b164d4af007b84a 100644 --- a/Code/Projections/otbVectorDataProjectionFilter.txx +++ b/Code/Projections/otbVectorDataProjectionFilter.txx @@ -376,7 +376,7 @@ VectorDataProjectionFilter<TInputVectorData, TOutputVectorData> // For each child typename InputChildrenListType::iterator it = children.begin(); while (it != children.end()) -//for(typename InputChildrenListType::iterator it = children.begin(); it!=children.end();++it) +//for(typename InputChildrenListType::iterator it = children.begin(); it!=children.end(); ++it) { typename OutputInternalTreeNodeType::Pointer newContainer; diff --git a/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx b/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx index c8e213b55ec35e8a43985f9162f68d45bf0e5de6..8497a6df8b7993465ac6e3cc8f6da983661fc717 100644 --- a/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx +++ b/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx @@ -583,7 +583,7 @@ AtmosphericRadiativeTerms for (unsigned int i = 0; i < m_Values.size(); ++i) { os << "Channel " << i << " : " << std::endl; - //ValueType::(os,indent); + //ValueType::(os, indent); os << indent << "Intrinsic Atmospheric Reflectance : " << m_Values[i]->GetIntrinsicAtmosphericReflectance() << std::endl; os << indent << "Shperical Albedo of the Atmosphere : " diff --git a/Code/Radiometry/otbSIXSTraits.cxx b/Code/Radiometry/otbSIXSTraits.cxx index ab46cbf5dfa4f66310d5a87dca96c66759e03a19..d1be1516117c0df1cb3fe0857d7d58ae86777a78 100644 --- a/Code/Radiometry/otbSIXSTraits.cxx +++ b/Code/Radiometry/otbSIXSTraits.cxx @@ -102,7 +102,7 @@ SIXSTraits::ComputeAtmosphericParameters( s = new otb_6s_doublereal[S_6S_SIZE]; memset(s, 0, S_6S_SIZE * sizeof(otb_6s_doublereal)); const ValuesVectorType& FilterFunctionValues6S = WavelengthSpectralBand->GetFilterFunctionValues6S(); - // Set the values of FilterFunctionValues6S in s between [iinf-1;isup] + // Set the values of FilterFunctionValues6S in s between [iinf-1; isup] for (unsigned int i = 0; i < FilterFunctionValues6S.size() && cpt < S_6S_SIZE; ++i) { s[cpt] = FilterFunctionValues6S[i]; diff --git a/Code/Radiometry/otbSarBrightnessFunction.h b/Code/Radiometry/otbSarBrightnessFunction.h index c7aa67e54f42a73cf1be5894b8c61b68ff66921b..5d4fef95be5f5ffd803cd2bba30b7e3c1463109c 100644 --- a/Code/Radiometry/otbSarBrightnessFunction.h +++ b/Code/Radiometry/otbSarBrightnessFunction.h @@ -74,7 +74,7 @@ public: /** Datatype used for the evaluation */ typedef double RealType; - typedef otb::Functor::SarBrightnessFunctor<RealType,RealType> FunctorType; + typedef otb::Functor::SarBrightnessFunctor<RealType, RealType> FunctorType; typedef typename FunctorType::RealType FunctorRealType; typedef otb::SarParametricMapFunction<InputImageType> ParametricFunctionType; diff --git a/Code/Radiometry/otbSarParametricMapFunction.txx b/Code/Radiometry/otbSarParametricMapFunction.txx index 0b2b629aa9788aeddbdda5432fb1da0d94acc5a9..5dd02e3b24055cbddd75e6f95e3caad1b2cafe5f 100644 --- a/Code/Radiometry/otbSarParametricMapFunction.txx +++ b/Code/Radiometry/otbSarParametricMapFunction.txx @@ -44,7 +44,7 @@ SarParametricMapFunction<TInputImage, TCoordRep> m_ProductWidth(0), m_ProductHeight(0) { - m_Coeff.SetSize(1,1); + m_Coeff.SetSize(1, 1); m_Coeff.Fill(0); } @@ -209,7 +209,7 @@ SarParametricMapFunction<TInputImage, TCoordRep> } else if (m_Coeff.Rows() * m_Coeff.Cols() == 1) { - result = m_Coeff(0,0); + result = m_Coeff(0, 0); } else { diff --git a/Code/Radiometry/otbSarRadiometricCalibrationFunction.h b/Code/Radiometry/otbSarRadiometricCalibrationFunction.h index e9302f0eae7c96f00419021ff0b2df45003d78e5..f7c6c1c2f763dc6f57e5a8da63d0e26206404c83 100644 --- a/Code/Radiometry/otbSarRadiometricCalibrationFunction.h +++ b/Code/Radiometry/otbSarRadiometricCalibrationFunction.h @@ -74,7 +74,7 @@ public: /** Datatype used for the evaluation */ typedef double RealType; - typedef otb::Functor::SarRadiometricCalibrationFunctor<RealType,RealType> FunctorType; + typedef otb::Functor::SarRadiometricCalibrationFunctor<RealType, RealType> FunctorType; typedef typename FunctorType::RealType FunctorRealType; typedef otb::SarParametricMapFunction<InputImageType> ParametricFunctionType; diff --git a/Code/Radiometry/otbSarRadiometricCalibrationFunction.txx b/Code/Radiometry/otbSarRadiometricCalibrationFunction.txx index ca3a7a493202a08aaf5c23582746484d6ea13f95..36ba4e6922f4b0e526af68da135f1dc1acdaf442 100644 --- a/Code/Radiometry/otbSarRadiometricCalibrationFunction.txx +++ b/Code/Radiometry/otbSarRadiometricCalibrationFunction.txx @@ -88,7 +88,7 @@ SarRadiometricCalibrationFunction<TInputImage, TCoordRep> result = itk::NumericTraits<RealType>::Zero; IndexType index; - this->GetInputImage()->TransformPhysicalPointToIndex(point,index); + this->GetInputImage()->TransformPhysicalPointToIndex(point, index); if (!this->GetInputImage()) diff --git a/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.h b/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.h index 930b0497e3876f6a45b1c4456d2db0c9efb08449..7e4fce0e8c37fddaec918b5b13632e1ccb529b3c 100644 --- a/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.h +++ b/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.h @@ -91,12 +91,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::CoherencyToMuellerFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT CoherencyToMuellerImageFilter : - public otb::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public otb::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef CoherencyToMuellerImageFilter Self; - typedef otb::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef otb::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; diff --git a/Code/SARPolarimetry/otbHAlphaImageFilter.h b/Code/SARPolarimetry/otbHAlphaImageFilter.h index cb7c1b4d007f88c8fea6e17b208618fd2166c805..1f3d2ae6979026ff84e2a327aef1d5b7e5398e8b 100644 --- a/Code/SARPolarimetry/otbHAlphaImageFilter.h +++ b/Code/SARPolarimetry/otbHAlphaImageFilter.h @@ -47,25 +47,25 @@ public: typedef typename TOutput::ValueType OutputValueType; /** CoherencyMatrix type **/ - typedef itk::Vector<RealType,9> CoherencyMatrixType; + typedef itk::Vector<RealType, 9> CoherencyMatrixType; /** Vector type used to store eigenvalues. */ typedef itk::Vector<RealType, 3> EigenvalueType; /** Matrix type used to store eigenvectors. */ typedef itk::Vector<float, 2> VectorType; - typedef itk::Vector<VectorType,3> EigenVectorFirstComposantType; - typedef itk::Vector<VectorType,3> EigenVectorType; // type d'un vecteur propre (partie reelle, partie imaginaire) - typedef itk::Vector<itk::Vector<float, 6>,3> EigenMatrixType; - typedef itk::Image<EigenVectorType,2> EigenVectorImageType; - typedef itk::Image<double,2> EigenValueImageType; + typedef itk::Vector<VectorType, 3> EigenVectorFirstComposantType; + typedef itk::Vector<VectorType, 3> EigenVectorType; // type d'un vecteur propre (partie reelle, partie imaginaire) + typedef itk::Vector<itk::Vector<float, 6>, 3> EigenMatrixType; + typedef itk::Image<EigenVectorType, 2> EigenVectorImageType; + typedef itk::Image<double, 2> EigenValueImageType; typedef itk::Vector<double, 3> OutputVectorType; typedef itk::Vector<float, 2> ComplexVectorType; typedef itk::Vector<ComplexVectorType, 3> HermitianVectorType; - typedef itk::Vector<HermitianVectorType,3> HermitianMatrixType; - typedef otb::HermitianEigenAnalysis<CoherencyMatrixType,EigenvalueType, EigenMatrixType> HermitianAnalysisType; + typedef itk::Vector<HermitianVectorType, 3> HermitianMatrixType; + typedef otb::HermitianEigenAnalysis<CoherencyMatrixType, EigenvalueType, EigenMatrixType> HermitianAnalysisType; inline TOutput operator()( const TInput & Coherency ) const @@ -87,7 +87,7 @@ public: T[6] = static_cast<RealType>(Coherency[2].imag()); T[7] = static_cast<RealType>(Coherency[4].real()); T[8] = static_cast<RealType>(Coherency[4].imag()); - HermitianAnalysis.ComputeEigenValuesAndVectors(T,eigenValues,eigenVectors); + HermitianAnalysis.ComputeEigenValuesAndVectors(T, eigenValues, eigenVectors); // Entropy estimation RealType totalEigenValues = 0.0; @@ -177,12 +177,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::HAlphaFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT HAlphaImageFilter : - public otb::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public otb::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef HAlphaImageFilter Self; - typedef otb::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef otb::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -190,7 +190,7 @@ public: itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(HAlphaImageFilter,UnaryFunctorImageFilter); + itkTypeMacro(HAlphaImageFilter, UnaryFunctorImageFilter); protected: HAlphaImageFilter() {} diff --git a/Code/SARPolarimetry/otbHermitianEigenAnalysis.h b/Code/SARPolarimetry/otbHermitianEigenAnalysis.h index cf26b48225b1107f1d51cec420c85218a1610182..fdc417d5bbe0f55f962eafa59f96e95393486f2b 100644 --- a/Code/SARPolarimetry/otbHermitianEigenAnalysis.h +++ b/Code/SARPolarimetry/otbHermitianEigenAnalysis.h @@ -1,7 +1,7 @@ /*========================================================================= Program: Insight Segmentation & Registration Toolkit - Module: $RCSfile: otbHermitianEigenAnalysis.h,v $ + Module: $RCSfile: otbHermitianEigenAnalysis.h, v $ Language: C++ Date: $Date: 2005/07/09 22:43:35 $ Version: $Revision: 1.5 $ @@ -70,7 +70,7 @@ public: typedef itk::Vector<float, 2> ComplexVectorType; typedef itk::Vector<ComplexVectorType, 3> HermitianVectorType; - typedef itk::Vector<HermitianVectorType,3> HermitianMatrixType; + typedef itk::Vector<HermitianVectorType, 3> HermitianMatrixType; HermitianEigenAnalysis(): diff --git a/Code/SARPolarimetry/otbHermitianEigenAnalysis.txx b/Code/SARPolarimetry/otbHermitianEigenAnalysis.txx index a1d79c596c46f3f7218f3ca0ec4767322585d7ed..942a4e66627bcd0815acda4ba58b04fba8fb2581 100644 --- a/Code/SARPolarimetry/otbHermitianEigenAnalysis.txx +++ b/Code/SARPolarimetry/otbHermitianEigenAnalysis.txx @@ -1,7 +1,7 @@ /*========================================================================= Program: Insight Segmentation & Registration Toolkit - Module: $RCSfile: otbHermitianEigenAnalysis.txx,v $ + Module: $RCSfile: otbHermitianEigenAnalysis.txx, v $ Language: C++ Date: Version: @@ -35,7 +35,7 @@ ComputeEigenValues(const TMatrix & A, { for( unsigned int col=0; col < m_Dimension; col++ ) { - inputMatrix[k++] = A(row,col); + inputMatrix[k++] = A(row, col); } } @@ -271,13 +271,13 @@ ComputeEigenValuesAndVectors( float eigenVal[3]; for (int i=0; i<3; i++) - for (int j=0;j<3; j++) + for (int j=0; j<3; j++) { eigenVect[i][j][0]=0.; eigenVect[i][j][1]=0.; } - for (int i=0;i<3;i++) + for (int i=0; i<3; i++) eigenVal[i]=0.; @@ -293,14 +293,14 @@ ComputeEigenValuesAndVectors( // Recuperation des sorties for (int i=0; i<3; i++) - for (int j=0;j<3; j++) + for (int j=0; j<3; j++) { EigenVectors[i][2*j]=eigenVect[i][j][0]; EigenVectors[i][2*j+1]=eigenVect[i][j][1]; } - for (int i=0;i<3;i++) + for (int i=0; i<3; i++) EigenValues[i]=eigenVal[i]; diff --git a/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h b/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h index b9bd408953cc4261ee26fd94610caceac0d10529..61ca413afb4b8c682e70a6d353b20665cc01938e 100644 --- a/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h +++ b/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.h @@ -129,12 +129,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::MLCToCircularCoherencyDegreeFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT MLCToCircularCoherencyDegreeImageFilter : - public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef MLCToCircularCoherencyDegreeImageFilter Self; - typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -142,7 +142,7 @@ public: itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(MLCToCircularCoherencyDegreeImageFilter,itk::UnaryFunctorImageFilter); + itkTypeMacro(MLCToCircularCoherencyDegreeImageFilter, itk::UnaryFunctorImageFilter); protected: diff --git a/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h b/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h index 67cfd638492f478abb44c1f746100ad9c801b3b4..4a5bd553be09f09496a9d67e06116f28c24a0995 100644 --- a/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h +++ b/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.h @@ -98,12 +98,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::MLCToCoherencyDegreeFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT MLCToCoherencyDegreeImageFilter : - public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef MLCToCoherencyDegreeImageFilter Self; - typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -111,7 +111,7 @@ public: itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(MLCToCoherencyDegreeImageFilter,itk::UnaryFunctorImageFilter); + itkTypeMacro(MLCToCoherencyDegreeImageFilter, itk::UnaryFunctorImageFilter); protected: diff --git a/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h b/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h index 444a3d695d43176d1049381a5d4cf37dd054eed8..0e88d67480521aa9ce4bfddc14771430e016d44c 100644 --- a/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h +++ b/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.h @@ -95,12 +95,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::MLCToCoherencyFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT MLCToCoherencyImageFilter : - public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef MLCToCoherencyImageFilter Self; - typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -108,7 +108,7 @@ public: itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(MLCToCoherencyImageFilter,itk::UnaryFunctorImageFilter); + itkTypeMacro(MLCToCoherencyImageFilter, itk::UnaryFunctorImageFilter); protected: diff --git a/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h b/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h index 2b8496d0608b3d79ce6dcbac3697632fc3516057..1bb571c3704f07d08ed776e188d52ac217839e05 100644 --- a/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.h @@ -80,12 +80,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::MuellerToCircularPolarisationFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT MuellerToCircularPolarisationImageFilter : - public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef MuellerToCircularPolarisationImageFilter Self; - typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -93,7 +93,7 @@ public: itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(MuellerToCircularPolarisationImageFilter,itk::UnaryFunctorImageFilter); + itkTypeMacro(MuellerToCircularPolarisationImageFilter, itk::UnaryFunctorImageFilter); protected: diff --git a/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h b/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h index 90880162919a1fecd67e2eaf1a77212caa81ebdb..8db89f81305147b82b737b1ec00101659289791c 100644 --- a/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToMLCImageFilter.h @@ -61,12 +61,12 @@ public: RealType M43 = static_cast<RealType>(Mueller[14]); RealType M44 = static_cast<RealType>(Mueller[15]); - ComplexType hhhh(M11+M22+2.*M12,0.0); - ComplexType hvhv(M11-M22,0.0); - ComplexType vvvv(M11+M22-2.*M12,0.0); - ComplexType hhhv(M13+M23,-1.*(M14+M24)); - ComplexType hhvv(M33-M44,-2.*M34); - ComplexType hvvv(M13-M23,-1.*(M14-M24)); + ComplexType hhhh(M11+M22+2.*M12, 0.0); + ComplexType hvhv(M11-M22, 0.0); + ComplexType vvvv(M11+M22-2.*M12, 0.0); + ComplexType hhhv(M13+M23, -1.*(M14+M24)); + ComplexType hhvv(M33-M44, -2.*M34); + ComplexType hvvv(M13-M23, -1.*(M14-M24)); result[0] = static_cast<OutputValueType>( hhhh ); result[1] = static_cast<OutputValueType>( 2.* hhhv ); @@ -102,12 +102,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::MuellerToMLCFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT MuellerToMLCImageFilter : - public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef MuellerToMLCImageFilter Self; - typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -115,7 +115,7 @@ public: itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(MuellerToMLCImageFilter,itk::UnaryFunctorImageFilter); + itkTypeMacro(MuellerToMLCImageFilter, itk::UnaryFunctorImageFilter); protected: diff --git a/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h b/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h index ec9a1200ab213be6fdf4aa321c074c8ef8c12d3a..c2c5fb726604f8045ff9c1096e7d3d74b0a7a41c 100644 --- a/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h +++ b/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.h @@ -41,8 +41,8 @@ class MuellerToPolarisationDegreeAndPowerFunctor public: typedef double RealType; typedef typename TOutput::ValueType OutputValueType; - typedef itk::Matrix<RealType,4,4> MuellerMatrixType; - typedef itk::Vector<RealType,4> StokesVectorType; + typedef itk::Matrix<RealType, 4, 4> MuellerMatrixType; + typedef itk::Vector<RealType, 4> StokesVectorType; inline TOutput operator()( const TInput & Mueller ) const { @@ -167,12 +167,12 @@ private: template <class TInputImage, class TOutputImage, class TFunction = Functor::MuellerToPolarisationDegreeAndPowerFunctor< ITK_TYPENAME TInputImage::PixelType, ITK_TYPENAME TOutputImage::PixelType> > class ITK_EXPORT MuellerToPolarisationDegreeAndPowerImageFilter : - public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> + public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> { public: /** Standard class typedefs. */ typedef MuellerToPolarisationDegreeAndPowerImageFilter Self; - typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, TFunction> Superclass; + typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage, TFunction> Superclass; typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<const Self> ConstPointer; @@ -180,7 +180,7 @@ public: itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(MuellerToPolarisationDegreeAndPowerImageFilter,itk::UnaryFunctorImageFilter); + itkTypeMacro(MuellerToPolarisationDegreeAndPowerImageFilter, itk::UnaryFunctorImageFilter); protected: diff --git a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx index 6f5c611c0daf10c7e74272c1afa5e79cb9690572..d2e11134d9c9b2499695ffd9fd60182e72946d24 100644 --- a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx +++ b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx @@ -294,8 +294,8 @@ ImageToImageRCC8Calculator<TInputImage> /// Definition of the filters used typedef itk::InvertIntensityImageFilter<BoolImageType, BoolImageType> InvertFilterType; typedef itk::AndImageFilter<BoolImageType, BoolImageType, BoolImageType> AndFilterType; -//TODELETE typedef otb::Image<unsigned char,2> TmpImageType; -//TODELETE typedef itk::CastImageFilter<BoolImageType,TmpImageType> CastFilterType; +//TODELETE typedef otb::Image<unsigned char, 2> TmpImageType; +//TODELETE typedef itk::CastImageFilter<BoolImageType, TmpImageType> CastFilterType; //TODELETE typedef ImageFileWriter<TmpImageType> WriterType; /// Declaration and instantiation diff --git a/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx b/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx index 7b24a118ad8f7a29ac3b4b9d47a129c571144137..83bddfdafc3d84b49944ade07a391659635a8c66 100644 --- a/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx +++ b/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx @@ -209,7 +209,7 @@ PolygonToPolygonRCC8Calculator<TInputPolygon> if (isInside && nextIsInside) { - //std::cout<<current<<" is inside and "<<it.Value()<<" is inside, nb crossings: "<<polygon2->NbCrossing(current,it.Value())<<std::endl; + //std::cout<<current<<" is inside and "<<it.Value()<<" is inside, nb crossings: "<<polygon2->NbCrossing(current, it.Value())<<std::endl; resp = polygon2->NbCrossing(current, it.Value()) > 0; } current = it.Value(); @@ -229,7 +229,7 @@ PolygonToPolygonRCC8Calculator<TInputPolygon> if (!resp && isInside && firstIsInside) { resp = polygon2->NbCrossing(current, first) > 0; - //std::cout<<current<<" is inside and "<<first<<" is inside, nb crossings: "<<polygon2->NbCrossing(current,first)<<std::endl; + //std::cout<<current<<" is inside and "<<first<<" is inside, nb crossings: "<<polygon2->NbCrossing(current, first)<<std::endl; } return resp; @@ -301,12 +301,12 @@ PolygonToPolygonRCC8Calculator<TInputPolygon> if (polygon2->NbTouching(current, it.Value()) > 0) { resp = true; - //std::cout<<"NbCrossing: "<<current<<" -> "<<it.Value()<<": "<<polygon2->NbCrossing(current,it.Value())<<std::endl; + //std::cout<<"NbCrossing: "<<current<<" -> "<<it.Value()<<": "<<polygon2->NbCrossing(current, it.Value())<<std::endl; } if (polygon2->NbCrossing(current, it.Value()) > 0) { resp = true; - //std::cout<<"NbTouching: "<<current<<" -> "<<it.Value()<<": "<<polygon2->NbTouching(current,it.Value())<<std::endl; + //std::cout<<"NbTouching: "<<current<<" -> "<<it.Value()<<": "<<polygon2->NbTouching(current, it.Value())<<std::endl; } current = it.Value(); @@ -320,12 +320,12 @@ PolygonToPolygonRCC8Calculator<TInputPolygon> if (!resp && polygon2->NbTouching(current, first) > 0) { resp = true; - //std::cout<<"NbCrossing: "<<current<<" -> "<<first<<": "<<polygon2->NbCrossing(current,first)<<std::endl; + //std::cout<<"NbCrossing: "<<current<<" -> "<<first<<": "<<polygon2->NbCrossing(current, first)<<std::endl; } if (polygon2->NbCrossing(current, first) > 0) { resp = true; - //std::cout<<"NbTouching: "<<current<<" -> "<<first<<": "<<polygon2->NbTouching(current,first)<<std::endl; + //std::cout<<"NbTouching: "<<current<<" -> "<<first<<": "<<polygon2->NbTouching(current, first)<<std::endl; } return resp; diff --git a/Code/Testing/otbTestHelper.cxx b/Code/Testing/otbTestHelper.cxx index 0308cf0332c69d5d4dd57a3d7a5978947d0229c2..0ab1bb952812bc71fe0e02039f40393c9ba7265e 100644 --- a/Code/Testing/otbTestHelper.cxx +++ b/Code/Testing/otbTestHelper.cxx @@ -410,7 +410,7 @@ int TestHelper::RegressionTestImage(int cpt, const char *testImageFilename, cons { typedef otb::PrintableImageFilter<ImageType> RescaleType; typedef RescaleType::OutputImageType OutputType; - /* typedef itk::ExtractImageFilter<OutputType,DiffOutputType> ExtractType; */ + /* typedef itk::ExtractImageFilter<OutputType, DiffOutputType> ExtractType; */ typedef otb::ImageFileWriter<RescaleType::OutputImageType> WriterType; RescaleType::Pointer rescale = RescaleType::New(); @@ -830,7 +830,7 @@ int TestHelper::RegressionTestOgrFile(const char *testOgrFilename, const char *b /* -------------------------------------------------------------------- */ otbCheckStringValue("INFO: using driver", ref_poDriver->GetName(), test_poDriver->GetName(), nbdiff, m_ReportErrors); - // otbCheckStringValue("INFO: Internal data source name", ref_poDS->GetName(),test_poDS->GetName(),nbdiff,m_ReportErrors ); + // otbCheckStringValue("INFO: Internal data source name", ref_poDS->GetName(), test_poDS->GetName(), nbdiff, m_ReportErrors ); std::string strRefName(ref_poDS->GetName()); std::string strTestName(test_poDS->GetName()); if (strRefName != strTestName) diff --git a/Code/Visu/otbImageWidgetBase.txx b/Code/Visu/otbImageWidgetBase.txx index 8b12f462cd54c0b23236d1051987608aace1c723..4365360770f7a1960df7789fa8127d28278cf041 100644 --- a/Code/Visu/otbImageWidgetBase.txx +++ b/Code/Visu/otbImageWidgetBase.txx @@ -354,8 +354,8 @@ ImageWidgetBase<TPixel> m_BufferedRegion.GetSize()[1], 0, GL_RGBA, GL_UNSIGNED_BYTE, m_OpenGlBuffer); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); // Nearest Filtering glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); // Nearest Filtering - // glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); // Linear Filtering - // glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // Linear Filtering + // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); // Linear Filtering + // glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); // Linear Filtering glBindTexture (GL_TEXTURE_2D, texture); glBegin (GL_QUADS); diff --git a/Code/Visualization/otbCircleGlComponent.cxx b/Code/Visualization/otbCircleGlComponent.cxx index 46b759b5edbf422b122d2de45b70d88a7a47d4f7..7fecfe384e8f540c7f14c1a43ba89bfe2fc45c0c 100644 --- a/Code/Visualization/otbCircleGlComponent.cxx +++ b/Code/Visualization/otbCircleGlComponent.cxx @@ -110,7 +110,7 @@ CircleGlComponent glEnd(); // Draw the center - //glColor4d(m_ColorList[id][0],m_ColorList[id][1],m_ColorList[id][2],1) + //glColor4d(m_ColorList[id][0], m_ColorList[id][1], m_ColorList[id][2], 1) if (m_CenterRepresentation == CIRCLE && m_Radius > 4) { glColor4d(0, 0, 0, 1); diff --git a/Code/Visualization/otbCurves2DWidget.cxx b/Code/Visualization/otbCurves2DWidget.cxx index 8c541ac21a7c3c0ad038f40c18b46bbf79b20028..9cd55c1772d14b1550d19722ee8ae9f93c5ca8a1 100644 --- a/Code/Visualization/otbCurves2DWidget.cxx +++ b/Code/Visualization/otbCurves2DWidget.cxx @@ -281,14 +281,14 @@ void Curves2DWidget::RenderGrid() pos = screenGridOrigin[1]; int scale = 0; std::ostringstream oss; - gl_font(FL_COURIER_BOLD,8); + gl_font(FL_COURIER_BOLD, 8); glColor4d(0, 0, 0, 0.5); while(pos <= this->h()-m_Margins[1]) { oss<<scale; - gl_draw(oss.str().c_str(),(float)m_Margins[0]-20,(float)pos); + gl_draw(oss.str().c_str(), (float)m_Margins[0]-20, (float)pos); pos+=screenGridSpacing[1]; scale += m_GridSpacing[1]; oss.str(""); @@ -301,7 +301,7 @@ void Curves2DWidget::RenderGrid() { oss<<scale; - gl_draw(oss.str().c_str(),(float)pos, m_Margins[1]-5); + gl_draw(oss.str().c_str(), (float)pos, m_Margins[1]-5); pos+=screenGridSpacing[0]; scale += m_GridSpacing[0]; oss.str(""); diff --git a/Code/Visualization/otbGaussianRenderingFunction.h b/Code/Visualization/otbGaussianRenderingFunction.h index 24e860276b4dc4f84165e154479f0422c4066571..9016af3a86fccffe3f4e5ab972606ed22bd25631 100644 --- a/Code/Visualization/otbGaussianRenderingFunction.h +++ b/Code/Visualization/otbGaussianRenderingFunction.h @@ -131,7 +131,7 @@ namespace otb if ((spixel.Size() == 4) && (output.Size() == 4)) { assert((spixel[3] >= SCREEN_COLOR_MIN_VALUE) && (spixel[3] <= SCREEN_COLOR_MAX_VALUE)); - output[3] = static_cast<OutputValueType>(spixel[3]);//just copy the alpha channel + output[3] = static_cast<OutputValueType>(spixel[3]); //just copy the alpha channel } return output; @@ -142,7 +142,7 @@ namespace otb * p[0]: mean value of the gaussian curve * p[1]: standard deviation of the gaussian curve * p[2..n]: minimum and maximum for the different bands, has to be - * provided as [minBand0, maxBand0, minBand1, maxBand1,...] + * provided as [minBand0, maxBand0, minBand1, maxBand1, ...] */ virtual void SetParameters(const ParametersType & p) { @@ -171,7 +171,7 @@ namespace otb * p[0]: mean value of the gaussian curve * p[1]: standard deviation of the gaussian curve * p[2..n]: minimum and maximum for the different bands, has to be - * provided as [minBand0, maxBand0, minBand1, maxBand1,...] + * provided as [minBand0, maxBand0, minBand1, maxBand1, ...] */ virtual ParametersType GetParameters() const { diff --git a/Code/Visualization/otbImageLayer.h b/Code/Visualization/otbImageLayer.h index 16ea7a940183495de0682d1779a760a043125d64..c019c3e0d3f3d8ac1f7d7ed03e762092da61f482 100644 --- a/Code/Visualization/otbImageLayer.h +++ b/Code/Visualization/otbImageLayer.h @@ -189,7 +189,7 @@ public: /** Get the list sample used by the rendering function */ virtual ListSamplePointerType GetListSample() { -// this->UpdateListSample();//FIXME condition to IsModified +// this->UpdateListSample(); //FIXME condition to IsModified return m_ListSample; } diff --git a/Code/Visualization/otbImageLayer.txx b/Code/Visualization/otbImageLayer.txx index c93eeeae249ebe8f42a05ac2ce347baea54d2094..e086acdf2f748613462802960e64887544730e9c 100644 --- a/Code/Visualization/otbImageLayer.txx +++ b/Code/Visualization/otbImageLayer.txx @@ -378,7 +378,7 @@ ImageLayer<TImage, TOutputImage> this->UpdateListSample(); PixelType pixel; - itk::PixelBuilder<PixelType>::Zero(pixel,(m_Image->GetNumberOfComponentsPerPixel())); + itk::PixelBuilder<PixelType>::Zero(pixel, (m_Image->GetNumberOfComponentsPerPixel())); // Ensure rendering function initialization m_RenderingFunction->Initialize(m_Image->GetMetaDataDictionary()); //FIXME check, but the call must be done in the generator. To be moved to the layer? diff --git a/Code/Visualization/otbImageLayerGenerator.h b/Code/Visualization/otbImageLayerGenerator.h index 10d9c170f4b9d8115eaea5ccfa66c2c139f4c0eb..c51f7fdd524355ed47c8edf1ac7024543bf3accc 100644 --- a/Code/Visualization/otbImageLayerGenerator.h +++ b/Code/Visualization/otbImageLayerGenerator.h @@ -126,8 +126,8 @@ public: itkGetMacro(ScreenRatio, double); /** Get the generated default rendering function */ -// itkSetObjectMacro(RenderingFunction,RenderingFunctionType); -// itkGetObjectMacro(RenderingFunction,RenderingFunctionType); +// itkSetObjectMacro(RenderingFunction, RenderingFunctionType); +// itkGetObjectMacro(RenderingFunction, RenderingFunctionType); virtual void SetRenderingFunction(RenderingFunctionType* func) { if (this->m_Layer.IsNull()) @@ -151,8 +151,8 @@ public: } /** Set/Get the blending function */ -// itkSetObjectMacro(BlendingFunction,BlendingFunctionType); -// itkGetObjectMacro(BlendingFunction,BlendingFunctionType); +// itkSetObjectMacro(BlendingFunction, BlendingFunctionType); +// itkGetObjectMacro(BlendingFunction, BlendingFunctionType); virtual void SetBlendingFunction(BlendingFunctionType* func) { if (this->m_Layer.IsNull()) diff --git a/Code/Visualization/otbImageWidgetController.cxx b/Code/Visualization/otbImageWidgetController.cxx index 9a6429db01d3af10361484b3c27b167c1b944aa8..1f845850dec10c6238540f1964219c2af89fde9a 100644 --- a/Code/Visualization/otbImageWidgetController.cxx +++ b/Code/Visualization/otbImageWidgetController.cxx @@ -62,7 +62,7 @@ int ImageWidgetController::HandleWidgetEvent(std::string widgetId, int event) { // Get the current handler handler = it.Get(); - // Check if it listens to (widget,event) + // Check if it listens to (widget, event) bool newFound = handler->HandleWidgetEvent(widgetId, event); found = found || newFound; ++it; @@ -109,7 +109,7 @@ void ImageWidgetController::HandleWidgetMove(std::string widgetId, int x, int y) { // Get the current handler handler = it.Get(); - // Check if it listens to (widget,event) + // Check if it listens to (widget, event) handler->HandleWidgetMove(widgetId, x, y); ++it; } @@ -128,7 +128,7 @@ void ImageWidgetController::ActivateActionHandlers() { // Get the current handler handler = it.Get(); - // Check if it listens to (widget,event) + // Check if it listens to (widget, event) handler->SetIsActive(true); ++it; } @@ -147,7 +147,7 @@ void ImageWidgetController::DeactivateActionHandlers() { // Get the current handler handler = it.Get(); - // Check if it listens to (widget,event) + // Check if it listens to (widget, event) handler->SetIsActive(false); ++it; } diff --git a/Code/Visualization/otbNoStretchRenderingFunction.h b/Code/Visualization/otbNoStretchRenderingFunction.h index a033e40239274052e4a5ea5849247c627dcd7450..32a698663b0959350ecc9e7f2e8f3d5877ccf04f 100644 --- a/Code/Visualization/otbNoStretchRenderingFunction.h +++ b/Code/Visualization/otbNoStretchRenderingFunction.h @@ -144,7 +144,7 @@ namespace otb if (this->m_PixelRepresentationFunction->IsUsingDefaultParameters()) { // Case of image with 4 bands or more : Display in the - // B,G,R,NIR channel order + // B, G, R, NIR channel order if (this->GetListSample()->GetMeasurementVectorSize() >= 4) { this->m_PixelRepresentationFunction->SetRedChannelIndex(2); diff --git a/Code/Visualization/otbPixelDescriptionView.txx b/Code/Visualization/otbPixelDescriptionView.txx index 7b5e328c43620646bbb61b59b9e0b7b24bf76cc1..83ad52a3e37ccdaa2f49a3777cec6b0d33508ee4 100644 --- a/Code/Visualization/otbPixelDescriptionView.txx +++ b/Code/Visualization/otbPixelDescriptionView.txx @@ -39,7 +39,7 @@ PixelDescriptionView<TInputPixelDescription> { if (m_PixelDescriptionWidget != NULL) { -// delete m_PixelDescriptionWidget;//FIXME +// delete m_PixelDescriptionWidget; //FIXME //NOTE segfault with the previous line, why? } } diff --git a/Code/Visualization/otbSelectAreaActionHandler.h b/Code/Visualization/otbSelectAreaActionHandler.h index 846cd5c2dfdc94853a2d726953553db26228d661..2947eea7fafe3e2a04ffa5034abb64510092a947 100644 --- a/Code/Visualization/otbSelectAreaActionHandler.h +++ b/Code/Visualization/otbSelectAreaActionHandler.h @@ -80,7 +80,7 @@ public: if (widgetId == m_Widget->GetIdentifier()) { // Get the clicked index - typename WidgetType::PointType screenPoint, imagePoint; /*, lScreenSizePoint, lImageSizePoint;*/ + typename WidgetType::PointType screenPoint, imagePoint; /*, lScreenSizePoint, lImageSizePoint; */ screenPoint = m_Widget->GetMousePosition(); // Transform to image point diff --git a/Code/Visualization/otbStandardRenderingFunction.h b/Code/Visualization/otbStandardRenderingFunction.h index 769a1848a233522a0e5f7884568d00f3d8d480dd..ce279b01c274e165b18705d56f8b38f5256b65f9 100644 --- a/Code/Visualization/otbStandardRenderingFunction.h +++ b/Code/Visualization/otbStandardRenderingFunction.h @@ -311,7 +311,7 @@ public: } /** Set the minimum and maximum for the different bands. - * Has to be provided as [minBand0, maxBand0, minBand1, maxBand1,...] + * Has to be provided as [minBand0, maxBand0, minBand1, maxBand1, ...] */ virtual void SetParameters(const ParametersType& parameters) { @@ -345,7 +345,7 @@ public: ParametersType param; param.SetSize(2 * nbBands); - // Edit the parameters as [minBand0, maxBand0, minBand1, maxBand1,...] + // Edit the parameters as [minBand0, maxBand0, minBand1, maxBand1, ...] for (unsigned int i = 0; i < nbBands; ++i) { // Min Band diff --git a/Code/Visualization/otbVectorDataGlComponent.txx b/Code/Visualization/otbVectorDataGlComponent.txx index f234b2e25220063d7618a7f0ab95269fdd8753a0..1c11bcac0b51db75bac1d92cd4b1d351347bf30c 100644 --- a/Code/Visualization/otbVectorDataGlComponent.txx +++ b/Code/Visualization/otbVectorDataGlComponent.txx @@ -266,7 +266,7 @@ VectorDataGlComponent<TVectorData> { case FEATURE_POINT: { -// this->RenderPoint(node->Get()->GetPoint(),extent,space2ScreenTransform); +// this->RenderPoint(node->Get()->GetPoint(), extent, space2ScreenTransform); this->RenderPoint(node->Get(), extent, space2ScreenTransform); break; diff --git a/Examples/BasicFilters/BandMathFilterExample.cxx b/Examples/BasicFilters/BandMathFilterExample.cxx index a73a3cca83d4b3384691e4bf319c9437864195ca..0c12e89b6400614316a1c112b915e46130f05539 100644 --- a/Examples/BasicFilters/BandMathFilterExample.cxx +++ b/Examples/BasicFilters/BandMathFilterExample.cxx @@ -91,7 +91,7 @@ int main( int argc, char* argv[]) typedef otb::Image<PixelType, 2> OutputImageType; typedef otb::ImageList<OutputImageType> ImageListType; typedef OutputImageType::PixelType VPixelType; - typedef otb::VectorImageToImageListFilter<InputImageType,ImageListType> + typedef otb::VectorImageToImageListFilter<InputImageType, ImageListType> VectorImageToImageListType; typedef otb::ImageFileReader<InputImageType> ReaderType; typedef otb::ImageFileWriter<OutputImageType> WriterType; @@ -151,7 +151,7 @@ int main( int argc, char* argv[]) // Software Guide : BeginLatex // -// Now we can define the mathematical expression to perform on the layers (b1, b2,b3,b4). +// Now we can define the mathematical expression to perform on the layers (b1, b2, b3, b4). // The filter takes advantage of the parsing capabilities of the muParser library and // allows to set the expression as on a digital calculator. // @@ -160,7 +160,7 @@ int main( int argc, char* argv[]) // Software Guide : EndLatex // Software Guide : BeginCodeSnippet - filter->SetExpression("if((b4-b3)/(b4+b3) > 0.4,255,0)"); + filter->SetExpression("if((b4-b3)/(b4+b3) > 0.4, 255, 0)"); // Software Guide : EndCodeSnippet // Software Guide : BeginLatex @@ -176,8 +176,8 @@ int main( int argc, char* argv[]) // Software Guide : BeginLatex // // The muParser library offers also the possibility to extended existing built-in functions. For example, -// you can use the OTB expression "ndvi(b3,b4)" with the filter. The mathematical expression would be in -// this case \textit{if($ndvi(b3,b4)>0.4$,255,0)}. It will return the same result. +// you can use the OTB expression "ndvi(b3, b4)" with the filter. The mathematical expression would be in +// this case \textit{if($ndvi(b3, b4)>0.4$, 255, 0)}. It will return the same result. // // Software Guide : EndLatex diff --git a/Examples/BasicFilters/FrostImageFilter.cxx b/Examples/BasicFilters/FrostImageFilter.cxx index 05c656d7f73fe5ab0a2015417e33d0acc04afd5f..4fb5ea61794f6fc00227563d21d85ccffa722f01 100644 --- a/Examples/BasicFilters/FrostImageFilter.cxx +++ b/Examples/BasicFilters/FrostImageFilter.cxx @@ -36,14 +36,14 @@ // The output of the filter for pixel p is: // $ \hat I_{s}=\sum_{p\in\eta_{p}} m_{p}I_{p} $ // -// where : $ m_{p}=\frac{KC_{s}^{2}\exp(-KC_{s}^{2}d_{s,p})}{\sum_{p\in\eta_{p}} KC_{s}^{2}\exp(-KC_{s}^{2}d_{s,p})} $ -// and $ d_{s,p}=\sqrt{(i-i_{p})^2+(j-j_{p})^2} $ +// where : $ m_{p}=\frac{KC_{s}^{2}\exp(-KC_{s}^{2}d_{s, p})}{\sum_{p\in\eta_{p}} KC_{s}^{2}\exp(-KC_{s}^{2}d_{s, p})} $ +// and $ d_{s, p}=\sqrt{(i-i_{p})^2+(j-j_{p})^2} $ // // \begin{itemize} // \item $ K $ : the decrease coefficient -// \item $ (i,j)$ : the coordinates of the pixel inside the region +// \item $ (i, j)$ : the coordinates of the pixel inside the region // defined by $ \eta_{s} $ -// \item $ (i_{p},j_{p})$ : the coordinates of the pixels belonging to $ \eta_{p} \subset \eta_{s} $ +// \item $ (i_{p}, j_{p})$ : the coordinates of the pixels belonging to $ \eta_{p} \subset \eta_{s} $ // \item $ C_{s}$ : the variation coefficient computed over $ \eta_{p}$ // \end{itemize} // diff --git a/Examples/ChangeDetection/JHMIChDet.cxx b/Examples/ChangeDetection/JHMIChDet.cxx index 4900598df955aedba7a21ce67329f7a527fa7458..08aa9433c183f3ddb58a219c67886ba9d2f7ed64 100644 --- a/Examples/ChangeDetection/JHMIChDet.cxx +++ b/Examples/ChangeDetection/JHMIChDet.cxx @@ -76,7 +76,7 @@ int main(int argc, char* argv[]) float scale = itk::NumericTraits<OutputPixelType>::max() / 100.0; /*float(itk::NumericTraits< OutputPixelType >::max()+ - itk::NumericTraits< InternalPixelType >::min());*/ + itk::NumericTraits< InternalPixelType >::min()); */ rescaler->SetScale(scale); filter->SetInput1(reader1->GetOutput()); diff --git a/Examples/ChangeDetection/KullbackLeiblerDistanceChDet.cxx b/Examples/ChangeDetection/KullbackLeiblerDistanceChDet.cxx index 6da141ae1fa1950234b53210978ba8b2c5dbb4f2..f6b8b133b28dc0df98738a5d922005239cbe1463 100644 --- a/Examples/ChangeDetection/KullbackLeiblerDistanceChDet.cxx +++ b/Examples/ChangeDetection/KullbackLeiblerDistanceChDet.cxx @@ -32,36 +32,36 @@ // Edgeworth series. // The Kullback-Leibler distance is evaluated by: // \begin{multline}\label{eqKLapprox1D} -// K_{\text{Edgeworth}}(X_1 | X_2) = \frac{1}{12} \frac{\kappa_{X_1;3}^2}{\kappa_{X_1;2}^2} -// + \frac{1}{2} \left( \log \frac{\kappa_{X_2;2}}{\kappa_{X_1;2}} -// -1+\frac{1}{\kappa_{X_2;2}} -// \left( \kappa_{X_1;1} - \kappa_{X_2;1} + \kappa_{X_1;2}^{1/2} \right)^2 +// K_{\text{Edgeworth}}(X_1 | X_2) = \frac{1}{12} \frac{\kappa_{X_1; 3}^2}{\kappa_{X_1; 2}^2} +// + \frac{1}{2} \left( \log \frac{\kappa_{X_2; 2}}{\kappa_{X_1; 2}} +// -1+\frac{1}{\kappa_{X_2; 2}} +// \left( \kappa_{X_1; 1} - \kappa_{X_2; 1} + \kappa_{X_1; 2}^{1/2} \right)^2 // \right) \\ -// - \left( \kappa_{X_2;3} \frac{a_1}{6} + \kappa_{X_2;4} \frac{a_2}{24} -// + \kappa_{X_2;3}^2 \frac{a_3}{72} \right) -// - \frac{1}{2} \frac{ \kappa_{X_2;3}^2}{36} +// - \left( \kappa_{X_2; 3} \frac{a_1}{6} + \kappa_{X_2; 4} \frac{a_2}{24} +// + \kappa_{X_2; 3}^2 \frac{a_3}{72} \right) +// - \frac{1}{2} \frac{ \kappa_{X_2; 3}^2}{36} // \left( -// c_6 - 6 \frac{c_4}{\kappa_{X_1;2}} + 9 \frac{c_2}{\kappa_{X_2;2}^2} +// c_6 - 6 \frac{c_4}{\kappa_{X_1; 2}} + 9 \frac{c_2}{\kappa_{X_2; 2}^2} // \right) \\ -// - 10 \frac{\kappa_{X_1;3} \kappa_{X_2;3} -// \left( \kappa_{X_1;1} - \kappa_{X_2;1} \right) -// \left( \kappa_{X_1;2} - \kappa_{X_2;2} \right)}{\kappa_{X_2;2}^6} \qquad +// - 10 \frac{\kappa_{X_1; 3} \kappa_{X_2; 3} +// \left( \kappa_{X_1; 1} - \kappa_{X_2; 1} \right) +// \left( \kappa_{X_1; 2} - \kappa_{X_2; 2} \right)}{\kappa_{X_2; 2}^6} \qquad // \end{multline} // where // \begin{align*} -// a_1 &= c_3 - 3 \frac{\alpha}{\kappa_{X_2;2}} \\ -// a_2 &= c_4 - 6 \frac{c_2}{\kappa_{X_2;2}} + \frac{3}{\kappa_{X_2;2}^2} \\ -// a_3 &= c_6 - 15\frac{c_4}{\kappa_{X_2;2}} + 45\frac{c_2}{\kappa_{X_2;2}^2} - -// \frac{15}{\kappa_{X_2;2}^3} \\ +// a_1 &= c_3 - 3 \frac{\alpha}{\kappa_{X_2; 2}} \\ +// a_2 &= c_4 - 6 \frac{c_2}{\kappa_{X_2; 2}} + \frac{3}{\kappa_{X_2; 2}^2} \\ +// a_3 &= c_6 - 15\frac{c_4}{\kappa_{X_2; 2}} + 45\frac{c_2}{\kappa_{X_2; 2}^2} - +// \frac{15}{\kappa_{X_2; 2}^3} \\ // c_2 &= \alpha^2 + \beta^2 \\ // c_3 &= \alpha^3 + 3 \alpha \beta^2 \\ // c_4 &= \alpha^4 + 6 \alpha^2 \beta^2 + 3 \beta^4 \\ // c_6 &= \alpha^6 + 15\alpha^4 \beta^2 + 45 \alpha^2 \beta^4 + 15 \beta^6 \\ -// \alpha &= \frac{\kappa_{X_1;1} - \kappa_{X_2;1}}{\kappa_{X_2;2}} \\ -// \beta &= \frac{ \kappa_{X_1;2}^{1/2} }{\kappa_{X_2;2}}. +// \alpha &= \frac{\kappa_{X_1; 1} - \kappa_{X_2; 1}}{\kappa_{X_2; 2}} \\ +// \beta &= \frac{ \kappa_{X_1; 2}^{1/2} }{\kappa_{X_2; 2}}. // \end{align*} -// $\kappa_{X_i;1}$, $\kappa_{X_i;2}$, $\kappa_{X_i;3}$ and $\kappa_{X_i;4}$ -// are the cumulants up to order 4 of the random variable $X_i$ ($i=1,2$). +// $\kappa_{X_i; 1}$, $\kappa_{X_i; 2}$, $\kappa_{X_i; 3}$ and $\kappa_{X_i; 4}$ +// are the cumulants up to order 4 of the random variable $X_i$ ($i=1, 2$). // This example will use the images shown in // figure~\ref{fig:RATCHDETINIM}. These correspond to 2 Radarsat fine // mode acquisitions before and after a lava flow resulting from a diff --git a/Examples/Classification/ScalarImageKmeansClassifier.cxx b/Examples/Classification/ScalarImageKmeansClassifier.cxx index d39754337a904f3fc150dd79aacfb6a3b3b7963c..2bf725824a107e785595cbc165f8b94e7ea2fdf8 100644 --- a/Examples/Classification/ScalarImageKmeansClassifier.cxx +++ b/Examples/Classification/ScalarImageKmeansClassifier.cxx @@ -101,14 +101,14 @@ int main(int argc, char * argv[]) // // In general the classification will produce as output an image whose pixel // values are integers associated to the labels of the classes. Since typically -// these integers will be generated in order (0,1,2,...N), the output image +// these integers will be generated in order (0, 1, 2, ...N), the output image // will tend to look very dark when displayed with naive viewers. It is // therefore convenient to have the option of spreading the label values over // the dynamic range of the output image pixel type. When this is done, the // dynamic range of the pixels is divided by the number of classes in order to // define the increment between labels. For example, an output image of 8 bits // will have a dynamic range of [0:255], and when it is used for holding four -// classes, the non-contiguous labels will be (0,64,128,192). The selection of +// classes, the non-contiguous labels will be (0, 64, 128, 192). The selection of // the mode to use is done with the method \code{SetUseContiguousLabels()}. // // Software Guide : EndLatex diff --git a/Examples/DataRepresentation/Image/Image4.cxx b/Examples/DataRepresentation/Image/Image4.cxx index 4766379bb6ae982ba03dd3d86c349c31f5348bff..7058d3e0e73a3973c90d793e80c36ac87cead135 100644 --- a/Examples/DataRepresentation/Image/Image4.cxx +++ b/Examples/DataRepresentation/Image/Image4.cxx @@ -218,7 +218,7 @@ int main(int, char *[]) // particular, the \code{[]} operator is available. For efficiency reasons, // no bounds checking is performed on the index used to access a particular // point component. It is the user's responsibility to make sure that the - // index is in the range $\{0,Dimension-1\}$. + // index is in the range $\{0, Dimension-1\}$. // // Software Guide : EndLatex diff --git a/Examples/DataRepresentation/Image/RGBImage.cxx b/Examples/DataRepresentation/Image/RGBImage.cxx index a34beff778a54cb15fac73d82d7b034541f1e3c8..1356b99ad08abe1b892274ddee3cf5164e44c451 100644 --- a/Examples/DataRepresentation/Image/RGBImage.cxx +++ b/Examples/DataRepresentation/Image/RGBImage.cxx @@ -120,7 +120,7 @@ int main(int, char * argv[]) PixelType::ValueType blue = onePixel.GetBlue(); // Software Guide : EndCodeSnippet - std::cout << "Pixel values from GetRed,GetGreen,GetBlue:" << std::endl; + std::cout << "Pixel values from GetRed, GetGreen, GetBlue:" << std::endl; std::cout << "Red = " << itk::NumericTraits<PixelType::ValueType>::PrintType(red) << std::endl; diff --git a/Examples/DataRepresentation/Mesh/Mesh2.cxx b/Examples/DataRepresentation/Mesh/Mesh2.cxx index 564b7c6864214b37d309fa6c461255545c336658..ae4705005d02a8992f773462d7c9ddb625fad8da 100644 --- a/Examples/DataRepresentation/Mesh/Mesh2.cxx +++ b/Examples/DataRepresentation/Mesh/Mesh2.cxx @@ -193,7 +193,7 @@ int main(int, char *[]) // LineCell requires two points, a TriangleCell // requires three and a TetrahedronCell requires four. Cells use // an internal numbering system for points. It is simply an index in the - // range $\{0,NumberOfPoints-1\}$. The association of points and cells is + // range $\{0, NumberOfPoints-1\}$. The association of points and cells is // done by the \code{SetPointId()} method which requires the user to // provide the internal index of the point in the cell and the // corresponding PointIdentifier in the Mesh. The internal cell index is diff --git a/Examples/DataRepresentation/Mesh/PointSet1.cxx b/Examples/DataRepresentation/Mesh/PointSet1.cxx index 794ec08e01df77da8d4111b1fc3ec62d569e63dc..9df19ec0f6cff8849cd2c0425850ba72fba4781b 100644 --- a/Examples/DataRepresentation/Mesh/PointSet1.cxx +++ b/Examples/DataRepresentation/Mesh/PointSet1.cxx @@ -121,7 +121,7 @@ int main(int, char *[]) // This makes it possible to access its components using index notation. For // efficiency's sake no bounds checking is performed during index access. It is // the user's responsibility to ensure that the index used is in the range - // $\{0,Dimension-1\}$. Each of the components in the point is associated + // $\{0, Dimension-1\}$. Each of the components in the point is associated // with space coordinates. The following code illustrates how to instantiate // a point and initialize its components. // @@ -135,10 +135,10 @@ int main(int, char *[]) PointType p1; - p1[0] = 1.0; // Point 1 = { 1,-1 } + p1[0] = 1.0; // Point 1 = { 1, -1 } p1[1] = -1.0; - PointType p2; // Point 2 = { 1,1 } + PointType p2; // Point 2 = { 1, 1 } p2[0] = 1.0; p2[1] = 1.0; diff --git a/Examples/DataRepresentation/Mesh/PointSet2.cxx b/Examples/DataRepresentation/Mesh/PointSet2.cxx index ccad395ed5863ecae32499f8d0994abd52e8b7b4..a855dae8a2c570ddbbaf0db5a362b8d214934cf4 100644 --- a/Examples/DataRepresentation/Mesh/PointSet2.cxx +++ b/Examples/DataRepresentation/Mesh/PointSet2.cxx @@ -91,9 +91,9 @@ int main(int, char *[]) PointType p0; PointType p1; p0[0] = -1.0; - p0[1] = 0.0; // Point 0 = {-1,0 } + p0[1] = 0.0; // Point 0 = {-1, 0 } p1[0] = 1.0; - p1[1] = 0.0; // Point 1 = { 1,0 } + p1[1] = 0.0; // Point 1 = { 1, 0 } // Software Guide : EndCodeSnippet // Software Guide : BeginLatex diff --git a/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx b/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx index b0b75e7be5203cccf2637eeca1cfd480fba10571..330db6e9128f789ae68f2e09a948cc700c3d2579 100644 --- a/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx +++ b/Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx @@ -51,7 +51,7 @@ int main(int, char *[]) // Software Guide : BeginLatex // // \itkpiccaption[PointSet with Vectors as PixelType]{Vectors as PixelType.\label{fig:PointSetWithVectors}} - // \parpic(6cm,4cm)[r]{\includegraphics[width=4cm]{PointSetWithVectors.eps}} + // \parpic(6cm, 4cm)[r]{\includegraphics[width=4cm]{PointSetWithVectors.eps}} // // The Vector class is templated over the type used to represent // the spatial coordinates and over the space dimension. Since the diff --git a/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx b/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx index 7a796ff456758094de81de5fda72744a536debed..40b3fd4fec6d87862e8e81e86d1752aff27662f4 100644 --- a/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx +++ b/Examples/DisparityMap/FineRegistrationImageFilterExample.cxx @@ -199,7 +199,7 @@ int main(int argc, char** argv) { // Software Guide : BeginCodeSnippet typedef itk::MeanReciprocalSquareDifferenceImageToImageMetric - <InputImageType,InputImageType> MRSDMetricType; + <InputImageType, InputImageType> MRSDMetricType; MRSDMetricType::Pointer mrsdMetric = MRSDMetricType::New(); registrator->SetMetric(mrsdMetric); // Software Guide : EndCodeSnippet diff --git a/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx b/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx index f459f56c90ce6a82cd7c0ddf2044512cd64ae623..744f5fe7281df41e69fe6b87962897afc29fa37f 100644 --- a/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx +++ b/Examples/DisparityMap/SimpleDisparityMapEstimationExample.cxx @@ -21,7 +21,7 @@ // Software Guide : BeginCommandLineArgs // INPUTS: {StereoFixed.png}, {StereoMoving.png} -// OUTPUTS: {deformationFieldOutput.png},{resampledMovingOutput.png} +// OUTPUTS: {deformationFieldOutput.png}, {resampledMovingOutput.png} // 5 5 9 7 10 100 0.8 // Software Guide : EndCommandLineArgs @@ -268,9 +268,9 @@ int main(int argc, char* argv[]) // Point data will contains the following data : // // \begin{enumerate} - // \item{The final metric value found in the registration process,} - // \item{the deformation value in the first image direction,} - // \item{the deformation value in the second image direction,} + // \item{The final metric value found in the registration process, } + // \item{the deformation value in the first image direction, } + // \item{the deformation value in the second image direction, } // \item{the final parameters of the transform.} // \end{enumerate} // diff --git a/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx b/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx index a498f4a01dfd6d916535c5ee04aa5a32e6623012..ec9a47c7854623ab3544326c05f74aceb6f70864 100644 --- a/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx +++ b/Examples/FeatureExtraction/ExtractRoadByStepsExample.cxx @@ -499,7 +499,7 @@ int main(int argc, char * argv[]) subtract3->SetInput1(channelExtractor3->GetOutput()); subtract3->SetInput2(dilater->GetOutput()); - // Threshold outside the [0,255] range + // Threshold outside the [0, 255] range threshold11->SetInput(addFilter->GetOutput()); threshold11->ThresholdBelow(0); diff --git a/Examples/FeatureExtraction/HarrisExample.cxx b/Examples/FeatureExtraction/HarrisExample.cxx index 146791fa8ca31c023fa2a992cb91e8637129aac3..86021d8e51cf6f2a18774a842a49126b24112542 100644 --- a/Examples/FeatureExtraction/HarrisExample.cxx +++ b/Examples/FeatureExtraction/HarrisExample.cxx @@ -142,7 +142,7 @@ int main(int argc, char *argv[]) // \end{figure} // // The output of the \doxygen{otb}{HarrisImageFilter} is an image - // where,for each pixel, we obtain the intensity of the + // where, for each pixel, we obtain the intensity of the // detection. Often, the user may want to get access to the set of // points for which the output of the detector is higher than a // given threshold. This can be obtained by using the diff --git a/Examples/FeatureExtraction/ParallelLineDetectionExample.cxx b/Examples/FeatureExtraction/ParallelLineDetectionExample.cxx index cb46f9c29b5abbf4b0e08e00bdc9c4b0f7c8c69d..1bc2253c8c927e8deeb41755bcb3c3b7531cab28 100644 --- a/Examples/FeatureExtraction/ParallelLineDetectionExample.cxx +++ b/Examples/FeatureExtraction/ParallelLineDetectionExample.cxx @@ -229,7 +229,7 @@ int main(int argc, char * argv[]) // Parallel lines are drawn on a black background image with \doxygen{otb}{DrawPathListFilter}. // The \code{SetUseIternalValues()} tells the drawing filter to draw the path with its likelihood // value. - //typedef otb::DrawPathListFilter<ImageType,PathType,ImageType> DrawPathType; + //typedef otb::DrawPathListFilter<ImageType, PathType, ImageType> DrawPathType; DrawPathType::Pointer drawPathListFilterParallel = DrawPathType::New(); drawPathListFilterParallel->SetInput(outputParallel); drawPathListFilterParallel->SetInputPath( diff --git a/Examples/Filtering/BinaryThresholdImageFilter.cxx b/Examples/Filtering/BinaryThresholdImageFilter.cxx index 3538f119767f50747d9710d444df414f99bc838b..86837331823e7d92f152970c14f0556ac7bbd612 100644 --- a/Examples/Filtering/BinaryThresholdImageFilter.cxx +++ b/Examples/Filtering/BinaryThresholdImageFilter.cxx @@ -33,7 +33,7 @@ // \itkpiccaption[BinaryThresholdImageFilter transfer function]{Transfer function // of the BinaryThresholdImageFilter. // \label{fig:BinaryThresholdTransferFunction}} -// \parpic(8cm,5cm)[r]{\includegraphics[width=7cm]{BinaryThresholdTransferFunction.eps}} +// \parpic(8cm, 5cm)[r]{\includegraphics[width=7cm]{BinaryThresholdTransferFunction.eps}} // // This example illustrates the use of the binary threshold image filter. // This filter is used to transform an image into a binary image by changing @@ -42,7 +42,7 @@ // thresholds---Upper and Lower---and two intensity values---Inside and // Outside. For each pixel in the input image, the value of the pixel is // compared with the lower and upper thresholds. If the pixel value is inside -// the range defined by $[Lower,Upper]$ the output pixel is assigned the +// the range defined by $[Lower, Upper]$ the output pixel is assigned the // InsideValue. Otherwise the output pixels are assigned to the OutsideValue. // Thresholding is commonly applied as the last operation of a segmentation // pipeline. diff --git a/Examples/Filtering/DiscreteGaussianImageFilter.cxx b/Examples/Filtering/DiscreteGaussianImageFilter.cxx index ed4d70db79a983f4a2d8e4cafd7ba3f272396e59..35abb8d836a70154389bb02a6ced3bde74c29e6a 100644 --- a/Examples/Filtering/DiscreteGaussianImageFilter.cxx +++ b/Examples/Filtering/DiscreteGaussianImageFilter.cxx @@ -29,7 +29,7 @@ // // \itkpiccaption[DiscreteGaussianImageFilter Gaussian diagram.]{Discretized // Gaussian.\label{fig:DiscretizedGaussian}} -// \parpic(7cm,4cm)[r]{\includegraphics[width=6cm]{DiscreteGaussian.eps}} +// \parpic(7cm, 4cm)[r]{\includegraphics[width=6cm]{DiscreteGaussian.eps}} // // The \doxygen{itk}{DiscreteGaussianImageFilter} computes the convolution of the // input image with a Gaussian kernel. This is done in $ND$ by taking diff --git a/Examples/Filtering/GradientMagnitudeImageFilter.cxx b/Examples/Filtering/GradientMagnitudeImageFilter.cxx index cd240745d57db565bcb6e2e6e68bc60106a42b19..c9ccc2b43b8555af8bf21600acb7deb2d06fb104 100644 --- a/Examples/Filtering/GradientMagnitudeImageFilter.cxx +++ b/Examples/Filtering/GradientMagnitudeImageFilter.cxx @@ -35,13 +35,13 @@ // to convolving the image with masks of type // // \begin{center} -// \begin{picture}(200,50) -// \put( 5.0,32.0){\framebox(30.0,15.0){-1}} -// \put(35.0,32.0){\framebox(30.0,15.0){0}} -// \put(65.0,32.0){\framebox(30.0,15.0){1}} -// \put(105.0,17.0){\framebox(20.0,15.0){1}} -// \put(105.0,32.0){\framebox(20.0,15.0){0}} -// \put(105.0,47.0){\framebox(20.0,15.0){-1}} +// \begin{picture}(200, 50) +// \put( 5.0, 32.0){\framebox(30.0, 15.0){-1}} +// \put(35.0, 32.0){\framebox(30.0, 15.0){0}} +// \put(65.0, 32.0){\framebox(30.0, 15.0){1}} +// \put(105.0, 17.0){\framebox(20.0, 15.0){1}} +// \put(105.0, 32.0){\framebox(20.0, 15.0){0}} +// \put(105.0, 47.0){\framebox(20.0, 15.0){-1}} // \end{picture} // \end{center} // diff --git a/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx b/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx index b94a2ddc11276ccd99ff45d7ee9f209efc60f0fc..9c69531842b2b2c5a123c102179ca73c6340b07d 100644 --- a/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx +++ b/Examples/Filtering/GradientMagnitudeRecursiveGaussianImageFilter.cxx @@ -51,7 +51,7 @@ // Response} filter that approximates a convolution with the derivative of the // Gaussian kernel. Traditional convolution will produce a more accurate // result, but the IIR approach is much faster, especially using large -// $\sigma$s \cite{Deriche1990,Deriche1993}. +// $\sigma$s \cite{Deriche1990, Deriche1993}. // // GradientMagnitudeRecursiveGaussianImageFilter will work on images of // any dimension by taking advantage of the natural separability of the diff --git a/Examples/Filtering/MeanImageFilter.cxx b/Examples/Filtering/MeanImageFilter.cxx index ae34c6926577673d03bfb0daae79b94416b7d09f..0619bca4395266a2012ad91bb350b59c58b4f00d 100644 --- a/Examples/Filtering/MeanImageFilter.cxx +++ b/Examples/Filtering/MeanImageFilter.cxx @@ -35,20 +35,20 @@ // with the pixel at the center of the neighborhood. // // \begin{center} -// \begin{picture}(200,46) -// \put( 5.0, 0.0 ){\framebox(30.0,15.0){25}} -// \put( 35.0, 0.0 ){\framebox(30.0,15.0){30}} -// \put( 65.0, 0.0 ){\framebox(30.0,15.0){32}} -// \put( 5.0, 15.0 ){\framebox(30.0,15.0){27}} -// \put( 35.0, 15.0 ){\framebox(30.0,15.0){25}} -// \put( 65.0, 15.0 ){\framebox(30.0,15.0){29}} -// \put( 5.0, 30.0 ){\framebox(30.0,15.0){28}} -// \put( 35.0, 30.0 ){\framebox(30.0,15.0){26}} -// \put( 65.0, 30.0 ){\framebox(30.0,15.0){50}} -// \put( 100.0, 22.0 ){\vector(1,0){20.0}} -// \put( 125.0, 15.0 ){\framebox(34.0,15.0){30.22}} -// \put( 160.0, 22.0 ){\vector(1,0){20.0}} -// \put( 185.0, 15.0 ){\framebox(30.0,15.0){30}} +// \begin{picture}(200, 46) +// \put( 5.0, 0.0 ){\framebox(30.0, 15.0){25}} +// \put( 35.0, 0.0 ){\framebox(30.0, 15.0){30}} +// \put( 65.0, 0.0 ){\framebox(30.0, 15.0){32}} +// \put( 5.0, 15.0 ){\framebox(30.0, 15.0){27}} +// \put( 35.0, 15.0 ){\framebox(30.0, 15.0){25}} +// \put( 65.0, 15.0 ){\framebox(30.0, 15.0){29}} +// \put( 5.0, 30.0 ){\framebox(30.0, 15.0){28}} +// \put( 35.0, 30.0 ){\framebox(30.0, 15.0){26}} +// \put( 65.0, 30.0 ){\framebox(30.0, 15.0){50}} +// \put( 100.0, 22.0 ){\vector(1, 0){20.0}} +// \put( 125.0, 15.0 ){\framebox(34.0, 15.0){30.22}} +// \put( 160.0, 22.0 ){\vector(1, 0){20.0}} +// \put( 185.0, 15.0 ){\framebox(30.0, 15.0){30}} // \end{picture} // \end{center} // @@ -134,7 +134,7 @@ int main(int argc, char * argv[]) // The size of the neighborhood is defined along every dimension by // passing a \code{SizeType} object with the corresponding values. The // value on each dimension is used as the semi-size of a rectangular - // box. For example, in $2D$ a size of \(1,2\) will result in a $3 \times + // box. For example, in $2D$ a size of \(1, 2\) will result in a $3 \times // 5$ neighborhood. // // \index{itk::MeanImageFilter!Radius} @@ -181,7 +181,7 @@ int main(int argc, char * argv[]) // // Figure \ref{fig:MeanImageFilterOutput} illustrates the effect of this // filter using neighborhood radii of - // \(1,1\) which corresponds to a $ 3 \times 3 $ classical neighborhood. + // \(1, 1\) which corresponds to a $ 3 \times 3 $ classical neighborhood. // It can be seen from this picture that edges are rapidly degraded by the // diffusion of intensity values among neighbors. // diff --git a/Examples/Filtering/MedianImageFilter.cxx b/Examples/Filtering/MedianImageFilter.cxx index c57158350bf1f8aeff43a9c7c4da98c9b1507f31..2421255830580f21af57298671ab5e7f25e3a45e 100644 --- a/Examples/Filtering/MedianImageFilter.cxx +++ b/Examples/Filtering/MedianImageFilter.cxx @@ -38,18 +38,18 @@ // // // \begin{center} -// \begin{picture}(200,46) -// \put( 5.0, 0.0 ){\framebox(30.0,15.0){25}} -// \put( 35.0, 0.0 ){\framebox(30.0,15.0){30}} -// \put( 65.0, 0.0 ){\framebox(30.0,15.0){32}} -// \put( 5.0, 15.0 ){\framebox(30.0,15.0){27}} -// \put( 35.0, 15.0 ){\framebox(30.0,15.0){25}} -// \put( 65.0, 15.0 ){\framebox(30.0,15.0){29}} -// \put( 5.0, 30.0 ){\framebox(30.0,15.0){28}} -// \put( 35.0, 30.0 ){\framebox(30.0,15.0){26}} -// \put( 65.0, 30.0 ){\framebox(30.0,15.0){50}} -// \put( 100.0, 22.0 ){\vector(1,0){20.0}} -// \put( 125.0, 15.0 ){\framebox(30.0,15.0){28}} +// \begin{picture}(200, 46) +// \put( 5.0, 0.0 ){\framebox(30.0, 15.0){25}} +// \put( 35.0, 0.0 ){\framebox(30.0, 15.0){30}} +// \put( 65.0, 0.0 ){\framebox(30.0, 15.0){32}} +// \put( 5.0, 15.0 ){\framebox(30.0, 15.0){27}} +// \put( 35.0, 15.0 ){\framebox(30.0, 15.0){25}} +// \put( 65.0, 15.0 ){\framebox(30.0, 15.0){29}} +// \put( 5.0, 30.0 ){\framebox(30.0, 15.0){28}} +// \put( 35.0, 30.0 ){\framebox(30.0, 15.0){26}} +// \put( 65.0, 30.0 ){\framebox(30.0, 15.0){50}} +// \put( 100.0, 22.0 ){\vector(1, 0){20.0}} +// \put( 125.0, 15.0 ){\framebox(30.0, 15.0){28}} // \end{picture} // \end{center} // @@ -134,7 +134,7 @@ int main(int argc, char * argv[]) // The size of the neighborhood is defined along every dimension by // passing a \code{SizeType} object with the corresponding values. The // value on each dimension is used as the semi-size of a rectangular - // box. For example, in $2D$ a size of \(1,2\) will result in a $3 \times + // box. For example, in $2D$ a size of \(1, 2\) will result in a $3 \times // 5$ neighborhood. // // \index{itk::MedianImageFilter!Radius} @@ -181,7 +181,7 @@ int main(int argc, char * argv[]) // // Figure \ref{fig:MedianImageFilterOutput} illustrates the effect of the MedianImageFilter // filter a neighborhood radius of - // \(1,1\), which corresponds to a $ 3 \times 3 $ classical neighborhood. + // \(1, 1\), which corresponds to a $ 3 \times 3 $ classical neighborhood. // The filtered image demonstrates the moderate tendency of the median // filter to preserve edges. // diff --git a/Examples/IO/ImageToKmzAndMapFileProductExample.cxx b/Examples/IO/ImageToKmzAndMapFileProductExample.cxx index 40dc3875ecdb90debe6f17578fe00e4c1f9e5b4a..6e2c2f133a07156a178a355a47fae655b4ce51bb 100644 --- a/Examples/IO/ImageToKmzAndMapFileProductExample.cxx +++ b/Examples/IO/ImageToKmzAndMapFileProductExample.cxx @@ -139,7 +139,7 @@ int main(int argc, char* argv[]) // The last step of the chain, is to export the image to a Google // Earth understandable format using the KmzProductWriter. Note that // the writer can add legends via the method -// AddLegend(std::string description,ImageType * legend) and a logo in +// AddLegend(std::string description, ImageType * legend) and a logo in // the kmz using SetLogo(ImageType*). // // Software Guide : EndLatex @@ -172,7 +172,7 @@ int main(int argc, char* argv[]) // configuration file, the tiles to draw, and shapefiles descrining // the tiles and where to find them. // The Mapfile writer allow setting the complete path to the mapfile -// via SetFileName(std::string),the path where to store the tiles via +// via SetFileName(std::string), the path where to store the tiles via // the method SetShapeIndexPath() and finally the path to the cgi-bin // to use via the method SetGCIPath(). // diff --git a/Examples/IO/VectorDataIOExample.cxx b/Examples/IO/VectorDataIOExample.cxx index 2e690b2b158129f0528a32c2fb198b816115b5b1..e373bdcbdf6101cbc57198eec4d60387211c5850 100644 --- a/Examples/IO/VectorDataIOExample.cxx +++ b/Examples/IO/VectorDataIOExample.cxx @@ -243,7 +243,7 @@ int main(int argc, char * argv[]) // // This example can convert an ESRI Shapefile to // a MapInfo File but you can also access with the same OTB source code -// to a PostgreSQL datasource,using a connection string as : +// to a PostgreSQL datasource, using a connection string as : // PG:"dbname='databasename' host='addr' port='5432' user='x' password='y'" // Starting with GDAL 1.6.0, the set of tables to be scanned can be overridden // by specifying tables=schema.table. diff --git a/Examples/Iterators/NeighborhoodIterators1.cxx b/Examples/Iterators/NeighborhoodIterators1.cxx index 6edbab879e5245bcb0e4ae027dc41f833cc79eb9..c70e539ba2d6af3e8401675711356d89c2c490af 100644 --- a/Examples/Iterators/NeighborhoodIterators1.cxx +++ b/Examples/Iterators/NeighborhoodIterators1.cxx @@ -172,7 +172,7 @@ int main(int argc, char *argv[]) // Software Guide : BeginLatex // // It is equivalent to use the six corresponding integer array indices instead. -// For example, the offsets \code{(-1,-1)} and \code{(1, -1)} are +// For example, the offsets \code{(-1, -1)} and \code{(1, -1)} are // equivalent to the integer indices \code{0} and \code{2}, respectively. // // The calculations are done in a \code{for} loop that moves the input and diff --git a/Examples/Learning/SVMGenericKernelImageModelEstimatorExample.cxx b/Examples/Learning/SVMGenericKernelImageModelEstimatorExample.cxx index 914d131edecd72db15620071975b99a2660cb0f6..448f7a4c3a4e40f84e90eed8f18d5eaa29a08094 100644 --- a/Examples/Learning/SVMGenericKernelImageModelEstimatorExample.cxx +++ b/Examples/Learning/SVMGenericKernelImageModelEstimatorExample.cxx @@ -100,9 +100,9 @@ int main(int argc, char* argv[]) // // The instanciation of the kernel is to be implemented. The kernel which is // used here is a linear combination of a polynomial kernel and an RBF one. -// It is written as $$\mu k_1(x,y) + (1-\mu) k_2(x,y)$$ with -// $k_1(x,y)=\left( \gamma_1 x\cdot y + c_0 \right) ^d$ and -// $k_2(x,y) = \exp\left( - \gamma_2 \| x-y\|^2 \right)$. Then, the specific +// It is written as $$\mu k_1(x, y) + (1-\mu) k_2(x, y)$$ with +// $k_1(x, y)=\left( \gamma_1 x\cdot y + c_0 \right) ^d$ and +// $k_2(x, y) = \exp\left( - \gamma_2 \| x-y\|^2 \right)$. Then, the specific // parameters of this kernel are: // \begin{itemize} // \item \code{Mixture} ($\mu$), diff --git a/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx b/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx index fd0556b5849a2d48344307191ae1caacd5c5e4e6..613e0c2c94e89ce77300a542e2198a907c05c1b1 100644 --- a/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx +++ b/Examples/OBIA/RadiometricAttributesLabelMapFilterExample.cxx @@ -124,7 +124,7 @@ int main(int argc, char * argv[]) LabelMapToBinaryImageFilterType; typedef otb::MultiChannelRAndNIRIndexImageFilter<VectorImageType, ImageType> NDVIImageFilterType; - typedef otb::ImageToVectorImageCastFilter<ImageType,VectorImageType> + typedef otb::ImageToVectorImageCastFilter<ImageType, VectorImageType> ImageToVectorImageCastFilterType; ReaderType::Pointer reader = ReaderType::New(); diff --git a/Examples/Patented/HybridSegmentationFuzzyVoronoi.cxx b/Examples/Patented/HybridSegmentationFuzzyVoronoi.cxx index a693f663602b9bb3b822cdd4adb940ccefbdf0ca..de0ef6eb042bd447d3de00df2c4f06a1834c6c07 100644 --- a/Examples/Patented/HybridSegmentationFuzzyVoronoi.cxx +++ b/Examples/Patented/HybridSegmentationFuzzyVoronoi.cxx @@ -357,7 +357,7 @@ int main(int argc, char *argv[]) // \end{verbatim} // \normalsize // - // $(111,38)$ specifies the index position of a seed point in the image, + // $(111, 38)$ specifies the index position of a seed point in the image, // while $75$ and $20$ are the estimated mean and standard deviation, // respectively, of the object to be segmented. Finally, $0.5$ and $2.0$ // are the tolerance for the mean and standard deviation, respectively. diff --git a/Examples/Patented/ScaleInvariantFeatureImageFilter.cxx b/Examples/Patented/ScaleInvariantFeatureImageFilter.cxx index 91328da14c7ec60b197bbf741587f68194c7b183..4181f7c5af706cd5de39b7f162b3bafe976cc814 100644 --- a/Examples/Patented/ScaleInvariantFeatureImageFilter.cxx +++ b/Examples/Patented/ScaleInvariantFeatureImageFilter.cxx @@ -4,7 +4,7 @@ Language: C++ Date: $Date$ Version: $Revision$ - Copyright (c) 2005,2006,2007 Warren Cheung + Copyright (c) 2005, 2006, 2007 Warren Cheung All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/Examples/Projections/MapProjectionExample.cxx b/Examples/Projections/MapProjectionExample.cxx index bc72e00892286e688a58585cc1e651597fdc4394..a72eafebbc57527a1774eb6ead85ccd565ce29b1 100644 --- a/Examples/Projections/MapProjectionExample.cxx +++ b/Examples/Projections/MapProjectionExample.cxx @@ -154,15 +154,15 @@ int main(int argc, char* argv[]) // Software Guide : BeginCodeSnippet std::string projectionRefWkt = "PROJCS[\"UTM Zone 31, Northern Hemisphere\"," - "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563," - "AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0]," - "AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]]," - "UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]]," - "AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST]," - "AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"]," - "PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3]," - "PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000]," - "PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563," + "AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0]," + "AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]]," + "UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]]," + "AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST]," + "AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"]," + "PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3]," + "PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000]," + "PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; // Software Guide : EndCodeSnippet // Software Guide : BeginLatex diff --git a/Examples/Radiometry/AVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx b/Examples/Radiometry/AVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx index b119386a4712943a7078236708a9c56cf808a60d..94edd4d01e1923f1b84663493bd338b51fc7769f 100644 --- a/Examples/Radiometry/AVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx +++ b/Examples/Radiometry/AVIMultiChannelRAndGAndNIRVegetationIndexImageFilter.cxx @@ -170,7 +170,7 @@ int main(int argc, char *argv[]) // Software Guide : BeginLatex // - // The $\lambda$ R,G and NIR parameters are set. The + // The $\lambda$ R, G and NIR parameters are set. The // \doxygen{otb}{MultiChannelRAndGAndNIRIndexImageFilter} // class sets the default values of $\lambda$ to $660$, $560$ and // $830$. diff --git a/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx b/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx index 71d98d8c8164c1386ace76fe288d7024027376d8..606a09508e30ac0281a44b5032eeda9b62e11aa9 100644 --- a/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx +++ b/Examples/Radiometry/AtmosphericCorrectionSequencement.cxx @@ -515,11 +515,11 @@ int main(int argc, char *argv[]) // \item $\rho_{S}$ is the environment contribution to the pixel target reflectance in the total // observed signal. // \begin{equation} -// \rho{S} = \sum{j}\sum{i}f(r(i,j))\times \rho_{S}^{unif}(i,j) +// \rho{S} = \sum{j}\sum{i}f(r(i, j))\times \rho_{S}^{unif}(i, j) // \end{equation} // where, // \begin{itemize} -// \item r(i,j) is the distance between the pixel(i,j) and the central pixel of the window in $km$; +// \item r(i, j) is the distance between the pixel(i, j) and the central pixel of the window in $km$; // \item f(r) is the global environment function. // \begin{equation} // f(r) = \frac{t_{d}^{R}(\mu_{V}).f_{R}(r)+t_{d}^{A}(\mu_{V}).f_{A}(r)}{ t_{d}(\mu_{V}) } diff --git a/Examples/Registration/ImageRegistration1.cxx b/Examples/Registration/ImageRegistration1.cxx index 44a6092d1c19849232099a86e503223d9b6d9fd8..aaa2b1160f8a91bdcc8d43fd038b7e389b8da748 100644 --- a/Examples/Registration/ImageRegistration1.cxx +++ b/Examples/Registration/ImageRegistration1.cxx @@ -503,7 +503,7 @@ int main(int argc, char *argv[]) // \end{itemize} // // The second image is the result of intentionally translating the first - // image by $(13,17)$ pixels. Both images have unit-spacing and + // image by $(13, 17)$ pixels. Both images have unit-spacing and // are shown in Figure \ref{fig:FixedMovingImageRegistration1}. The // registration takes 18 iterations and the resulting transform parameters are: // diff --git a/Examples/Registration/ImageRegistration2.cxx b/Examples/Registration/ImageRegistration2.cxx index a052e7a6cb4710a290372ccc3ff0eea7d1695785..b4554c67a9926245b0afb1c0ed1d44495ac4c351 100644 --- a/Examples/Registration/ImageRegistration2.cxx +++ b/Examples/Registration/ImageRegistration2.cxx @@ -391,7 +391,7 @@ int main(int argc, char *argv[]) // unstable. Small values, on the other hand, may result in the optimizer // needing too many iterations in order to walk to the extrema of the cost // function. The easy way of fine tuning this parameter is to start with - // small values, probably in the range of $\{5.0,10.0\}$. Once the other + // small values, probably in the range of $\{5.0, 10.0\}$. Once the other // registration parameters have been tuned for producing convergence, you // may want to revisit the learning rate and start increasing its value until // you observe that the optimization becomes unstable. The ideal value for diff --git a/Examples/Registration/ImageRegistration5.cxx b/Examples/Registration/ImageRegistration5.cxx index 87273b96094ddc6624226bd4df785957520a1033..3578f71b8b31112709ca07e2b022579655d52e8b 100644 --- a/Examples/Registration/ImageRegistration5.cxx +++ b/Examples/Registration/ImageRegistration5.cxx @@ -631,7 +631,7 @@ int main(int argc, char *argv[]) // \ref{fig:FixedMovingImageRegistration5b}. In order to accelerate // convergence it is convenient to use a larger step length as shown here. // - // \code{optimizer->SetMaximumStepLength( 1.0 );} + // \code{optimizer->SetMaximumStepLength( 1.0 ); } // // The registration now takes $34$ iterations and produces the following // results: diff --git a/Examples/Registration/ImageRegistration9.cxx b/Examples/Registration/ImageRegistration9.cxx index 486c1cc1ce4e32194b31651a745614fd5b56c351..e663d77ea89ab6387d577cc18b346e2e0ad3e898 100644 --- a/Examples/Registration/ImageRegistration9.cxx +++ b/Examples/Registration/ImageRegistration9.cxx @@ -464,7 +464,7 @@ int main(int argc, char *argv[]) // \end{itemize} // // The second image is the result of intentionally rotating the first - // image by $10$ degrees and then translating by $(13,17)$. Both images + // image by $10$ degrees and then translating by $(13, 17)$. Both images // have unit-spacing and are shown in Figure // \ref{fig:FixedMovingImageRegistration9}. We execute the code using the // following parameters: step length=1.0, translation scale= 0.0001 and diff --git a/Examples/Segmentation/ConfidenceConnected.cxx b/Examples/Segmentation/ConfidenceConnected.cxx index 1bf813bae503fa715225d2e882f3aa241b69649b..e56ac85c39fcdfb93d314a2b52a91f076563da66 100644 --- a/Examples/Segmentation/ConfidenceConnected.cxx +++ b/Examples/Segmentation/ConfidenceConnected.cxx @@ -348,9 +348,9 @@ int main(int argc, char *argv[]) // \begin{tabular}{|l|c|c|c|c|} // \hline // Structure & Seed Index & Lower & Upper & Output Image \\ \hline - // Road & $(110,38)$ & 50 & 100 & Second from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline - // Shadow & $(118,100)$ & 0 & 10 & Third from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline - // Building & $(169,146)$ & 220 & 255 & Fourth from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline + // Road & $(110, 38)$ & 50 & 100 & Second from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline + // Shadow & $(118, 100)$ & 0 & 10 & Third from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline + // Building & $(169, 146)$ & 220 & 255 & Fourth from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline // \end{tabular} // \end{center} // \itkcaption[ConnectedThreshold example parameters]{Parameters used for diff --git a/Examples/Segmentation/ConnectedThresholdImageFilter.cxx b/Examples/Segmentation/ConnectedThresholdImageFilter.cxx index 88ac12e2dcee08c4cb3b38f36521372070fb9859..693b3789d97fad0ca228ab1f05ff1f46bdc4b5c7 100644 --- a/Examples/Segmentation/ConnectedThresholdImageFilter.cxx +++ b/Examples/Segmentation/ConnectedThresholdImageFilter.cxx @@ -310,9 +310,9 @@ int main(int argc, char *argv[]) // \begin{tabular}{|l|c|c|c|c|} // \hline // Structure & Seed Index & Lower & Upper & Output Image \\ \hline - // Road & $(110,38)$ & 50 & 100 & Second from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline - // Shadow & $(118,100)$ & 0 & 10 & Third from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline - // Building & $(169,146)$ & 220 & 255 & Fourth from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline + // Road & $(110, 38)$ & 50 & 100 & Second from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline + // Shadow & $(118, 100)$ & 0 & 10 & Third from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline + // Building & $(169, 146)$ & 220 & 255 & Fourth from left in Figure \ref{fig:ConnectedThresholdOutput} \\ \hline // \end{tabular} // \end{center} // \itkcaption[ConnectedThreshold example parameters]{Parameters used for diff --git a/Examples/Segmentation/FastMarchingImageFilter.cxx b/Examples/Segmentation/FastMarchingImageFilter.cxx index 6b67b29b167629ff48a49f4204fbbebe6437a8ae..1079bdda816c1142a9a6a29b2ec107b495acb599 100644 --- a/Examples/Segmentation/FastMarchingImageFilter.cxx +++ b/Examples/Segmentation/FastMarchingImageFilter.cxx @@ -663,9 +663,9 @@ int main(int argc, char *argv[]) // \begin{tabular}{|l|c|c|c|c|c|c|p{2cm}|} // \hline // Structure & Seed Index & $\sigma$ & $\alpha$ & $\beta$ & Threshold & Output Image from left \\ \hline - // Road & $(91,176)$ & 0.5 & -0.5 & 3.0 & 100 & First \\ \hline - // Shadow & $(118,100)$ & 1.0 & -0.5 & 3.0 & 100 & Second \\ \hline - // Building & $(145,21)$ & 0.5 & -0.5 & 3.0 & 100 & Third \\ \hline + // Road & $(91, 176)$ & 0.5 & -0.5 & 3.0 & 100 & First \\ \hline + // Shadow & $(118, 100)$ & 1.0 & -0.5 & 3.0 & 100 & Second \\ \hline + // Building & $(145, 21)$ & 0.5 & -0.5 & 3.0 & 100 & Third \\ \hline // \end{tabular} // \end{center} // \itkcaption[FastMarching segmentation example parameters]{Parameters used diff --git a/Examples/Segmentation/IsolatedConnectedImageFilter.cxx b/Examples/Segmentation/IsolatedConnectedImageFilter.cxx index 8bbc20ccd586a436da40c667cc61cb34d85e3c02..e2e07ad6346ba7325eff24981b5d9cfea06fa7ca 100644 --- a/Examples/Segmentation/IsolatedConnectedImageFilter.cxx +++ b/Examples/Segmentation/IsolatedConnectedImageFilter.cxx @@ -257,7 +257,7 @@ int main(int argc, char *argv[]) // \begin{tabular}{|l|c|c|c|c|} // \hline // Adjacent Structures & Seed1 & Seed2 & Lower & Isolated value found \\ \hline - // Gray matter vs White matter & $(61,140)$ & $(63,43)$ & $150$ & $183.31$ \\ \hline + // Gray matter vs White matter & $(61, 140)$ & $(63, 43)$ & $150$ & $183.31$ \\ \hline // \end{tabular} // \end{center} // \itkcaption[IsolatedConnectedImageFilter example parameters]{Parameters diff --git a/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx b/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx index a78634748b6e2f02c0079b593d0eb5a9bd221948..a8646e61b574e61364397d86631fe9d4a25a4e5b 100644 --- a/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx +++ b/Examples/Segmentation/NeighborhoodConnectedImageFilter.cxx @@ -302,9 +302,9 @@ int main(int argc, char *argv[]) // \begin{tabular}{|l|c|c|c|c|} // \hline // Structure & Seed Index & Lower & Upper & Output Image \\ \hline - // Road & $(110,38)$ & 50 & 100 & Second from left in Figure \ref{fig:NeighborhoodConnectedThresholdOutput} \\ \hline - // Shadow & $(118,100)$ & 0 & 10 & Third from left in Figure \ref{fig:NeighborhoodConnectedThresholdOutput} \\ \hline - // Building & $(169,146)$ & 220 & 255 & Fourth from left in Figure \ref{fig:NeighborhoodConnectedThresholdOutput} \\ \hline + // Road & $(110, 38)$ & 50 & 100 & Second from left in Figure \ref{fig:NeighborhoodConnectedThresholdOutput} \\ \hline + // Shadow & $(118, 100)$ & 0 & 10 & Third from left in Figure \ref{fig:NeighborhoodConnectedThresholdOutput} \\ \hline + // Building & $(169, 146)$ & 220 & 255 & Fourth from left in Figure \ref{fig:NeighborhoodConnectedThresholdOutput} \\ \hline // \end{tabular} // \end{center} // \itkcaption[NeighborhoodConnectedThreshold example parameters]{Parameters used for diff --git a/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx b/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx index 5939cf1b9b7c6be990977e1019a59cba1eee19ac..017c74332c02694ab879aa4b041e1e3044a1d549 100644 --- a/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx +++ b/Examples/Segmentation/OtsuMultipleThresholdImageFilter.cxx @@ -25,7 +25,7 @@ // Software Guide : BeginCommandLineArgs // INPUTS: {QB_Suburb.png} -// OUTPUTS: {OtsuMultipleThresholdsOutput000.png},{OtsuMultipleThresholdsOutput001.png}, {OtsuMultipleThresholdsOutput002.png} +// OUTPUTS: {OtsuMultipleThresholdsOutput000.png}, {OtsuMultipleThresholdsOutput001.png}, {OtsuMultipleThresholdsOutput002.png} // Software Guide : EndCommandLineArgs // Software Guide : BeginLatex diff --git a/Examples/Segmentation/VectorConfidenceConnected.cxx b/Examples/Segmentation/VectorConfidenceConnected.cxx index 2ca7017eb9bff950b7a51820716a01b7a749b24f..3599eb624a2e1b758ba01874c8e58ea3bf1698ad 100644 --- a/Examples/Segmentation/VectorConfidenceConnected.cxx +++ b/Examples/Segmentation/VectorConfidenceConnected.cxx @@ -277,7 +277,7 @@ int main( int argc, char *argv[] ) // \begin{tabular}{|l|c|c|c|c|} // \hline // Structure & Seed Index & Multiplier & Iterations & Output Image \\ \hline - // Rectum & $(70,120)$ & 7 & 1 & Second from left in Figure \ref{fig:VectorConfidenceConnectedOutput} \\ \hline + // Rectum & $(70, 120)$ & 7 & 1 & Second from left in Figure \ref{fig:VectorConfidenceConnectedOutput} \\ \hline // Rectum & $(23, 93)$ & 7 & 1 & Third from left in Figure \ref{fig:VectorConfidenceConnectedOutput} \\ \hline // Vitreo & $(66, 66)$ & 3 & 1 & Fourth from left in Figure \ref{fig:VectorConfidenceConnectedOutput} \\ \hline // \end{tabular} diff --git a/Examples/Tutorials/OrthoFusion.cxx b/Examples/Tutorials/OrthoFusion.cxx index 39d21080a4e041dc87c7880a49a94d11ec1c363c..e7e6e630dfb7a834e5880731515605f9eb3f5d65 100644 --- a/Examples/Tutorials/OrthoFusion.cxx +++ b/Examples/Tutorials/OrthoFusion.cxx @@ -179,7 +179,7 @@ int main(int argc, char* argv[]) // Software Guide : BeginCodeSnippet typedef otb::OrthoRectificationFilter<VectorImageType, - DoubleVectorImageType,utmMapProjectionType> + DoubleVectorImageType, utmMapProjectionType> VectorOrthoRectifFilterType; diff --git a/Examples/Visualization/VectorDataRendering.cxx b/Examples/Visualization/VectorDataRendering.cxx index 2734a15a51ad7c3dcb7ddf20937e9cbc43ce4cf5..bba34859f135ae46a2dd0ffc2f68b2a95277576b 100644 --- a/Examples/Visualization/VectorDataRendering.cxx +++ b/Examples/Visualization/VectorDataRendering.cxx @@ -90,10 +90,10 @@ int main( int argc, char * argv[] ) return EXIT_FAILURE; } - typedef otb::VectorImage<double,2> ImageType; + typedef otb::VectorImage<double, 2> ImageType; typedef ImageType::PixelType PixelType; typedef itk::RGBAPixel<unsigned char> RGBAPixelType; - typedef otb::Image<RGBAPixelType,2> OutputImageType; + typedef otb::Image<RGBAPixelType, 2> OutputImageType; // Reading input image typedef otb::ImageFileReader<ImageType> ReaderType; @@ -110,13 +110,13 @@ int main( int argc, char * argv[] ) typedef otb::ImageView<ModelType> ViewType; typedef otb::ImageWidgetController ControllerType; typedef otb::WidgetResizingActionHandler - <ModelType,ViewType> ResizingHandlerType; + <ModelType, ViewType> ResizingHandlerType; typedef otb::ChangeScaledExtractRegionActionHandler - <ModelType,ViewType> ChangeScaledRegionHandlerType; + <ModelType, ViewType> ChangeScaledRegionHandlerType; typedef otb::ChangeExtractRegionActionHandler - <ModelType,ViewType> ChangeRegionHandlerType; + <ModelType, ViewType> ChangeRegionHandlerType; typedef otb::ChangeScaleActionHandler - <ModelType,ViewType> ChangeScaleHandlerType; + <ModelType, ViewType> ChangeScaleHandlerType; typedef otb::PixelDescriptionModel<OutputImageType> PixelDescriptionModelType; typedef otb::PixelDescriptionActionHandler < PixelDescriptionModelType, ViewType> PixelDescriptionActionHandlerType; @@ -170,7 +170,7 @@ int main( int argc, char * argv[] ) // set up the rendering of the vector data, the VectorDataToImageFilter uses the // mapnik library to obtain a nice rendering typedef itk::RGBAPixel<unsigned char> AlphaPixelType; - typedef otb::Image<AlphaPixelType,2> AlphaImageType; + typedef otb::Image<AlphaPixelType, 2> AlphaImageType; typedef otb::VectorDataToImageFilter<VectorDataType, AlphaImageType> VectorDataToImageFilterType; VectorDataToImageFilterType::Pointer vectorDataRendering = VectorDataToImageFilterType::New(); vectorDataRendering->SetInput(projection->GetOutput()); @@ -294,7 +294,7 @@ int main( int argc, char * argv[] ) typedef LayerType::HistogramType HistogramType; typedef otb::HistogramCurve<HistogramType> HistogramCurveType; - HistogramCurveType::ColorType red,green,blue; + HistogramCurveType::ColorType red, green, blue; red.Fill(0); red[0]=1.; red[3]=0.5; diff --git a/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx b/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx index cd7665dbde11a1601532739b8d34481ad9bba695..b2e12c65628d48e694c17ae214d8b83c60c162cf 100644 --- a/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx +++ b/Testing/Code/BasicFilters/otbBCOInterpolateImageFunction.cxx @@ -72,7 +72,7 @@ int otbBCOInterpolateImageFunction(int argc, char * argv[]) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(infname); - reader->Update();//TODO check if necessary + reader->Update(); //TODO check if necessary std::cout << "Alpha Checking : " << std::endl << filter->GetAlpha() << std::endl; filter->SetAlpha(-1.0); @@ -144,7 +144,7 @@ int otbBCOInterpolateImageFunctionOverVectorImage(int argc, char * argv[]) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(infname); - reader->Update();//TODO check if necessary + reader->Update(); //TODO check if necessary std::cout << "Alpha Checking : " << std::endl << filter->GetAlpha() << std::endl; filter->SetAlpha(-1.0); @@ -181,7 +181,7 @@ int otbBCOInterpolateImageFunctionTest(int argc, char * argv[]) typedef otb::Image<double, 2> ImageType; typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::StreamingResampleImageFilter<ImageType,ImageType,double> StreamingResampleImageFilterType; + typedef otb::StreamingResampleImageFilter<ImageType, ImageType, double> StreamingResampleImageFilterType; typedef otb::BCOInterpolateImageFunction<ImageType, double> InterpolatorType; typedef otb::StreamingImageFileWriter<ImageType> WriterType; @@ -224,7 +224,7 @@ int otbBCOInterpolateImageFunctionVectorImageTest(int argc, char * argv[]) typedef otb::VectorImage<double, 2> ImageType; typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::StreamingResampleImageFilter<ImageType,ImageType,double> StreamingResampleImageFilterType; + typedef otb::StreamingResampleImageFilter<ImageType, ImageType, double> StreamingResampleImageFilterType; typedef otb::BCOInterpolateImageFunction<ImageType, double> InterpolatorType; typedef otb::StreamingImageFileWriter<ImageType> WriterType; diff --git a/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx b/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx index cd9a8588d21fc1e297fda71434c57711fb936ca9..b17bae5f6da59377df1bffcd737e91ff69f4b512 100644 --- a/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx +++ b/Testing/Code/BasicFilters/otbBandMathImageFilter.cxx @@ -103,7 +103,7 @@ int otbBandMathImageFilter( int argc, char* argv[]) filter->SetNthInput(1, image2); filter->SetNthInput(2, image3, "canal3"); - filter->SetExpression("cos(2 * pi * b1)/(2 * pi * b2 + 1E-3)*sin(pi * canal3) + ndvi(b1,b2) * sqrt(2) * canal3"); + filter->SetExpression("cos(2 * pi * b1)/(2 * pi * b2 + 1E-3)*sin(pi * canal3) + ndvi(b1, b2) * sqrt(2) * canal3"); filter->Update(); std::cout << "\n--- Standard Use\n"; @@ -112,7 +112,7 @@ int otbBandMathImageFilter( int argc, char* argv[]) ImageType::Pointer output = filter->GetOutput(); IteratorType it(output, region); - for (it1.GoToBegin(), it2.GoToBegin(), it3.GoToBegin(), it.GoToBegin(); !it1.IsAtEnd(); ++it1, ++it2, ++it3,++it) + for (it1.GoToBegin(), it2.GoToBegin(), it3.GoToBegin(), it.GoToBegin(); !it1.IsAtEnd(); ++it1, ++it2, ++it3, ++it) { ImageType::IndexType i1 = it1.GetIndex(); ImageType::IndexType i2 = it2.GetIndex(); @@ -258,7 +258,7 @@ int otbBandMathImageFilterWithIdx( int argc, char* argv[]) filter->SetNthInput(1, image2); filter->SetNthInput(2, image3); - filter->SetExpression("if(sqrt(idxX*idxX+idxY*idxY) < 50, b2,b3)"); + filter->SetExpression("if(sqrt(idxX*idxX+idxY*idxY) < 50, b2, b3)"); WriterType::Pointer writer = WriterType::New(); writer->SetInput(filter->GetOutput()); writer->SetFileName(outfname1); diff --git a/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorTest.cxx b/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorTest.cxx index a2d396ef5d777aaedd8e27f0eb6571f09bd04c31..37bd612682b49f9bc93d5819d264066d941e7f68 100644 --- a/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorTest.cxx +++ b/Testing/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculatorTest.cxx @@ -70,7 +70,7 @@ otbContinuousMinimumMaximumImageCalculatorTest(int, char *[]) } } - // Set voxel (10,10) to maximum value + // Set voxel (10, 10) to maximum value index[0] = 10; index[1] = 10; image->SetPixel(index, maximum); diff --git a/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx b/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx index 1aed28cd8aeaa49f0ae88b25ae904356c003e9fb..d10ecad8b325c68b418753a211f44ab8f779a657 100644 --- a/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx +++ b/Testing/Code/BasicFilters/otbFlexibleDistanceWithMissingValue.cxx @@ -46,8 +46,8 @@ int otbFlexibleDistanceWithMissingValue(int argc, char * argv[]) DistanceType::Pointer dist = DistanceType::New(); double distanceValue = dist->Evaluate(x, y); std::cout << std::setprecision(20) << std::endl; - std::cout << "dim,a,b : " << dim << "," << a << "," << b << std::endl; - std::cout << "dim*vcl_pow(3,b) : " << dim*vcl_pow(3, b) << std::endl; + std::cout << "dim, a, b : " << dim << "," << a << "," << b << std::endl; + std::cout << "dim*vcl_pow(3, b) : " << dim*vcl_pow(3, b) << std::endl; std::cout << "Distance : " << distanceValue << std::endl; std::cout << "Epsilon : " << epsilon << std::endl; std::cout << "-> Tests diff : " << vcl_abs(distanceValue - dim * vcl_pow(3, b)) << std::endl; diff --git a/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx b/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx index 10b40f0d1245b503bab9076537d54218a06a3b36..ae69837947489294b783db833286603cf793770a 100644 --- a/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx +++ b/Testing/Code/BasicFilters/otbImagePCAShapeModelEstimatorTest.cxx @@ -1,7 +1,7 @@ /*========================================================================= Program: Insight Segmentation & Registration Toolkit - Module: $RCSfile: itkImagePCAShapeModelEstimatorTest.cxx,v $ + Module: $RCSfile: itkImagePCAShapeModelEstimatorTest.cxx, v $ Language: C++ Date: $Date: 2008-02-03 04:05:34 $ Version: $Revision: 1.11 $ diff --git a/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx b/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx index 3e6c03a85cd9bfbf6dc1d363e90bb4fc160637ab..944136515bd5dce563cb166bffe2497ba65d3255 100644 --- a/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx +++ b/Testing/Code/BasicFilters/otbImaginaryImageToComplexImageFilterTest.cxx @@ -40,7 +40,7 @@ int otbImaginaryImageToComplexImageFilterTest(int argc, char * argv[]) typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::ImaginaryImageToComplexImageFilter<ImageType,ComplexImageType> FilterType; + typedef otb::ImaginaryImageToComplexImageFilter<ImageType, ComplexImageType> FilterType; FilterType::Pointer filter = FilterType::New(); diff --git a/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx b/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx index c2ac8c727c0b71d93fe270fe646eceb5a67a2f91..0eae54dd9a22e0638257999092ce40df8a9c1d29 100644 --- a/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx +++ b/Testing/Code/BasicFilters/otbInverseLogPolarTransform.cxx @@ -67,7 +67,7 @@ int otbInverseLogPolarTransform(int argc, char* argv[]) { pprime[0] = (1. / angularStep) * vcl_asin((*it)[1] / rho); pprime[0] = pprime[0] * (180. / otb::CONST_PI); - // Deplacing the range to [0,90], [270,360] + // 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) diff --git a/Testing/Code/BasicFilters/otbProlateInterpolateImageFunction.cxx b/Testing/Code/BasicFilters/otbProlateInterpolateImageFunction.cxx index c9cae95ea23c27855a45e05d999d6c3bc4e3707d..f157e8deb7548067db4950ecf712788b092f45b6 100644 --- a/Testing/Code/BasicFilters/otbProlateInterpolateImageFunction.cxx +++ b/Testing/Code/BasicFilters/otbProlateInterpolateImageFunction.cxx @@ -77,7 +77,7 @@ int otbProlateInterpolateImageFunction(int argc, char * argv[]) /**********************************************************/ //typedef otb::StreamingImageFileWriter<ImageType> WriterType; - //typedef otb::StreamingResampleImageFilter<ImageType,ImageType,double> StreamingResampleImageFilterType; + //typedef otb::StreamingResampleImageFilter<ImageType, ImageType, double> StreamingResampleImageFilterType; typedef otb::ImageFileWriter<ImageType> WriterType; typedef itk::ResampleImageFilter<ImageType, ImageType, double> StreamingResampleImageFilterType; WriterType::Pointer prowriter = WriterType::New(); diff --git a/Testing/Code/BasicFilters/otbProlateValidationTest.cxx b/Testing/Code/BasicFilters/otbProlateValidationTest.cxx index c4e1adc56516ce6b1a75cc8cbb5b6581fa4476ea..bec48dbf9a54621f649e5915d664dcd0f2a5f1a6 100644 --- a/Testing/Code/BasicFilters/otbProlateValidationTest.cxx +++ b/Testing/Code/BasicFilters/otbProlateValidationTest.cxx @@ -40,7 +40,7 @@ int otbProlateValidationTest(int argc, char * argv[]) typedef otb::ProlateInterpolateImageFunction<ImageType> InterpolatorType; //typedef InterpolatorType::FunctionType FunctionType; - //typedef itk::NearestNeighborInterpolateImageFunction<ImageType,double> DefaultInterpolatorType; + //typedef itk::NearestNeighborInterpolateImageFunction<ImageType, double> DefaultInterpolatorType; //DefaultInterpolatorType::Pointer def = DefaultInterpolatorType::New(); InterpolatorType::Pointer prolate = InterpolatorType::New(); diff --git a/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx b/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx index 5ab19235dd12efc8e58ae5c76aab737ca3959c27..8eeca857249ea24e87f9744fd626d3dc17da4f4b 100644 --- a/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx +++ b/Testing/Code/BasicFilters/otbRealImageToComplexImageFilterTest.cxx @@ -40,7 +40,7 @@ int otbRealImageToComplexImageFilterTest(int argc, char * argv[]) typedef otb::ImageFileReader<ImageType> ReaderType; - typedef otb::RealImageToComplexImageFilter<ImageType,ComplexImageType> FilterType; + typedef otb::RealImageToComplexImageFilter<ImageType, ComplexImageType> FilterType; FilterType::Pointer filter = FilterType::New(); diff --git a/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx b/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx index 10660a3baf858dede567e2c06a6e505d1267f551..b1e359c2dcdae8c34a67f2a7e108433f4540ac84 100644 --- a/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx +++ b/Testing/Code/BasicFilters/otbStreamingCompareImageFilter.cxx @@ -51,7 +51,7 @@ int otbStreamingCompareImageFilter(int argc, char * argv[]) typedef otb::Image<PixelType, Dimension> ImageType; typedef otb::ImageFileReader<ImageType> ReaderType; typedef otb::StreamingCompareImageFilter<ImageType> StreamingCompareImageFilterType; - typedef itk::ShiftScaleImageFilter <ImageType ,ImageType > ShiftFilterType; + typedef itk::ShiftScaleImageFilter <ImageType , ImageType > ShiftFilterType; // Instantiating object StreamingCompareImageFilterType::Pointer filter = StreamingCompareImageFilterType::New(); diff --git a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterCompareWithITK.cxx index 15c19fd91c350c83316624643e526eb2b198926f..64c3c4f3d8172819d8d2e1f25025ee197b07a5ef 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; diff --git a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx index 56660fcfd53bec0cac49ed5775bbd5c3c542e844..0b8902079ed13d787e75ef8b97d2448c56a1075f 100644 --- a/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx +++ b/Testing/Code/BasicFilters/otbStreamingResampleImageFilterWithAffineTransform.cxx @@ -86,7 +86,7 @@ int otbStreamingResampleImageFilterWithAffineTransform(int argc, char* argv[]) // Default value builder ImageType::PixelType defaultValue; - itk::PixelBuilder<ImageType::PixelType>::Zero(defaultValue,reader->GetOutput()->GetNumberOfComponentsPerPixel()); + itk::PixelBuilder<ImageType::PixelType>::Zero(defaultValue, reader->GetOutput()->GetNumberOfComponentsPerPixel()); /** Set the OptResampler Parameters*/ resampler->SetInput(reader->GetOutput()); diff --git a/Testing/Code/BasicFilters/otbTransformPointSetFilterTest.cxx b/Testing/Code/BasicFilters/otbTransformPointSetFilterTest.cxx index dc151299b3c1c47d105a78f7565e0ec1e6a12581..6418dd86b2143beee28a779b29a8a6eb3838bb78 100644 --- a/Testing/Code/BasicFilters/otbTransformPointSetFilterTest.cxx +++ b/Testing/Code/BasicFilters/otbTransformPointSetFilterTest.cxx @@ -32,7 +32,7 @@ int otbTransformPointSetFilterTest(int, char*[]) typedef int PixelType; // Declare the types of the PointSet - // By default it is a 3D PointSet using itk::Point<float,3> + // By default it is a 3D PointSet using itk::Point<float, 3> // on the vertices, and an itk::VectorContainter // as containter for points typedef itk::PointSet<PixelType> PointSetType; diff --git a/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx b/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx index 152e5b728e18c5f7be49eda2fa9cc0ec76168302..15aa5f76ed69afa8b4c7f74486ade03567053219 100644 --- a/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx +++ b/Testing/Code/Common/otbDrawLineSpatialObjectList.cxx @@ -127,7 +127,7 @@ int otbDrawLineSpatialObjectList(int argc, char* argv[]) /* LinesListType::const_iterator it; std::cout<<list.size()<<std::endl; for (it=list.begin(); it!=list.end(); it++) - std::cout<< (*it) <<std::endl;*/ + std::cout<< (*it) <<std::endl; */ filter->SetInputLineSpatialObjectList(list); diff --git a/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx b/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx index b3cc83772816db3d5ff14ef728d53b40b8ea21e0..43646d095284b89cb345471939356a55fecf9efd 100644 --- a/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx +++ b/Testing/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.cxx @@ -52,7 +52,7 @@ int otbImageRegionNonUniformMultidimensionalSplitter(int argc, char * argv[]) outfile << "Input region: " << region << std::endl; outfile << "Input NumberOfSplits: " << nbSplitTheoric << std::endl; outfile << "Output GetNumberOfSplits: " << nb << std::endl; - outfile << "Output GetSplit(" << nbAsked << "," << nb << ",input region): " << std::endl; + outfile << "Output GetSplit(" << nbAsked << "," << nb << ", input region): " << std::endl; outfile << " " << region2 << std::endl; outfile.close(); diff --git a/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx b/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx index 703a78597cc8567f33d0671e3f6f552397c23fa0..f9c2234e7aca63e232e884e9f54fe3d504ac9005 100644 --- a/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx +++ b/Testing/Code/Common/otbImageRegionTileMapSplitter.cxx @@ -53,7 +53,7 @@ int otbImageRegionTileMapSplitter(int argc, char * argv[]) outfile << "Input region: " << region << std::endl; outfile << "Input NumberOfSplits: " << nbSplitTheoric << std::endl; outfile << "Output GetNumberOfSplits: " << nb << std::endl; - outfile << "Output GetSplit(" << nbAsked << "," << nb << ",input region): " << std::endl; + outfile << "Output GetSplit(" << nbAsked << "," << nb << ", input region): " << std::endl; outfile << "Output region: " << region2 << std::endl; //Case 2 @@ -74,7 +74,7 @@ int otbImageRegionTileMapSplitter(int argc, char * argv[]) outfile << "Input region: " << region << std::endl; outfile << "Input NumberOfSplits: " << nbSplitTheoric << std::endl; outfile << "Output GetNumberOfSplits: " << nb << std::endl; - outfile << "Output GetSplit(" << nbAsked << "," << nb << ",input region): " << std::endl; + outfile << "Output GetSplit(" << nbAsked << "," << nb << ", input region): " << std::endl; outfile << "Output region: " << region2 << std::endl; //Case 3 @@ -95,7 +95,7 @@ int otbImageRegionTileMapSplitter(int argc, char * argv[]) outfile << "Input region: " << region << std::endl; outfile << "Input NumberOfSplits: " << nbSplitTheoric << std::endl; outfile << "Output GetNumberOfSplits: " << nb << std::endl; - outfile << "Output GetSplit(" << nbAsked << "," << nb << ",input region): " << std::endl; + outfile << "Output GetSplit(" << nbAsked << "," << nb << ", input region): " << std::endl; outfile << "Output region: " << region2 << std::endl; //Case 4 @@ -116,7 +116,7 @@ int otbImageRegionTileMapSplitter(int argc, char * argv[]) outfile << "Input region: " << region << std::endl; outfile << "Input NumberOfSplits: " << nbSplitTheoric << std::endl; outfile << "Output GetNumberOfSplits: " << nb << std::endl; - outfile << "Output GetSplit(" << nbAsked << "," << nb << ",input region): " << std::endl; + outfile << "Output GetSplit(" << nbAsked << "," << nb << ", input region): " << std::endl; outfile << "Output region: " << region2 << std::endl; //Case 5 @@ -137,7 +137,7 @@ int otbImageRegionTileMapSplitter(int argc, char * argv[]) outfile << "Input region: " << region << std::endl; outfile << "Input NumberOfSplits: " << nbSplitTheoric << std::endl; outfile << "Output GetNumberOfSplits: " << nb << std::endl; - outfile << "Output GetSplit(" << nbAsked << "," << nb << ",input region): " << std::endl; + outfile << "Output GetSplit(" << nbAsked << "," << nb << ", input region): " << std::endl; outfile << "Output region: " << region2 << std::endl; outfile.close(); diff --git a/Testing/Code/Common/otbObjectList.cxx b/Testing/Code/Common/otbObjectList.cxx index ade922b770704c1e8159b3a3b3b99307f5381ede..80195bcb4ba6a9a1aa661723afa0fc2ebd41adf7 100644 --- a/Testing/Code/Common/otbObjectList.cxx +++ b/Testing/Code/Common/otbObjectList.cxx @@ -169,8 +169,8 @@ int otbObjectList(int argc, char * argv[]) ImageListType::Iterator end = imageList->End(); imageList->Erase(begin, end); - otbControlConditionTestMacro(imageList->Size() != 1, "Erase(Iterator,Iterator)/Size()"); - otbControlConditionTestMacro(imageList->Back() != reader1->GetOutput(), "Erase(Iterator,Iterator)/Back()"); + otbControlConditionTestMacro(imageList->Size() != 1, "Erase(Iterator, Iterator)/Size()"); + otbControlConditionTestMacro(imageList->Back() != reader1->GetOutput(), "Erase(Iterator, Iterator)/Back()"); return EXIT_SUCCESS; } diff --git a/Testing/Code/Common/otbParserTest.cxx b/Testing/Code/Common/otbParserTest.cxx index 5ad71b30f05e22da9a6ea3f494f3159b89f92674..73e598efeced37ed36f92ed39b9af7794fc1fd44 100644 --- a/Testing/Code/Common/otbParserTest.cxx +++ b/Testing/Code/Common/otbParserTest.cxx @@ -46,10 +46,10 @@ int otbParserTest(int argc, char * argv[]) std::string Expression_Numerical = "10.0+3"; std::string Expression_BuildInFun = "cos(1.55)"; std::string Expression_UserDefinedCst = "ln10"; - std::string Expression_UserDefinedFun = "ndvi(100,10)"; + std::string Expression_UserDefinedFun = "ndvi(100, 10)"; std::string Expression_UserDefinedVars = "(var1+var2-var3)*var4/var5"; - std::string Expression_Mixed = "(7+10)/2+cos(pi/4)*10-10*ln10+ndvi(100,10)"; - std::string Expression_StressTest = "(7+10)/2+cos(pi/4)*10-10*ln10+ndvi(100,10)*40+rint(83.144)*0.6588"; + std::string Expression_Mixed = "(7+10)/2+cos(pi/4)*10-10*ln10+ndvi(100, 10)"; + std::string Expression_StressTest = "(7+10)/2+cos(pi/4)*10-10*ln10+ndvi(100, 10)*40+rint(83.144)*0.6588"; typedef otb::Parser ParserType; diff --git a/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx b/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx index 640cee045b66a9db04a8941e7a586c9b96e9bc31..c3f6057b2cdb34eac51335cc8aaeb890d138d750 100644 --- a/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx +++ b/Testing/Code/Common/otbPipelineMemoryPrintCalculatorTest.cxx @@ -32,11 +32,11 @@ int otbPipelineMemoryPrintCalculatorNew(int argc, char * argv[]) int otbPipelineMemoryPrintCalculatorTest(int argc, char * argv[]) { - typedef otb::VectorImage<double,2> VectorImageType; - typedef otb::Image<double,2> ImageType; + typedef otb::VectorImage<double, 2> VectorImageType; + typedef otb::Image<double, 2> ImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; typedef otb::VectorImageToIntensityImageFilter - <VectorImageType,ImageType> IntensityImageFilterType; + <VectorImageType, ImageType> IntensityImageFilterType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(argv[1]); diff --git a/Testing/Code/Common/otbRemoteSensingRegion.cxx b/Testing/Code/Common/otbRemoteSensingRegion.cxx index 2afcd04e3a44f89e6c294970fa25b23738d3e8f9..f8f3f815215437a7719af78b70f0660b9eba7e77 100644 --- a/Testing/Code/Common/otbRemoteSensingRegion.cxx +++ b/Testing/Code/Common/otbRemoteSensingRegion.cxx @@ -59,7 +59,7 @@ int otbRemoteSensingRegion(int argc, char * argv[]) /*Set the projection */ std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; region.SetRegionProjection(projectionRefWkt); diff --git a/Testing/Code/Common/otbTestCommandLineArgumentParserList.cxx b/Testing/Code/Common/otbTestCommandLineArgumentParserList.cxx index 2b116de2b142acd585b59d28cfb4a42f9112d9d4..d51c0cc642732a2d3145e8d5d0bea0948aee8aaf 100644 --- a/Testing/Code/Common/otbTestCommandLineArgumentParserList.cxx +++ b/Testing/Code/Common/otbTestCommandLineArgumentParserList.cxx @@ -44,7 +44,7 @@ int otbTestCommandLineArgumentParserList(int argc, char * argv[]) std::cout << "Entier : " << lEntier << std::endl; if (parseResult->IsOptionPresent("-deuxentiers")) { - //unsigned int lEntierDeux = otb::GetParameter<unsigned int>(parseResult,"-deuxentiers",1); + //unsigned int lEntierDeux = otb::GetParameter<unsigned int>(parseResult,"-deuxentiers", 1); unsigned int lEntierDeux = parseResult->GetParameterUInt("-deuxentiers", 1); std::cout << "Entier : " << lEntierDeux << std::endl; } @@ -55,7 +55,7 @@ int otbTestCommandLineArgumentParserList(int argc, char * argv[]) std::cout << "List de Double : " << parseResult->GetNumberOfParameters("-doubles") << std::endl; for (int i = 0; i < parseResult->GetNumberOfParameters("-doubles"); i++) { - //double value = otb::GetParameter<double>(parseResult,"-doubles",i); + //double value = otb::GetParameter<double>(parseResult,"-doubles", i); double value = parseResult->GetParameterDouble("-doubles", i); std::cout << " " << value; } diff --git a/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx b/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx index a78ffc3d9d3bd568461ee8ec02d3c0f6989272d4..1cdcf7218fb9c59b78396593ad20611bb7bd45ff 100644 --- a/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx +++ b/Testing/Code/Common/otbTestCommandLineArgumentParserWithError.cxx @@ -46,7 +46,7 @@ int otbTestCommandLineArgumentParserWithError(int argc, char * argv[]) std::cout << "Entier : " << lEntier << std::endl; if (parseResult->IsOptionPresent("-deuxentiers")) { - //unsigned int lEntierDeux = otb::GetParameter<unsigned int>(parseResult,"-deuxentiers",1); + //unsigned int lEntierDeux = otb::GetParameter<unsigned int>(parseResult,"-deuxentiers", 1); unsigned int lEntierDeux = parseResult->GetParameterUInt("-deuxentiers", 1); std::cout << "Entier : " << lEntierDeux << std::endl; } diff --git a/Testing/Code/Common/otbVectorDataExtractROI.cxx b/Testing/Code/Common/otbVectorDataExtractROI.cxx index b54dda0dc60928304a7aa35225643ccc6f44ef2d..cc056ad0226bee971dc80a28ed31873c88968306 100644 --- a/Testing/Code/Common/otbVectorDataExtractROI.cxx +++ b/Testing/Code/Common/otbVectorDataExtractROI.cxx @@ -58,7 +58,7 @@ int otbVectorDataExtractROI(int argc, char * argv[]) /*Set the projection */ std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; region.SetSize(size); region.SetOrigin(index); diff --git a/Testing/Code/Common/otbVectorDataToImageFilter.cxx b/Testing/Code/Common/otbVectorDataToImageFilter.cxx index bad39bad805a27443e1852553aee5a914ddaf7f6..100a03eece5929661c071c31bdf194f69774b235 100644 --- a/Testing/Code/Common/otbVectorDataToImageFilter.cxx +++ b/Testing/Code/Common/otbVectorDataToImageFilter.cxx @@ -51,7 +51,7 @@ int otbVectorDataToImageFilter(int argc, char * argv[]) projection->SetInput(reader->GetOutput()); std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; projection->SetOutputProjectionRef(projectionRefWkt); @@ -129,7 +129,7 @@ int otbVectorDataToImageFilterBinary(int argc, char * argv[]) projection->SetInput(reader->GetOutput()); std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; projection->SetOutputProjectionRef(projectionRefWkt); diff --git a/Testing/Code/Common/otbVectorDataToImageFilterNoFonts.cxx b/Testing/Code/Common/otbVectorDataToImageFilterNoFonts.cxx index a7a906f333a5abbea8f70060751c7484a5de6652..95de5dbed5fd74e055eecc67e8adbaeb83d83339 100644 --- a/Testing/Code/Common/otbVectorDataToImageFilterNoFonts.cxx +++ b/Testing/Code/Common/otbVectorDataToImageFilterNoFonts.cxx @@ -51,7 +51,7 @@ int otbVectorDataToImageFilterNoFonts(int argc, char * argv[]) projection->SetInput(reader->GetOutput()); std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; projection->SetOutputProjectionRef(projectionRefWkt); diff --git a/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx b/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx index fd53b6f573e7cdc4e2f116a3109d03acc42e1ce0..003b961660542f08911c91d2e22eb78fdcbcab03 100644 --- a/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx +++ b/Testing/Code/DisparityMap/otbFineRegistrationImageFilterNew.cxx @@ -29,10 +29,10 @@ int otbFineRegistrationImageFilterNew( int argc, char * argv[] ) typedef double PixelType; const unsigned int Dimension = 2; - typedef itk::FixedArray<PixelType,Dimension> DeformationValueType; + typedef itk::FixedArray<PixelType, Dimension> DeformationValueType; typedef otb::Image< PixelType> ImageType; - typedef otb::Image<DeformationValueType,2> FieldImageType; - typedef otb::FineRegistrationImageFilter<ImageType,ImageType,FieldImageType> RegistrationFilterType; + typedef otb::Image<DeformationValueType, 2> FieldImageType; + typedef otb::FineRegistrationImageFilter<ImageType, ImageType, FieldImageType> RegistrationFilterType; RegistrationFilterType::Pointer filter = RegistrationFilterType::New(); diff --git a/Testing/Code/DisparityMap/otbFineRegistrationImageFilterTest.cxx b/Testing/Code/DisparityMap/otbFineRegistrationImageFilterTest.cxx index c9de4c1ce9637c9f0aaf8240cf3a92ae31c8df8a..35e0502d5a033010d306c47fe83dcbb7a492deea 100644 --- a/Testing/Code/DisparityMap/otbFineRegistrationImageFilterTest.cxx +++ b/Testing/Code/DisparityMap/otbFineRegistrationImageFilterTest.cxx @@ -38,7 +38,7 @@ int otbFineRegistrationImageFilterTest( int argc, char * argv[] ) if(argc!=16) { std::cerr<<"Usage: "<<argv[0]<<" fixed_fname moving_fname output_correl output_field radius search_radius "; - std::cerr<<"subpixPrecision metric(0=CC,1=NCC,2=MeanSquare,3=Mean reciprocal square difference) "; + std::cerr<<"subpixPrecision metric(0=CC, 1=NCC, 2=MeanSquare, 3=Mean reciprocal square difference) "; std::cerr<<"gridStep offsetX offsetY"<<std::endl; std::cerr<<"ROI : indexX, indexY, startX, startY"<<std::endl; return EXIT_FAILURE; @@ -62,14 +62,14 @@ int otbFineRegistrationImageFilterTest( int argc, char * argv[] ) typedef double PixelType; const unsigned int Dimension = 2; - typedef itk::FixedArray<PixelType,Dimension> DeformationValueType; + typedef itk::FixedArray<PixelType, Dimension> DeformationValueType; typedef otb::Image< PixelType, Dimension > ImageType; - typedef otb::Image<DeformationValueType,Dimension> FieldImageType; + typedef otb::Image<DeformationValueType, Dimension> FieldImageType; typedef otb::ImageFileReader< ImageType > ReaderType; typedef otb::ImageFileWriter< ImageType > CorrelWriterType; typedef otb::ImageFileWriter< FieldImageType> FieldWriterType; typedef otb::ExtractROI<PixelType, PixelType> ExtractFiltertype; - typedef otb::FineRegistrationImageFilter<ImageType,ImageType,FieldImageType> RegistrationFilterType; + typedef otb::FineRegistrationImageFilter<ImageType, ImageType, FieldImageType> RegistrationFilterType; ReaderType::Pointer freader = ReaderType::New(); freader->SetFileName(fixedFileName); @@ -111,7 +111,7 @@ int otbFineRegistrationImageFilterTest( int argc, char * argv[] ) case 0: { std::cout<<"Metric: correlation"<<std::endl; - typedef itk::NormalizedCorrelationImageToImageMetric<ImageType,ImageType> NCCType; + typedef itk::NormalizedCorrelationImageToImageMetric<ImageType, ImageType> NCCType; NCCType::Pointer metricPtr = NCCType::New(); metricPtr->SubtractMeanOff(); registration->SetMetric(metricPtr); @@ -121,7 +121,7 @@ int otbFineRegistrationImageFilterTest( int argc, char * argv[] ) case 1: { std::cout<<"Metric: normalized correlation"<<std::endl; - typedef itk::NormalizedCorrelationImageToImageMetric<ImageType,ImageType> NCCType; + typedef itk::NormalizedCorrelationImageToImageMetric<ImageType, ImageType> NCCType; NCCType::Pointer metricPtr = NCCType::New(); metricPtr->SubtractMeanOn(); registration->SetMetric(metricPtr); @@ -131,7 +131,7 @@ int otbFineRegistrationImageFilterTest( int argc, char * argv[] ) case 2: { std::cout<<"Metric: mean squares"<<std::endl; - typedef itk::MeanSquaresImageToImageMetric<ImageType,ImageType> MeanSquareType; + typedef itk::MeanSquaresImageToImageMetric<ImageType, ImageType> MeanSquareType; MeanSquareType::Pointer metricPtr = MeanSquareType::New(); registration->SetMetric(metricPtr); registration->MinimizeOn(); @@ -140,7 +140,7 @@ int otbFineRegistrationImageFilterTest( int argc, char * argv[] ) case 3: { std::cout<<"Metric: mean reciprocal square difference"<<std::endl; - typedef itk::MeanReciprocalSquareDifferenceImageToImageMetric<ImageType,ImageType> MRSDType; + typedef itk::MeanReciprocalSquareDifferenceImageToImageMetric<ImageType, ImageType> MRSDType; MRSDType::Pointer metricPtr = MRSDType::New(); registration->SetMetric(metricPtr); registration->MinimizeOff(); diff --git a/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx b/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx index b2cbc51e7f3f24fd73c0c4f35e108ac1e7e2c58c..07a5b536fb155af3cdaa0d48dc25e5a152de4fcc 100644 --- a/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx +++ b/Testing/Code/FeatureExtraction/otbHaralickTexturesImageFunction.cxx @@ -30,7 +30,7 @@ typedef otb::Image<InputPixelType, Dimension> InputImage typedef otb::ImageFileReader<InputImageType> ReaderType; typedef otb::HaralickTexturesImageFunction< - InputImageType,double> HaralickTexturesImageFunctionType; + InputImageType, double> HaralickTexturesImageFunctionType; typedef HaralickTexturesImageFunctionType::PointType PointType; typedef HaralickTexturesImageFunctionType::OutputType OutputType; diff --git a/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx b/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx index e8cf816e138d3136a4ed4ff2505c6b1c90cbd5d3..d71ceb66aeef1344ea18a36b17b2d4e1b1e50493 100644 --- a/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx +++ b/Testing/Code/FeatureExtraction/otbHistogramOfOrientedGradientCovariantImageFunction.cxx @@ -77,9 +77,9 @@ int otbHistogramOfOrientedGradientCovariantImageFunction(int argc, char * argv[] std::ofstream ofs(argv[2]); - for(unsigned i = 0; i < 5;++i) + for(unsigned i = 0; i < 5; ++i) { - for(unsigned j = 0; j<function->GetNumberOfOrientationBins();++j) + for(unsigned j = 0; j<function->GetNumberOfOrientationBins(); ++j) { ofs<<value[i][j]<<"\t"; } diff --git a/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx b/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx index c28f54f908c082ba12ab46a83a6b6f0de610d60b..eb3c0a66b55f2989c625a170e7978cc4ea10821b 100644 --- a/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx +++ b/Testing/Code/FeatureExtraction/otbHoughTransform2DLinesImageTest.cxx @@ -1,7 +1,7 @@ /*========================================================================= Program: Insight Segmentation & Registration Toolkit - Module: $RCSfile: otbHoughTransform2DLinesImageTest.cxx,v $ + Module: $RCSfile: otbHoughTransform2DLinesImageTest.cxx, v $ Language: C++ Date: $Date: 2007-03-07 14:05:39 $ Version: $Revision: 1.10 $ diff --git a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx index 81addeb2acd6b89f3d445a89b73e9d4bf2dc1ded..882f06f2cc221c1e75173ac68b18b755f1032814 100644 --- a/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToEdgePathFilter.cxx @@ -105,7 +105,7 @@ int otbImageToEdgePathFilter(int argc, char * argv[]) cindex = vertexList->GetElement(1); x2 = cindex[0]; y2 = cindex[1]; - fprintf(file,"%8.4f %8.3f\n",x1,y1); + fprintf(file,"%8.4f %8.3f\n", x1, y1); */ return EXIT_SUCCESS; diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx index 2a0ecee41d35e384bb0f64e11f85d00af184639c..ab9633b32463d1016304f760fa655c2359f038a8 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterDistanceMap.cxx @@ -280,7 +280,7 @@ int otbImageToSIFTKeyPointSetFilterDistanceMap(int argc, char * argv[]) const float threshold = atof(argv[4]); const float ratio = atof(argv[5]); - // Rotation angle [0,360[ + // Rotation angle [0, 360[ const unsigned int rotation = atoi(argv[6]); // Zoom factor diff --git a/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx b/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx index 09f08e7b08e22d3dcc30ea3bdfabf4443ba0e1f8..bbb7bb24c140823a05db7e34e67130453df4ae0b 100644 --- a/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx +++ b/Testing/Code/FeatureExtraction/otbLineSegmentDetector.cxx @@ -83,7 +83,7 @@ int otbLineSegmentDetector(int argc, char * argv[]) // float y1 = (*itPoints).GetPosition()[1]; // IndexEnd[0]= static_cast<int>(x1); IndexEnd[1] = static_cast<int>(y1); -// LineIteratorFilter itLine(reader->GetOutput(),IndexBegin, IndexEnd); +// LineIteratorFilter itLine(reader->GetOutput(), IndexBegin, IndexEnd); // itLine.GoToBegin(); // while(!itLine.IsAtEnd()) // { @@ -155,7 +155,7 @@ int otbLineSegmentDetector_binary(int argc, char * argv[]) it.Set(0); } - drawLineFilter->SetInput(image);//Black BCKGRD + drawLineFilter->SetInput(image); //Black BCKGRD drawLineFilter->SetInputLineSpatialObjectList(lsdFilter->GetOutput()); /** Write The Output Image*/ diff --git a/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx b/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx index e23fbe83eb72cd06b8ca496ea95ebe7dd291e670..45757c19868abe5ec1687389f2982e31ca3205e7 100644 --- a/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx +++ b/Testing/Code/FeatureExtraction/otbLocalHistogramImageFunctionTest.cxx @@ -64,7 +64,7 @@ int otbLocalHistogramImageFunctionTest(int argc, char * argv[]) for(unsigned int i = 0; i < function->GetNumberOfHistogramBins(); ++i) { - outputStream << "Pos[" <<i <<"] = " << Result->GetMeasurement(i,0) << " -> " << Result->GetFrequency(i,0) << std::endl; + outputStream << "Pos[" <<i <<"] = " << Result->GetMeasurement(i, 0) << " -> " << Result->GetFrequency(i, 0) << std::endl; } outputStream.close(); diff --git a/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx b/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx index fbf9cb96440efd407ea9fde618a4e4a54f7b44e8..56a61684503789fefcaba2c61c968935bde2389a 100644 --- a/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx +++ b/Testing/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.cxx @@ -39,7 +39,7 @@ int otbSimpleRcsPanSharpeningFusionImageFilter(int argc, char * argv[]) typedef otb::ImageFileReader<PanchroImageType> ImageReaderType; typedef otb::StreamingImageFileWriter<VectorImageType> VectorImageWriterType; typedef otb::SimpleRcsPanSharpeningFusionImageFilter - <PanchroImageType, VectorImageType, VectorImageType,double> FilterType; + <PanchroImageType, VectorImageType, VectorImageType, double> FilterType; VectorReaderType::Pointer multiSpectReader = VectorReaderType::New(); ImageReaderType::Pointer panchroReader = ImageReaderType::New(); diff --git a/Testing/Code/IO/otbCompareWritingComplexImage.cxx b/Testing/Code/IO/otbCompareWritingComplexImage.cxx index ad0eb5c661289037b0f6298071cb3d2130a808d6..ee95e62e3dacf231b2f518185fec7ce20c1c30f9 100644 --- a/Testing/Code/IO/otbCompareWritingComplexImage.cxx +++ b/Testing/Code/IO/otbCompareWritingComplexImage.cxx @@ -59,7 +59,7 @@ int otbCompareWritingComplexImageTest(int argc, char* argv[]) typedef otb::ExtractROI<ComplexPixelType, ComplexPixelType> ExtractROIFilterType; typedef otb::StreamingCompareImageFilter<ImageType> CompareFilterType; typedef itk::ComplexToRealImageFilter<ComplexImageType, ImageType> RealExtractorType; - typedef itk::ComplexToImaginaryImageFilter<ComplexImageType,ImageType> ImaginaryExtractorType; + typedef itk::ComplexToImaginaryImageFilter<ComplexImageType, ImageType> ImaginaryExtractorType; ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(inputFilename); diff --git a/Testing/Code/IO/otbComplexImageManipulationTest.cxx b/Testing/Code/IO/otbComplexImageManipulationTest.cxx index b0522c677fe499544d50b808af1942b1ff74a8cb..0cfadca35628e110180b659f40a734500393a1cb 100644 --- a/Testing/Code/IO/otbComplexImageManipulationTest.cxx +++ b/Testing/Code/IO/otbComplexImageManipulationTest.cxx @@ -137,12 +137,12 @@ int otbMonobandScalarToImageComplexGeneric(int argc, char * argv[]) int otbMonobandScalarToImageComplexFloat(int argc, char * argv[]) { - return otbMonobandScalarToImageComplexGeneric<float>(argc,argv); + return otbMonobandScalarToImageComplexGeneric<float>(argc, argv); } int otbMonobandScalarToImageComplexDouble(int argc, char * argv[]) { - return otbMonobandScalarToImageComplexGeneric<double>(argc,argv); + return otbMonobandScalarToImageComplexGeneric<double>(argc, argv); } /*********** @@ -181,12 +181,12 @@ int otbMonobandComplexToImageScalarGeneric(int argc, char * argv[]) int otbMonobandComplexToImageScalarFloat(int argc, char * argv[]) { - return otbMonobandComplexToImageScalarGeneric<float>(argc,argv); + return otbMonobandComplexToImageScalarGeneric<float>(argc, argv); } int otbMonobandComplexToImageScalarDouble(int argc, char * argv[]) { - return otbMonobandComplexToImageScalarGeneric<double>(argc,argv); + return otbMonobandComplexToImageScalarGeneric<double>(argc, argv); } /*********** @@ -225,12 +225,12 @@ int otbMonobandComplexToImageComplexGeneric(int argc, char * argv[]) int otbMonobandComplexToImageComplexFloat(int argc, char * argv[]) { - return otbMonobandComplexToImageComplexGeneric<float>(argc,argv); + return otbMonobandComplexToImageComplexGeneric<float>(argc, argv); } int otbMonobandComplexToImageComplexDouble(int argc, char * argv[]) { - return otbMonobandComplexToImageComplexGeneric<double>(argc,argv); + return otbMonobandComplexToImageComplexGeneric<double>(argc, argv); } /*********** @@ -274,12 +274,12 @@ int otbMonobandComplexToVectorImageScalarGeneric(int argc, char * argv[]) int otbMonobandComplexToVectorImageScalarFloat(int argc, char * argv[]) { - return otbMonobandComplexToVectorImageScalarGeneric<float>(argc,argv); + return otbMonobandComplexToVectorImageScalarGeneric<float>(argc, argv); } int otbMonobandComplexToVectorImageScalarDouble(int argc, char * argv[]) { - return otbMonobandComplexToVectorImageScalarGeneric<double>(argc,argv); + return otbMonobandComplexToVectorImageScalarGeneric<double>(argc, argv); } /*********** @@ -322,12 +322,12 @@ int otbMonobandComplexToVectorImageComplexGeneric(int argc, char * argv[]) int otbMonobandComplexToVectorImageComplexFloat(int argc, char * argv[]) { - return otbMonobandComplexToVectorImageComplexGeneric<float>(argc,argv); + return otbMonobandComplexToVectorImageComplexGeneric<float>(argc, argv); } int otbMonobandComplexToVectorImageComplexDouble(int argc, char * argv[]) { - return otbMonobandComplexToVectorImageComplexGeneric<double>(argc,argv); + return otbMonobandComplexToVectorImageComplexGeneric<double>(argc, argv); } @@ -370,12 +370,12 @@ int otbMultibandScalarToImageComplexGeneric(int argc, char * argv[]) int otbMultibandScalarToImageComplexFloat(int argc, char * argv[]) { - return otbMultibandScalarToImageComplexGeneric<float>(argc,argv); + return otbMultibandScalarToImageComplexGeneric<float>(argc, argv); } int otbMultibandScalarToImageComplexDouble(int argc, char * argv[]) { - return otbMultibandScalarToImageComplexGeneric<double>(argc,argv); + return otbMultibandScalarToImageComplexGeneric<double>(argc, argv); } @@ -420,19 +420,19 @@ int otbMultibandScalarToVectorImageComplexGeneric(int argc, char * argv[]) int otbMultibandScalarToVectorImageComplexFloat(int argc, char * argv[]) { - return otbMultibandScalarToVectorImageComplexGeneric<float>(argc,argv); + return otbMultibandScalarToVectorImageComplexGeneric<float>(argc, argv); } int otbMultibandScalarToVectorImageComplexDouble(int argc, char * argv[]) { - return otbMultibandScalarToVectorImageComplexGeneric<double>(argc,argv); + return otbMultibandScalarToVectorImageComplexGeneric<double>(argc, argv); } /*********** * 8. * Read Multiband Complex as VectorImage<scalar> - * out : out[0]=in[0].real, out[1]=in[0].imag, out[2]=in[0].real, out[3]=in[0].imag,... + * out : out[0]=in[0].real, out[1]=in[0].imag, out[2]=in[0].real, out[3]=in[0].imag, ... ***********/ template<class InternalType> int otbMultibandComplexToVectorImageScalarGeneric(int argc, char * argv[]) @@ -475,12 +475,12 @@ int otbMultibandComplexToVectorImageScalarGeneric(int argc, char * argv[]) int otbMultibandComplexToVectorImageScalarFloat(int argc, char * argv[]) { - return otbMultibandComplexToVectorImageScalarGeneric<float>(argc,argv); + return otbMultibandComplexToVectorImageScalarGeneric<float>(argc, argv); } int otbMultibandComplexToVectorImageScalarDouble(int argc, char * argv[]) { - return otbMultibandComplexToVectorImageScalarGeneric<double>(argc,argv); + return otbMultibandComplexToVectorImageScalarGeneric<double>(argc, argv); } /*********** @@ -529,12 +529,12 @@ int otbMultibandComplexToVectorImageComplexGeneric(int argc, char * argv[]) int otbMultibandComplexToVectorImageComplexFloat(int argc, char * argv[]) { - return otbMultibandComplexToVectorImageComplexGeneric<float>(argc,argv); + return otbMultibandComplexToVectorImageComplexGeneric<float>(argc, argv); } int otbMultibandComplexToVectorImageComplexDouble(int argc, char * argv[]) { - return otbMultibandComplexToVectorImageComplexGeneric<double>(argc,argv); + return otbMultibandComplexToVectorImageComplexGeneric<double>(argc, argv); } /*********** @@ -577,12 +577,12 @@ int otbMonobandScalarToVectorImageComplexGeneric(int argc, char * argv[]) int otbMonobandScalarToVectorImageComplexFloat(int argc, char * argv[]) { - return otbMonobandScalarToVectorImageComplexGeneric<float>(argc,argv); + return otbMonobandScalarToVectorImageComplexGeneric<float>(argc, argv); } int otbMonobandScalarToVectorImageComplexDouble(int argc, char * argv[]) { - return otbMonobandScalarToVectorImageComplexGeneric<double>(argc,argv); + return otbMonobandScalarToVectorImageComplexGeneric<double>(argc, argv); } /*********** @@ -603,10 +603,10 @@ int otbMultibandComplexToImageScalarGeneric(int argc, char * argv[]) int otbMultibandComplexToImageScalarFloat(int argc, char * argv[]) { - return otbMultibandComplexToImageScalarGeneric<float>(argc,argv); + return otbMultibandComplexToImageScalarGeneric<float>(argc, argv); } int otbMultibandComplexToImageScalarDouble(int argc, char * argv[]) { - return otbMultibandComplexToImageScalarGeneric<double>(argc,argv); + return otbMultibandComplexToImageScalarGeneric<double>(argc, argv); } diff --git a/Testing/Code/IO/otbComplexImageTests.cxx b/Testing/Code/IO/otbComplexImageTests.cxx index f00c50c4bc1dbd1a806f9fa1f83e7c617b9fdc1b..fe086c15aa15383ab3553314315a56dc6696fcac 100644 --- a/Testing/Code/IO/otbComplexImageTests.cxx +++ b/Testing/Code/IO/otbComplexImageTests.cxx @@ -61,11 +61,11 @@ int otbVectorImageComplexGenericTest(int argc, char* argv[]) std::cout << pixel << std::endl; //Test value - if ((pixel[0] != PixelType(0,1)) + if ((pixel[0] != PixelType(0, 1)) || (pixel[1] != PixelType(20000, 20001))) { - std::cout << "Found " << pixel[0] << " should be " << PixelType(0,1) << std::endl; - std::cout << "Found " << pixel[1] << " should be " << PixelType(20000,20001) << std::endl; + std::cout << "Found " << pixel[0] << " should be " << PixelType(0, 1) << std::endl; + std::cout << "Found " << pixel[1] << " should be " << PixelType(20000, 20001) << std::endl; return EXIT_FAILURE; } return EXIT_SUCCESS; @@ -102,9 +102,9 @@ int otbImageComplexGenericTest(int argc, char* argv[]) std::cout << pixel << std::endl; //Test value - if (pixel != PixelType(0,1)) + if (pixel != PixelType(0, 1)) { - std::cout << "Found " << pixel << " should be " << PixelType(0,1) << std::endl; + std::cout << "Found " << pixel << " should be " << PixelType(0, 1) << std::endl; return EXIT_FAILURE; } @@ -115,9 +115,9 @@ int otbImageComplexGenericTest(int argc, char* argv[]) pixel = reader->GetOutput()->GetPixel(index); std::cout << pixel << std::endl; - if (pixel != PixelType(1010,1011)) + if (pixel != PixelType(1010, 1011)) { - std::cout << "Found " << pixel << " should be " << PixelType(1010,1011) << std::endl; + std::cout << "Found " << pixel << " should be " << PixelType(1010, 1011) << std::endl; return EXIT_FAILURE; } diff --git a/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx b/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx index 6616a03be451dc22044cca5b0c4375a3384be6ed..1a9b616b450207c0a8a2a4eb4d69b2bf9bd29f12 100644 --- a/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx +++ b/Testing/Code/IO/otbImageFileWriterStreamingONERAComplex.cxx @@ -42,7 +42,7 @@ int otbImageFileWriterStreamingONERAComplex(int argc, char* argv[]) 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); diff --git a/Testing/Code/IO/otbKmzProductWriter.cxx b/Testing/Code/IO/otbKmzProductWriter.cxx index c5d2713a72a638d231bb9ab867bacd89e904ddcf..15f182fa0d54ee2b554b32518edad4d0be4eb75e 100644 --- a/Testing/Code/IO/otbKmzProductWriter.cxx +++ b/Testing/Code/IO/otbKmzProductWriter.cxx @@ -119,7 +119,7 @@ int otbKmzProductWriterWithLogoAndLegend(int argc, char* argv[]) try { - parser->ParseCommandLine(argc,argv,parseResult); + parser->ParseCommandLine(argc, argv, parseResult); } catch ( itk::ExceptionObject & err ) { @@ -197,7 +197,7 @@ int otbKmzProductWriterWithLogoAndLegend(int argc, char* argv[]) ReaderType::Pointer legendReader = ReaderType::New(); legendReader->SetFileName(parseResult->GetParameterString("--LegendImage")); legendReader->Update(); - kmzWriter->AddLegend("Input Legend",legendReader->GetOutput()); + kmzWriter->AddLegend("Input Legend", legendReader->GetOutput()); kmzWriter->AddLegend(legendReader->GetOutput()); } diff --git a/Testing/Code/IO/otbOssimElevManagerTest4.cxx b/Testing/Code/IO/otbOssimElevManagerTest4.cxx index d472f5ab76ddd3b8bd2dc5a57dfaf9467cc53d5e..46212a87757d2cd3a329dfe5a66e96676032942a 100644 --- a/Testing/Code/IO/otbOssimElevManagerTest4.cxx +++ b/Testing/Code/IO/otbOssimElevManagerTest4.cxx @@ -105,7 +105,7 @@ int otbOssimElevManagerTest4(int argc, char* argv[]) headerFile << std::endl; headerFile.close(); - //Check for the index 216,51 (difference of 4 in the output) + //Check for the index 216, 51 (difference of 4 in the output) { int i = 216; int j = 51; @@ -117,7 +117,7 @@ int otbOssimElevManagerTest4(int argc, char* argv[]) ossimWorldPoint.lon = point[0]; ossimWorldPoint.lat = point[1]; double height = elevManager->getHeightAboveMSL(ossimWorldPoint); - std::cout << "Output value at (216,51): " << height << std::endl; + std::cout << "Output value at (216, 51): " << height << std::endl; std::cout << "At lon: " << ossimWorldPoint.lon << " , lat: " << ossimWorldPoint.lat << std::endl; } diff --git a/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx b/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx index 3479385639a24fd22166e9b63face7799f88a320..000d8929da55a8e329b8ad7d2f350d15a78d0194 100644 --- a/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx +++ b/Testing/Code/Learning/otbConcatenateSampleListFilter.cxx @@ -68,9 +68,9 @@ int otbConcatenateSampleListFilter(int argc, char * argv[]) ofs<<"Input samples 1: "<<std::endl; - for(unsigned int sampleId = 0; sampleId<nbSamples1;++sampleId) + for(unsigned int sampleId = 0; sampleId<nbSamples1; ++sampleId) { - for(unsigned int i = 0; i<sampleSize;++i) + for(unsigned int i = 0; i<sampleSize; ++i) { sample[i]=atof(argv[index]); ++index; @@ -81,9 +81,9 @@ int otbConcatenateSampleListFilter(int argc, char * argv[]) ofs<<"Input samples 2: "<<std::endl; - for(unsigned int sampleId = 0; sampleId<nbSamples2;++sampleId) + for(unsigned int sampleId = 0; sampleId<nbSamples2; ++sampleId) { - for(unsigned int i = 0; i<sampleSize;++i) + for(unsigned int i = 0; i<sampleSize; ++i) { sample[i]=atof(argv[index]); ++index; diff --git a/Testing/Code/Learning/otbDecisionTreeBuild.cxx b/Testing/Code/Learning/otbDecisionTreeBuild.cxx index 7221a01fc96ed9f2c18b260138eb37d5204a8bdf..78795cd79804713268d8d3bb071066ec79ded4fd 100644 --- a/Testing/Code/Learning/otbDecisionTreeBuild.cxx +++ b/Testing/Code/Learning/otbDecisionTreeBuild.cxx @@ -61,7 +61,7 @@ int otbDecisionTreeBuild(int argc, char* argv[]) // Build some examples for testing - DecisionTreeType::ExampleType ww_in_summer;//(DoY<100), (NDVI>0.7) + DecisionTreeType::ExampleType ww_in_summer; //(DoY<100), (NDVI>0.7) ww_in_summer.push_back(false); ww_in_summer.push_back(false); diff --git a/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx b/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx index 60454789c3f2747cdf0786f97a12604bda699b90..555dbcac1e0240678b671a9526be3e55e0af9a81 100644 --- a/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx +++ b/Testing/Code/Learning/otbDecisionTreeWithRealValues.cxx @@ -61,7 +61,7 @@ int otbDecisionTreeWithRealValues(int argc, char* argv[]) // Build some examples for testing - DecisionTreeType::ExampleType ww_in_summer;//(DoY), (NDVI) + DecisionTreeType::ExampleType ww_in_summer; //(DoY), (NDVI) ww_in_summer.push_back(200); ww_in_summer.push_back(0.2); diff --git a/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx b/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx index 5e69f841404f30788f304c7230e7e67e707042c1..2ebea3a0acfd3ffc83154c290098304c18bcf840 100644 --- a/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx +++ b/Testing/Code/Learning/otbGaussianAdditiveNoiseSampleListFilter.cxx @@ -30,7 +30,7 @@ typedef itk::Statistics::ListSample<DoubleSampleType> DoubleSampleListType; typedef itk::VariableLengthVector<float> FloatSampleType; typedef itk::Statistics::ListSample<FloatSampleType> FloatSampleListType; typedef otb::Statistics::GaussianAdditiveNoiseSampleListFilter -<FloatSampleListType,DoubleSampleListType> GaussianFilterType; +<FloatSampleListType, DoubleSampleListType> GaussianFilterType; int otbGaussianAdditiveNoiseSampleListFilterNew(int argc, char * argv[]) @@ -63,9 +63,9 @@ int otbGaussianAdditiveNoiseSampleListFilter(int argc, char * argv[]) ofs<<"Nb samples : "<<nbSamples<<std::endl; // InputSampleList - for(unsigned int sampleId = 0; sampleId<nbSamples;++sampleId) + for(unsigned int sampleId = 0; sampleId<nbSamples; ++sampleId) { - for(unsigned int i = 0; i<sampleSize;++i) + for(unsigned int i = 0; i<sampleSize; ++i) { sample[i]=atof(argv[index]); ++index; diff --git a/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx b/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx index 01b39c4694d1cd1549c074f08b6412d7280a4145..9d95a705fa5683e1ff5e6d1bcbba38eae98837d8 100644 --- a/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx +++ b/Testing/Code/Learning/otbListSampleToBalancedListSampleFilter.cxx @@ -34,7 +34,7 @@ typedef itk::VariableLengthVector<float> FloatSampleType; typedef itk::Statistics::ListSample<FloatSampleType> FloatSampleListType; typedef otb::Statistics::ListSampleToBalancedListSampleFilter -<FloatSampleListType,IntegerSampleListType,DoubleSampleListType> BalancingFilterType; +<FloatSampleListType, IntegerSampleListType, DoubleSampleListType> BalancingFilterType; int otbListSampleToBalancedListSampleFilterNew(int argc, char * argv[]) @@ -74,9 +74,9 @@ int otbListSampleToBalancedListSampleFilter(int argc, char * argv[]) ofs<<"Nb samples : "<<nbSamples<<std::endl; // InputSampleList and LabelSampleList - for(unsigned int sampleId = 0; sampleId<nbSamples;++sampleId) + for(unsigned int sampleId = 0; sampleId<nbSamples; ++sampleId) { - for(unsigned int i = 0; i<sampleSize;++i) + for(unsigned int i = 0; i<sampleSize; ++i) { sample[i]=atof(argv[index]); ++index; diff --git a/Testing/Code/Learning/otbSVMClassifierPointSet.cxx b/Testing/Code/Learning/otbSVMClassifierPointSet.cxx index e6a94dbe6dbd0cf0a4d410cadf1ead0b947bcdf1..63245ef1bfdf9160660a1c40c4e320c37a9ae129 100644 --- a/Testing/Code/Learning/otbSVMClassifierPointSet.cxx +++ b/Testing/Code/Learning/otbSVMClassifierPointSet.cxx @@ -70,7 +70,7 @@ int otbSVMClassifierPointSet(int argc, char* argv[]) mP[1] = pointId; InputVectorType measure; - //measure.push_back(vcl_pow(pointId,2.0)); + //measure.push_back(vcl_pow(pointId, 2.0)); measure.push_back(double(2.0 * pointId)); measure.push_back(double(-10)); diff --git a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx index acde097ddd4bdd1751e24ada4b337d9fb71ca884..da6219f10a8e51c655d0d0118e29a35ba3b08c89 100644 --- a/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx +++ b/Testing/Code/Learning/otbSVMImageModelEstimatorModelAccessor.cxx @@ -93,9 +93,9 @@ int otbSVMImageModelEstimatorModelAccessor(int argc, char* argv[]) f << std::endl; f << " SV[" << i << "]:"; const svm_node *p = SVs[i]; - /* for(unsigned int j=0;j<nbSupportVector;j++) + /* for(unsigned int j=0; j<nbSupportVector; j++) { - f << " SV["<<i<<"]["<<j<<"]:";*/ + f << " SV["<<i<<"]["<<j<<"]:"; */ if (svmEstimator->GetKernelType() == PRECOMPUTED) { f << " " << p->value; @@ -150,7 +150,7 @@ int otbSVMImageModelEstimatorModelAccessor(int argc, char* argv[]) // _evaluateHyperplaneDistance = ptrModel->EvaluateHyperplaneDistance(); // f << " - EvaluateHyperplaneDistance() VariableLengthVector() nb value(s): "<<_evaluateHyperplaneDistance.Size()<<std::endl; -// for (unsigned int i=0;i<_evaluateHyperplaneDistance.Size();i++) +// for (unsigned int i=0; i<_evaluateHyperplaneDistance.Size(); i++) // { // f << " "<<_evaluateHyperplaneDistance[i]<<std::endl; // } diff --git a/Testing/Code/Learning/otbSVMModelAccessor.cxx b/Testing/Code/Learning/otbSVMModelAccessor.cxx index 5da43e53ef4e204ae9f5d16c29ed64740fcc96c9..130d22c734b4aea004be61e8db8286b056c95de8 100644 --- a/Testing/Code/Learning/otbSVMModelAccessor.cxx +++ b/Testing/Code/Learning/otbSVMModelAccessor.cxx @@ -108,7 +108,7 @@ int otbSVMModelAccessor(int argc, char* argv[]) // _evaluateHyperplaneDistance = ptrModel->EvaluateHyperplaneDistance(); // f << " - EvaluateHyperplaneDistance() VariableLengthVector() nb value(s): "<<_evaluateHyperplaneDistance.Size()<<std::endl; -// for (unsigned int i=0;i<_evaluateHyperplaneDistance.Size();i++) +// for (unsigned int i=0; i<_evaluateHyperplaneDistance.Size(); i++) // { // f << " "<<_evaluateHyperplaneDistance[i]<<std::endl; // } diff --git a/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx b/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx index 4e8b6b3fe27e02bbf34a88942f73990f0fcaa7c3..73491f47ceaa23b135ade12e8ef11fcd9183b60c 100644 --- a/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx +++ b/Testing/Code/Learning/otbSVMModelGenericKernelsTest.cxx @@ -189,7 +189,7 @@ int otbSVMModelGenericKernelsTest(int argc, char* argv[]) model->param.kernel_generic = SAMFunctor.Clone(); svmModel->SetModel(model); svmModel->SaveModel(argv[3]); - model->param.kernel_generic = kModFunctor.Clone();; + model->param.kernel_generic = kModFunctor.Clone(); ; svmModel->SetModel(model); svmModel->SaveModel(argv[4]); model->param.kernel_generic = radialSAMFunctor.Clone(); diff --git a/Testing/Code/Learning/otbSVMValidation.cxx b/Testing/Code/Learning/otbSVMValidation.cxx index 34d1680c32d8dab311dcfa0ef82f74f3660ad141..3eef73918bfe56905825577fb19f74a50abfdf47 100644 --- a/Testing/Code/Learning/otbSVMValidation.cxx +++ b/Testing/Code/Learning/otbSVMValidation.cxx @@ -64,11 +64,11 @@ int otbSVMValidation(int argc, char* argv[]) typedef itk::FixedArray<LabelType, 1> TrainingSampleType; typedef itk::Statistics::ListSample<TrainingSampleType> TrainingListSampleType; typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType; - typedef otb::SVMSampleListModelEstimator<ListSampleType,TrainingListSampleType> EstimatorType; + typedef otb::SVMSampleListModelEstimator<ListSampleType, TrainingListSampleType> EstimatorType; typedef otb::SVMClassifier<ListSampleType, LabelType> ClassifierType; typedef ClassifierType::OutputType ClassifierOutputType; typedef otb::ConfusionMatrixCalculator - <TrainingListSampleType,TrainingListSampleType> ConfusionMatrixCalculatorType; + <TrainingListSampleType, TrainingListSampleType> ConfusionMatrixCalculatorType; RandomGeneratorType::Pointer random = RandomGeneratorType::New(); @@ -86,7 +86,7 @@ int otbSVMValidation(int argc, char* argv[]) { // Generate a positive sample double angle = random->GetVariateWithOpenUpperRange( otb::CONST_2PI ); - double radius = random->GetUniformVariate(prmin,prmax); + double radius = random->GetUniformVariate(prmin, prmax); SampleType pSample(2); pSample[0] = cpx+radius*vcl_sin(angle); pSample[1] = cpy+radius*vcl_cos(angle); @@ -99,7 +99,7 @@ int otbSVMValidation(int argc, char* argv[]) // Generate a negative sample angle = random->GetVariateWithOpenUpperRange( otb::CONST_2PI ); - radius = random->GetUniformVariate(nrmin,nrmax); + radius = random->GetUniformVariate(nrmin, nrmax); SampleType nSample(2); nSample[0] = cnx+radius*vcl_sin(angle); nSample[1] = cny+radius*vcl_cos(angle); @@ -119,7 +119,7 @@ int otbSVMValidation(int argc, char* argv[]) { // Generate a positive sample double angle = random->GetVariateWithOpenUpperRange( otb::CONST_2PI ); - double radius = random->GetUniformVariate(prmin,prmax); + double radius = random->GetUniformVariate(prmin, prmax); SampleType pSample(2); pSample[0] = cpx+radius*vcl_sin(angle); pSample[1] = cpy+radius*vcl_cos(angle); @@ -131,7 +131,7 @@ int otbSVMValidation(int argc, char* argv[]) // Generate a negative sample angle = random->GetVariateWithOpenUpperRange( otb::CONST_2PI ); - radius = random->GetUniformVariate(nrmin,nrmax); + radius = random->GetUniformVariate(nrmin, nrmax); SampleType nSample(2); nSample[0] = cnx+radius*vcl_sin(angle); nSample[1] = cny+radius*vcl_cos(angle); diff --git a/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx b/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx index 78fd7994c2396576fed39e07c6bb314cab3951bd..4ad0fdd0387d90b345e5983b2752e44408504a9b 100644 --- a/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx +++ b/Testing/Code/Learning/otbShiftScaleSampleListFilter.cxx @@ -31,7 +31,7 @@ typedef itk::Statistics::ListSample<DoubleSampleType> DoubleSampleListType; typedef itk::VariableLengthVector<float> FloatSampleType; typedef itk::Statistics::ListSample<FloatSampleType> FloatSampleListType; -typedef otb::Statistics::ShiftScaleSampleListFilter<FloatSampleListType,DoubleSampleListType> ShiftScaleFilterType; +typedef otb::Statistics::ShiftScaleSampleListFilter<FloatSampleListType, DoubleSampleListType> ShiftScaleFilterType; int otbShiftScaleSampleListFilterNew(int argc, char * argv[]) @@ -63,7 +63,7 @@ int otbShiftScaleSampleListFilter(int argc, char * argv[]) ofs<<"Sample size: "<<sampleSize<<std::endl; ofs<<"Nb samples : "<<nbSamples<<std::endl; - for(unsigned int i = 0; i<sampleSize;++i) + for(unsigned int i = 0; i<sampleSize; ++i) { sample[i]=atof(argv[index]); ++index; @@ -73,7 +73,7 @@ int otbShiftScaleSampleListFilter(int argc, char * argv[]) filter->SetShifts(sample); - for(unsigned int i = 0; i<sampleSize;++i) + for(unsigned int i = 0; i<sampleSize; ++i) { sample[i]=atof(argv[index]); ++index; @@ -85,9 +85,9 @@ int otbShiftScaleSampleListFilter(int argc, char * argv[]) ofs<<"Input samples: "<<std::endl; - for(unsigned int sampleId = 0; sampleId<nbSamples;++sampleId) + for(unsigned int sampleId = 0; sampleId<nbSamples; ++sampleId) { - for(unsigned int i = 0; i<sampleSize;++i) + for(unsigned int i = 0; i<sampleSize; ++i) { sample[i]=atof(argv[index]); ++index; diff --git a/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx b/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx index 6f94e15d1b960b1a0f65f9e3a8dfe9508f1ecd5a..1e0bd87398dcd57c2bbc1bf63df5781f077f22a3 100644 --- a/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx +++ b/Testing/Code/OBIA/otbAttributesMapLabelObjectNew.cxx @@ -23,7 +23,7 @@ int otbAttributesMapLabelObjectNew(int argc, char* argv[]) { - typedef otb::AttributesMapLabelObject<unsigned short,2,double> LabelObjectType; + typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType; // instantiation LabelObjectType::Pointer object = LabelObjectType::New(); diff --git a/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx b/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx index fb1d0d19491debad4464a5af89b70401842b7653..9ce88788cebd178f6ef6588ffdb5025033d416c3 100644 --- a/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx +++ b/Testing/Code/OBIA/otbAttributesMapLabelObjectWithClassLabelNew.cxx @@ -23,7 +23,7 @@ int otbAttributesMapLabelObjectWithClassLabelNew(int argc, char* argv[]) { - typedef otb::AttributesMapLabelObjectWithClassLabel<unsigned short,2,double,unsigned short> LabelObjectType; + typedef otb::AttributesMapLabelObjectWithClassLabel<unsigned short, 2, double, unsigned short> LabelObjectType; // instantiation LabelObjectType::Pointer object = LabelObjectType::New(); diff --git a/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx index 6d89a11847a57a3a19ffb7462f8867eafa34c862..64ceee15ac54417ca308150f38cf944a59b4fea7 100644 --- a/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx +++ b/Testing/Code/OBIA/otbAttributesMapOpeningLabelMapFilterNew.cxx @@ -25,7 +25,7 @@ int otbAttributesMapOpeningLabelMapFilterNew(int argc, char* argv[]) { - typedef otb::AttributesMapLabelObject<unsigned short,2,double> LabelObjectType; + typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::AttributesMapOpeningLabelMapFilter<LabelMapType> LabelMapFilterType; diff --git a/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx index 4e874bb57c968ad7175683231fa0c200a26a6cae..7c812fa864638248739021b7641b3281620a4872 100644 --- a/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx +++ b/Testing/Code/OBIA/otbBandsStatisticsAttributesLabelMapFilter.cxx @@ -36,7 +36,7 @@ typedef double PixelType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int,2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabeledImageType; typedef LabelMapType::LabelObjectContainerType LabelObjectContainerType; typedef LabelObjectContainerType::const_iterator LabelObjectIterator; @@ -44,8 +44,8 @@ typedef LabelObjectContainerType::const_iterator LabelObjectIterator; typedef otb::ImageFileReader<VectorImageType> ReaderType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; -typedef itk::LabelImageToLabelMapFilter<LabeledImageType,LabelMapType> LabelMapFilterType; -typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType,VectorImageType> BandsStatisticsFilterType; +typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; +typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType, VectorImageType> BandsStatisticsFilterType; int otbBandsStatisticsAttributesLabelMapFilterNew(int argc, char* argv[]) diff --git a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx index 8bf2d93fee9cc4d1082487aab87f9c78e36750e5..0ba228518e373bb3eda8350cb0ab6da15e88fb83 100644 --- a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx +++ b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilter.cxx @@ -32,15 +32,15 @@ int otbImageToLabelMapWithAttributesFilter(int argc, char* argv[]) const char * lfname = argv[2]; // Convenient typedefs - typedef otb::VectorImage<double,2> ImageType; + typedef otb::VectorImage<double, 2> ImageType; typedef ImageType::IndexType IndexType; - typedef otb::Image<unsigned int,2> LabeledImageType; + typedef otb::Image<unsigned int, 2> LabeledImageType; - typedef otb::AttributesMapLabelObjectWithClassLabel<double,2,double,double> LabelObjectType; + typedef otb::AttributesMapLabelObjectWithClassLabel<double, 2, double, double> LabelObjectType; typedef otb::ImageToLabelMapWithAttributesFilter<ImageType, - LabeledImageType,unsigned int, LabelObjectType> FilterType; + LabeledImageType, unsigned int, LabelObjectType> FilterType; typedef otb::ImageFileReader<ImageType> ReaderType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; @@ -65,7 +65,7 @@ int otbImageToLabelMapWithAttributesFilter(int argc, char* argv[]) // tests std::vector<std::string> features = filter->GetOutput()->GetNthLabelObject(0)->GetAvailableAttributes(); - for(std::vector<std::string>::const_iterator fit = features.begin();fit!=features.end();++fit) + for(std::vector<std::string>::const_iterator fit = features.begin(); fit!=features.end(); ++fit) { std::cout <<"Label " << *fit << std::endl; diff --git a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx index ebf6938e9c490d5c8c80ca9004d9ae9890074d6f..1a2d2d438a2a1491cd59926c2289457ecb444a82 100644 --- a/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx +++ b/Testing/Code/OBIA/otbImageToLabelMapWithAttributesFilterNew.cxx @@ -29,10 +29,10 @@ int otbImageToLabelMapWithAttributesFilterNew(int argc, char* argv[]) { - typedef otb::VectorImage<double,2> ImageType; - typedef otb::Image<unsigned int,2> LabeledImageType; - typedef otb::AttributesMapLabelObjectWithClassLabel<double,2,double,double> LabelObjectType; - typedef otb::ImageToLabelMapWithAttributesFilter<ImageType,LabeledImageType,unsigned int ,LabelObjectType> FilterType; + typedef otb::VectorImage<double, 2> ImageType; + typedef otb::Image<unsigned int, 2> LabeledImageType; + typedef otb::AttributesMapLabelObjectWithClassLabel<double, 2, double, double> LabelObjectType; + typedef otb::ImageToLabelMapWithAttributesFilter<ImageType, LabeledImageType, unsigned int , LabelObjectType> FilterType; FilterType::Pointer filter = FilterType::New(); diff --git a/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx index 0f5b87303c0c1fac663637c6f13e69abd415ed91..5f1e9a523403e91379698b8a498a503c82d75e66 100644 --- a/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx +++ b/Testing/Code/OBIA/otbKMeansAttributesLabelMapFilter.cxx @@ -38,11 +38,11 @@ typedef otb::AttributesMapLabelObjectWithClassLabel<LabelType, Dimension, double LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int,2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabeledImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; -typedef itk::LabelImageToLabelMapFilter<LabeledImageType,LabelMapType> LabelMapFilterType; +typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; typedef otb::KMeansAttributesLabelMapFilter<LabelMapType> KMeansAttributesLabelMapFilterType; diff --git a/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx b/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx index db1ea2ca1216dc92b9c2d9043aa0e1fb69411fa7..ada722f6c7b756cddcbfd5d7647f89c7495d43ed 100644 --- a/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx +++ b/Testing/Code/OBIA/otbLabelMapSVMClassifier.cxx @@ -40,32 +40,32 @@ typedef double PixelType; typedef otb::AttributesMapLabelObjectWithClassLabel<LabelType, Dimension, double, LabelType> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int,2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabeledImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; typedef otb::ImageFileWriter<VectorImageType> WriterType; typedef otb::ImageFileWriter<LabeledImageType> LabeledWriterType; -typedef itk::LabelImageToLabelMapFilter<LabeledImageType,LabelMapType> LabelMapFilterType; +typedef itk::LabelImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; -typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType,VectorImageType> BandsStatisticsFilterType; +typedef otb::BandsStatisticsAttributesLabelMapFilter<LabelMapType, VectorImageType> BandsStatisticsFilterType; // SVM model estimation typedef itk::VariableLengthVector<double> VectorType; -typedef itk::FixedArray<LabelType,1> TrainingVectorType; +typedef itk::FixedArray<LabelType, 1> TrainingVectorType; typedef itk::Statistics::ListSample<VectorType> ListSampleType; typedef itk::Statistics::ListSample<TrainingVectorType> TrainingListSampleType; -typedef otb::LabelMapWithClassLabelToLabeledSampleListFilter<LabelMapType,ListSampleType,TrainingListSampleType> +typedef otb::LabelMapWithClassLabelToLabeledSampleListFilter<LabelMapType, ListSampleType, TrainingListSampleType> ListSampleFilterType; typedef otb::Functor::VariableLengthVectorToMeasurementVectorFunctor<VectorType> MeasurementVectorFunctorType; -typedef otb::SVMSampleListModelEstimator<ListSampleType,TrainingListSampleType, +typedef otb::SVMSampleListModelEstimator<ListSampleType, TrainingListSampleType, MeasurementVectorFunctorType> SVMEstimatorType; typedef otb::LabelMapSVMClassifier<LabelMapType> ClassifierType; typedef otb::LabelMapWithClassLabelToClassLabelImageFilter - <LabelMapType,LabeledImageType> ClassifImageGeneratorType; + <LabelMapType, LabeledImageType> ClassifImageGeneratorType; LabelObjectType::Pointer makeTrainingSample(LabelMapType* labelMap, LabelType labelObjectId, LabelType classLabel) diff --git a/Testing/Code/OBIA/otbLabelMapToSampleListFilter.cxx b/Testing/Code/OBIA/otbLabelMapToSampleListFilter.cxx index ade9d4a52f1dd4ed8d398d0d6ca02803ac9d6fdf..0d219247655b7520aae2769738a68731dedbeb2b 100644 --- a/Testing/Code/OBIA/otbLabelMapToSampleListFilter.cxx +++ b/Testing/Code/OBIA/otbLabelMapToSampleListFilter.cxx @@ -41,11 +41,11 @@ int otbLabelMapToSampleListFilter(int argc, char* argv[]) // Labeled image type const unsigned int Dimension = 2; typedef unsigned short LabelType; - typedef otb::Image<LabelType,Dimension> LabeledImageType; + typedef otb::Image<LabelType, Dimension> LabeledImageType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; - typedef otb::AttributesMapLabelObject<LabelType,Dimension,double> LabelObjectType; + typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef itk::BinaryImageToLabelMapFilter<LabeledImageType,LabelMapType> LabelMapFilterType; + typedef itk::BinaryImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeLabelMapFilterType; @@ -76,7 +76,7 @@ int otbLabelMapToSampleListFilter(int argc, char* argv[]) filter->GetMeasurementFunctor().AddAttribute("test"); filter->GetMeasurementFunctor().ClearAttributes(); - for(int i = 2; i<argc;++i) + for(int i = 2; i<argc; ++i) { filter->GetMeasurementFunctor().AddAttribute(argv[i]); } diff --git a/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx b/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx index 22dfc38394f7006dbac9964861e2178f704ad6b1..0c90662d0bf0ebbdcc47f567b24bbfe351007d28 100644 --- a/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx +++ b/Testing/Code/OBIA/otbLabelMapToSampleListFilterNew.cxx @@ -27,7 +27,7 @@ int otbLabelMapToSampleListFilterNew(int argc, char* argv[]) { - typedef otb::AttributesMapLabelObject<unsigned short,2,double> LabelObjectType; + typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef itk::VariableLengthVector<double> VectorType; typedef itk::Statistics::ListSample<VectorType> ListSampleType; diff --git a/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx b/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx index 2f0a8efaeb55b0a16f41081f8bed3a9e95f5e7f6..99b19493affaf29879599ff8273a0b430087cbda 100644 --- a/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx +++ b/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilter.cxx @@ -41,20 +41,20 @@ int otbLabelMapWithClassLabelToLabeledSampleListFilter(int argc, char* argv[]) // Labeled image type const unsigned int Dimension = 2; typedef unsigned short LabelType; - typedef otb::Image<LabelType,Dimension> LabeledImageType; + typedef otb::Image<LabelType, Dimension> LabeledImageType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; - typedef otb::AttributesMapLabelObjectWithClassLabel<LabelType,Dimension,double,LabelType> LabelObjectType; + typedef otb::AttributesMapLabelObjectWithClassLabel<LabelType, Dimension, double, LabelType> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef itk::BinaryImageToLabelMapFilter<LabeledImageType,LabelMapType> LabelMapFilterType; + typedef itk::BinaryImageToLabelMapFilter<LabeledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeLabelMapFilterType; typedef itk::VariableLengthVector<double> VectorType; - typedef itk::FixedArray<LabelType,1> TrainingVectorType; + typedef itk::FixedArray<LabelType, 1> TrainingVectorType; typedef itk::Statistics::ListSample<VectorType> ListSampleType; typedef itk::Statistics::ListSample<TrainingVectorType> TrainingListSampleType; - typedef otb::LabelMapWithClassLabelToLabeledSampleListFilter<LabelMapType,ListSampleType,TrainingListSampleType> + typedef otb::LabelMapWithClassLabelToLabeledSampleListFilter<LabelMapType, ListSampleType, TrainingListSampleType> LabelMap2ListSampleFilterType; // instantiation @@ -78,7 +78,7 @@ int otbLabelMapWithClassLabelToLabeledSampleListFilter(int argc, char* argv[]) filter->GetMeasurementFunctor().AddAttribute("test"); filter->GetMeasurementFunctor().ClearAttributes(); - for(int i = 2; i<argc;++i) + for(int i = 2; i<argc; ++i) { filter->GetMeasurementFunctor().AddAttribute(argv[i]); } diff --git a/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx b/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx index d16f792750aced31ca745671ce3f80cbf2d91a2c..c86b2ada189b12cf64465c7171009eb19125087c 100644 --- a/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx +++ b/Testing/Code/OBIA/otbLabelMapWithClassLabelToLabeledSampleListFilterNew.cxx @@ -28,13 +28,13 @@ int otbLabelMapWithClassLabelToLabeledSampleListFilterNew(int argc, char* argv[]) { typedef otb::AttributesMapLabelObjectWithClassLabel - <unsigned short,2,double,unsigned short> LabelObjectType; + <unsigned short, 2, double, unsigned short> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef itk::FixedArray<unsigned short,1> LabelVectorType; + typedef itk::FixedArray<unsigned short, 1> LabelVectorType; typedef itk::VariableLengthVector<double> VectorType; typedef itk::Statistics::ListSample<VectorType> ListSampleType; typedef itk::Statistics::ListSample<LabelVectorType> TrainingListSampleType; - typedef otb::LabelMapWithClassLabelToLabeledSampleListFilter<LabelMapType,ListSampleType,TrainingListSampleType> LabelMapFilterType; + typedef otb::LabelMapWithClassLabelToLabeledSampleListFilter<LabelMapType, ListSampleType, TrainingListSampleType> LabelMapFilterType; // instantiation LabelMapFilterType::Pointer filter = LabelMapFilterType::New(); diff --git a/Testing/Code/OBIA/otbLabelObjectMapVectorizer.cxx b/Testing/Code/OBIA/otbLabelObjectMapVectorizer.cxx index 2ad883e81aa979f5eb902e82370eb281b4f3353a..e30b51f6da7146453d3e523c6ba1593c74c655a0 100644 --- a/Testing/Code/OBIA/otbLabelObjectMapVectorizer.cxx +++ b/Testing/Code/OBIA/otbLabelObjectMapVectorizer.cxx @@ -91,7 +91,7 @@ int otbLabelObjectMapVectorizer(int argc, char * argv[]) // If a label is given, extract only this label if (argc == 4) { - std::cout << "Label is given;Vectorizing object " << atoi(argv[3]) << std::endl; + std::cout << "Label is given; Vectorizing object " << atoi(argv[3]) << std::endl; chrono.Start(); PolygonType::Pointer polygon = functor(labelMapFilter->GetOutput()->GetLabelObject(atoi(argv[3]))); chrono.Stop(); diff --git a/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx index 40384f762776b2d85ebb373a4c4229720260ca62..fbe636173a36f82880a21d0a16747a6fb82e1c05 100644 --- a/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx +++ b/Testing/Code/OBIA/otbMinMaxAttributesLabelMapFilter.cxx @@ -35,11 +35,11 @@ typedef double PixelType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef otb::LabelMapWithAdjacency<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int,2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabeledImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; -typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType,LabelMapType> LabelMapFilterType; +typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType> MinMaxAttributesLabelMapFilterType; diff --git a/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx b/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx index 39279e3f3d907542092b124f60f48af19a6ac0a5..62cb5a592a37a50cc86325180860d6624c62f3c1 100644 --- a/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx +++ b/Testing/Code/OBIA/otbNormalizeAttributesLabelMapFilter.cxx @@ -36,11 +36,11 @@ typedef double PixelType; typedef otb::AttributesMapLabelObject<LabelType, Dimension, double> LabelObjectType; typedef otb::LabelMapWithAdjacency<LabelObjectType> LabelMapType; typedef otb::VectorImage<PixelType, Dimension> VectorImageType; -typedef otb::Image<unsigned int,2> LabeledImageType; +typedef otb::Image<unsigned int, 2> LabeledImageType; typedef otb::ImageFileReader<VectorImageType> ReaderType; typedef otb::ImageFileReader<LabeledImageType> LabeledReaderType; -typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType,LabelMapType> LabelMapFilterType; +typedef otb::LabelImageToLabelMapWithAdjacencyFilter<LabeledImageType, LabelMapType> LabelMapFilterType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> ShapeFilterType; typedef otb::MinMaxAttributesLabelMapFilter<LabelMapType> MinMaxAttributesLabelMapFilterType; typedef otb::NormalizeAttributesLabelMapFilter<LabelMapType> NormalizeAttributesLabelMapFilterType; diff --git a/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx index e3dd3ed33d1ad12898a7695388acc5757fdd81e4..6aa2221719335294dc67765ec0d41774772b87a4 100644 --- a/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx +++ b/Testing/Code/OBIA/otbShapeAttributesLabelMapFilterNew.cxx @@ -25,7 +25,7 @@ int otbShapeAttributesLabelMapFilterNew(int argc, char* argv[]) { - typedef otb::AttributesMapLabelObject<unsigned short,2,double> LabelObjectType; + typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; typedef otb::ShapeAttributesLabelMapFilter<LabelMapType> LabelMapFilterType; diff --git a/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx b/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx index 0d3a52d6f45cbdb0ddfce59d164b447e8567de72..412580656b13e87a09f1bf068b053adda9fb050c 100644 --- a/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx +++ b/Testing/Code/OBIA/otbStatisticsAttributesLabelMapFilterNew.cxx @@ -26,10 +26,10 @@ int otbStatisticsAttributesLabelMapFilterNew(int argc, char* argv[]) { - typedef otb::Image<double,2> ImageType; - typedef otb::AttributesMapLabelObject<unsigned short,2,double> LabelObjectType; + typedef otb::Image<double, 2> ImageType; + typedef otb::AttributesMapLabelObject<unsigned short, 2, double> LabelObjectType; typedef itk::LabelMap<LabelObjectType> LabelMapType; - typedef otb::StatisticsAttributesLabelMapFilter<LabelMapType,ImageType> LabelMapFilterType; + typedef otb::StatisticsAttributesLabelMapFilter<LabelMapType, ImageType> LabelMapFilterType; // instantiation LabelMapFilterType::Pointer filter = LabelMapFilterType::New(); diff --git a/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx b/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx index ab11841220e4666785d0e71bc7cc4a696f9944d0..ffab1644eb387577894aac6d853491ff270d2358 100644 --- a/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx +++ b/Testing/Code/OBIA/otbVectorDataToLabelMapFilter.cxx @@ -92,7 +92,7 @@ int otbVectorDataToLabelMapFilter(int argc, char * argv[]) origin[0] = p->GetBoundingRegion().GetImageRegion().GetIndex(0); origin[1] = p->GetBoundingRegion().GetImageRegion().GetIndex(1); - //Set size,origin and spacing of the output labelmap + //Set size, origin and spacing of the output labelmap myFilter->SetSize(p->GetBoundingRegion().GetImageRegion().GetSize()); myFilter->SetOrigin(origin); myFilter->SetSpacing(reader->GetOutput()->GetSpacing()); diff --git a/Testing/Code/Projections/otbForwardSensorModelGrid.cxx b/Testing/Code/Projections/otbForwardSensorModelGrid.cxx index f8b665828c31883696d30bc801f17a2f2550da1c..142a69f8eb518d8b2c845c20a797b5b522ed3dcd 100644 --- a/Testing/Code/Projections/otbForwardSensorModelGrid.cxx +++ b/Testing/Code/Projections/otbForwardSensorModelGrid.cxx @@ -65,7 +65,7 @@ int otbForwardSensorModelGrid(int argc, char* argv[]) sizeOut[1] = size_y; ImageType::RegionType region; - region.SetIndex(0,0); + region.SetIndex(0, 0); region.SetSize(sizeOut); ImageType::Pointer outputGeoPointX = ImageType::New(); diff --git a/Testing/Code/Projections/otbGenericMapProjection.cxx b/Testing/Code/Projections/otbGenericMapProjection.cxx index 880f84c5ad4cefa7fdf619d4d9517eb32999d165..c115cf4f8efdbd2eb77096a517bc896290217730 100644 --- a/Testing/Code/Projections/otbGenericMapProjection.cxx +++ b/Testing/Code/Projections/otbGenericMapProjection.cxx @@ -30,7 +30,7 @@ int otbGenericMapProjection(int argc, char* argv[]) /** Test the ability to instanciate a projection from a string*/ std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; typedef otb::GenericMapProjection<otb::FORWARD> GenericMapProjection; GenericMapProjection::Pointer genericMapProjection = GenericMapProjection::New(); diff --git a/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx b/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx index 3acfd1f71499201a2f62bbe21c306306161a316e..78e74a75c9056a189552a21cb63e4fc877ef1a77 100644 --- a/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx +++ b/Testing/Code/Projections/otbGenericRSResampleImageFilter.cxx @@ -138,7 +138,7 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[]) int otbGenericRSResampleImageFilterFromMap(int argc, char* argv[]) { - typedef otb::MultiChannelExtractROI<PixelType,PixelType> ExtractROIType; + typedef otb::MultiChannelExtractROI<PixelType, PixelType> ExtractROIType; // SmartPointer instanciation ExtractROIType::Pointer extractor = ExtractROIType::New(); @@ -190,7 +190,7 @@ int otbGenericRSResampleImageFilterFromMap(int argc, char* argv[]) // Set the Resampler Parameters resampler->SetInput(extractor->GetOutput()); resampler->SetDeformationFieldSpacing(gridSpacing); - resampler->SetOutputParametersFromMap("UTM",spacing); + resampler->SetOutputParametersFromMap("UTM", spacing); if (useInRpc) { diff --git a/Testing/Code/Projections/otbGeocentricTransform.cxx b/Testing/Code/Projections/otbGeocentricTransform.cxx index d64ad5e3c03cf0d5d48ffda714508dab0a8d1bdc..68b94e79036c7126dd4c694bc52d2e3549b73d21 100644 --- a/Testing/Code/Projections/otbGeocentricTransform.cxx +++ b/Testing/Code/Projections/otbGeocentricTransform.cxx @@ -43,7 +43,7 @@ int otbGeocentricTransform(int argc, char* argv[]) file << projection->TransformPoint(point); file << std::endl << std::endl; -// itk::Point<double,3> point; +// itk::Point<double, 3> point; point[0] = 1.4835345f; //lon point[1] = 43.559682611111107f; //lat point[2] = 192.15; //elev diff --git a/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx b/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx index 9baaf07374bcfad3e93736520fda7bdf49fb4d93..3d11669e46153b70d94f30c205f0467ed32029db 100644 --- a/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx +++ b/Testing/Code/Projections/otbImageToEnvelopeVectorDataFilter.cxx @@ -23,14 +23,14 @@ #include "otbVectorDataFileWriter.h" typedef unsigned short PixelType; -typedef otb::Image<PixelType,2> ImageType; +typedef otb::Image<PixelType, 2> ImageType; typedef otb::ImageFileReader<ImageType> ReaderType; typedef otb::VectorData<> VectorDataType; typedef otb::VectorDataFileWriter<VectorDataType> WriterType; typedef otb::ImageToEnvelopeVectorDataFilter - <ImageType,VectorDataType> FilterType; + <ImageType, VectorDataType> FilterType; -int otbImageToEnvelopeVectorDataFilterNew(int argc,char* argv[]) +int otbImageToEnvelopeVectorDataFilterNew(int argc, char* argv[]) { // Instantiation FilterType::Pointer filter = FilterType::New(); @@ -38,7 +38,7 @@ int otbImageToEnvelopeVectorDataFilterNew(int argc,char* argv[]) return EXIT_SUCCESS; } -int otbImageToEnvelopeVectorDataFilter(int argc,char* argv[]) +int otbImageToEnvelopeVectorDataFilter(int argc, char* argv[]) { ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(argv[1]); diff --git a/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx b/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx index 5e6450b7002b51f73a99557f0323305ff63f6bf8..89b9a19d6c3a72c331146cb15bbe2be7a14be6a3 100644 --- a/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx +++ b/Testing/Code/Projections/otbImageToGenericRSOutputParameters.cxx @@ -26,7 +26,7 @@ #include <iostream> #include <fstream> -typedef otb::VectorImage<double,2> ImageType; +typedef otb::VectorImage<double, 2> ImageType; typedef otb::ImageToGenericRSOutputParameters<ImageType> FilterType; int otbImageToGenericRSOutputParametersNew (int argc, char * argv[]) diff --git a/Testing/Code/Projections/otbSensorModelGrid.cxx b/Testing/Code/Projections/otbSensorModelGrid.cxx index e9154240b5c5d82ce3f5c40eb16e419c9878a251..826e91a088e1dec4b37744d2f9394c04f76a6525 100644 --- a/Testing/Code/Projections/otbSensorModelGrid.cxx +++ b/Testing/Code/Projections/otbSensorModelGrid.cxx @@ -66,7 +66,7 @@ int otbSensorModelGrid(int argc, char* argv[]) sizeOut[1] = size_y; ImageType::RegionType region; - region.SetIndex(0,0); + region.SetIndex(0, 0); region.SetSize(sizeOut); ImageType::Pointer outputErrorX = ImageType::New(); diff --git a/Testing/Code/Projections/otbUtmMapProjection.cxx b/Testing/Code/Projections/otbUtmMapProjection.cxx index a7ab9e9aa3f7fb5f5636fc1f4a80ef452db8a582..18c4dd4d3fb6a1209ce3af2a20d73c49b0d47110 100644 --- a/Testing/Code/Projections/otbUtmMapProjection.cxx +++ b/Testing/Code/Projections/otbUtmMapProjection.cxx @@ -57,7 +57,7 @@ int otbUtmMapProjection(int argc, char* argv[]) file << "And back in the north hemisphere\n"; file << lUtmProjection2->GetWkt() << std::endl << std::endl; - lUtmProjection2->SetHemisphere('S');//Back in the south to make sure the following works + lUtmProjection2->SetHemisphere('S'); //Back in the south to make sure the following works otb::UtmForwardProjection::InputPointType groundPoint; groundPoint[0] = -4.5; groundPoint[1] = 48.5; diff --git a/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx b/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx index 9b4fb1fcf93d65643b40ba9a3b0d663b064c31a4..61d1cc5d01f3f6b4b0edbdcf86669ba04649fb3e 100644 --- a/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx +++ b/Testing/Code/Projections/otbVectorDataExtractROIandProjection.cxx @@ -40,7 +40,7 @@ int otbVectorDataExtractROIandProjection(int argc, char * argv[]) projection->SetInput(reader->GetOutput()); // projection->Update(); std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; projection->SetOutputProjectionRef(projectionRefWkt); diff --git a/Testing/Code/Projections/otbVectorDataProjectionFilter.cxx b/Testing/Code/Projections/otbVectorDataProjectionFilter.cxx index 6c0c86a95e97f7f5003521fe00d49c965a743019..2c5e113e3061589d404a8e4430368f5b20576b60 100644 --- a/Testing/Code/Projections/otbVectorDataProjectionFilter.cxx +++ b/Testing/Code/Projections/otbVectorDataProjectionFilter.cxx @@ -48,7 +48,7 @@ int otbVectorDataProjectionFilter(int argc, char * argv[]) vectorDataProjection->SetInput(reader->GetOutput()); std::string projectionRefWkt = - "PROJCS[\"UTM Zone 31, Northern Hemisphere\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AXIS[\"Lat\",NORTH],AXIS[\"Long\",EAST],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",3],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"Meter\",1]]"; + "PROJCS[\"UTM Zone 31, Northern Hemisphere\", GEOGCS[\"WGS 84\", DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\", 6378137, 298.257223563, AUTHORITY[\"EPSG\",\"7030\"]], TOWGS84[0, 0, 0, 0, 0, 0, 0], AUTHORITY[\"EPSG\",\"6326\"]], PRIMEM[\"Greenwich\", 0, AUTHORITY[\"EPSG\",\"8901\"]], UNIT[\"degree\", 0.0174532925199433, AUTHORITY[\"EPSG\",\"9108\"]], AXIS[\"Lat\", NORTH], AXIS[\"Long\", EAST], AUTHORITY[\"EPSG\",\"4326\"]], PROJECTION[\"Transverse_Mercator\"], PARAMETER[\"latitude_of_origin\", 0], PARAMETER[\"central_meridian\", 3], PARAMETER[\"scale_factor\", 0.9996], PARAMETER[\"false_easting\", 500000], PARAMETER[\"false_northing\", 0], UNIT[\"Meter\", 1]]"; vectorDataProjection->SetOutputProjectionRef(projectionRefWkt); diff --git a/Testing/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.cxx b/Testing/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.cxx index 4f8c4d3f8998f82fbe281803a518a2b4636adc63..a89c5ea1219e123f4ff0a69e047f0098e44188a4 100644 --- a/Testing/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbCoherencyToMuellerImageFilter.cxx @@ -57,7 +57,7 @@ int otbCoherencyToMuellerImageFilter(int argc, char * argv[]) typedef otb::SinclairImageFilter<InputImageType, InputImageType, InputImageType, InputImageType, ImageType, FunctionType > SinclairToCoherencyFilterType; - typedef otb::CoherencyToMuellerImageFilter<ImageType,RealImageType> FilterType; + typedef otb::CoherencyToMuellerImageFilter<ImageType, RealImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; diff --git a/Testing/Code/SARPolarimetry/otbHAlphaImageFilter.cxx b/Testing/Code/SARPolarimetry/otbHAlphaImageFilter.cxx index 718c52c586c6e77d8131d008e7971d9f61c49a38..013251c364f91a10b2829e360bb69d27db3fcbe3 100644 --- a/Testing/Code/SARPolarimetry/otbHAlphaImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbHAlphaImageFilter.cxx @@ -63,7 +63,7 @@ int otbHAlphaImageFilter(int argc, char * argv[]) typedef otb::PerBandVectorImageFilter<ImageType, ImageType, MeanFilterType> PerBandMeanFilterType; - typedef otb::HAlphaImageFilter<ImageType,RealImageType> FilterType; + typedef otb::HAlphaImageFilter<ImageType, RealImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; typedef otb::ImageFileWriter<RealImageType> WriterType; diff --git a/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.cxx index cc7c866cd67a7642f418a0bee05c3c31ce6cc31b..708dbcdc48e00fd64182a60f431e94a9dbbe3bdb 100644 --- a/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbMLCToCircularCoherencyDegreeImageFilter.cxx @@ -57,7 +57,7 @@ int otbMLCToCircularCoherencyDegreeImageFilter(int argc, char * argv[]) InputImageType, InputImageType, ImageType, FunctionType > SinclairToCovarianceFilterType; - typedef otb::MLCToCircularCoherencyDegreeImageFilter<ImageType,ImageType> FilterType; + typedef otb::MLCToCircularCoherencyDegreeImageFilter<ImageType, ImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; diff --git a/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.cxx index f816caa4c87f69c5b295532f4e69233d03b9f144..8c68e703dbc09afbbbfb130e7b0b2740adf643c7 100644 --- a/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbMLCToCoherencyDegreeImageFilter.cxx @@ -56,7 +56,7 @@ int otbMLCToCoherencyDegreeImageFilter(int argc, char * argv[]) typedef otb::SinclairImageFilter<InputImageType, InputImageType, InputImageType, InputImageType, ImageType, FunctionType > SinclairToCovarianceFilterType; - typedef otb::MLCToCoherencyDegreeImageFilter<ImageType,ImageType> FilterType; + typedef otb::MLCToCoherencyDegreeImageFilter<ImageType, ImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; diff --git a/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.cxx index 3f55c702ef89a6fd7d3312f8787b7cf353789688..fcc8e742e330f9c30490962d125d58bba72e5cfb 100644 --- a/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbMLCToCoherencyImageFilter.cxx @@ -56,7 +56,7 @@ int otbMLCToCoherencyImageFilter(int argc, char * argv[]) typedef otb::SinclairImageFilter<InputImageType, InputImageType, InputImageType, InputImageType, ImageType, FunctionType > SinclairToCovarianceFilterType; - typedef otb::MLCToCoherencyImageFilter<ImageType,ImageType> FilterType; + typedef otb::MLCToCoherencyImageFilter<ImageType, ImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; diff --git a/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.cxx index 31e33555f91b6367fd69f67791518826977145cd..aea2433f2c71f3d26d91e112946c726dc06af01f 100644 --- a/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbMuellerToCircularPolarisationImageFilter.cxx @@ -56,7 +56,7 @@ int otbMuellerToCircularPolarisationImageFilter(int argc, char * argv[]) typedef otb::SinclairImageFilter<InputImageType, InputImageType, InputImageType, InputImageType, RealImageType, FunctionType > SinclairToMuellerFilterType; - typedef otb::MuellerToCircularPolarisationImageFilter<RealImageType,RealImageType> FilterType; + typedef otb::MuellerToCircularPolarisationImageFilter<RealImageType, RealImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; diff --git a/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilter.cxx index 0fd62541d425d4338f9bc08c1660d0bc92701db2..86a908e5660861c39fbbbf96935bda199699d97d 100644 --- a/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbMuellerToMLCImageFilter.cxx @@ -57,7 +57,7 @@ int otbMuellerToMLCImageFilter(int argc, char * argv[]) typedef otb::SinclairImageFilter<InputImageType, InputImageType, InputImageType, InputImageType, RealImageType, FunctionType > SinclairToMuellerFilterType; - typedef otb::MuellerToMLCImageFilter<RealImageType,ComplexImageType> FilterType; + typedef otb::MuellerToMLCImageFilter<RealImageType, ComplexImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; diff --git a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx index 31c0d7a68d6ea7b8bb004f60a5a7b6ca7382962b..4ab4195ff25ff29a23a8d59b4b1644ac11388b84 100644 --- a/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx +++ b/Testing/Code/SARPolarimetry/otbMuellerToPolarisationDegreeAndPowerImageFilter.cxx @@ -56,7 +56,7 @@ int otbMuellerToPolarisationDegreeAndPowerImageFilter(int argc, char * argv[]) typedef otb::SinclairImageFilter<InputImageType, InputImageType, InputImageType, InputImageType, RealImageType, FunctionType > SinclairToMuellerFilterType; - typedef otb::MuellerToPolarisationDegreeAndPowerImageFilter<RealImageType,RealImageType> FilterType; + typedef otb::MuellerToPolarisationDegreeAndPowerImageFilter<RealImageType, RealImageType> FilterType; typedef otb::ImageFileReader<InputImageType> ReaderType; diff --git a/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx b/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx index c8b4128a0a6d0ae6b0aa8c23688d9b2983c72823..7ea2333dbfdcb1abf1e8d819dd16b585e1e88ad2 100644 --- a/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx +++ b/Testing/Code/SARPolarimetry/otbSinclairToCovarianceFunctor.cxx @@ -26,7 +26,7 @@ int otbSinclairToCovarianceFunctor(int argc, char * argv[]) typedef itk::VariableLengthVector<ScalarType> OutputType; typedef otb::Functor::SinclairToCovarianceFunctor<ScalarType, ScalarType, - ScalarType, ScalarType,OutputType > FunctorType; + ScalarType, ScalarType, OutputType > FunctorType; OutputType result(6); FunctorType funct; diff --git a/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx b/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx index d8517e7d7f203edde0e7c2085e605465db86f63d..b26f436978963060e2c767ced2d84784d1070512 100644 --- a/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx +++ b/Testing/Code/SpatialReasoning/otbImageToImageRCC8CalculatorNew.cxx @@ -23,7 +23,7 @@ int otbImageToImageRCC8CalculatorNew(int argc, char* argv[]) { // const unsigned int Dimension = 2; // typedef unsigned char PixelType; - // typedef otb::Image<PixelType,Dimension> ImageType; + // typedef otb::Image<PixelType, Dimension> ImageType; // typedef otb::ImageToImageRCC8Calculator<ImageType> CalculatorType; // //Instantiation diff --git a/Testing/Code/Visualization/otbAmplitudeFunctorTest.cxx b/Testing/Code/Visualization/otbAmplitudeFunctorTest.cxx index b61998fdc61d25da5e99af841ace27c1a5afaddb..d066d7916e3d2817ac627858b94bcb9b2d6fad1a 100644 --- a/Testing/Code/Visualization/otbAmplitudeFunctorTest.cxx +++ b/Testing/Code/Visualization/otbAmplitudeFunctorTest.cxx @@ -39,9 +39,9 @@ int otbAmplitudeFunctorTest(int argc, char * argv[]) VectorPixelType vectorPixel; vectorPixel.SetSize(3); - vectorPixel.SetElement(0,1.0); - vectorPixel.SetElement(1,2.0); - vectorPixel.SetElement(2,3.0); + vectorPixel.SetElement(0, 1.0); + vectorPixel.SetElement(1, 2.0); + vectorPixel.SetElement(2, 3.0); // Test VectorPixelType for(unsigned int i = 0; i < 3; ++i) diff --git a/Testing/Code/Visualization/otbImageWidget.cxx b/Testing/Code/Visualization/otbImageWidget.cxx index 26867eed6778f341b4779cc3de3685ecd3f1aafc..bdd4fc4f75170773843e33ddbce059212dc1acc5 100644 --- a/Testing/Code/Visualization/otbImageWidget.cxx +++ b/Testing/Code/Visualization/otbImageWidget.cxx @@ -108,7 +108,7 @@ int otbImageWidget(int argc, char * argv[]) Fl::check(); // Use nearest neighbor interpolation -// widget->resize(0,0,region.GetSize()[0],region.GetSize()[1]); +// widget->resize(0, 0, region.GetSize()[0], region.GetSize()[1]); widget->SetIsotropicZoom(10.0); size = region.GetSize(); size[0] /= 10; diff --git a/Testing/Code/Visualization/otbVectorDataModelAddVectorDataTest.cxx b/Testing/Code/Visualization/otbVectorDataModelAddVectorDataTest.cxx index ca5835d687200c3eef8977d6e585e8fbff8c6141..b1fdf0a8829b5373412da11ff0b17fbac459544d 100644 --- a/Testing/Code/Visualization/otbVectorDataModelAddVectorDataTest.cxx +++ b/Testing/Code/Visualization/otbVectorDataModelAddVectorDataTest.cxx @@ -212,7 +212,7 @@ int otbVectorDataModelAddVectorDataTest(int argc, char * argv[]) VectorDataReaderType::Pointer vdReader = VectorDataReaderType::New(); vdReader->SetFileName(vdataName); vdReader->Update(); - typedef otb::VectorDataProjectionFilter<VectorDataType,VectorDataType> ProjectionFilterType; + typedef otb::VectorDataProjectionFilter<VectorDataType, VectorDataType> ProjectionFilterType; ProjectionFilterType::Pointer vectorDataProjection = ProjectionFilterType::New(); vectorDataProjection->SetInput(vdReader->GetOutput()); diff --git a/Testing/Fa/0000041-mean_shift.cxx b/Testing/Fa/0000041-mean_shift.cxx index 2c0feda712a7f810a0f56e30d847b6f39b5500fe..db93fec560bc01dc882babbfbf46fad7ae3c7268 100644 --- a/Testing/Fa/0000041-mean_shift.cxx +++ b/Testing/Fa/0000041-mean_shift.cxx @@ -29,7 +29,7 @@ int main(int argc, char *argv[]) char * outfilenameboundary = argv[8]; typedef otb::VectorImage<unsigned char, 2> ImageType; // image d'entree, image filtree et image segmente - typedef otb::Image<int, 2> TLabeledOutput; // image labelisee,image des contours (de l'image labellisee) + typedef otb::Image<int, 2> TLabeledOutput; // image labelisee, image des contours (de l'image labellisee) // lecture de l'image d'entree a partir d'un fichier typedef otb::ImageFileReader<ImageType> ReaderType; diff --git a/Testing/Fa/AlignementsQB.cxx b/Testing/Fa/AlignementsQB.cxx index 93d96e0c9c297130a9ec603a7a15964872f76277..cf0f607a9def2e50242f193c57ccc52693f66027 100644 --- a/Testing/Fa/AlignementsQB.cxx +++ b/Testing/Fa/AlignementsQB.cxx @@ -126,7 +126,7 @@ int main(int argc, char ** argv) writer->Update(); -/* typedef otb::ColorImageViewer<unsigned char,double> ViewerType; +/* typedef otb::ColorImageViewer<unsigned char, double> ViewerType; ViewerType viewer; viewer.SetLabel( "Input Image" ); diff --git a/Testing/Fa/MapActivation.cxx b/Testing/Fa/MapActivation.cxx index 0351519fe8cd489f4077f73e8af1f0ef55152ab1..0af7291bfa5db4758bc3979295c04a03e1c28311 100644 --- a/Testing/Fa/MapActivation.cxx +++ b/Testing/Fa/MapActivation.cxx @@ -156,7 +156,7 @@ int main(int argc, char* argv[]) ClassifierType::OutputType::ConstIterator m_last = membershipSample->End(); /*int count[16]; - for(int i=0;i<16;i++) + for(int i=0; i<16; i++) { count[i]=0; } @@ -174,7 +174,7 @@ int main(int argc, char* argv[]) ++m_iter; } - /*for(int i=0;i<16;i++) + /*for(int i=0; i<16; i++) { std::cout<<" classe: "<< i <<" nb elements= "<<count[i]<<std::endl; }*/ diff --git a/Testing/Fa/PolygonsVectorization.cxx b/Testing/Fa/PolygonsVectorization.cxx index 5a5651513f26540de1f4a5363b79cc2615525366..31787edb90df4adfb16216c917639fac78e5880d 100644 --- a/Testing/Fa/PolygonsVectorization.cxx +++ b/Testing/Fa/PolygonsVectorization.cxx @@ -73,9 +73,9 @@ int main(int argc, char * argv[]) typedef itk::RescaleIntensityImageFilter<LabeledImageType, OutputImageType> RescalerType; /* typedef itk::BinaryBallStructuringElement< LabelPixelType, 2 > StructuringElementType; - typedef itk::BinaryErodeImageFilter<LabeledImageType,LabeledImageType,StructuringElementType> ErodeFilterType; - typedef itk::BinaryDilateImageFilter<LabeledImageType,LabeledImageType,StructuringElementType> DilateFilterType; - typedef itk::MedianImageFilter<LabeledImageType,LabeledImageType> MedianFilterType; + typedef itk::BinaryErodeImageFilter<LabeledImageType, LabeledImageType, StructuringElementType> ErodeFilterType; + typedef itk::BinaryDilateImageFilter<LabeledImageType, LabeledImageType, StructuringElementType> DilateFilterType; + typedef itk::MedianImageFilter<LabeledImageType, LabeledImageType> MedianFilterType; typedef otb::RemoveObjectPreprocessingImageFilter<LabeledImageType> PreprocessingFilterType; */ typedef otb::ImageFileReader<LabeledImageType> ReaderType;