[PATCH] COMP: fix compilation errors with gcc 4.7
Vivien Delmon
vivien.delmon at creatis.insa-lyon.fr
Tue Apr 17 05:41:54 EDT 2012
* missing include
* missing this->
---
Code/Algorithms/itkCurvesLevelSetFunction.h | 2 +-
Code/Algorithms/itkGeodesicActiveContourLevelSetFunction.h | 2 +-
.../itkGeodesicActiveContourShapePriorLevelSetFunction.h | 2 +-
Code/Algorithms/itkShapeDetectionLevelSetFunction.h | 2 +-
Code/Algorithms/itkVoronoiPartitioningImageFilter.txx | 4 ++--
...itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx | 4 ++--
.../itkBloxBoundaryProfileImageToBloxCoreAtomImageFilter.txx | 4 ++--
Code/BasicFilters/itkTernaryFunctorImageFilter.txx | 6 +++---
Code/Common/itkPoint.txx | 2 +-
Code/Common/itkSize.h | 1 +
Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx | 4 ++--
Code/Review/itkMovingHistogramImageFilter.txx | 2 +-
Code/Review/itkQuadEdgeMeshDiscreteGaussianCurvatureEstimator.h | 2 +-
Code/Review/itkQuadEdgeMeshDiscreteMeanCurvatureEstimator.h | 2 +-
.../Review/itkQuadEdgeMeshDiscretePrincipalCurvaturesEstimator.h | 2 +-
Code/Review/itkValuedRegionalMaximaImageFilter.h | 2 +-
Testing/Code/Common/itkMeshSourceGraftOutputTest.cxx | 2 +-
17 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/Code/Algorithms/itkCurvesLevelSetFunction.h b/Code/Algorithms/itkCurvesLevelSetFunction.h
index dd157b5..235cf0f 100644
--- a/Code/Algorithms/itkCurvesLevelSetFunction.h
+++ b/Code/Algorithms/itkCurvesLevelSetFunction.h
@@ -99,7 +99,7 @@ public:
/** The curvature speed is same as the propagation speed. */
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
const FloatOffsetType & offset, GlobalDataStruct *gd ) const
- { return PropagationSpeed( neighborhood, offset, gd ); }
+ { return this->PropagationSpeed( neighborhood, offset, gd ); }
/** Set/Get the sigma for the Gaussian kernel used to compute the gradient
* of the feature image needed for the advection term of the equation. */
diff --git a/Code/Algorithms/itkGeodesicActiveContourLevelSetFunction.h b/Code/Algorithms/itkGeodesicActiveContourLevelSetFunction.h
index 6ba8f5d..1fd948b 100644
--- a/Code/Algorithms/itkGeodesicActiveContourLevelSetFunction.h
+++ b/Code/Algorithms/itkGeodesicActiveContourLevelSetFunction.h
@@ -114,7 +114,7 @@ public:
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
const FloatOffsetType & offset, GlobalDataStruct *gd ) const
{
- return PropagationSpeed( neighborhood, offset, gd );
+ return this->PropagationSpeed( neighborhood, offset, gd );
}
/** Set/Get the sigma for the Gaussian kernel used to compute the gradient
diff --git a/Code/Algorithms/itkGeodesicActiveContourShapePriorLevelSetFunction.h b/Code/Algorithms/itkGeodesicActiveContourShapePriorLevelSetFunction.h
index b616060..92aa264 100644
--- a/Code/Algorithms/itkGeodesicActiveContourShapePriorLevelSetFunction.h
+++ b/Code/Algorithms/itkGeodesicActiveContourShapePriorLevelSetFunction.h
@@ -130,7 +130,7 @@ public:
/** The curvature speed is same as the propagation speed. */
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
const FloatOffsetType & offset, GlobalDataStruct *gd ) const
- { return PropagationSpeed( neighborhood, offset, gd ); }
+ { return this->PropagationSpeed( neighborhood, offset, gd ); }
/** Set/Get the sigma for the Gaussian kernel used to compute the gradient
* of the feature image needed for the advection term of the equation. */
diff --git a/Code/Algorithms/itkShapeDetectionLevelSetFunction.h b/Code/Algorithms/itkShapeDetectionLevelSetFunction.h
index ed22597..6c1bab9 100644
--- a/Code/Algorithms/itkShapeDetectionLevelSetFunction.h
+++ b/Code/Algorithms/itkShapeDetectionLevelSetFunction.h
@@ -103,7 +103,7 @@ public:
/** The curvature speed is same as the propagation speed. */
virtual ScalarValueType CurvatureSpeed(const NeighborhoodType & neighborhood,
const FloatOffsetType & offset, GlobalDataStruct *gd ) const
- { return PropagationSpeed( neighborhood, offset, gd ); }
+ { return this->PropagationSpeed( neighborhood, offset, gd ); }
virtual void Initialize(const RadiusType &r)
{
diff --git a/Code/Algorithms/itkVoronoiPartitioningImageFilter.txx b/Code/Algorithms/itkVoronoiPartitioningImageFilter.txx
index be8443d..f6324cb 100644
--- a/Code/Algorithms/itkVoronoiPartitioningImageFilter.txx
+++ b/Code/Algorithms/itkVoronoiPartitioningImageFilter.txx
@@ -129,7 +129,7 @@ VoronoiPartitioningImageFilter <TInputImage,TOutputImage>
{
if ((*nit)>i)
{
- drawLine(this->m_WorkingVD->GetSeed(i),this->m_WorkingVD->GetSeed(*nit));
+ this->drawLine(this->m_WorkingVD->GetSeed(i),this->m_WorkingVD->GetSeed(*nit));
i=i;
}
}
@@ -164,7 +164,7 @@ VoronoiPartitioningImageFilter<TInputImage,TOutputImage>
VertList.push_back(currP);
}
// Need to fill with an segment identifier
- FillPolygon(VertList, static_cast<OutputPixelType>(i));
+ this->FillPolygon(VertList, static_cast<OutputPixelType>(i));
}
}
diff --git a/Code/BasicFilters/itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx b/Code/BasicFilters/itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx
index 8ad039b..6d7bd46 100644
--- a/Code/BasicFilters/itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx
+++ b/Code/BasicFilters/itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx
@@ -502,7 +502,7 @@ BloxBoundaryPointImageToBloxBoundaryProfileImageFilter< TSourceImage >
::SetInput1(const SourceImageType * image1 )
{
// Process object is not const-correct so the const casting is required.
- SetNthInput(1, const_cast<SourceImageType *>( image1 ) );
+ this->SetNthInput(1, const_cast<SourceImageType *>( image1 ) );
}
template< typename TSourceImage >
@@ -511,7 +511,7 @@ BloxBoundaryPointImageToBloxBoundaryProfileImageFilter< TSourceImage >
::SetInput2(const BoundaryPointImageType * image2 )
{
// Process object is not const-correct so the const casting is required.
- SetNthInput(0, const_cast<BoundaryPointImageType *>( image2 ) );
+ this->SetNthInput(0, const_cast<BoundaryPointImageType *>( image2 ) );
}
} // end namespace
diff --git a/Code/BasicFilters/itkBloxBoundaryProfileImageToBloxCoreAtomImageFilter.txx b/Code/BasicFilters/itkBloxBoundaryProfileImageToBloxCoreAtomImageFilter.txx
index a7b0174..d8cc75f 100644
--- a/Code/BasicFilters/itkBloxBoundaryProfileImageToBloxCoreAtomImageFilter.txx
+++ b/Code/BasicFilters/itkBloxBoundaryProfileImageToBloxCoreAtomImageFilter.txx
@@ -46,7 +46,7 @@ BloxBoundaryProfileImageToBloxCoreAtomImageFilter< TInputImage, TOutputImage, TS
::SetInput1(const SourceImageType * image1 )
{
// Process object is not const-correct so the const casting is required.
- SetNthInput(1, const_cast<SourceImageType *>( image1 ) );
+ this->SetNthInput(1, const_cast<SourceImageType *>( image1 ) );
}
template< typename TInputImage, typename TOutputImage, typename TSourceImage >
@@ -55,7 +55,7 @@ BloxBoundaryProfileImageToBloxCoreAtomImageFilter< TInputImage, TOutputImage, TS
::SetInput2(const InputImageType * image2 )
{
// Process object is not const-correct so the const casting is required.
- SetNthInput(0, const_cast<InputImageType *>( image2 ) );
+ this->SetNthInput(0, const_cast<InputImageType *>( image2 ) );
}
diff --git a/Code/BasicFilters/itkTernaryFunctorImageFilter.txx b/Code/BasicFilters/itkTernaryFunctorImageFilter.txx
index ae6a5e2..6b6aaf2 100644
--- a/Code/BasicFilters/itkTernaryFunctorImageFilter.txx
+++ b/Code/BasicFilters/itkTernaryFunctorImageFilter.txx
@@ -46,7 +46,7 @@ TernaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TOutputImage,TF
::SetInput1( const TInputImage1 *image1 )
{
// The ProcessObject is not const-correct so the const_cast is required here
- SetNthInput( 0, const_cast<TInputImage1 *>( image1 ) );
+ this->SetNthInput( 0, const_cast<TInputImage1 *>( image1 ) );
}
/**
@@ -59,7 +59,7 @@ TernaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TOutputImage,TF
::SetInput2( const TInputImage2 *image2 )
{
// The ProcessObject is not const-correct so the const_cast is required here
- SetNthInput( 1, const_cast<TInputImage2 *>( image2 ) );
+ this->SetNthInput( 1, const_cast<TInputImage2 *>( image2 ) );
}
/**
@@ -72,7 +72,7 @@ TernaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TOutputImage,TF
::SetInput3( const TInputImage3 *image3 )
{
// The ProcessObject is not const-correct so the const_cast is required here
- SetNthInput( 2, const_cast<TInputImage3 *>( image3 ) );
+ this->SetNthInput( 2, const_cast<TInputImage3 *>( image3 ) );
}
/**
diff --git a/Code/Common/itkPoint.txx b/Code/Common/itkPoint.txx
index a5a61c4..bed0c8a 100644
--- a/Code/Common/itkPoint.txx
+++ b/Code/Common/itkPoint.txx
@@ -256,7 +256,7 @@ Point<T, TPointDimension>
::SetToBarycentricCombination( const Self * P,
const double * weights, unsigned int N )
{
- Fill( NumericTraits<T>::Zero ); // put this point to null
+ this->Fill( NumericTraits<T>::Zero ); // put this point to null
double weightSum = 0.0;
for( unsigned int j=0; j<N-1; j++)
{
diff --git a/Code/Common/itkSize.h b/Code/Common/itkSize.h
index 24a6880..e216156 100644
--- a/Code/Common/itkSize.h
+++ b/Code/Common/itkSize.h
@@ -17,6 +17,7 @@
#ifndef __itkSize_h
#define __itkSize_h
+#include <cstring>
#include "itkMacro.h"
namespace itk
diff --git a/Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx b/Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx
index 479382b..5e9f76a 100644
--- a/Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx
+++ b/Code/Numerics/Statistics/itkWeightedCentroidKdTreeGenerator.txx
@@ -117,13 +117,13 @@ WeightedCentroidKdTreeGenerator< TSample >
upperBound[partitionDimension] = partitionValue;
const unsigned int beginLeftIndex = beginIndex;
const unsigned int endLeftIndex = medianIndex;
- KdTreeNodeType* left = GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1);
+ KdTreeNodeType* left = this->GenerateTreeLoop(beginLeftIndex, endLeftIndex, lowerBound, upperBound, level + 1);
upperBound[partitionDimension] = dimensionUpperBound;
lowerBound[partitionDimension] = partitionValue;
const unsigned int beginRightIndex = medianIndex+1;
const unsigned int endRighIndex = endIndex;
- KdTreeNodeType* right = GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1);
+ KdTreeNodeType* right = this->GenerateTreeLoop(beginRightIndex, endRighIndex, lowerBound, upperBound, level + 1);
lowerBound[partitionDimension] = dimensionLowerBound;
diff --git a/Code/Review/itkMovingHistogramImageFilter.txx b/Code/Review/itkMovingHistogramImageFilter.txx
index 6f48ca3..37f9751 100644
--- a/Code/Review/itkMovingHistogramImageFilter.txx
+++ b/Code/Review/itkMovingHistogramImageFilter.txx
@@ -291,7 +291,7 @@ MovingHistogramImageFilter<TInputImage, TOutputImage, TKernel, THistogram>
// which direction
int LineDirection=0;
// This function deals with changing planes etc
- GetDirAndOffset(LineStart, PrevLineStart,
+ this->GetDirAndOffset(LineStart, PrevLineStart,
LineOffset, Changes, LineDirection);
++(Steps[LineDirection]);
IndexType PrevLineStartHist = LineStart - LineOffset;
diff --git a/Code/Review/itkQuadEdgeMeshDiscreteGaussianCurvatureEstimator.h b/Code/Review/itkQuadEdgeMeshDiscreteGaussianCurvatureEstimator.h
index cee7ff2..2178c9c 100644
--- a/Code/Review/itkQuadEdgeMeshDiscreteGaussianCurvatureEstimator.h
+++ b/Code/Review/itkQuadEdgeMeshDiscreteGaussianCurvatureEstimator.h
@@ -98,7 +98,7 @@ protected:
// Compute Angle;
sum_theta += static_cast< OutputCurvatureType >(
TriangleType::ComputeAngle( q0, iP, q1 ) );
- area += ComputeMixedArea( qe_it, qe_it2 );
+ area += this->ComputeMixedArea( qe_it, qe_it2 );
qe_it = qe_it2;
} while( qe_it != qe );
diff --git a/Code/Review/itkQuadEdgeMeshDiscreteMeanCurvatureEstimator.h b/Code/Review/itkQuadEdgeMeshDiscreteMeanCurvatureEstimator.h
index 57cbc7b..add0ab5 100644
--- a/Code/Review/itkQuadEdgeMeshDiscreteMeanCurvatureEstimator.h
+++ b/Code/Review/itkQuadEdgeMeshDiscreteMeanCurvatureEstimator.h
@@ -110,7 +110,7 @@ protected:
temp_coeff = coefficent( output, qe_it );
Laplace += temp_coeff * ( iP - q0 );
- temp_area = ComputeMixedArea( qe_it, qe_it2 );
+ temp_area = this->ComputeMixedArea( qe_it, qe_it2 );
area += temp_area;
face_normal = TriangleType::ComputeNormal( q0, iP, q1 );
diff --git a/Code/Review/itkQuadEdgeMeshDiscretePrincipalCurvaturesEstimator.h b/Code/Review/itkQuadEdgeMeshDiscretePrincipalCurvaturesEstimator.h
index b2163f8..c8f3da2 100644
--- a/Code/Review/itkQuadEdgeMeshDiscretePrincipalCurvaturesEstimator.h
+++ b/Code/Review/itkQuadEdgeMeshDiscretePrincipalCurvaturesEstimator.h
@@ -116,7 +116,7 @@ protected:
sum_theta += static_cast< OutputCurvatureType >(
TriangleType::ComputeAngle( q0, iP, q1 ) );
- temp_area = ComputeMixedArea( qe_it, qe_it2 );
+ temp_area = this->ComputeMixedArea( qe_it, qe_it2 );
area += temp_area;
face_normal = TriangleType::ComputeNormal( q0, iP, q1 );
diff --git a/Code/Review/itkValuedRegionalMaximaImageFilter.h b/Code/Review/itkValuedRegionalMaximaImageFilter.h
index c74ea64..a1d5278 100644
--- a/Code/Review/itkValuedRegionalMaximaImageFilter.h
+++ b/Code/Review/itkValuedRegionalMaximaImageFilter.h
@@ -87,7 +87,7 @@ public:
protected:
ValuedRegionalMaximaImageFilter()
{
- SetMarkerValue(
+ this->SetMarkerValue(
NumericTraits<ITK_TYPENAME TOutputImage::PixelType>::NonpositiveMin());
}
virtual ~ValuedRegionalMaximaImageFilter() {}
diff --git a/Testing/Code/Common/itkMeshSourceGraftOutputTest.cxx b/Testing/Code/Common/itkMeshSourceGraftOutputTest.cxx
index d6e0b0c..2b69884 100644
--- a/Testing/Code/Common/itkMeshSourceGraftOutputTest.cxx
+++ b/Testing/Code/Common/itkMeshSourceGraftOutputTest.cxx
@@ -150,7 +150,7 @@ void MeshSourceGraftOutputFilter<TInputMesh,TOutputMesh,TTransform>
std::cout << "Filter: " << filter;
// Get the Smart Pointer to the Filter Output
- GraftOutput( filter->GetOutput() );
+ this->GraftOutput( filter->GetOutput() );
/*
outputMesh->SetBufferedRegion( outputMesh->GetRequestedRegion() );
--
1.7.10
--------------040508080806020406050805--
More information about the Insight-users
mailing list