Skip to content

Commit c14ef00

Browse files
authored
Merge pull request #23 from zachary-williamson/master
COMP: Use override annotations on overridden functions
2 parents c9cdc87 + bce56ed commit c14ef00

6 files changed

+26
-26
lines changed

include/itkArrivalFunctionToPathFilter.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@ class ArrivalFunctionToPathCommand : public itk::Command
5858
itkGetConstObjectMacro( Filter, FilterType );
5959

6060
/** Execute */
61-
void Execute(itk::Object *caller, const itk::EventObject & event)
61+
void Execute(itk::Object *caller, const itk::EventObject & event) ITK_OVERRIDE
6262
{
6363
Execute( (const itk::Object *)caller, event);
6464
}
6565

6666
/** Execute */
67-
void Execute(const itk::Object * object, const itk::EventObject & event)
67+
void Execute(const itk::Object * object, const itk::EventObject & event) ITK_OVERRIDE
6868
{
6969
if( ! itk::IterationEvent().CheckEvent( &event ) )
7070
{
@@ -211,13 +211,13 @@ class ITK_EXPORT ArrivalFunctionToPathFilter :
211211
protected:
212212
ArrivalFunctionToPathFilter();
213213
~ArrivalFunctionToPathFilter();
214-
virtual void PrintSelf(std::ostream& os, Indent indent) const;
214+
virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
215215

216216
/** Override since the filter needs all the data for the algorithm */
217-
void GenerateInputRequestedRegion();
217+
void GenerateInputRequestedRegion() ITK_OVERRIDE;
218218

219219
/** Implemention of algorithm */
220-
void GenerateData(void);
220+
void GenerateData(void) ITK_OVERRIDE;
221221

222222
/** Get the arrival function from which to extract the path. */
223223
virtual unsigned int GetNumberOfPathsToExtract( ) const;

include/itkIterateNeighborhoodOptimizer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class MinimalPathExtraction_EXPORT IterateNeighborhoodOptimizer :
7171
virtual void AdvanceOneStep( void );
7272

7373
/** Start optimization. */
74-
void StartOptimization( void );
74+
void StartOptimization( void ) ITK_OVERRIDE;
7575

7676
/** Resume previously stopped optimization with current parameters
7777
* \sa StopOptimization. */
@@ -105,7 +105,7 @@ class MinimalPathExtraction_EXPORT IterateNeighborhoodOptimizer :
105105
protected:
106106
IterateNeighborhoodOptimizer();
107107
virtual ~IterateNeighborhoodOptimizer() {};
108-
void PrintSelf(std::ostream& os, Indent indent) const;
108+
void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
109109

110110
private:
111111
IterateNeighborhoodOptimizer(const Self&); //purposely not implemented

include/itkPhysicalCentralDifferenceImageFunction.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class ITK_EXPORT PhysicalCentralDifferenceImageFunction :
8989
* \warning this method caches BufferedRegion information.
9090
* If the BufferedRegion has changed, user must call
9191
* SetInputImage again to update cached values. */
92-
virtual void SetInputImage( const InputImageType * ptr )
92+
virtual void SetInputImage( const InputImageType * ptr ) ITK_OVERRIDE
9393
{
9494
this->Superclass::SetInputImage( ptr );
9595
if ( m_Interpolator.IsNotNull() )
@@ -103,7 +103,7 @@ class ITK_EXPORT PhysicalCentralDifferenceImageFunction :
103103
* No bounds checking is done. The point is assume to lie within the
104104
* image buffer. ImageFunction::IsInsideBuffer() can be used to check
105105
* bounds before calling this method. */
106-
virtual OutputType EvaluateAtIndex( const IndexType& index ) const
106+
virtual OutputType EvaluateAtIndex( const IndexType& index ) const ITK_OVERRIDE
107107
{
108108
PointType point;
109109
m_Interpolator->GetInputImage()->TransformIndexToPhysicalPoint( index, point );
@@ -117,7 +117,7 @@ class ITK_EXPORT PhysicalCentralDifferenceImageFunction :
117117
* image buffer. ImageFunction::IsInsideBuffer() can be used to check
118118
* bounds before calling this method. */
119119
virtual OutputType EvaluateAtContinuousIndex(
120-
const ContinuousIndexType& cindex ) const
120+
const ContinuousIndexType& cindex ) const ITK_OVERRIDE
121121
{
122122
PointType point;
123123
m_Interpolator->GetInputImage()->TransformContinuousIndexToPhysicalPoint( cindex, point );
@@ -130,12 +130,12 @@ class ITK_EXPORT PhysicalCentralDifferenceImageFunction :
130130
* No bounds checking is done. The point is assume to lie within the
131131
* image buffer. ImageFunction::IsInsideBuffer() can be used to check
132132
* bounds before calling this method. */
133-
virtual OutputType Evaluate( const PointType& point ) const;
133+
virtual OutputType Evaluate( const PointType& point ) const ITK_OVERRIDE;
134134

135135
protected:
136136
PhysicalCentralDifferenceImageFunction();
137137
~PhysicalCentralDifferenceImageFunction(){};
138-
void PrintSelf(std::ostream& os, Indent indent) const;
138+
void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
139139

140140
private:
141141
PhysicalCentralDifferenceImageFunction( const Self& ); //purposely not implemented

include/itkSingleImageCostFunction.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,22 +116,22 @@ class ITK_EXPORT SingleImageCostFunction :
116116
virtual void Initialize(void) throw ( ExceptionObject );
117117

118118
/** Return the number of parameters required by the Transform */
119-
unsigned int GetNumberOfParameters(void) const
119+
unsigned int GetNumberOfParameters(void) const ITK_OVERRIDE
120120
{ return ImageDimension; }
121121

122122
/** This method returns the value of the cost function corresponding
123123
* to the specified parameters. */
124-
virtual MeasureType GetValue( const ParametersType & parameters ) const;
124+
virtual MeasureType GetValue( const ParametersType & parameters ) const ITK_OVERRIDE;
125125

126126
/** This method returns the derivative of the cost function corresponding
127127
* to the specified parameters. */
128128
virtual void GetDerivative( const ParametersType & parameters,
129-
DerivativeType & derivative ) const;
129+
DerivativeType & derivative ) const ITK_OVERRIDE;
130130

131131
protected:
132132
SingleImageCostFunction();
133133
virtual ~SingleImageCostFunction() {}
134-
void PrintSelf(std::ostream& os, Indent indent) const;
134+
void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
135135

136136
private:
137137
SingleImageCostFunction(const Self&); //purposely not implemented

include/itkSpeedFunctionPathInformation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class SpeedFunctionPathInformation :
9494
protected:
9595
SpeedFunctionPathInformation( );
9696
virtual ~SpeedFunctionPathInformation( );
97-
virtual void PrintSelf( std::ostream& os, Indent indent ) const;
97+
virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
9898

9999
std::vector< PointType > m_Information;
100100
SizeValueType m_Front;

include/itkSpeedFunctionToPathFilter.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ITK_EXPORT SpeedFunctionToPathFilter :
109109
* Warning: SetPathEndPoint() is not valid for this filter.
110110
* This method is provided by the superclass, however it is not
111111
* used by this subclass. Use AddPathInfo() instead.*/
112-
void SetPathEndPoint( const PointType& )
112+
void SetPathEndPoint( const PointType& ) ITK_OVERRIDE
113113
{
114114
itkWarningMacro("SetPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
115115
}
@@ -118,7 +118,7 @@ class ITK_EXPORT SpeedFunctionToPathFilter :
118118
* Warning: AddPathEndPoint() is not valid for this filter.
119119
* This method is provided by the superclass, however it is not
120120
* used by this subclass. Use AddPathInfo() instead.*/
121-
void AddPathEndPoint( const PointType& )
121+
void AddPathEndPoint( const PointType& ) ITK_OVERRIDE
122122
{
123123
itkWarningMacro("AddPathEndPoint() is not valid for this filter. Use AddPathInfo() instead.");
124124
}
@@ -127,7 +127,7 @@ class ITK_EXPORT SpeedFunctionToPathFilter :
127127
* Warning: ClearPathEndPoints() is not valid for this filter.
128128
* This method is provided by the superclass, however it is not
129129
* used by this subclass. Use ClearPathInfo() instead.*/
130-
void ClearPathEndPoints()
130+
void ClearPathEndPoints() ITK_OVERRIDE
131131
{
132132
itkWarningMacro("ClearPathEndPoints() is not valid for this filter. Use ClearPathInfo() instead.");
133133
}
@@ -146,24 +146,24 @@ class ITK_EXPORT SpeedFunctionToPathFilter :
146146
}
147147

148148
/** Handle optimizer iteration events. */
149-
virtual void Execute( const itk::Object * object, const itk::EventObject & event );
149+
virtual void Execute( const itk::Object * object, const itk::EventObject & event ) ITK_OVERRIDE;
150150

151151
protected:
152152
SpeedFunctionToPathFilter( );
153153
~SpeedFunctionToPathFilter( );
154-
virtual void PrintSelf( std::ostream& os, Indent indent ) const;
154+
virtual void PrintSelf( std::ostream& os, Indent indent ) const ITK_OVERRIDE;
155155

156156
/** Implemention of algorithm. */
157-
void GenerateData( void );
157+
void GenerateData( void ) ITK_OVERRIDE;
158158

159159
/** Get the number of paths which the user has instructed to extracted. */
160-
virtual unsigned int GetNumberOfPathsToExtract( ) const;
160+
virtual unsigned int GetNumberOfPathsToExtract( ) const ITK_OVERRIDE;
161161

162162
/** Compute the arrival function from which to extract the path. */
163-
virtual InputImageType * ComputeArrivalFunction( );
163+
virtual InputImageType * ComputeArrivalFunction( ) ITK_OVERRIDE;
164164

165165
/** Override handling of optimizer iteration events to accomodate way points. */
166-
virtual const PointType & GetNextEndPoint( );
166+
virtual const PointType & GetNextEndPoint( ) ITK_OVERRIDE;
167167

168168
std::vector< typename PathInformationType::Pointer > m_Information;
169169
InputImagePointer m_CurrentArrivalFunction;

0 commit comments

Comments
 (0)