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

Update override and virtual function designations." #184

Merged
merged 4 commits into from
Mar 17, 2025
Merged
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
2 changes: 0 additions & 2 deletions .github/workflows/clang-format-linter.yml
Original file line number Diff line number Diff line change
@@ -10,5 +10,3 @@ jobs:
- uses: actions/checkout@v4

- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master
with:
itk-branch: master
3 changes: 2 additions & 1 deletion include/itkTubeTK_fake_library_src.h
Original file line number Diff line number Diff line change
@@ -54,7 +54,8 @@ namespace itk
namespace tube
{

int never_call_this_function(int multiplier)
int
never_call_this_function(int multiplier)
{
// silly function just to prevent having an empty file compiled.
return 1010 * multiplier;
2 changes: 1 addition & 1 deletion src/Common/tubeMacro.h
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@ limitations under the License.

/** Return the name of a class. */
#define tubeTypeMacro(classname) \
virtual const char * GetNameOfClass(void) const override { return #classname; }
const char * GetNameOfClass(void) const override { return #classname; }

/** Return the name of a class. */
#define tubeTypeMacroNoOverride(classname) \
Original file line number Diff line number Diff line change
@@ -135,7 +135,8 @@ class AnisotropicCoherenceEnhancingDiffusionImageFilter
PrintSelf(std::ostream & os, Indent indent) const override;

/** Update diffusion tensor image */
void virtual UpdateDiffusionTensorImage(void) override;
void
UpdateDiffusionTensorImage(void) override;

private:
// purposely not implemented
3 changes: 1 addition & 2 deletions src/Filtering/itktubeAnisotropicDiffusionTensorFunction.h
Original file line number Diff line number Diff line change
@@ -92,8 +92,7 @@ class AnisotropicDiffusionTensorFunction : public FiniteDifferenceFunction<TImag
using ScalarDerivativeImageRegionType = ImageRegionIterator<ScalarDerivativeImageType>;

/** Tensor derivative type alias. */
using TensorDerivativeType =
itk::Matrix<ScalarValueType, Self::ImageDimension, Self::ImageDimension>;
using TensorDerivativeType = itk::Matrix<ScalarValueType, Self::ImageDimension, Self::ImageDimension>;
using TensorDerivativeImageType = itk::Image<TensorDerivativeType, 3>;
using TensorDerivativeImageRegionType = ImageRegionIterator<TensorDerivativeImageType>;

Original file line number Diff line number Diff line change
@@ -135,7 +135,8 @@ class AnisotropicEdgeEnhancementDiffusionImageFilter
PrintSelf(std::ostream & os, Indent indent) const override;

/** Update diffusion tensor image */
void virtual UpdateDiffusionTensorImage(void) override;
void
UpdateDiffusionTensorImage(void) override;

private:
// purposely not implemented
3 changes: 2 additions & 1 deletion src/Filtering/itktubeAnisotropicHybridDiffusionImageFilter.h
Original file line number Diff line number Diff line change
@@ -142,7 +142,8 @@ class AnisotropicHybridDiffusionImageFilter : public AnisotropicDiffusionTensorI
PrintSelf(std::ostream & os, Indent indent) const override;

/** Update diffusion tensor image */
void virtual UpdateDiffusionTensorImage(void) override;
void
UpdateDiffusionTensorImage(void) override;

private:
// purposely not implemented
Original file line number Diff line number Diff line change
@@ -340,7 +340,8 @@ MinimumSpanningTreeVesselConnectivityFilter<ObjectDimension>::RunMinimumSpanning

rootTube->GetModifiableObjectToParentTransform()->SetFixedParameters(
inputRootTube->GetObjectToParentTransform()->GetFixedParameters());
rootTube->GetModifiableObjectToParentTransform()->SetParameters(inputRootTube->GetObjectToParentTransform()->GetParameters());
rootTube->GetModifiableObjectToParentTransform()->SetParameters(
inputRootTube->GetObjectToParentTransform()->GetParameters());
rootTube->Update();

rootTube->ComputeTangentsAndNormals();
3 changes: 1 addition & 2 deletions src/Filtering/itktubeTubeSpatialObjectToDensityImageFilter.h
Original file line number Diff line number Diff line change
@@ -80,8 +80,7 @@ class TubeSpatialObjectToDensityImageFilter : public Object
using SizeType = typename DensityImageType::SizeType;
using SpacingType = typename DensityImageType::SpacingType;

using TubetoImageFilterType =
TubeSpatialObjectToImageFilter<Self::ImageDimension, DensityImageType>;
using TubetoImageFilterType = TubeSpatialObjectToImageFilter<Self::ImageDimension, DensityImageType>;

using DanielssonFilterType = DanielssonDistanceMapImageFilter<DensityImageType, DensityImageType>;

2 changes: 1 addition & 1 deletion src/MetaIO/itktubeMetaClassPDF.cxx
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ MetaClassPDF::PrintInfo(void) const
if (!m_ObjectPDFWeight.empty())
{
std::cout << m_ObjectPDFWeight[0];
for (int i = 1; i < m_ObjectPDFWeight.size(); i++)
for (unsigned long i = 1; i < m_ObjectPDFWeight.size(); i++)
{
std::cout << ", " << m_ObjectPDFWeight[i];
}
34 changes: 17 additions & 17 deletions src/MetaIO/itktubeMetaClassPDF.h
Original file line number Diff line number Diff line change
@@ -85,16 +85,16 @@ class MetaClassPDF : private MetaImage
double _binSizeZ,
float * _elementData = NULL);

~MetaClassPDF(void);
~MetaClassPDF(void) override;

virtual void
PrintInfo(void) const;
void
PrintInfo(void) const override;

virtual void
CopyInfo(const MetaObject * _pdf);
void
CopyInfo(const MetaObject * _pdf) override;

virtual void
Clear(void);
void
Clear(void) override;

virtual bool
InitializeEssential(unsigned int _nFeatures,
@@ -185,30 +185,30 @@ class MetaClassPDF : private MetaImage
virtual bool
CanRead(const char * _headerName = NULL) const;

virtual bool
Read(const char * _headerName = NULL);
bool
Read(const char * _headerName = NULL) override;

virtual bool
CanReadStream(METAIO_STREAM::ifstream * _stream) const;

virtual bool
ReadStream(METAIO_STREAM::ifstream * _stream);

virtual bool
Write(const char * _headerName = NULL);
bool
Write(const char * _headerName = NULL) override;

virtual bool
WriteStream(METAIO_STREAM::ofstream * _stream);

protected:
virtual void
M_SetupReadFields(void);
void
M_SetupReadFields(void) override;

virtual void
M_SetupWriteFields(void);
void
M_SetupWriteFields(void) override;

virtual bool
M_Read(void);
bool
M_Read(void) override;

VectorIntType m_ObjectId;
VectorDoubleType m_ObjectPDFWeight;
16 changes: 8 additions & 8 deletions src/MetaIO/itktubeMetaLDA.h
Original file line number Diff line number Diff line change
@@ -72,17 +72,17 @@ class MetaLDA : public MetaForm
const ValueListType & _outputWhitenMeans,
const ValueListType & _outputWhitenStdDevs);

~MetaLDA(void);
~MetaLDA(void) override;

virtual void
PrintInfo(void) const;
void
PrintInfo(void) const override;

using MetaForm::CopyInfo;
virtual void
CopyInfo(const MetaLDA & lda);

virtual void
Clear(void);
void
Clear(void) override;

bool
InitializeEssential(unsigned int _numberOfPCABasisToUseAsFeatures,
@@ -157,13 +157,13 @@ class MetaLDA : public MetaForm
M_Destroy(void);

void
M_SetupReadFields(void);
M_SetupReadFields(void) override;

void
M_SetupWriteFields(void);
M_SetupWriteFields(void) override;

bool
M_Read(void);
M_Read(void) override;

unsigned int m_NumberOfPCABasisToUseAsFeatures;

40 changes: 20 additions & 20 deletions src/MetaIO/itktubeMetaNJetLDA.h
Original file line number Diff line number Diff line change
@@ -77,17 +77,17 @@ class MetaNJetLDA : public MetaLDA
const ValueListType & _outputWhitenMeans,
const ValueListType & _outputWhitenStdDevs);

~MetaNJetLDA(void);
~MetaNJetLDA(void) override;

virtual void
PrintInfo(void) const;
void
PrintInfo(void) const override;

using MetaLDA::CopyInfo;
virtual void
CopyInfo(const MetaNJetLDA & _lda);

virtual void
Clear(void);
void
Clear(void) override;

bool
InitializeEssential(const NJetScalesType & _zeroScales,
@@ -128,36 +128,36 @@ class MetaNJetLDA : public MetaLDA
const NJetScalesType &
GetRidgeScales(void) const;

virtual bool
CanRead(const char * headerName = NULL) const;
bool
CanRead(const char * headerName = NULL) const override;

virtual bool
Read(const char * headerName = NULL);
bool
Read(const char * headerName = NULL) override;

virtual bool
CanReadStream(METAIO_STREAM::ifstream * stream) const;
bool
CanReadStream(METAIO_STREAM::ifstream * stream) const override;

virtual bool
ReadStream(METAIO_STREAM::ifstream * stream);
bool
ReadStream(METAIO_STREAM::ifstream * stream) override;

virtual bool
Write(const char * headerName = NULL);
bool
Write(const char * headerName = NULL) override;

virtual bool
WriteStream(METAIO_STREAM::ofstream * stream);
bool
WriteStream(METAIO_STREAM::ofstream * stream) override;

protected:
void
M_Destroy(void);

void
M_SetupReadFields(void);
M_SetupReadFields(void) override;

void
M_SetupWriteFields(void);
M_SetupWriteFields(void) override;

bool
M_Read(void);
M_Read(void) override;

NJetScalesType m_ZeroScales;
NJetScalesType m_FirstScales;
40 changes: 20 additions & 20 deletions src/MetaIO/itktubeMetaRidgeSeed.h
Original file line number Diff line number Diff line change
@@ -77,17 +77,17 @@ class MetaRidgeSeed : public MetaLDA
const ValueListType & _outputWhitenStdDevs,
const std::string & _pdfFileName);

~MetaRidgeSeed(void);
~MetaRidgeSeed(void) override;

virtual void
PrintInfo(void) const;
void
PrintInfo(void) const override;

using MetaLDA::CopyInfo;
virtual void
CopyInfo(const MetaRidgeSeed & _lda);

virtual void
Clear(void);
void
Clear(void) override;

bool
InitializeEssential(const RidgeSeedScalesType & _ridgeScales,
@@ -146,36 +146,36 @@ class MetaRidgeSeed : public MetaLDA
bool
GetSkeletonize(void) const;

virtual bool
CanRead(const char * _headerName = NULL) const;
bool
CanRead(const char * _headerName = NULL) const override;

virtual bool
Read(const char * _headerName = NULL);
bool
Read(const char * _headerName = NULL) override;

virtual bool
CanReadStream(METAIO_STREAM::ifstream * _stream) const;
bool
CanReadStream(METAIO_STREAM::ifstream * _stream) const override;

virtual bool
ReadStream(METAIO_STREAM::ifstream * _stream);
bool
ReadStream(METAIO_STREAM::ifstream * _stream) override;

virtual bool
Write(const char * _headName = NULL);
bool
Write(const char * _headName = NULL) override;

virtual bool
WriteStream(METAIO_STREAM::ofstream * _stream);
bool
WriteStream(METAIO_STREAM::ofstream * _stream) override;

protected:
void
M_Destroy(void);

void
M_SetupReadFields(void);
M_SetupReadFields(void) override;

void
M_SetupWriteFields(void);
M_SetupWriteFields(void) override;

bool
M_Read(void);
M_Read(void) override;

bool m_UseIntensityOnly;
bool m_UseFeatureMath;
16 changes: 8 additions & 8 deletions src/MetaIO/itktubeMetaTubeExtractor.h
Original file line number Diff line number Diff line change
@@ -64,10 +64,10 @@ class MetaTubeExtractor : public MetaForm

MetaTubeExtractor(const MetaTubeExtractor & _metaTubeExtractor);

~MetaTubeExtractor(void);
~MetaTubeExtractor(void) override;

virtual void
PrintInfo(void) const;
void
PrintInfo(void) const override;

void
SetGeneralProperties(double _dataMin, double _dataMax, const VectorType & _tubeColor);
@@ -153,8 +153,8 @@ class MetaTubeExtractor : public MetaForm
virtual void
CopyInfo(const MetaTubeExtractor & _tubeExtractor);

virtual void
Clear(void);
void
Clear(void) override;

bool
InitializeEssential(void);
@@ -180,13 +180,13 @@ class MetaTubeExtractor : public MetaForm
M_Destroy(void);

void
M_SetupReadFields(void);
M_SetupReadFields(void) override;

void
M_SetupWriteFields(void);
M_SetupWriteFields(void) override;

bool
M_Read(void);
M_Read(void) override;

double m_DataMin;
double m_DataMax;
2 changes: 1 addition & 1 deletion src/Numerics/tubeBrentOptimizer1D.h
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ class BrentOptimizer1D : public Optimizer1D
BrentOptimizer1D(ValueFunctionType::Pointer funcVal, DerivativeFunctionType::Pointer funcDeriv);

/** Destructor. */
~BrentOptimizer1D(void);
~BrentOptimizer1D(void) override;

tubeGetMacro(Epsilon, double);

Loading