Commit 231a23d9 authored by OTB Bot's avatar OTB Bot

STYLE

parent 2ab61527

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
namespace otb namespace otb
{ {
namespace Functor namespace Functor
{ {
/** /**
* \class AmplitudePhaseToRGBFunctor * \class AmplitudePhaseToRGBFunctor
* \brief Function object to compute a color representation of a radar image. * \brief Function object to compute a color representation of a radar image.
* *
...@@ -42,10 +42,10 @@ namespace otb ...@@ -42,10 +42,10 @@ namespace otb
* and itk::ComplexToPhaseImageFilter for example. * and itk::ComplexToPhaseImageFilter for example.
* *
*/ */
template< class TInput1, class TInput2=TInput1, class TInput3=TInput1, class TOutput=TInput1> template<class TInput1, class TInput2 = TInput1, class TInput3 = TInput1, class TOutput = TInput1>
class ITK_EXPORT AmplitudePhaseToRGBFunctor class ITK_EXPORT AmplitudePhaseToRGBFunctor
{ {
public: public:
typedef TOutput RGBPixelType; typedef TOutput RGBPixelType;
typedef typename RGBPixelType::ValueType RGBComponentType; typedef typename RGBPixelType::ValueType RGBComponentType;
typedef HSVToRGBFunctor<RGBPixelType> HSVToRGBFunctorType; typedef HSVToRGBFunctor<RGBPixelType> HSVToRGBFunctorType;
...@@ -56,7 +56,7 @@ namespace otb ...@@ -56,7 +56,7 @@ namespace otb
m_Minimum = 0; m_Minimum = 0;
m_Maximum = itk::NumericTraits<ScalarType>::max(); m_Maximum = itk::NumericTraits<ScalarType>::max();
}; };
~AmplitudePhaseToRGBFunctor(){}; ~AmplitudePhaseToRGBFunctor(){}
void SetMaximum(ScalarType max) void SetMaximum(ScalarType max)
{ {
...@@ -68,20 +68,20 @@ namespace otb ...@@ -68,20 +68,20 @@ namespace otb
this->m_Minimum = min; this->m_Minimum = min;
} }
inline TOutput operator()( const TInput1 & amplitude, const TInput2 & coherence, const TInput3 & phase) const inline TOutput operator ()(const TInput1& amplitude, const TInput2& coherence, const TInput3& phase) const
{ {
// std::cout << amplitude << " - " << phase << std::endl; // std::cout << amplitude << " - " << phase << std::endl;
double hinc, sinc, vinc; double hinc, sinc, vinc;
hinc=0.6/(CONST_2PI); hinc = 0.6 / (CONST_2PI);
sinc=0.0; sinc = 0.0;
vinc=0.0; vinc = 0.0;
double hue, sat, val; double hue, sat, val;
hue = 0.6 - (phase+CONST_PI)*hinc; hue = 0.6 - (phase + CONST_PI) * hinc;
sat = 0.6*coherence+0.3; sat = 0.6 * coherence + 0.3;
val = itk::NumericTraits<RGBComponentType>::max()/2 val = itk::NumericTraits<RGBComponentType>::max() / 2
* ( (amplitude-m_Minimum)/(m_Maximum-m_Minimum)+1.0); * ((amplitude - m_Minimum) / (m_Maximum - m_Minimum) + 1.0);
if (amplitude < m_Minimum) if (amplitude < m_Minimum)
{ {
...@@ -95,12 +95,12 @@ namespace otb ...@@ -95,12 +95,12 @@ namespace otb
return m_HSVToRGBFunctor(hue, sat, val); return m_HSVToRGBFunctor(hue, sat, val);
} }
private: private:
ScalarType m_Maximum; ScalarType m_Maximum;
ScalarType m_Minimum; ScalarType m_Minimum;
HSVToRGBFunctorType m_HSVToRGBFunctor; HSVToRGBFunctorType m_HSVToRGBFunctor;
}; };
} }
} }
#endif #endif
...@@ -36,12 +36,12 @@ namespace otb ...@@ -36,12 +36,12 @@ namespace otb
*/ */
template <class TInputImage, class TOutputImage> template <class TInputImage, class TOutputImage>
class ITK_EXPORT BSplineDecompositionImageFilter : class ITK_EXPORT BSplineDecompositionImageFilter :
public itk::ImageToImageFilter<TInputImage,TOutputImage> public itk::ImageToImageFilter<TInputImage, TOutputImage>
{ {
public: public:
/** Standard class typedefs. */ /** Standard class typedefs. */
typedef BSplineDecompositionImageFilter Self; typedef BSplineDecompositionImageFilter Self;
typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass; typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
typedef itk::SmartPointer<Self> Pointer; typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer; typedef itk::SmartPointer<const Self> ConstPointer;
...@@ -49,7 +49,7 @@ public: ...@@ -49,7 +49,7 @@ public:
itkTypeMacro(BSplineDecompositionImageFilter, ImageToImageFilter); itkTypeMacro(BSplineDecompositionImageFilter, ImageToImageFilter);
/** New macro for creation of through a Smart Pointer */ /** New macro for creation of through a Smart Pointer */
itkNewMacro( Self ); itkNewMacro(Self);
/** Inherit input and output image types from Superclass. */ /** Inherit input and output image types from Superclass. */
typedef typename Superclass::InputImageType InputImageType; typedef typename Superclass::InputImageType InputImageType;
...@@ -58,7 +58,7 @@ public: ...@@ -58,7 +58,7 @@ public:
typedef typename Superclass::OutputImagePointer OutputImagePointer; typedef typename Superclass::OutputImagePointer OutputImagePointer;
/** Dimension underlying input image. */ /** Dimension underlying input image. */
itkStaticConstMacro(ImageDimension, unsigned int,TInputImage::ImageDimension); itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
itkStaticConstMacro(OutputImageDimension, unsigned int, itkStaticConstMacro(OutputImageDimension, unsigned int,
TOutputImage::ImageDimension); TOutputImage::ImageDimension);
...@@ -72,24 +72,23 @@ public: ...@@ -72,24 +72,23 @@ public:
protected: protected:
BSplineDecompositionImageFilter(); BSplineDecompositionImageFilter();
virtual ~BSplineDecompositionImageFilter() {}; virtual ~BSplineDecompositionImageFilter() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const; void PrintSelf(std::ostream& os, itk::Indent indent) const;
void GenerateData( ); void GenerateData();
/** These are needed by the smoothing spline routine. */ /** These are needed by the smoothing spline routine. */
std::vector<double> m_Scratch; // temp storage for processing of Coefficients std::vector<double> m_Scratch; // temp storage for processing of Coefficients
typename TInputImage::SizeType m_DataLength; // Image size typename TInputImage::SizeType m_DataLength; // Image size
unsigned int m_SplineOrder; // User specified spline order (3rd or cubic is the default) unsigned int m_SplineOrder; // User specified spline order (3rd or cubic is the default)
double m_SplinePoles[3];// Poles calculated for a given spline order double m_SplinePoles[3]; // Poles calculated for a given spline order
int m_NumberOfPoles; // number of poles int m_NumberOfPoles; // number of poles
double m_Tolerance; // Tolerance used for determining initial causal coefficient double m_Tolerance; // Tolerance used for determining initial causal coefficient
unsigned int m_IteratorDirection; // Direction for iterator incrementing unsigned int m_IteratorDirection; // Direction for iterator incrementing
private: private:
BSplineDecompositionImageFilter( const Self& ); //purposely not implemented BSplineDecompositionImageFilter(const Self &); //purposely not implemented
void operator=( const Self& ); //purposely not implemented void operator =(const Self&); //purposely not implemented
/** Determines the poles given the Spline Order. */ /** Determines the poles given the Spline Order. */
virtual void SetPoles(); virtual void SetPoles();
...@@ -111,14 +110,13 @@ private: ...@@ -111,14 +110,13 @@ private:
void CopyImageToImage(); void CopyImageToImage();
/** Copies a vector of data from the Coefficients image to the m_Scratch vector. */ /** Copies a vector of data from the Coefficients image to the m_Scratch vector. */
void CopyCoefficientsToScratch( OutputLinearIterator & ); void CopyCoefficientsToScratch(OutputLinearIterator&);
/** Copies a vector of data from m_Scratch to the Coefficients image. */ /** Copies a vector of data from m_Scratch to the Coefficients image. */
void CopyScratchToCoefficients( OutputLinearIterator & ); void CopyScratchToCoefficients(OutputLinearIterator&);
};