Commit ff65320c authored by Emmanuel Christophe's avatar Emmanuel Christophe

BUG: destructor should be virtual if there is at least one other virtual...

BUG: destructor should be virtual if there is at least one other virtual method in the class (ie the class is expected to be inherited)
parent b21bd2d6
......@@ -104,7 +104,7 @@ class ITK_EXPORT BinaryImageDensityFunction :
protected:
BinaryImageDensityFunction();
~BinaryImageDensityFunction(){};
virtual ~BinaryImageDensityFunction(){};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -82,7 +82,7 @@ protected:
/** Constructor */
BinaryImageToDensityImageFilter();
/** Destructor */
~BinaryImageToDensityImageFilter();
virtual ~BinaryImageToDensityImageFilter();
/** PrintSelf method */
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -46,7 +46,7 @@ public:
typedef typename TOutput::ValueType ValueType;
VectorChangeLabel() {};
~VectorChangeLabel() {};
virtual ~VectorChangeLabel() {};
typedef std::map<TInput, TOutput> ChangeMapType;
......@@ -228,7 +228,7 @@ template< class TInput, class TOutput>
{
public:
VectorChangeLabel() {m_NumberOfComponents=1;};
~VectorChangeLabel() {};
virtual ~VectorChangeLabel() {};
void SetNumberOfComponents(unsigned int nb)
......
......@@ -109,7 +109,7 @@ protected:
/** constructor */
GaborFilterGenerator();
/** destructor */
~GaborFilterGenerator() {}
virtual ~GaborFilterGenerator() {}
/** PrintSelf method */
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -42,7 +42,7 @@ public:
{
m_Operator = ADDITION;//1;
};
~ImageAndVectorImageOperationFunctor(){};
virtual ~ImageAndVectorImageOperationFunctor(){};
void SetOperator(OperatorType oper)
......@@ -216,7 +216,7 @@ public:
protected:
ImageAndVectorImageOperationFilter();
~ImageAndVectorImageOperationFilter();
virtual ~ImageAndVectorImageOperationFilter();
/** This is a source, so it must set the spacing, size, and largest possible
* region for the output image that it will produce.
......
......@@ -141,7 +141,7 @@ public:
protected:
ImportImageFilter();
~ImportImageFilter();
virtual ~ImportImageFilter();
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** This filter does not actually "produce" any data, rather it "wraps"
......
......@@ -146,7 +146,7 @@ public:
protected:
ImportVectorImageFilter();
~ImportVectorImageFilter();
virtual ~ImportVectorImageFilter();
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** This filter does not actually "produce" any data, rather it "wraps"
......
......@@ -107,7 +107,7 @@ protected:
/** Constructor */
InverseLogPolarTransform();
/** Destructor */
~InverseLogPolarTransform();
virtual ~InverseLogPolarTransform();
/** PrintSelf method */
void PrintSelf(std::ostream &os,itk::Indent indent) const;
......
......@@ -108,7 +108,7 @@ protected:
/** Constructor */
LogPolarTransform();
/** Destructor */
~LogPolarTransform();
virtual ~LogPolarTransform();
/** PrintSelf method */
void PrintSelf(std::ostream &os,itk::Indent indent) const;
......
......@@ -194,7 +194,7 @@ protected:
/** Constructor */
MeanShiftImageFilter();
/** destructor */
~MeanShiftImageFilter() {};
virtual ~MeanShiftImageFilter() {};
/**PrintSelf method */
virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -87,7 +87,7 @@ protected:
/** Constructor */
MeanShiftVectorImageFilter() {};
/** destructor */
~MeanShiftVectorImageFilter() {};
virtual ~MeanShiftVectorImageFilter() {};
/**PrintSelf method */
virtual void PrintSelf(std::ostream& os, itk::Indent indent) const
......
......@@ -86,7 +86,7 @@ public:
protected:
PersistentVectorizationImageFilter();
~PersistentVectorizationImageFilter() {};
virtual ~PersistentVectorizationImageFilter() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
virtual void GenerateData();
......
......@@ -65,7 +65,7 @@ public:
protected:
PointSetDensityFunction();
~PointSetDensityFunction() {};
virtual ~PointSetDensityFunction() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -137,7 +137,7 @@ public:
protected:
SpatialObjectToImageDrawingFilter();
~SpatialObjectToImageDrawingFilter();
virtual ~SpatialObjectToImageDrawingFilter();
virtual void GenerateOutputInformation(); // do nothing
virtual void GenerateData();
......
......@@ -167,7 +167,7 @@ public:
protected:
PersistentMatrixTransposeMatrixImageFilter();
~PersistentMatrixTransposeMatrixImageFilter() {};
virtual ~PersistentMatrixTransposeMatrixImageFilter() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Multi-thread version GenerateData. */
virtual void ThreadedGenerateData (const RegionType& outputRegionForThread,int threadId);
......
......@@ -78,7 +78,7 @@ protected:
/** Constructor */
StreamingShrinkImageFilter();
/** Destructor */
~StreamingShrinkImageFilter();
virtual ~StreamingShrinkImageFilter();
/** PrintSelf method */
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -150,7 +150,7 @@ public:
protected:
PersistentStatisticsImageFilter();
~PersistentStatisticsImageFilter() {};
virtual ~PersistentStatisticsImageFilter() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Multi-thread version GenerateData. */
......
......@@ -30,7 +30,7 @@ class VectorToAmplitudeFunctor
{
public:
VectorToAmplitudeFunctor() {};
~VectorToAmplitudeFunctor() {};
virtual ~VectorToAmplitudeFunctor() {};
inline TOutput operator()(const TInput & A)
{
......
......@@ -47,7 +47,7 @@ public:
/// Constructor
VectorAffineTransform() {}
/// Desctructor
~VectorAffineTransform() {}
virtual ~VectorAffineTransform() {}
/// Accessors
void SetOutputMaximum( TOutput a )
......
......@@ -174,7 +174,7 @@ public:
protected:
WindowedSincInterpolateImageFunctionBase();
~WindowedSincInterpolateImageFunctionBase();
virtual ~WindowedSincInterpolateImageFunctionBase();
virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -69,7 +69,7 @@ public:
typedef typename VectorOfVectorType::iterator VecOfVecIteratorType;
CBAMI() {};
~CBAMI() {};
virtual ~CBAMI() {};
inline TOutput operator()( const TInput1 & itA,
const TInput2 & itB)
{
......
......@@ -54,7 +54,7 @@ class CrossCorrelation
{
public:
CrossCorrelation() {};
~CrossCorrelation() {};
virtual ~CrossCorrelation() {};
inline TOutput operator()( const TInput1 & itA,
const TInput2 & itB)
{
......
......@@ -58,7 +58,7 @@ public:
typedef double HistogramFrequencyType;
typedef typename itk::Statistics::Histogram<HistogramFrequencyType, 2> HistogramType;
JoinHistogramMI() {};
~JoinHistogramMI() {};
virtual ~JoinHistogramMI() {};
inline TOutput operator()( const TInput1 & itA,
const TInput2 & itB, const HistogramType* histogram)
{
......
......@@ -77,7 +77,7 @@ public:
LHMI() {};
~LHMI() {};
virtual ~LHMI() {};
inline TOutput operator()( const TInput1 & itA,
const TInput2 & itB)
{
......
......@@ -54,7 +54,7 @@ class MeanDifference
{
public:
MeanDifference() {};
~MeanDifference() {};
virtual ~MeanDifference() {};
inline TOutput operator()( const TInput1 & itA,
const TInput2 & itB)
{
......
......@@ -52,7 +52,7 @@ class MeanRatio
{
public:
MeanRatio() {};
~MeanRatio() {};
virtual ~MeanRatio() {};
inline TOutput operator()( const TInput1 & itA,
const TInput2 & itB)
{
......
......@@ -176,7 +176,7 @@ public:
protected:
CommandLineArgumentParseResult() {};
~CommandLineArgumentParseResult() {};
virtual ~CommandLineArgumentParseResult() {};
private:
......@@ -261,7 +261,7 @@ public:
bool failOnUnknownTrailingParameters = true);
protected:
CommandLineArgumentParser();
~CommandLineArgumentParser() {};
virtual ~CommandLineArgumentParser() {};
private:
......
......@@ -80,7 +80,7 @@ public:
protected:
ExtractROI();
~ExtractROI() {};
virtual ~ExtractROI() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** ExtractROI
......
......@@ -104,7 +104,7 @@ public:
protected:
ExtractROIBase();
~ExtractROIBase() {};
virtual ~ExtractROIBase() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -63,7 +63,7 @@ public :
protected:
GISTableSource();
~GISTableSource();
virtual ~GISTableSource();
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -112,7 +112,7 @@ public:
protected:
GenericInterpolateImageFunction();
~GenericInterpolateImageFunction();
virtual ~GenericInterpolateImageFunction();
virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Call the superclass implementation and set the TablesHaveBeenGenerated
......
......@@ -67,7 +67,7 @@ protected:
/** Constructor */
ImageList() {};
/** Destructor */
~ImageList() {};
virtual ~ImageList() {};
/** PrintSelf method */
void PrintSelf(std::ostream& os, itk::Indent indent) const
{
......
......@@ -81,7 +81,7 @@ public:
protected:
ImageOfVectorsToMonoChannelExtractROI();
~ImageOfVectorsToMonoChannelExtractROI() {};
virtual ~ImageOfVectorsToMonoChannelExtractROI() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** ExtractImageFilter can produce an image which is a different
......
......@@ -105,7 +105,7 @@ public:
protected:
ImageRegionNonUniformMultidimensionalSplitter() {}
~ImageRegionNonUniformMultidimensionalSplitter() {}
virtual ~ImageRegionNonUniformMultidimensionalSplitter() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -121,7 +121,7 @@ public:
protected:
ImageRegionTileMapSplitter() {}
~ImageRegionTileMapSplitter() {}
virtual ~ImageRegionTileMapSplitter() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -38,7 +38,7 @@ class VectorCast
public:
typedef typename TOutput::ValueType OutputValueType;
VectorCast() {};
~VectorCast() {};
virtual ~VectorCast() {};
bool operator!=(const VectorCast&) const
{
......
......@@ -316,7 +316,7 @@ class Cleanup
{
public:
Cleanup(std::strstream& ostr): m_StrStream(ostr) {}
~Cleanup()
virtual ~Cleanup()
{
m_StrStream.rdbuf()->freeze(0);
}
......
......@@ -120,7 +120,7 @@ public:
protected:
MultiChannelExtractROI();
~MultiChannelExtractROI() {};
virtual ~MultiChannelExtractROI() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Reinitialize channels vector for multiple Update.*/
......
......@@ -88,7 +88,7 @@ public:
protected:
MultiToMonoChannelExtractROI();
~MultiToMonoChannelExtractROI() {};
virtual ~MultiToMonoChannelExtractROI() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** ExtractImageFilter can produce an image which is a different
......
......@@ -76,7 +76,7 @@ public:
protected:
PathFunction();
~PathFunction() {}
virtual ~PathFunction() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
InputPathConstPointer m_Path;
......
......@@ -103,7 +103,7 @@ public:
protected:
VectorDataExtractROI();
~VectorDataExtractROI() {};
virtual ~VectorDataExtractROI() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Method to compare the projection embedded in the cartoRegion And the the InputVectorData*/
......
......@@ -63,7 +63,7 @@ public :
protected:
VectorDataSource();
~VectorDataSource();
virtual ~VectorDataSource();
void PrintSelf(std::ostream& os, itk::Indent indent) const;
......
......@@ -119,7 +119,7 @@ public:
protected:
MIRegistrationFilter();
~MIRegistrationFilter() {}
virtual ~MIRegistrationFilter() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Initialize the state of filter and equation before each iteration. */
......
......@@ -132,7 +132,7 @@ public:
protected:
NCCRegistrationFilter();
~NCCRegistrationFilter() {}
virtual ~NCCRegistrationFilter() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Initialize the state of filter and equation before each iteration. */
......
......@@ -149,7 +149,7 @@ public:
protected:
NCCRegistrationFunction();
~NCCRegistrationFunction() {}
virtual ~NCCRegistrationFunction() {}
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** FixedImage image neighborhood iterator type. */
......
......@@ -32,7 +32,7 @@ class DistanceComparisonFunctor
{
public:
DistanceComparisonFunctor() {};
~DistanceComparisonFunctor() {};
virtual ~DistanceComparisonFunctor() {};
typedef std::vector<double> DistanceVectorType;
void SetDistanceVector(DistanceVectorType &vec)
......
......@@ -47,7 +47,7 @@ class ITK_EXPORT AssociativeSymmetricalSum
{
public:
AssociativeSymmetricalSum() {};
~AssociativeSymmetricalSum() {};
virtual ~AssociativeSymmetricalSum() {};
inline TOutput operator()( const TInput1 X,
const TInput2 Y)
......
......@@ -71,7 +71,7 @@ public:
protected:
CompacityPathFunction() {};
~CompacityPathFunction() {};
virtual ~CompacityPathFunction() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -105,7 +105,7 @@ public:
protected:
ComplexMomentImageFunction();
~ComplexMomentImageFunction() {};
virtual ~ComplexMomentImageFunction() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -98,7 +98,7 @@ public:
protected:
ComplexMomentPathFunction();
~ComplexMomentPathFunction() {};
virtual ~ComplexMomentPathFunction() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -123,7 +123,7 @@ public:
protected:
FlusserImageFunction();
~FlusserImageFunction() {};
virtual ~FlusserImageFunction() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -97,7 +97,7 @@ public:
protected:
FlusserPathFunction();
~FlusserPathFunction() {};
virtual ~FlusserPathFunction() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......
......@@ -133,7 +133,7 @@ public:
protected:
ForwardFourierMellinTransformImageFilter();
~ForwardFourierMellinTransformImageFilter() {};
virtual ~ForwardFourierMellinTransformImageFilter() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
/** Main Computation Method */
void GenerateData();
......
......@@ -38,7 +38,7 @@ public:
{
m_Alpha = 1.0;
}
~HessianToScalar() {};
virtual ~HessianToScalar() {};
inline TOutput operator()( const TInput & Hessian )
{
......
......@@ -116,7 +116,7 @@ public:
protected:
HuImageFunction();
~HuImageFunction() {};
virtual ~HuImageFunction() {};
void PrintSelf(std::ostream& os, itk::Indent indent) const;
private:
......