Commit 38ace640 authored by OTB Bot's avatar OTB Bot

STYLE

parent 70f550a4
......@@ -132,39 +132,39 @@ BSplineDecompositionImageFilter<TInputImage, TOutputImage>
// 2000, pg. 416.
switch (m_SplineOrder)
{
case 3:
m_NumberOfPoles = 1;
m_SplinePoles[0] = vcl_sqrt(3.0) - 2.0;
break;
case 0:
m_NumberOfPoles = 0;
break;
case 1:
m_NumberOfPoles = 0;
break;
case 2:
m_NumberOfPoles = 1;
m_SplinePoles[0] = vcl_sqrt(8.0) - 3.0;
break;
case 4:
m_NumberOfPoles = 2;
m_SplinePoles[0] = vcl_sqrt(664.0 - vcl_sqrt(438976.0)) + vcl_sqrt(304.0) - 19.0;
m_SplinePoles[1] = vcl_sqrt(664.0 + vcl_sqrt(438976.0)) - vcl_sqrt(304.0) - 19.0;
break;
case 5:
m_NumberOfPoles = 2;
m_SplinePoles[0] = vcl_sqrt(135.0 / 2.0 - vcl_sqrt(17745.0 / 4.0)) + vcl_sqrt(105.0 / 4.0)
- 13.0 / 2.0;
m_SplinePoles[1] = vcl_sqrt(135.0 / 2.0 + vcl_sqrt(17745.0 / 4.0)) - vcl_sqrt(105.0 / 4.0)
- 13.0 / 2.0;
break;
default:
// SplineOrder not implemented yet.
itk::ExceptionObject err(__FILE__, __LINE__);
err.SetLocation(ITK_LOCATION);
err.SetDescription("SplineOrder must be between 0 and 5. Requested spline order has not been implemented yet.");
throw err;
break;
case 3:
m_NumberOfPoles = 1;
m_SplinePoles[0] = vcl_sqrt(3.0) - 2.0;
break;
case 0:
m_NumberOfPoles = 0;
break;
case 1:
m_NumberOfPoles = 0;
break;
case 2:
m_NumberOfPoles = 1;
m_SplinePoles[0] = vcl_sqrt(8.0) - 3.0;
break;
case 4:
m_NumberOfPoles = 2;
m_SplinePoles[0] = vcl_sqrt(664.0 - vcl_sqrt(438976.0)) + vcl_sqrt(304.0) - 19.0;
m_SplinePoles[1] = vcl_sqrt(664.0 + vcl_sqrt(438976.0)) - vcl_sqrt(304.0) - 19.0;
break;
case 5:
m_NumberOfPoles = 2;
m_SplinePoles[0] = vcl_sqrt(135.0 / 2.0 - vcl_sqrt(17745.0 / 4.0)) + vcl_sqrt(105.0 / 4.0)
- 13.0 / 2.0;
m_SplinePoles[1] = vcl_sqrt(135.0 / 2.0 + vcl_sqrt(17745.0 / 4.0)) - vcl_sqrt(105.0 / 4.0)
- 13.0 / 2.0;
break;
default:
// SplineOrder not implemented yet.
itk::ExceptionObject err(__FILE__, __LINE__);
err.SetLocation(ITK_LOCATION);
err.SetDescription("SplineOrder must be between 0 and 5. Requested spline order has not been implemented yet.");
throw err;
break;
}
}
......
......@@ -41,9 +41,9 @@ namespace otb
* \ingroup ImageFunctions
*/
template <
class TImageType,
class TCoordRep = double,
class TCoefficientType = double>
class TImageType,
class TCoordRep = double,
class TCoefficientType = double>
class ITK_EXPORT BSplineInterpolateImageFunction :
public itk::InterpolateImageFunction<TImageType, TCoordRep>
{
......@@ -87,8 +87,8 @@ public:
/** Internal Coefficient typedef support */
typedef TCoefficientType CoefficientDataType;
typedef itk::Image<CoefficientDataType,
itkGetStaticConstMacro(ImageDimension)
> CoefficientImageType;
itkGetStaticConstMacro(ImageDimension)
> CoefficientImageType;
/** Define filter for calculating the BSpline coefficients */
typedef otb::BSplineDecompositionImageFilter<TImageType, CoefficientImageType>
......@@ -108,8 +108,8 @@ public:
/** Derivative typedef support */
typedef itk::CovariantVector<OutputType,
itkGetStaticConstMacro(ImageDimension)
> CovariantVectorType;
itkGetStaticConstMacro(ImageDimension)
> CovariantVectorType;
CovariantVectorType EvaluateDerivative(const PointType& point) const
{
......
......@@ -44,13 +44,13 @@ namespace otb
template <class TInputImage, class TCoordRep = float>
class ITK_EXPORT BinaryImageDensityFunction :
public itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::RealType,
TCoordRep>
TCoordRep>
{
public:
/** Standard class typedefs. */
typedef BinaryImageDensityFunction Self;
typedef itk::ImageFunction<TInputImage, typename itk::NumericTraits<typename TInputImage::PixelType>::RealType,
TCoordRep> Superclass;
TCoordRep> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -113,17 +113,17 @@ private:
template <class TInputImage, class TOutputImage>
class ITK_EXPORT ChangeLabelImageFilter :
public itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
Functor::VectorChangeLabel<typename TInputImage::PixelType,
typename TOutputImage::PixelType> >
Functor::VectorChangeLabel<typename TInputImage::PixelType,
typename TOutputImage::PixelType> >
{
public:
/** Standard class typedefs. */
typedef ChangeLabelImageFilter Self;
typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputImage,
Functor::VectorChangeLabel<
typename TInputImage::PixelType,
typename TOutputImage::PixelType>
> Superclass;
Functor::VectorChangeLabel<
typename TInputImage::PixelType,
typename TOutputImage::PixelType>
> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -59,8 +59,8 @@ namespace otb
* \ingroup MultiThreaded
*/
template <class TInputImage, class TOutputImage, class TBoundaryCondition =
itk::ZeroFluxNeumannBoundaryCondition<TInputImage>,
class TFilterPrecision = typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType >
itk::ZeroFluxNeumannBoundaryCondition<TInputImage>,
class TFilterPrecision = typename itk::NumericTraits<typename TInputImage::InternalPixelType>::RealType>
class ITK_EXPORT ConvolutionImageFilter :
public itk::ImageToImageFilter<TInputImage, TOutputImage>
{
......
......@@ -72,8 +72,8 @@ public:
/** PointSetToDensityImageFilter support*/
typedef otb::BinaryImageToDensityImageFilter<InputImageType,
OutputImageType,
DensityCountFunctionType> DensityImageType;
OutputImageType,
DensityCountFunctionType> DensityImageType;
typedef typename DensityImageType::Pointer DensityImagePointerType;
......
......@@ -39,16 +39,16 @@ class ITK_EXPORT HillShadingFilter :
public UnaryFunctorNeighborhoodImageFilter<TInputImage, TOutputImage,
Functor::HillShadingFunctor<itk::ConstNeighborhoodIterator<TInputImage>,
TInputImage, typename TOutputImage::PixelType>
>
>
{
public:
/** Standard class typedefs. */
typedef HillShadingFilter Self;
typedef HillShadingFilter Self;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Method for creation through the object factory. */
itkNewMacro(Self);
......
......@@ -148,8 +148,8 @@ public:
float xSlope =
((makeValid(it.GetPixel(LEFTUP)) + 2 * makeValid(it.GetPixel(LEFT)) + makeValid(it.GetPixel(RIGHTDOWN)))
- (makeValid(it.GetPixel(RIGHTUP)) + 2 * makeValid(it.GetPixel(RIGHT)) +
makeValid(it.GetPixel(RIGHTDOWN))))
- (makeValid(it.GetPixel(RIGHTUP)) + 2 * makeValid(it.GetPixel(RIGHT)) +
makeValid(it.GetPixel(RIGHTDOWN))))
/ (m_XRes * m_Scale);
// - as the azimuth is given compared to y axis pointing up
float ySlope = -((makeValid(it.GetPixel(LEFTUP)) + 2 * makeValid(it.GetPixel(UP)) + makeValid(it.GetPixel(RIGHTUP)))
......
......@@ -60,33 +60,33 @@ public:
switch (m_Operator)
{
case MULTIPLICATION:
{
vInTmp *= static_cast<InternalInputPixelType>(inPix);
break;
}
case ADDITION:
{
vInTmp += static_cast<InternalInputPixelType>(inPix);
break;
}
case DIVISON:
{
if (inPix != 0) vInTmp /= static_cast<InternalInputPixelType>(inPix);
else
case MULTIPLICATION:
{
vInTmp *= static_cast<InternalInputPixelType>(inPix);
break;
}
case ADDITION:
{
vInTmp += static_cast<InternalInputPixelType>(inPix);
break;
}
case DIVISON:
{
if (inPix != 0) vInTmp /= static_cast<InternalInputPixelType>(inPix);
else
{
vInTmp.Fill(0);
}
break;
}
case SUBSTRACTION:
{
vInTmp -= static_cast<InternalInputPixelType>(inPix);
break;
}
default:
{
vInTmp.Fill(0);
}
break;
}
case SUBSTRACTION:
{
vInTmp -= static_cast<InternalInputPixelType>(inPix);
break;
}
default:
{
}
}
for (unsigned int i = 0; i < vInTmp.Size(); i++)
......@@ -118,13 +118,13 @@ protected:
template <class TInputImage, class TVectorInputImage, class TOutputImage>
class ITK_EXPORT ImageAndVectorImageOperationFilter :
public itk::BinaryFunctorImageFilter<TInputImage,
TVectorInputImage,
TOutputImage,
Functor::ImageAndVectorImageOperationFunctor<ITK_TYPENAME TInputImage::PixelType,
ITK_TYPENAME TVectorInputImage::
PixelType,
ITK_TYPENAME TOutputImage::
PixelType> >
TVectorInputImage,
TOutputImage,
Functor::ImageAndVectorImageOperationFunctor<ITK_TYPENAME TInputImage::PixelType,
ITK_TYPENAME TVectorInputImage::
PixelType,
ITK_TYPENAME TOutputImage::
PixelType> >
//ImageToImageFilter< TVectorInputImage, TOutputImage >
{
public:
......@@ -133,8 +133,8 @@ public:
typedef ImageAndVectorImageOperationFilter Self;
//typedef itk::ImageToImageFilter<TVectorInputImage, TOutputImage> Superclass;
typedef Functor::ImageAndVectorImageOperationFunctor<ITK_TYPENAME TInputImage::PixelType,
ITK_TYPENAME TVectorInputImage::PixelType,
ITK_TYPENAME TOutputImage::PixelType> FunctorType;
ITK_TYPENAME TVectorInputImage::PixelType,
ITK_TYPENAME TOutputImage::PixelType> FunctorType;
typedef itk::BinaryFunctorImageFilter<TInputImage, TVectorInputImage, TOutputImage, FunctorType> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -41,13 +41,13 @@ namespace otb
template <class TInputImageList, class TOutputImageList, class TFilter>
class ITK_EXPORT ImageListToImageListApplyFilter
: public ImageListToImageListFilter<typename TInputImageList::ImageType,
typename TOutputImageList::ImageType>
typename TOutputImageList::ImageType>
{
public:
/** Standard typedefs */
typedef ImageListToImageListApplyFilter Self;
typedef ImageListToImageListFilter<typename TInputImageList::ImageType,
typename TOutputImageList::ImageType> Superclass;
typename TOutputImageList::ImageType> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -41,7 +41,7 @@ public:
/** Standard typedefs */
typedef ImageListToVectorImageFilter Self;
typedef ImageListToImageFilter<typename TImageList::ImageType,
TVectorImage> Superclass;
TVectorImage> Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
......
......@@ -159,7 +159,7 @@ ImageToPointSetFilter<TInputImage, TOutputPointSet>
{
streamRegion = m_RegionSplitter->GetSplit(piece, numDivisions, inputRegion);
typedef itk::ImageToImageFilterDetail::ImageRegionCopier<itkGetStaticConstMacro(InputImageDimension),
itkGetStaticConstMacro(InputImageDimension)>
itkGetStaticConstMacro(InputImageDimension)>
OutputToInputRegionCopierType;
OutputToInputRegionCopierType regionCopier;
InputImageRegionType inputRegion;
......
......@@ -178,7 +178,8 @@ ImportVectorImageFilter<TOutputImage>
int numberOfBands = m_Size / (size[0] * size[1]);
if (numberOfBands != static_cast<int>(numberOfBands)) itkExceptionMacro(
if (numberOfBands != static_cast<int>(numberOfBands))
itkExceptionMacro(
<< "Buffer size and image size are not compatible !");
outputPtr->SetNumberOfComponentsPerPixel(numberOfBands);
......
......@@ -87,7 +87,7 @@ public:
/** Template parameters typedefs for mean component generation */
typedef Image<typename InputImageType::InternalPixelType,
::itk::GetImageDimension<InputImageType>::ImageDimension> InternalImageType;
::itk::GetImageDimension<InputImageType>::ImageDimension> InternalImageType;
typedef Functor::MeanFunctor<typename InputImageType::PixelType, typename InternalImageType::PixelType>
MeanFunctorType;
typedef itk::UnaryFunctorImageFilter<InputImageType, InternalImageType, MeanFunctorType> MeanFilterType;
......
......@@ -48,7 +48,8 @@ InnerProductPCAImageFilter<TInputImage, TOutputImage>
::GenerateOutputInformation(void)
{
Superclass::GenerateOutputInformation();
if (m_GenerateMeanComponent == false) this->GetOutput()->SetNumberOfComponentsPerPixel(