Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move empty member function definitions from "itk*.hxx" to "itk*.h" #5198

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Modules/Core/Common/include/itkMapContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ class ITK_TEMPLATE_EXPORT MapContainer
* memory usage.
*/
void
Squeeze();
Squeeze()
{}

/**
* Tell the container to release any memory it may have allocated and
Expand Down
10 changes: 0 additions & 10 deletions Modules/Core/Common/include/itkMapContainer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,6 @@ MapContainer<TElementIdentifier, TElement>::Reserve(ElementIdentifier sz)
}
}

/**
* Tell the container to try to minimize its memory usage for storage of
* the current number of elements. This is NOT guaranteed to decrease
* memory usage.
*/
template <typename TElementIdentifier, typename TElement>
void
MapContainer<TElementIdentifier, TElement>::Squeeze()
{}

/**
* Tell the container to release any memory it may have allocated and
* return itself to its initial state.
Expand Down
2 changes: 1 addition & 1 deletion Modules/Core/Common/include/itkPyImageFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ITK_TEMPLATE_EXPORT PyImageFilter : public ImageToImageFilter<TInputImage,
}

protected:
PyImageFilter();
PyImageFilter() = default;
~PyImageFilter() override;

void
Expand Down
4 changes: 0 additions & 4 deletions Modules/Core/Common/include/itkPyImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
namespace itk
{

template <class TInputImage, class TOutputImage>
PyImageFilter<TInputImage, TOutputImage>::PyImageFilter()
{}

template <class TInputImage, class TOutputImage>
PyImageFilter<TInputImage, TOutputImage>::~PyImageFilter()
{
Expand Down
3 changes: 2 additions & 1 deletion Modules/Core/Common/include/itkVectorContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ class ITK_TEMPLATE_EXPORT VectorContainer
* with other containers in the toolkit.
*/
void
Squeeze();
Squeeze()
{}

/**
* Clear the elements. The final size will be zero.
Expand Down
5 changes: 0 additions & 5 deletions Modules/Core/Common/include/itkVectorContainer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,6 @@ VectorContainer<TElementIdentifier, TElement>::Reserve(ElementIdentifier sz)
{
this->CreateIndex(sz - 1);
}

template <typename TElementIdentifier, typename TElement>
void
VectorContainer<TElementIdentifier, TElement>::Squeeze()
{}
} // namespace itk::detail

#endif
5 changes: 3 additions & 2 deletions Modules/Core/Mesh/include/itkImageToMeshFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ class ITK_TEMPLATE_EXPORT ImageToMeshFilter : public MeshSource<TOutputMesh>
OutputMeshType *
GetOutput();

/** Prepare the output */
/** Prepare the output. This is a void implementation to prevent the ProcessObject version to be called. */
void
GenerateOutputInformation() override;
GenerateOutputInformation() override
{}

protected:
ImageToMeshFilter();
Expand Down
9 changes: 0 additions & 9 deletions Modules/Core/Mesh/include/itkImageToMeshFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ ImageToMeshFilter<TInputImage, TOutputMesh>::GetOutput() -> OutputMeshType *
return dynamic_cast<OutputMeshType *>(this->ProcessObject::GetOutput(0));
}

/**
* copy information from first input to all outputs
* This is a void implementation to prevent the
* ProcessObject version to be called
*/
template <typename TInputImage, typename TOutputMesh>
void
ImageToMeshFilter<TInputImage, TOutputMesh>::GenerateOutputInformation()
{}
} // end namespace itk

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,8 @@ class ITK_TEMPLATE_EXPORT PatchBasedDenoisingImageFilter
ThreadedApplyUpdate(const InputImageRegionType & regionToProcess, const int itkNotUsed(threadId));

void
PostProcessOutput() override;
PostProcessOutput() override
{}

virtual void
SetThreadData(int threadId, const ThreadDataStruct & data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2332,11 +2332,6 @@ PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>::ComputeGradientJointE
return gradientJointEntropy;
}

template <typename TInputImage, typename TOutputImage>
void
PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>::PostProcessOutput()
{}

template <typename TInputImage, typename TOutputImage>
void
PatchBasedDenoisingImageFilter<TInputImage, TOutputImage>::PrintSelf(std::ostream & os, Indent indent) const
Expand Down
3 changes: 2 additions & 1 deletion Modules/Numerics/FEM/include/itkFEMSolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ class ITK_TEMPLATE_EXPORT Solver : public ProcessObject

/** Decompose matrix using svd, qr, etc. if needed. */
void
DecomposeK();
DecomposeK()
{}

/** Solve for the displacement vector u. May be overridden in derived
* classes. */
Expand Down
5 changes: 0 additions & 5 deletions Modules/Numerics/FEM/include/itkFEMSolver.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -517,11 +517,6 @@ Solver<VDimension>::AssembleF(int dim)
}
}

template <unsigned int VDimension>
void
Solver<VDimension>::DecomposeK()
{}

template <unsigned int VDimension>
void
Solver<VDimension>::RunSolver()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ class ITK_TEMPLATE_EXPORT NarrowBandImageFilterBase : public FiniteDifferenceIma
/** This method allows deallocation of data and further post processing
*/
void
PostProcessOutput() override;
PostProcessOutput() override
{}

/* This function clears all pixels from the narrow band */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,6 @@ NarrowBandImageFilterBase<TInputImage, TOutputImage>::ThreadedCalculateChange(co
return timeStep;
}

template <typename TInputImage, typename TOutputImage>
void
NarrowBandImageFilterBase<TInputImage, TOutputImage>::PostProcessOutput()
{}

template <typename TInputImage, typename TOutputImage>
void
NarrowBandImageFilterBase<TInputImage, TOutputImage>::GetSplitRegion(const size_t & i, ThreadRegionType & splitRegion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ class ITK_TEMPLATE_EXPORT BinaryMaskToNarrowBandPointSetFilter : public ImageToM

/** Some type alias associated with the output mesh. */
void
GenerateOutputInformation() override;
GenerateOutputInformation() override
{}

private:
DistanceFilterPointer m_DistanceFilter{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ BinaryMaskToNarrowBandPointSetFilter<TInputImage, TOutputMesh>::PrintSelf(std::o
os << indent << "BandWidth: " << m_BandWidth << std::endl;
}

/**
*
*/
template <typename TInputImage, typename TOutputMesh>
void
BinaryMaskToNarrowBandPointSetFilter<TInputImage, TOutputMesh>::GenerateOutputInformation()
{}

/**
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ class ITK_TEMPLATE_EXPORT LevelSetDomainPartitionMesh : public LevelSetDomainPar
/** Allocate a list mesh with each node being a list of overlapping
* level set support at that pixel */
void
AllocateListDomain();
AllocateListDomain()
{}

private:
MeshPointer m_Mesh{};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@ LevelSetDomainPartitionMesh<TMesh>::PopulateListDomain()
}
}

template <typename TMesh>
void
LevelSetDomainPartitionMesh<TMesh>::AllocateListDomain()
{}

} // end namespace itk

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationAdvectionTerm : public LevelSetEquatio

/** \todo to be documented. */
void
Update() override;
Update() override
{}

/** Initialize the parameters in the terms prior to an iteration */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ void
LevelSetEquationAdvectionTerm<TInput, TLevelSetContainer>::Initialize(const LevelSetInputIndexType &)
{}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationAdvectionTerm<TInput, TLevelSetContainer>::Update()
{}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationAdvectionTerm<TInput, TLevelSetContainer>::UpdatePixel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationBinaryMaskTerm : public LevelSetEquati

/** Update the term parameter values at end of iteration */
void
Update() override;
Update() override
{}

/** Initialize parameters in the terms prior to an iteration */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ LevelSetEquationBinaryMaskTerm<TInput, TLevelSetContainer>::LevelSetEquationBina
this->m_RequiredData.insert("Value");
}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationBinaryMaskTerm<TInput, TLevelSetContainer>::Update()
{}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationBinaryMaskTerm<TInput, TLevelSetContainer>::InitializeParameters()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationCurvatureTerm : public LevelSetEquatio

/** Update the term parameter values at end of iteration */
void
Update() override;
Update() override
{}

/** Initialize the parameters in the terms prior to an iteration */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ void
LevelSetEquationCurvatureTerm<TInput, TLevelSetContainer, TCurvatureImage>::Initialize(const LevelSetInputIndexType &)
{}

template <typename TInput, typename TLevelSetContainer, typename TCurvatureImage>
void
LevelSetEquationCurvatureTerm<TInput, TLevelSetContainer, TCurvatureImage>::Update()
{}

template <typename TInput, typename TLevelSetContainer, typename TCurvatureImage>
void
LevelSetEquationCurvatureTerm<TInput, TLevelSetContainer, TCurvatureImage>::UpdatePixel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationLaplacianTerm : public LevelSetEquatio

/** Update the term parameter values at end of iteration */
void
Update() override;
Update() override
{}

/** Initialize the parameters in the terms prior to an iteration */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ void
LevelSetEquationLaplacianTerm<TInput, TLevelSetContainer>::Initialize(const LevelSetInputIndexType &)
{}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationLaplacianTerm<TInput, TLevelSetContainer>::Update()
{}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationLaplacianTerm<TInput, TLevelSetContainer>::UpdatePixel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationOverlapPenaltyTerm

/** Update the term parameter values at end of iteration */
void
Update() override;
Update() override
{}

/** Initialize parameters in the terms prior to an iteration */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::LevelSetEquation
this->m_CacheImage = nullptr;
}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::Update()
{}

template <typename TInput, typename TLevelSetContainer>
void
LevelSetEquationOverlapPenaltyTerm<TInput, TLevelSetContainer>::UpdatePixel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationPropagationTerm : public LevelSetEquat

/** \todo to be documented. */
void
Update() override;
Update() override
{}

/** Initialize the parameters in the terms prior to an iteration */
void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ LevelSetEquationPropagationTerm<TInput, TLevelSetContainer, TPropagationImage>::
const LevelSetInputIndexType &)
{}

template <typename TInput, typename TLevelSetContainer, typename TPropagationImage>
void
LevelSetEquationPropagationTerm<TInput, TLevelSetContainer, TPropagationImage>::Update()
{}

template <typename TInput, typename TLevelSetContainer, typename TPropagationImage>
void
LevelSetEquationPropagationTerm<TInput, TLevelSetContainer, TPropagationImage>::UpdatePixel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,16 +140,19 @@ class ITK_TEMPLATE_EXPORT LevelSetEvolutionBase : public Object
/** Initialize the update buffers for all level sets to hold the updates of
* equations in each iteration. No-op by default. */
virtual void
AllocateUpdateBuffer();
AllocateUpdateBuffer()
{}

/** Computer the update at each pixel and store in the update buffer. No-op by
* default. */
virtual void
ComputeIteration();
ComputeIteration()
{}

/** Compute the time-step for the next iteration. No-op by default. */
virtual void
ComputeTimeStepForNextIteration();
ComputeTimeStepForNextIteration()
{}

virtual void
UpdateLevelSets() = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,5 @@ LevelSetEvolutionBase<TEquationContainer, TLevelSet>::Evolve()
}
}

template <typename TEquationContainer, typename TLevelSet>
void
LevelSetEvolutionBase<TEquationContainer, TLevelSet>::AllocateUpdateBuffer()
{}

template <typename TEquationContainer, typename TLevelSet>
void
LevelSetEvolutionBase<TEquationContainer, TLevelSet>::ComputeIteration()
{}

template <typename TEquationContainer, typename TLevelSet>
void
LevelSetEvolutionBase<TEquationContainer, TLevelSet>::ComputeTimeStepForNextIteration()
{}

} // namespace itk
#endif // itkLevelSetEvolutionBase_hxx