From 366304eddc4e04cbfffc1f2ba388db6d87e0455f Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 26 Jan 2025 08:58:15 -0600 Subject: [PATCH 1/7] STYLE: Add itkVirtualGetNameOfClassMacro + itkOverrideGetNameOfClassMacro Added two new macro's, intended to replace the old 'itkTypeMacro' and 'itkTypeMacroNoParent'. The main aim is to be clearer about what those macro's do: add a virtual 'GetNameOfClass()' member function and override it. Unlike 'itkTypeMacro', 'itkOverrideGetNameOfClassMacro' does not have a 'superclass' parameter, as it was not used anyway. Note that originally 'itkTypeMacro' did not use its 'superclass' parameter either, looking at commit 699b66cb04d410e555656828e8892107add38ccb, Will Schroeder, June 27, 2001: https://github.com/InsightSoftwareConsortium/ITK/blob/699b66cb04d410e555656828e8892107add38ccb/Code/Common/itkMacro.h#L331-L337 --- include/itkLandmarkAtlasSegmentationFilter.h | 2 +- include/itkSegmentBonesInMicroCTFilter.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/itkLandmarkAtlasSegmentationFilter.h b/include/itkLandmarkAtlasSegmentationFilter.h index c66188d..bb7e4da 100644 --- a/include/itkLandmarkAtlasSegmentationFilter.h +++ b/include/itkLandmarkAtlasSegmentationFilter.h @@ -57,7 +57,7 @@ class LandmarkAtlasSegmentationFilter : public ImageToImageFilter; /** Run-time type information. */ - itkTypeMacro(LandmarkAtlasSegmentationFilter, ImageToImageFilter); + itkOverrideGetNameOfClassMacro(LandmarkAtlasSegmentationFilter); /** Standard New macro. */ itkNewMacro(Self); diff --git a/include/itkSegmentBonesInMicroCTFilter.h b/include/itkSegmentBonesInMicroCTFilter.h index fb5e6e0..bc5b370 100644 --- a/include/itkSegmentBonesInMicroCTFilter.h +++ b/include/itkSegmentBonesInMicroCTFilter.h @@ -56,7 +56,7 @@ class SegmentBonesInMicroCTFilter : public ImageToImageFilter; /** Run-time type information. */ - itkTypeMacro(SegmentBonesInMicroCTFilter, ImageToImageFilter); + itkOverrideGetNameOfClassMacro(SegmentBonesInMicroCTFilter); /** Standard New macro. */ itkNewMacro(Self); From 9d1bf10ac36f550302d17420a861ea3a4b612516 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 26 Jan 2025 09:16:40 -0600 Subject: [PATCH 2/7] STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Clarifies that the macro does not just disallow copy and assign, but also move operations. Note that in this context, the term 'move' refers to both move-construct and move-assign. With this commit, the old macro name will remain available, as long as 'ITK_FUTURE_LEGACY_REMOVE = OFF' (which is the default). --- include/itkLandmarkAtlasSegmentationFilter.h | 2 +- include/itkSegmentBonesInMicroCTFilter.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/itkLandmarkAtlasSegmentationFilter.h b/include/itkLandmarkAtlasSegmentationFilter.h index bb7e4da..d9da1fc 100644 --- a/include/itkLandmarkAtlasSegmentationFilter.h +++ b/include/itkLandmarkAtlasSegmentationFilter.h @@ -41,7 +41,7 @@ template class LandmarkAtlasSegmentationFilter : public ImageToImageFilter { public: - ITK_DISALLOW_COPY_AND_ASSIGN(LandmarkAtlasSegmentationFilter); + ITK_DISALLOW_COPY_AND_MOVE(LandmarkAtlasSegmentationFilter); static constexpr unsigned Dimension = TInputImage::ImageDimension; diff --git a/include/itkSegmentBonesInMicroCTFilter.h b/include/itkSegmentBonesInMicroCTFilter.h index bc5b370..674d864 100644 --- a/include/itkSegmentBonesInMicroCTFilter.h +++ b/include/itkSegmentBonesInMicroCTFilter.h @@ -42,7 +42,7 @@ template class SegmentBonesInMicroCTFilter : public ImageToImageFilter { public: - ITK_DISALLOW_COPY_AND_ASSIGN(SegmentBonesInMicroCTFilter); + ITK_DISALLOW_COPY_AND_MOVE(SegmentBonesInMicroCTFilter); using InputImageType = TInputImage; using OutputImageType = TOutputImage; From 7d1bbfede1b83bcd3ec8cf60ce95c18bf57f395f Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 27 Jan 2025 17:53:48 -0600 Subject: [PATCH 3/7] STYLE: Update to match clang-format-19 from ITK --- .clang-format | 251 +++++++++++++++--- examples/normalizedPoseMesh.cxx | 6 +- include/itkLandmarkAtlasSegmentationFilter.h | 2 +- .../itkLandmarkAtlasSegmentationFilter.hxx | 2 +- ...itkLandmarkAtlasSegmentationFilterTest.cxx | 6 +- 5 files changed, 217 insertions(+), 50 deletions(-) diff --git a/.clang-format b/.clang-format index 411b009..45b9502 100644 --- a/.clang-format +++ b/.clang-format @@ -1,4 +1,4 @@ -## This config file is only relevant for clang-format version 8.0.0 +## This config file is only relevant for clang-format version 19.1.4 ## ## Examples of each format style can be found on the in the clang-format documentation ## See: https://clang.llvm.org/docs/ClangFormatStyleOptions.html for details of each option @@ -10,142 +10,309 @@ ## maintaining a consistent code style. ## ## EXAMPLE apply code style enforcement before commit: -# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_8.0.0} --modified +# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --modified ## EXAMPLE apply code style enforcement after commit: -# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_8.0.0} --last +# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --last --- -# This configuration requires clang-format version 8.0.0 exactly. -BasedOnStyle: Mozilla +# This configuration requires clang-format version 19.1.4 exactly. Language: Cpp AccessModifierOffset: -2 AlignAfterOpenBracket: Align -AlignConsecutiveAssignments: false -AlignConsecutiveDeclarations: true -AlignEscapedNewlines: Right -AlignOperands: true -AlignTrailingComments: true -# clang 9.0 AllowAllArgumentsOnNextLine: true -# clang 9.0 AllowAllConstructorInitializersOnNextLine: true +AlignArrayOfStructures: None +AlignConsecutiveAssignments: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionPointers: false + PadOperators: true +AlignConsecutiveBitFields: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveDeclarations: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionPointers: false + PadOperators: true +AlignConsecutiveMacros: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveShortCaseStatements: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCaseArrows: false + AlignCaseColons: false +AlignConsecutiveTableGenBreakingDAGArgColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenCondOperatorColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionPointers: false + PadOperators: false +AlignConsecutiveTableGenDefinitionColons: + Enabled: false + AcrossEmptyLines: false + AcrossComments: false + AlignCompound: false + AlignFunctionPointers: false + PadOperators: false +AlignEscapedNewlines: Left +AlignOperands: Align +AlignTrailingComments: + Kind: Always + OverEmptyLines: 0 +AllowAllArgumentsOnNextLine: true AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false +AllowBreakBeforeNoexceptSpecifier: Never +AllowShortBlocksOnASingleLine: Never +AllowShortCaseExpressionOnASingleLine: true AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: Inline -# clang 9.0 AllowShortLambdasOnASingleLine: All -# clang 9.0 features AllowShortIfStatementsOnASingleLine: Never -AllowShortIfStatementsOnASingleLine: false +AllowShortCompoundRequirementOnASingleLine: true +AllowShortEnumsOnASingleLine: true +#AllowShortFunctionsOnASingleLine: Inline Only merge functions defined inside a class. Implies empty. +#AllowShortFunctionsOnASingleLine: None (in configuration: None) Never merge functions into a single line. +AllowShortFunctionsOnASingleLine: All +AllowShortIfStatementsOnASingleLine: Never +AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false AlwaysBreakAfterDefinitionReturnType: None -AlwaysBreakAfterReturnType: All AlwaysBreakBeforeMultilineStrings: false -AlwaysBreakTemplateDeclarations: Yes +AttributeMacros: + - __capability BinPackArguments: false BinPackParameters: false -BreakBeforeBraces: Custom +BitFieldColonSpacing: Both BraceWrapping: - # clang 9.0 feature AfterCaseLabel: false + AfterCaseLabel: true AfterClass: true - AfterControlStatement: true + AfterControlStatement: Always AfterEnum: true + AfterExternBlock: true AfterFunction: true AfterNamespace: true AfterObjCDeclaration: true AfterStruct: true AfterUnion: true - AfterExternBlock: true BeforeCatch: true BeforeElse: true -## This is the big change from historical ITK formatting! -# Historically ITK used a style similar to https://en.wikipedia.org/wiki/Indentation_style#Whitesmiths_style -# with indented braces, and not indented code. This style is very difficult to automatically -# maintain with code beautification tools. Not indenting braces is more common among -# formatting tools. + BeforeLambdaBody: false + BeforeWhile: false IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false +BreakAdjacentStringLiterals: true +BreakAfterAttributes: Leave +BreakAfterJavaFieldAnnotations: false +BreakAfterReturnType: All +BreakArrays: true BreakBeforeBinaryOperators: None -#clang 6.0 BreakBeforeInheritanceComma: true -BreakInheritanceList: BeforeComma +BreakBeforeConceptDeclarations: Always +BreakBeforeBraces: Custom +BreakBeforeInlineASMColon: OnlyMultiline BreakBeforeTernaryOperators: true -#clang 6.0 BreakConstructorInitializersBeforeComma: true BreakConstructorInitializers: BeforeComma -BreakAfterJavaFieldAnnotations: false +BreakFunctionDefinitionParameters: false +BreakInheritanceList: BeforeComma BreakStringLiterals: true +BreakTemplateDeclarations: Yes ## The following line allows larger lines in non-documentation code ColumnLimit: 120 CommentPragmas: '^ IWYU pragma:' CompactNamespaces: false -ConstructorInitializerAllOnOneLineOrOnePerLine: false ConstructorInitializerIndentWidth: 2 ContinuationIndentWidth: 2 Cpp11BracedListStyle: false DerivePointerAlignment: false DisableFormat: false +EmptyLineAfterAccessModifier: Never +EmptyLineBeforeAccessModifier: LogicalBlock ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true ForEachMacros: - foreach - Q_FOREACH - BOOST_FOREACH +IfMacros: + - KJ_IF_MAYBE IncludeBlocks: Preserve IncludeCategories: - Regex: '^"(llvm|llvm-c|clang|clang-c)/' Priority: 2 + SortPriority: 0 + CaseSensitive: false - Regex: '^(<|"(gtest|gmock|isl|json)/)' Priority: 3 + SortPriority: 0 + CaseSensitive: false - Regex: '.*' Priority: 1 + SortPriority: 0 + CaseSensitive: false IncludeIsMainRegex: '(Test)?$' +IncludeIsMainSourceRegex: '' +IndentAccessModifiers: false +IndentCaseBlocks: false IndentCaseLabels: true +IndentExternBlock: AfterExternBlock +IndentGotoLabels: true IndentPPDirectives: AfterHash +IndentRequiresClause: true IndentWidth: 2 IndentWrappedFunctionNames: false +InsertBraces: false +InsertNewlineAtEOF: false +InsertTrailingCommas: None +IntegerLiteralSeparator: + Binary: 0 + BinaryMinDigits: 0 + Decimal: 0 + DecimalMinDigits: 0 + Hex: 0 + HexMinDigits: 0 JavaScriptQuotes: Leave JavaScriptWrapImports: true -KeepEmptyLinesAtTheStartOfBlocks: true +KeepEmptyLines: + AtEndOfFile: false + AtStartOfBlock: true + AtStartOfFile: true +LambdaBodyIndentation: Signature +LineEnding: DeriveLF MacroBlockBegin: '' MacroBlockEnd: '' +MainIncludeChar: Quote MaxEmptyLinesToKeep: 2 NamespaceIndentation: None ObjCBinPackProtocolList: Auto ObjCBlockIndentWidth: 2 +ObjCBreakBeforeNestedBlockParam: true ObjCSpaceAfterProperty: true ObjCSpaceBeforeProtocolList: false +PackConstructorInitializers: BinPack PenaltyBreakAssignment: 2 PenaltyBreakBeforeFirstCallParameter: 19 PenaltyBreakComment: 300 ## The following line allows larger lines in non-documentation code PenaltyBreakFirstLessLess: 120 +PenaltyBreakOpenParenthesis: 0 +PenaltyBreakScopeResolution: 500 PenaltyBreakString: 1000 PenaltyBreakTemplateDeclaration: 10 PenaltyExcessCharacter: 1000000 +PenaltyIndentedWhitespace: 0 PenaltyReturnTypeOnItsOwnLine: 200 PointerAlignment: Middle +PPIndentWidth: -1 +QualifierAlignment: Custom +QualifierOrder: + - friend + - static + - inline + - constexpr + - const + - type +ReferenceAlignment: Pointer ReflowComments: true +RemoveBracesLLVM: false +RemoveParentheses: Leave +RemoveSemicolon: false +RequiresClausePosition: OwnLine +RequiresExpressionIndentation: OuterScope +SeparateDefinitionBlocks: Leave +ShortNamespaceLines: 1 +SkipMacroDefinitionBody: false # We may want to sort the includes as a separate pass -SortIncludes: false +SortIncludes: Never +SortJavaStaticImport: Before # We may want to revisit this later -SortUsingDeclarations: false +SortUsingDeclarations: Never SpaceAfterCStyleCast: false -# SpaceAfterLogicalNot: false +SpaceAfterLogicalNot: false SpaceAfterTemplateKeyword: true +SpaceAroundPointerQualifiers: Default SpaceBeforeAssignmentOperators: true +SpaceBeforeCaseColon: false SpaceBeforeCpp11BracedList: false SpaceBeforeCtorInitializerColon: true SpaceBeforeInheritanceColon: true +SpaceBeforeJsonColon: false SpaceBeforeParens: ControlStatements +SpaceBeforeParensOptions: + AfterControlStatements: true + AfterForeachMacros: true + AfterFunctionDefinitionName: false + AfterFunctionDeclarationName: false + AfterIfMacros: true + AfterOverloadedOperator: false + AfterPlacementOperator: true + AfterRequiresInClause: false + AfterRequiresInExpression: false + BeforeNonEmptyParentheses: false SpaceBeforeRangeBasedForLoopColon: true -SpaceInEmptyParentheses: false +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false SpacesBeforeTrailingComments: 1 -SpacesInAngles: false +SpacesInAngles: Never SpacesInContainerLiterals: false -SpacesInCStyleCastParentheses: false -SpacesInParentheses: false +SpacesInLineCommentPrefix: + Minimum: 1 + Maximum: -1 +SpacesInParens: Never +SpacesInParensOptions: + ExceptDoubleParentheses: false + InCStyleCasts: false + InConditionalStatements: false + InEmptyParentheses: false + Other: false SpacesInSquareBrackets: false -Standard: Cpp11 +Standard: Latest +StatementAttributeLikeMacros: + - Q_EMIT StatementMacros: - Q_UNUSED - QT_REQUIRE_VERSION + - ITK_GCC_PRAGMA_PUSH + - ITK_GCC_PRAGMA_POP + - ITK_GCC_SUPPRESS_Wfloat_equal + - ITK_GCC_SUPPRESS_Wformat_nonliteral + - ITK_GCC_SUPPRESS_Warray_bounds + - ITK_CLANG_PRAGMA_PUSH + - ITK_CLANG_PRAGMA_POP + - ITK_CLANG_SUPPRESS_Wzero_as_null_pointer_constant + - CLANG_PRAGMA_PUSH + - CLANG_PRAGMA_POP + - CLANG_SUPPRESS_Wfloat_equal + - INTEL_PRAGMA_WARN_PUSH + - INTEL_PRAGMA_WARN_POP + - INTEL_SUPPRESS_warning_1292 + - itkTemplateFloatingToIntegerMacro + - itkLegacyMacro +TableGenBreakInsideDAGArg: DontBreak TabWidth: 2 UseTab: Never +VerilogBreakBetweenInstancePorts: true +WhitespaceSensitiveMacros: + - BOOST_PP_STRINGIZE + - CF_SWIFT_NAME + - NS_SWIFT_NAME + - PP_STRINGIZE + - STRINGIZE ... diff --git a/examples/normalizedPoseMesh.cxx b/examples/normalizedPoseMesh.cxx index fb5f393..6726287 100644 --- a/examples/normalizedPoseMesh.cxx +++ b/examples/normalizedPoseMesh.cxx @@ -80,8 +80,8 @@ readSlicerFiducials(std::string fileName) std::ifstream pointsFile(fileName.c_str()); std::string line; // ignore first 3 lines (comments of fiducials savefile) - std::getline(pointsFile, line); //# Markups fiducial file version = 4.10 - std::getline(pointsFile, line); //# CoordinateSystem = 0 + std::getline(pointsFile, line); // # Markups fiducial file version = 4.10 + std::getline(pointsFile, line); // # CoordinateSystem = 0 line = line.substr(line.length() - 3); bool ras = false; if (line == "RAS" || line[line.length() - 1] == '0') @@ -93,7 +93,7 @@ readSlicerFiducials(std::string fileName) __FILE__, __LINE__, "Fiducials file with IJK coordinates is not supported", __FUNCTION__); else throw itk::ExceptionObject(__FILE__, __LINE__, "Unrecognized coordinate system", __FUNCTION__); - std::getline(pointsFile, line); //# columns = id,x,y,z,ow,ox,oy,oz,vis,sel,lock,label,desc,associatedNodeID + std::getline(pointsFile, line); // # columns = id,x,y,z,ow,ox,oy,oz,vis,sel,lock,label,desc,associatedNodeID std::vector points; std::getline(pointsFile, line); diff --git a/include/itkLandmarkAtlasSegmentationFilter.h b/include/itkLandmarkAtlasSegmentationFilter.h index d9da1fc..ab702b0 100644 --- a/include/itkLandmarkAtlasSegmentationFilter.h +++ b/include/itkLandmarkAtlasSegmentationFilter.h @@ -139,7 +139,7 @@ class LandmarkAtlasSegmentationFilter : public ImageToImageFilter::GenerateData() m_LandmarksTransform->SetTranslation(m_AtlasLandmarks.front() - m_InputLandmarks.front()); using InterpolatorType = itk::NearestNeighborInterpolateImageFunction; - typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); + typename InterpolatorType::Pointer interpolator = InterpolatorType::New(); using ResampleFilterType = itk::ResampleImageFilter; typename ResampleFilterType::Pointer resampleFilter = ResampleFilterType::New(); diff --git a/test/itkLandmarkAtlasSegmentationFilterTest.cxx b/test/itkLandmarkAtlasSegmentationFilterTest.cxx index d83911c..f315d29 100644 --- a/test/itkLandmarkAtlasSegmentationFilterTest.cxx +++ b/test/itkLandmarkAtlasSegmentationFilterTest.cxx @@ -63,8 +63,8 @@ readSlicerFiducials(std::string fileName) std::ifstream pointsFile(fileName.c_str()); std::string line; // ignore first 3 lines (comments of fiducials savefile) - std::getline(pointsFile, line); //# Markups fiducial file version = 4.10 - std::getline(pointsFile, line); //# CoordinateSystem = 0 + std::getline(pointsFile, line); // # Markups fiducial file version = 4.10 + std::getline(pointsFile, line); // # CoordinateSystem = 0 line = line.substr(line.length() - 3); bool ras = false; if (line == "RAS" || line[line.length() - 1] == '0') @@ -78,7 +78,7 @@ readSlicerFiducials(std::string fileName) { throw itk::ExceptionObject(__FILE__, __LINE__, "Unrecognized coordinate system", __FUNCTION__); } - std::getline(pointsFile, line); //# columns = id,x,y,z,ow,ox,oy,oz,vis,sel,lock,label,desc,associatedNodeID + std::getline(pointsFile, line); // # columns = id,x,y,z,ow,ox,oy,oz,vis,sel,lock,label,desc,associatedNodeID std::vector points; std::getline(pointsFile, line); From 1604a6d661e38155e6e3ac0dc664fbe0f932016e Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 27 Jan 2025 21:18:35 -0600 Subject: [PATCH 4/7] ENH: Update to support the clang-format-linter CI --- .github/workflows/clang-format-linter.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clang-format-linter.yml b/.github/workflows/clang-format-linter.yml index 69166d9..c8e1681 100644 --- a/.github/workflows/clang-format-linter.yml +++ b/.github/workflows/clang-format-linter.yml @@ -7,7 +7,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master + with: + itk-branch: master From 803fb790099ea661960719ec255556b9deb31d06 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Tue, 28 Jan 2025 08:24:13 -0600 Subject: [PATCH 5/7] COMP: remove compiler warnings. HASI/include/itkLandmarkAtlasSegmentationFilter.hxx:44:26: warning: unused variable 'inputRegion' [-Wunused-variable] HASI/include/itkSegmentBonesInMicroCTFilter.hxx:326:25: warning: comparison of integers of different signs: 'PixelType' (aka 'short') and 'const unsigned int' [-Wsign-compare] --- include/itkLandmarkAtlasSegmentationFilter.hxx | 6 +++--- include/itkSegmentBonesInMicroCTFilter.hxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/itkLandmarkAtlasSegmentationFilter.hxx b/include/itkLandmarkAtlasSegmentationFilter.hxx index c5b015d..6ff82f6 100644 --- a/include/itkLandmarkAtlasSegmentationFilter.hxx +++ b/include/itkLandmarkAtlasSegmentationFilter.hxx @@ -38,10 +38,10 @@ LandmarkAtlasSegmentationFilter::GenerateData() { this->AllocateOutputs(); - OutputImageType * output = this->GetOutput(); + // OutputImageType * output = this->GetOutput(); const InputImageType * input = this->GetInput(); - const RegionType & outputRegion = output->GetRequestedRegion(); - RegionType inputRegion = RegionType(outputRegion.GetSize()); + // const RegionType & outputRegion = output->GetRequestedRegion(); + // RegionType inputRegion = RegionType(outputRegion.GetSize()); m_LandmarksTransform = RigidTransformType::New(); diff --git a/include/itkSegmentBonesInMicroCTFilter.hxx b/include/itkSegmentBonesInMicroCTFilter.hxx index 2d219df..d55a7b1 100644 --- a/include/itkSegmentBonesInMicroCTFilter.hxx +++ b/include/itkSegmentBonesInMicroCTFilter.hxx @@ -285,7 +285,7 @@ SegmentBonesInMicroCTFilter::GenerateData() // per-bone processing - for (unsigned bone = 1; bone <= numBones; bone++) + for (typename TOutputImage::PixelType bone = 1; bone <= numBones; bone++) { float boneProgress = 0.3f / numBones; float beginProgress = 0.7 + boneProgress * (bone - 1); From 634210105c676fc2ad5ae0f172e0b66a433e47cb Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 9 Mar 2025 09:36:52 -0500 Subject: [PATCH 6/7] ENH: Use latest actions, do not pin to latest version The convention of only specifying the MAJOR version is the indicator that the latest version in that series should be used. By not specifying the MINOR and PATCH, the exact versions is not pinned, but the latest in that series is chosen. (i.e. the v5 tag is updated every time a new MINOR or PATCH tag is generated). This allows benefiting from minor patch fixes without needing to update workflows. --- .github/workflows/test-python-hasi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-python-hasi.yml b/.github/workflows/test-python-hasi.yml index ef3918f..70ef42f 100644 --- a/.github/workflows/test-python-hasi.yml +++ b/.github/workflows/test-python-hasi.yml @@ -18,10 +18,10 @@ jobs: - os: macos-10.15 steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python 3.7 - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: 3.7 From 6edf9d1316e807c6a2c48cb036cc25f40b515b03 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 9 Mar 2025 10:48:24 -0500 Subject: [PATCH 7/7] ENH: Use tag v5.4.2 for the build packages tags Set the default build package tags to v5.4.2 for capturing the ITKRemoteModuleBuildTestPackageAction shared scripts. This pulls the default configuration items needed to build against ITK version v5.4.2. --- .github/workflows/build-test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index 71459ec..96b7a48 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -4,12 +4,12 @@ on: [push,pull_request] jobs: cxx-build-workflow: - uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@36e33ec40332bb8fd85bfcd3ee899f82aa108e79 + uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.2 with: itk-module-deps: 'BoneEnhancement@e6935aa760c3fa4e247ca0f4924a4fe3e420bf91:IOScanco@10a73c1ab2de044c4dd73608f91cf52012aff5e4' python-build-workflow: - uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@36e33ec40332bb8fd85bfcd3ee899f82aa108e79 + uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.2 with: itk-module-deps: 'InsightSoftwareConsortium/ITKBoneEnhancement@e6935aa760c3fa4e247ca0f4924a4fe3e420bf91' secrets: