Skip to content

Commit 3d0fd19

Browse files
authored
Merge pull request #76 from hjmjohnson/sync-clang-format
STYLE: Update clang-format to match ITK 2025-11-10
2 parents 73cf772 + aa507a5 commit 3d0fd19

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

.clang-format

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## This config file is only relevant for clang-format version 19.1.4
1+
## This config file is only relevant for clang-format version 19.1.7
22
##
33
## Examples of each format style can be found on the in the clang-format documentation
44
## See: https://clang.llvm.org/docs/ClangFormatStyleOptions.html for details of each option
@@ -10,11 +10,11 @@
1010
## maintaining a consistent code style.
1111
##
1212
## EXAMPLE apply code style enforcement before commit:
13-
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --modified
13+
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.7} --modified
1414
## EXAMPLE apply code style enforcement after commit:
15-
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --last
15+
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.7} --last
1616
---
17-
# This configuration requires clang-format version 19.1.4 exactly.
17+
# This configuration requires clang-format version 19.1.7 exactly.
1818
Language: Cpp
1919
AccessModifierOffset: -2
2020
AlignAfterOpenBracket: Align
@@ -297,6 +297,7 @@ StatementMacros:
297297
- ITK_CLANG_PRAGMA_PUSH
298298
- ITK_CLANG_PRAGMA_POP
299299
- ITK_CLANG_SUPPRESS_Wzero_as_null_pointer_constant
300+
- ITK_CLANG_SUPPRESS_Wduplicate_enum
300301
- CLANG_PRAGMA_PUSH
301302
- CLANG_PRAGMA_POP
302303
- CLANG_SUPPRESS_Wfloat_equal

.github/workflows/clang-format-linter.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v5
1919

20-
- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master
20+
- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@main
2121
with:
22-
itk-branch: master
22+
itk-branch: main

include/itkCleaverImageToMeshFilter.h

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ class CleaverImageToMeshFilter : public ImageToMeshFilter<TInputImage, TOutputMe
7272
itkSetMacro(Sigma, double);
7373
itkGetConstMacro(Sigma, double);
7474

75-
/** Sizing field sampling rate. The sampling rate of the input indicator functions or calculated indicator functions from segmentation files.
76-
* The default sample rate will be the dimensions of the volume. Smaller sampling creates coarser meshes.
77-
* Adjusting this parameter will also affect Cleaver’s runtime, with smaller values running faster. */
75+
/** Sizing field sampling rate. The sampling rate of the input indicator functions or calculated indicator functions
76+
* from segmentation files. The default sample rate will be the dimensions of the volume. Smaller sampling creates
77+
* coarser meshes. Adjusting this parameter will also affect Cleaver’s runtime, with smaller values running faster. */
7878
itkSetMacro(SamplingRate, double);
7979
itkGetConstMacro(SamplingRate, double);
8080

@@ -84,7 +84,8 @@ class CleaverImageToMeshFilter : public ImageToMeshFilter<TInputImage, TOutputMe
8484
itkSetMacro(Lipschitz, double);
8585
itkGetConstMacro(Lipschitz, double);
8686

87-
/** Sizing field feature scaling. Scales features of the mesh effecting element size. Higher feature scaling creates coaser meshes. */
87+
/** Sizing field feature scaling. Scales features of the mesh effecting element size. Higher feature scaling creates
88+
* coaser meshes. */
8889
itkSetMacro(FeatureScaling, double);
8990
itkGetConstMacro(FeatureScaling, double);
9091

@@ -106,20 +107,22 @@ class CleaverImageToMeshFilter : public ImageToMeshFilter<TInputImage, TOutputMe
106107
CleaverImageToMeshFilter();
107108
~CleaverImageToMeshFilter() override = default;
108109

109-
void PrintSelf(std::ostream & os, Indent indent) const override;
110+
void
111+
PrintSelf(std::ostream & os, Indent indent) const override;
110112

111113
using OutputRegionType = typename OutputMeshType::RegionType;
112114

113-
void GenerateData() override;
115+
void
116+
GenerateData() override;
114117

115118
private:
116-
bool m_InputIsIndicatorFunction{false};
117-
double m_Alpha{0.4};
118-
double m_SamplingRate{1.0};
119-
double m_Lipschitz{0.2};
120-
double m_FeatureScaling{1.0};
121-
int m_Padding{0};
122-
double m_Sigma{1.0};
119+
bool m_InputIsIndicatorFunction{ false };
120+
double m_Alpha{ 0.4 };
121+
double m_SamplingRate{ 1.0 };
122+
double m_Lipschitz{ 0.2 };
123+
double m_FeatureScaling{ 1.0 };
124+
int m_Padding{ 0 };
125+
double m_Sigma{ 1.0 };
123126
};
124127
} // namespace itk
125128

0 commit comments

Comments
 (0)