Skip to content

Commit 8ae9f91

Browse files
N-Dekkerdzenanz
authored andcommitted
STYLE: Move empty member functions from .hxx to .h
Moved the member function definitions of member functions that have an empty member function definition from their "itk*.hxx" file to the corresponding "itk*.h" file, and into their class definition. Found by regular expression `^..[^:,].+\)\r\n{}` in "itk*.hxx" files. - Follow-up to pull request InsightSoftwareConsortium#5198 commit b94770d "STYLE: Move empty member functions with empty param list from .hxx to .h"
1 parent a5db4a8 commit 8ae9f91

20 files changed

+44
-131
lines changed

Modules/Core/Common/include/itkImageBase.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ class ITK_TEMPLATE_EXPORT ImageBase : public DataObject
249249
*
250250
*/
251251
virtual void
252-
Allocate(bool initialize = false);
252+
Allocate(bool itkNotUsed(initialize) = false)
253+
{}
253254

254255
/** Allocates the pixel buffer of the image, zero-initializing its pixels. `AllocateInitialized()` is equivalent to
255256
* `Allocate(true)`. It is just intended to make the code more readable. */

Modules/Core/Common/include/itkImageBase.hxx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,6 @@
3737

3838
namespace itk
3939
{
40-
41-
template <unsigned int VImageDimension>
42-
void
43-
ImageBase<VImageDimension>::Allocate(bool)
44-
{}
45-
46-
4740
template <unsigned int VImageDimension>
4841
void
4942
ImageBase<VImageDimension>::Initialize()

Modules/Numerics/FEM/include/itkFEMSolver.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject
141141
* \param dt New time step.
142142
*/
143143
virtual void
144-
SetTimeStep(Float dt);
144+
SetTimeStep(Float itkNotUsed(dt))
145+
{}
145146

146147
/** Returns the Solution for the specified nodal point. */
147148
Float

Modules/Numerics/FEM/include/itkFEMSolver.hxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ Solver<VDimension>::GetTimeStep() const -> Float
107107
return Float{};
108108
}
109109

110-
template <unsigned int VDimension>
111-
void
112-
Solver<VDimension>::SetTimeStep(Float itkNotUsed(dt))
113-
{}
114-
115110
template <unsigned int VDimension>
116111
auto
117112
Solver<VDimension>::GetSolution(unsigned int i, unsigned int which) -> Float

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,15 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationAdvectionTerm : public LevelSetEquatio
118118

119119
/** \todo to be documented. */
120120
void
121-
Initialize(const LevelSetInputIndexType &) override;
121+
Initialize(const LevelSetInputIndexType &) override
122+
{}
122123

123124
/** Supply updates at pixels to keep the term parameters always updated */
124125
void
125-
UpdatePixel(const LevelSetInputIndexType & iP,
126-
const LevelSetOutputRealType & oldValue,
127-
const LevelSetOutputRealType & newValue) override;
126+
UpdatePixel(const LevelSetInputIndexType & itkNotUsed(iP),
127+
const LevelSetOutputRealType & itkNotUsed(oldValue),
128+
const LevelSetOutputRealType & itkNotUsed(newValue)) override
129+
{}
128130

129131
protected:
130132
LevelSetEquationAdvectionTerm();

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationAdvectionTerm.hxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -118,19 +118,6 @@ LevelSetEquationAdvectionTerm<TInput, TLevelSetContainer>::GenerateAdvectionImag
118118
}
119119
}
120120

121-
template <typename TInput, typename TLevelSetContainer>
122-
void
123-
LevelSetEquationAdvectionTerm<TInput, TLevelSetContainer>::Initialize(const LevelSetInputIndexType &)
124-
{}
125-
126-
template <typename TInput, typename TLevelSetContainer>
127-
void
128-
LevelSetEquationAdvectionTerm<TInput, TLevelSetContainer>::UpdatePixel(
129-
const LevelSetInputIndexType & itkNotUsed(iP),
130-
const LevelSetOutputRealType & itkNotUsed(oldValue),
131-
const LevelSetOutputRealType & itkNotUsed(newValue))
132-
{}
133-
134121
template <typename TInput, typename TLevelSetContainer>
135122
auto
136123
LevelSetEquationAdvectionTerm<TInput, TLevelSetContainer>::AdvectionSpeed(const LevelSetInputIndexType & iP) const

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationBinaryMaskTerm : public LevelSetEquati
9494

9595
/** Initialize term parameters in the dense case by computing for each pixel location */
9696
void
97-
Initialize(const LevelSetInputIndexType & iP) override;
97+
Initialize(const LevelSetInputIndexType & itkNotUsed(iP)) override
98+
{}
9899

99100
/** Supply updates at pixels to keep the term parameters always updated */
100101
void
101-
UpdatePixel(const LevelSetInputIndexType & iP,
102-
const LevelSetOutputRealType & oldValue,
103-
const LevelSetOutputRealType & newValue) override;
102+
UpdatePixel(const LevelSetInputIndexType & itkNotUsed(iP),
103+
const LevelSetOutputRealType & itkNotUsed(oldValue),
104+
const LevelSetOutputRealType & itkNotUsed(newValue)) override
105+
{}
104106

105107
protected:
106108
LevelSetEquationBinaryMaskTerm();

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationBinaryMaskTerm.hxx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,6 @@ LevelSetEquationBinaryMaskTerm<TInput, TLevelSetContainer>::InitializeParameters
3838
}
3939

4040

41-
template <typename TInput, typename TLevelSetContainer>
42-
void
43-
LevelSetEquationBinaryMaskTerm<TInput, TLevelSetContainer>::Initialize(const LevelSetInputIndexType & itkNotUsed(index))
44-
{}
45-
46-
47-
template <typename TInput, typename TLevelSetContainer>
48-
void
49-
LevelSetEquationBinaryMaskTerm<TInput, TLevelSetContainer>::UpdatePixel(
50-
const LevelSetInputIndexType & itkNotUsed(index),
51-
const LevelSetOutputRealType & itkNotUsed(oldValue),
52-
const LevelSetOutputRealType & itkNotUsed(newValue))
53-
{}
54-
5541
template <typename TInput, typename TLevelSetContainer>
5642
auto
5743
LevelSetEquationBinaryMaskTerm<TInput, TLevelSetContainer>::Value(const LevelSetInputIndexType & index)

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,15 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationCurvatureTerm : public LevelSetEquatio
117117

118118
/** Initialize term parameters in the dense case by computing for each pixel location */
119119
void
120-
Initialize(const LevelSetInputIndexType &) override;
120+
Initialize(const LevelSetInputIndexType &) override
121+
{}
121122

122123
/** Supply updates at pixels to keep the term parameters always updated */
123124
void
124-
UpdatePixel(const LevelSetInputIndexType & iP,
125-
const LevelSetOutputRealType & oldValue,
126-
const LevelSetOutputRealType & newValue) override;
125+
UpdatePixel(const LevelSetInputIndexType & itkNotUsed(iP),
126+
const LevelSetOutputRealType & itkNotUsed(oldValue),
127+
const LevelSetOutputRealType & itkNotUsed(newValue)) override
128+
{}
127129

128130
protected:
129131
LevelSetEquationCurvatureTerm();

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationCurvatureTerm.hxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,6 @@ LevelSetEquationCurvatureTerm<TInput, TLevelSetContainer, TCurvatureImage>::Init
7676
}
7777
}
7878

79-
template <typename TInput, typename TLevelSetContainer, typename TCurvatureImage>
80-
void
81-
LevelSetEquationCurvatureTerm<TInput, TLevelSetContainer, TCurvatureImage>::Initialize(const LevelSetInputIndexType &)
82-
{}
83-
84-
template <typename TInput, typename TLevelSetContainer, typename TCurvatureImage>
85-
void
86-
LevelSetEquationCurvatureTerm<TInput, TLevelSetContainer, TCurvatureImage>::UpdatePixel(
87-
const LevelSetInputIndexType & itkNotUsed(iP),
88-
const LevelSetOutputRealType & itkNotUsed(oldValue),
89-
const LevelSetOutputRealType & itkNotUsed(newValue))
90-
{}
91-
9279
template <typename TInput, typename TLevelSetContainer, typename TCurvatureImage>
9380
auto
9481
LevelSetEquationCurvatureTerm<TInput, TLevelSetContainer, TCurvatureImage>::Value(const LevelSetInputIndexType & iP)

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,15 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationLaplacianTerm : public LevelSetEquatio
101101

102102
/** \todo to be documented. */
103103
void
104-
Initialize(const LevelSetInputIndexType &) override;
104+
Initialize(const LevelSetInputIndexType &) override
105+
{}
105106

106107
/** Supply updates at pixels to keep the term parameters always updated */
107108
void
108-
UpdatePixel(const LevelSetInputIndexType & iP,
109-
const LevelSetOutputRealType & oldValue,
110-
const LevelSetOutputRealType & newValue) override;
109+
UpdatePixel(const LevelSetInputIndexType & itkNotUsed(iP),
110+
const LevelSetOutputRealType & itkNotUsed(oldValue),
111+
const LevelSetOutputRealType & itkNotUsed(newValue)) override
112+
{}
111113

112114
protected:
113115
LevelSetEquationLaplacianTerm();

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationLaplacianTerm.hxx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,6 @@ LevelSetEquationLaplacianTerm<TInput, TLevelSetContainer>::InitializeParameters(
3636
this->SetUp();
3737
}
3838

39-
template <typename TInput, typename TLevelSetContainer>
40-
void
41-
LevelSetEquationLaplacianTerm<TInput, TLevelSetContainer>::Initialize(const LevelSetInputIndexType &)
42-
{}
43-
44-
template <typename TInput, typename TLevelSetContainer>
45-
void
46-
LevelSetEquationLaplacianTerm<TInput, TLevelSetContainer>::UpdatePixel(
47-
const LevelSetInputIndexType & itkNotUsed(iP),
48-
const LevelSetOutputRealType & itkNotUsed(oldValue),
49-
const LevelSetOutputRealType & itkNotUsed(newValue))
50-
{}
51-
5239
template <typename TInput, typename TLevelSetContainer>
5340
auto
5441
LevelSetEquationLaplacianTerm<TInput, TLevelSetContainer>::LaplacianSpeed(

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationOverlapPenaltyTerm
103103

104104
/** Initialize term parameters in the dense case by computing for each pixel location */
105105
void
106-
Initialize(const LevelSetInputIndexType & index) override;
106+
Initialize(const LevelSetInputIndexType & itkNotUsed(index)) override
107+
{}
107108

108109
/** Compute the sum of Heaviside functions in the multi-levelset cases
109110
* except the current levelset */
@@ -112,9 +113,10 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationOverlapPenaltyTerm
112113

113114
/** Supply updates at pixels to keep the term parameters always updated */
114115
void
115-
UpdatePixel(const LevelSetInputIndexType & index,
116-
const LevelSetOutputRealType & oldValue,
117-
const LevelSetOutputRealType & newValue) override;
116+
UpdatePixel(const LevelSetInputIndexType & itkNotUsed(index),
117+
const LevelSetOutputRealType & itkNotUsed(oldValue),
118+
const LevelSetOutputRealType & itkNotUsed(newValue)) override
119+
{}
118120

119121

120122
protected:

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationOverlapPenaltyTerm.hxx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@ LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::LevelSetEquation
3232
this->m_CacheImage = nullptr;
3333
}
3434

35-
template <typename TInput, typename TLevelSetContainer>
36-
void
37-
LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::UpdatePixel(
38-
const LevelSetInputIndexType & itkNotUsed(index),
39-
const LevelSetOutputRealType & itkNotUsed(oldValue),
40-
const LevelSetOutputRealType & itkNotUsed(newValue))
41-
{}
42-
4335
template <typename TInput, typename TLevelSetContainer>
4436
void
4537
LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::InitializeParameters()
@@ -48,12 +40,6 @@ LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::InitializeParame
4840
}
4941

5042

51-
template <typename TInput, typename TLevelSetContainer>
52-
void
53-
LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::Initialize(
54-
const LevelSetInputIndexType & itkNotUsed(index))
55-
{}
56-
5743
template <typename TInput, typename TLevelSetContainer>
5844
auto
5945
LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::Value(const LevelSetInputIndexType & index)

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,15 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationPropagationTerm : public LevelSetEquat
111111

112112
/** \todo to be documented. */
113113
void
114-
Initialize(const LevelSetInputIndexType &) override;
114+
Initialize(const LevelSetInputIndexType &) override
115+
{}
115116

116117
/** Supply updates at pixels to keep the term parameters always updated */
117118
void
118-
UpdatePixel(const LevelSetInputIndexType & iP,
119-
const LevelSetOutputRealType & oldValue,
120-
const LevelSetOutputRealType & newValue) override;
119+
UpdatePixel(const LevelSetInputIndexType & itkNotUsed(iP),
120+
const LevelSetOutputRealType & itkNotUsed(oldValue),
121+
const LevelSetOutputRealType & itkNotUsed(newValue)) override
122+
{}
121123

122124
protected:
123125
LevelSetEquationPropagationTerm();

Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationPropagationTerm.hxx

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,6 @@ LevelSetEquationPropagationTerm<TInput, TLevelSetContainer, TPropagationImage>::
4848
}
4949
}
5050

51-
template <typename TInput, typename TLevelSetContainer, typename TPropagationImage>
52-
void
53-
LevelSetEquationPropagationTerm<TInput, TLevelSetContainer, TPropagationImage>::Initialize(
54-
const LevelSetInputIndexType &)
55-
{}
56-
57-
template <typename TInput, typename TLevelSetContainer, typename TPropagationImage>
58-
void
59-
LevelSetEquationPropagationTerm<TInput, TLevelSetContainer, TPropagationImage>::UpdatePixel(
60-
const LevelSetInputIndexType & itkNotUsed(iP),
61-
const LevelSetOutputRealType & itkNotUsed(oldValue),
62-
const LevelSetOutputRealType & itkNotUsed(newValue))
63-
{}
64-
6551
template <typename TInput, typename TLevelSetContainer, typename TPropagationImage>
6652
auto
6753
LevelSetEquationPropagationTerm<TInput, TLevelSetContainer, TPropagationImage>::PropagationSpeed(

Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ class ITK_TEMPLATE_EXPORT BoundaryResolver : public ProcessObject
154154

155155
unsigned short m_Face{ 0 };
156156
void
157-
GenerateOutputRequestedRegion(DataObject * output) override;
157+
GenerateOutputRequestedRegion(DataObject * itkNotUsed(output)) override
158+
{}
158159
};
159160
} // end namespace watershed
160161
} // end namespace itk

Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.hxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ BoundaryResolver<TPixelType, TDimension>::GenerateData()
8989
// ------------------------------------------------------------
9090
// --------------------PIPELINE METHODS------------------------
9191
// ------------------------------------------------------------
92-
template <typename TPixelType, unsigned int TDimension>
93-
void
94-
BoundaryResolver<TPixelType, TDimension>::GenerateOutputRequestedRegion(DataObject *)
95-
{}
96-
9792
template <typename TPixelType, unsigned int TDimension>
9893
typename BoundaryResolver<TPixelType, TDimension>::DataObjectPointer
9994
BoundaryResolver<TPixelType, TDimension>::MakeOutput(DataObjectPointerArraySizeType)

Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ class ITK_TEMPLATE_EXPORT SegmentTreeGenerator : public ProcessObject
219219

220220
/** Methods required by the itk pipeline */
221221
void
222-
GenerateOutputRequestedRegion(DataObject * output) override;
222+
GenerateOutputRequestedRegion(DataObject * itkNotUsed(output)) override
223+
{}
223224

224225
void
225226
GenerateInputRequestedRegion() override;

Modules/Segmentation/Watersheds/include/itkWatershedSegmentTreeGenerator.hxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,6 @@ SegmentTreeGenerator<TScalar>::MergeSegments(SegmentTableTypePointer s
552552
eqT->Add(FROM, TO);
553553
}
554554

555-
template <typename TScalar>
556-
void
557-
SegmentTreeGenerator<TScalar>::GenerateOutputRequestedRegion(DataObject * itkNotUsed(output))
558-
{}
559-
560555
template <typename TScalar>
561556
void
562557
SegmentTreeGenerator<TScalar>::GenerateInputRequestedRegion()

0 commit comments

Comments
 (0)