From ae1c6253ee8092fe1fc19d81d60b9c15e447ffbf Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 26 Jan 2025 08:59:00 -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/itkExpandWithZerosImageFilter.h | 2 +- include/itkFrequencyExpandImageFilter.h | 2 +- include/itkFrequencyExpandViaInverseFFTImageFilter.h | 2 +- include/itkFrequencyFunction.h | 2 +- include/itkFrequencyShrinkImageFilter.h | 2 +- include/itkFrequencyShrinkViaInverseFFTImageFilter.h | 2 +- include/itkHeldIsotropicWavelet.h | 2 +- include/itkIsotropicFrequencyFunction.h | 2 +- include/itkIsotropicWaveletFrequencyFunction.h | 2 +- include/itkMonogenicSignalFrequencyImageFilter.h | 2 +- include/itkPhaseAnalysisImageFilter.h | 2 +- include/itkPhaseAnalysisSoftThresholdImageFilter.h | 2 +- include/itkRieszFrequencyFilterBankGenerator.h | 2 +- include/itkRieszFrequencyFunction.h | 2 +- include/itkShannonIsotropicWavelet.h | 2 +- include/itkShrinkDecimateImageFilter.h | 2 +- include/itkSimoncelliIsotropicWavelet.h | 2 +- include/itkStructureTensorImageFilter.h | 2 +- include/itkVectorInverseFFTImageFilter.h | 2 +- include/itkVowIsotropicWavelet.h | 2 +- include/itkWaveletCoeffsPhaseAnalyzisImageFilter.h | 2 +- include/itkWaveletCoeffsSpatialDomainImageFilter.h | 2 +- include/itkWaveletFrequencyFilterBankGenerator.h | 2 +- include/itkWaveletFrequencyForward.h | 2 +- include/itkWaveletFrequencyForwardUndecimated.h | 2 +- include/itkWaveletFrequencyInverse.h | 2 +- include/itkWaveletFrequencyInverseUndecimated.h | 2 +- include/itkZeroDCImageFilter.h | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/include/itkExpandWithZerosImageFilter.h b/include/itkExpandWithZerosImageFilter.h index a9ea076..ef0d7c5 100644 --- a/include/itkExpandWithZerosImageFilter.h +++ b/include/itkExpandWithZerosImageFilter.h @@ -75,7 +75,7 @@ class ExpandWithZerosImageFilter : public ImageToImageFilter; /** Run-time type information (and related methods). */ - itkTypeMacro(FrequencyFunction, SpatialFunction); + itkOverrideGetNameOfClassMacro(FrequencyFunction); /** Input type for the function. */ using InputType = typename Superclass::InputType; diff --git a/include/itkFrequencyShrinkImageFilter.h b/include/itkFrequencyShrinkImageFilter.h index e4513e0..30faab0 100644 --- a/include/itkFrequencyShrinkImageFilter.h +++ b/include/itkFrequencyShrinkImageFilter.h @@ -88,7 +88,7 @@ class FrequencyShrinkImageFilter : public ImageToImageFilter; /** Run-time type information (and related methods). */ - itkTypeMacro(IsotropicFrequencyFunction, FrequencyFunction); + itkOverrideGetNameOfClassMacro(IsotropicFrequencyFunction); /** Input type for the function. */ using InputType = typename Superclass::InputType; diff --git a/include/itkIsotropicWaveletFrequencyFunction.h b/include/itkIsotropicWaveletFrequencyFunction.h index 77a9655..e113550 100644 --- a/include/itkIsotropicWaveletFrequencyFunction.h +++ b/include/itkIsotropicWaveletFrequencyFunction.h @@ -66,7 +66,7 @@ class IsotropicWaveletFrequencyFunction : public IsotropicFrequencyFunction; /** Run-time type information (and related methods). */ - itkTypeMacro(IsotropicWaveletFrequencyFunction, IsotropicFrequencyFunction); + itkOverrideGetNameOfClassMacro(IsotropicWaveletFrequencyFunction); /** Input type for the function. */ using InputType = typename Superclass::InputType; diff --git a/include/itkMonogenicSignalFrequencyImageFilter.h b/include/itkMonogenicSignalFrequencyImageFilter.h index 14c83f8..3555970 100644 --- a/include/itkMonogenicSignalFrequencyImageFilter.h +++ b/include/itkMonogenicSignalFrequencyImageFilter.h @@ -61,7 +61,7 @@ class MonogenicSignalFrequencyImageFilter itkNewMacro(Self); /** Runtime information support. */ - itkTypeMacro(MonogenicSignalFrequencyImageFilter, ImageToImageFilter); + itkOverrideGetNameOfClassMacro(MonogenicSignalFrequencyImageFilter); #ifdef ITK_USE_CONCEPT_CHECKING /// This ensure that InputPixelType is complex diff --git a/include/itkPhaseAnalysisImageFilter.h b/include/itkPhaseAnalysisImageFilter.h index affcb7e..c9cc995 100644 --- a/include/itkPhaseAnalysisImageFilter.h +++ b/include/itkPhaseAnalysisImageFilter.h @@ -80,7 +80,7 @@ class PhaseAnalysisImageFilter : public ImageToImageFilter itkNewMacro(Self); /** Run-time type information (and related methods). */ - itkTypeMacro(ZeroDCImageFilter, ImageToImageFilter); + itkOverrideGetNameOfClassMacro(ZeroDCImageFilter); /** Typedef to describe the output image region type. */ using ImageRegionType = typename TImageType::RegionType; From ebdf9fa180c1f67fef30eb50a7a59bf70992d89b Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 26 Jan 2025 12:55:07 -0600 Subject: [PATCH 2/7] ENH: ITKv5_CONST macro for VerifyPreconditions() and VerifyInputInformation() ITKv5_CONST enables backwards compatible behavior when ITKV4_COMPATIBILITY is turned ON for methods which have acquired 'const' qualifier in ITKv5. Breaking changes were originally introduced by ITK commits 3e6b6f5bd6772316aa0fa6b89f31b42bef562112 (on 2018-10-18) and 16eae15c1bb6cc1bae9fba3e09a3102bdc02e955 (on 2018-10-23). --- include/itkWaveletFrequencyInverse.h | 2 +- include/itkWaveletFrequencyInverseUndecimated.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/itkWaveletFrequencyInverse.h b/include/itkWaveletFrequencyInverse.h index ecff898..57cbaad 100644 --- a/include/itkWaveletFrequencyInverse.h +++ b/include/itkWaveletFrequencyInverse.h @@ -175,7 +175,7 @@ class WaveletFrequencyInverse : public ImageToImageFilter Date: Tue, 11 Mar 2025 17:41:38 -0500 Subject: [PATCH 3/7] ENH: Update pyproject.toml for ITK 5.4.2 In preparation for release. Ensure that cmake is 3.16.3 or greater to match v5.4.2 minimum requirements. Set minimum python to 3.9 Increment version number. Replace keyword of "ITK" with lowercase "itk" in some instances to be consistent. --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5f298d1..21bd210 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build" [project] name = "itk-isotropicwavelets" -version = "0.7.0" +version = "0.7.1" description = "Steerable Wavelet Pyramid with Isotropic Wavelets and Riesz Functions" readme = "README.rst" license = {file = "LICENSE"} @@ -38,7 +38,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Medical Science Apps.", "Topic :: Software Development :: Libraries", ] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = [ "itk == 5.4.*", ] From c2c866fc06b073eae2237417dc395ccee1453fbd Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 27 Jan 2025 17:53:52 -0600 Subject: [PATCH 4/7] STYLE: Update to match clang-format-19 from ITK --- .clang-format | 251 +++++++++++++++--- include/itkRieszRotationMatrix.hxx | 6 +- include/itkRieszUtilities.h | 2 +- include/itkWaveletFrequencyForward.hxx | 2 +- .../itkWaveletFrequencyForwardUndecimated.hxx | 2 +- include/itkWaveletFrequencyInverse.h | 2 +- .../itkWaveletFrequencyInverseUndecimated.h | 2 +- include/itkWaveletUtilities.h | 2 +- test/itkWaveletUtilitiesTest.cxx | 9 +- 9 files changed, 223 insertions(+), 55 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/include/itkRieszRotationMatrix.hxx b/include/itkRieszRotationMatrix.hxx index 8aa9731..63cc761 100644 --- a/include/itkRieszRotationMatrix.hxx +++ b/include/itkRieszRotationMatrix.hxx @@ -284,7 +284,7 @@ RieszRotationMatrix::ComputeSteerableMatrix() tmpValidIndices.push_back(tmp); } } // end new k indices - } // end partial valid index + } // end partial valid index kValidIndices = tmpValidIndices; } // end combinations @@ -402,8 +402,8 @@ RieszRotationMatrix::ComputeSteerableMatrix() std::cout << std::endl; } } // end Debug - } // end j - } // end i + } // end j + } // end i // ----- PRINT ---- // // Print allIndicesPairs diff --git a/include/itkRieszUtilities.h b/include/itkRieszUtilities.h index 46ec2ee..c8d6ae6 100644 --- a/include/itkRieszUtilities.h +++ b/include/itkRieszUtilities.h @@ -105,7 +105,7 @@ ComputeUniqueIndices(TIndicesArrayType */ template ITK_TEMPLATE_EXPORT std::set> - ComputeAllPermutations(const std::set> & uniqueIndices) +ComputeAllPermutations(const std::set> & uniqueIndices) { using SetType = std::set>; SetType out; diff --git a/include/itkWaveletFrequencyForward.hxx b/include/itkWaveletFrequencyForward.hxx index 236a58c..fc0ea75 100644 --- a/include/itkWaveletFrequencyForward.hxx +++ b/include/itkWaveletFrequencyForward.hxx @@ -543,7 +543,7 @@ WaveletFrequencyForward; * Note that bands and levels are always >= 1. The level/bands returned here corresponds to an index. */ IsotropicWavelets_EXPORT IndexPairType - IndexToLevelBandSteerablePyramid(unsigned int linearIndex, unsigned int levels, unsigned int bands); +IndexToLevelBandSteerablePyramid(unsigned int linearIndex, unsigned int levels, unsigned int bands); /** Compute max number of levels depending on the size of the image. * Return J: $ J = \text{min_element}\{J_0,\ldots, J_d\} $; diff --git a/test/itkWaveletUtilitiesTest.cxx b/test/itkWaveletUtilitiesTest.cxx index f8464c3..c63de52 100644 --- a/test/itkWaveletUtilitiesTest.cxx +++ b/test/itkWaveletUtilitiesTest.cxx @@ -43,10 +43,11 @@ IndexToLevelBandTest(const unsigned int & linearIndex, } } -void printComputeMaxNumberOfLevelsError(itk::Size<3> inputSize, - unsigned int scaleFactor, - unsigned int expected, - unsigned int result) +void +printComputeMaxNumberOfLevelsError(itk::Size<3> inputSize, + unsigned int scaleFactor, + unsigned int expected, + unsigned int result) { std::cerr << "Error in ComputeMaxNumberOfLevels with" << std::endl; std::cerr << "scaleFactor = " << scaleFactor << std::endl; From f749d8fb18a2df604f6b7fd973553319ddc775dc Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 27 Jan 2025 21:18:45 -0600 Subject: [PATCH 5/7] ENH: Update to support the clang-format-linter CI --- .github/workflows/clang-format-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clang-format-linter.yml b/.github/workflows/clang-format-linter.yml index 69166d9..630ae57 100644 --- a/.github/workflows/clang-format-linter.yml +++ b/.github/workflows/clang-format-linter.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master From a5742673cbdc0eda79356337acd64415b5fba571 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Sun, 9 Mar 2025 10:48:51 -0500 Subject: [PATCH 6/7] ENH: Use tag v5.4.3 for the build packages tags Set the default build package tags to v5.4.3 for capturing the ITKRemoteModuleBuildTestPackageAction shared scripts. This pulls the default configuration items needed to build against ITK version v5.4.3. --- .github/workflows/build-test-package.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index 7f04a12..c9e610e 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -1,12 +1,20 @@ name: Build, test, package -on: [push,pull_request] +on: + push: + branches: + - main + tags: + - 'v*' + pull_request: + branches: + - main jobs: cxx-build-workflow: - uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@edd0a4350396f533e9ec3755ed6c5af5ddfedb97 + uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.3 python-build-workflow: - uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@edd0a4350396f533e9ec3755ed6c5af5ddfedb97 + uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.3 secrets: pypi_password: ${{ secrets.pypi_password }} From 55bdc3c8b6cbc8472b4f7f9f8ec5ae15997724d9 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Tue, 27 May 2025 14:29:46 -0500 Subject: [PATCH 7/7] COMP: Fix no-discard warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit itkShrinkDecimateImageFilter.hxx:184:42: warning: ignoring return value of ‘bool itk::ImageBase::TransformPhysicalPointToIndex(const itk::Point&, IndexType&) const [with TCoordinate = double; unsigned int VImageDimension = 3; IndexType = itk::Index<3>]’, declared with attribute ‘nodiscard’ [-Wunused-result] --- include/itkShrinkDecimateImageFilter.hxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/itkShrinkDecimateImageFilter.hxx b/include/itkShrinkDecimateImageFilter.hxx index f818a12..76915ba 100644 --- a/include/itkShrinkDecimateImageFilter.hxx +++ b/include/itkShrinkDecimateImageFilter.hxx @@ -168,20 +168,19 @@ ShrinkDecimateImageFilter::GenerateInputRequestedRegi factorSize[i] = m_ShrinkFactors[i]; } - OutputIndexType outputIndex; - InputIndexType inputIndex, inputRequestedRegionIndex; + InputIndexType inputRequestedRegionIndex; OutputOffsetType offsetIndex; typename TInputImage::SizeType inputRequestedRegionSize; - typename TOutputImage::PointType tempPoint; // Use this index to compute the offset everywhere in this class - outputIndex = outputPtr->GetLargestPossibleRegion().GetIndex(); + OutputIndexType outputIndex = outputPtr->GetLargestPossibleRegion().GetIndex(); // We wish to perform the following mapping of outputIndex to // inputIndex on all points in our region + typename TOutputImage::PointType tempPoint; outputPtr->TransformIndexToPhysicalPoint(outputIndex, tempPoint); - inputPtr->TransformPhysicalPointToIndex(tempPoint, inputIndex); + InputIndexType inputIndex { inputPtr->TransformPhysicalPointToIndex(tempPoint) }; // Given that the size is scaled by a constant factor eq: // inputIndex = outputIndex * factorSize