From 26b683ac9fca0b4e0a949b031eef64d201fc2bfe Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Wed, 4 Dec 2024 18:52:36 -0600 Subject: [PATCH 1/4] ENH: update clang-format binaries to 19.1.4 Step 1: Download pypi wheels from https://pypi.org/project/clang-format/#files for each of the platforms. Step 2: For each wheel: ```bash if [ $(uname) == "Darwin" ]; then xattr -d com.apple.quarantine ${downloaded_wheel_file} fi unzip ${downloaded_wheel_file} cd clang_format/data/bin tar -cf clang_format.tar clang-format ``` Step 3: Upload the clang_format.tar file to https://data.kitware.com/ Copy the sha512 for the uploaded tarball and change the has in Utilities/ClangFormat/DownloadClangFormat.cmake Step 4: Update the allowed version limits ```cmake set(CLANG_FORMAT_MIN_VERSION 19.1.4) # First acceptable version set(CLANG_FORMAT_MAX_VERSION 20.0) # First unacceptable version ``` --- .../ClangFormat/DownloadClangFormat.cmake | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/Utilities/ClangFormat/DownloadClangFormat.cmake b/Utilities/ClangFormat/DownloadClangFormat.cmake index 3a523bfa879..b229655441f 100644 --- a/Utilities/ClangFormat/DownloadClangFormat.cmake +++ b/Utilities/ClangFormat/DownloadClangFormat.cmake @@ -18,8 +18,8 @@ # # The ITK style guidelines are represented by clang-format version ${CLANG_FORMAT_MIN_VERSION} # rules defined in ${ITK_SOURCE_DIR}/.clang-format -set(CLANG_FORMAT_MIN_VERSION 8.0) # First acceptable version -set(CLANG_FORMAT_MAX_VERSION 9.0) # First unacceptable version +set(CLANG_FORMAT_MIN_VERSION 19.1.4) # First acceptable version +set(CLANG_FORMAT_MAX_VERSION 20.0) # First unacceptable version function(check_clang_format_version EXECUTABLE_FOUND_VARNAME CLANG_FORMAT_EXECUTABLE) # This function has the required signature for the @@ -116,25 +116,32 @@ if(NOT EXISTS CLANG_FORMAT_EXECUTABLE) set(_clang_format_hash) set(_clang_format_url) if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + #19.1.4 version hash for the tar'ed version of the binary set(_clang_format_hash - b14de32036c48f6c62998e2ebab509e71a0ae71464acb4616484e3a6eb941e1d9fac38559f5d27ea0cbbb512d590279ffb3015fae17779229e1090c2763ebcf3 + bc85b4a0feeefabeaabd2f5196e8fd3f469845cffecb71f4dd47f5e93de7881051f4138ae8901c4bb0ea69b2fbf103ecaf5f7bacfddd495b2c3e343582e62313 ) set(_clang_format_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_clang_format_hash}/download") - elseif( - CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin" - AND ( CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64" ) - AND (NOT - CMAKE_HOST_SYSTEM_VERSION - VERSION_LESS - "13.0.0" - )) - set(_clang_format_hash - 97460f9eef556a27592ccd99d8fc894554e5b3196326df4e33bfcdecfcb7eda2b5c7488008abc4dd923d607f2cb47d61567b1da99df60f31f719195118c117a9 - ) + elseif( CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin" AND (NOT CMAKE_HOST_SYSTEM_VERSION VERSION_LESS "13.0.0")) + if ( CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") + #19.1.4 version hash for the tar'ed version of the binary + set(_clang_format_hash + 9b7eb444fb41262baa0323f9b300daf8e1792df811adf9c3c1c8ce09f9f5413b103d35c6982e5c54efc9119de957b4fa066f61bb55138fb5bb059056753a059f + ) + elseif( CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "arm64" ) + #19.1.4 version hash for the tar'ed version of the binary + set(_clang_format_hash + 99d5dd2ea3a8aa956284f4ff506e6dec7d48eee2f6c394a817ffc2210ccdb6928142581c09d71afd5d551b1180b4f07fdc119e14ed855ea5bfef06f0ea932ecc + ) + else() + message(FATAL_ERROR "Darwin only allows CMAKE_HOST_SYSTEM_PROCESSOR for arm64 and x86_64") + endif() set(_clang_format_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_clang_format_hash}/download") + + elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Windows" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64") + #19.1.4 version hash for the tar'ed version of the binary set(_clang_format_hash - e96dd15938fd9b1c57028a519189f138397774eb6b66971d114300d2a80248adda9f74b192985a3c91c7de52c4dbe21800bc6b3cc8201c4985fc39ecfc64fdbe + 0e6d7176927e52acf081f47ff7cda1cd8d093931c80889f3765a3dca673633f8c1326b9977c5bf79f6d32e98632cb83d91e871aca18081477f70a715059454cf ) set(_clang_format_url "https://data.kitware.com/api/v1/file/hashsum/sha512/${_clang_format_hash}/download") else() From d09f6653086bfa1c8bb10b3bee3e31fc130ae5f8 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Wed, 4 Dec 2024 19:24:27 -0600 Subject: [PATCH 2/4] ENH: clang-format wrappers to version 19.1.4 update support scripts to support new clang-format version. Utilities/Hooks/pre-commit-style.bash Utilities/Maintenance/clang-format.bash --- Utilities/Hooks/pre-commit-style.bash | 2 +- Utilities/Maintenance/clang-format.bash | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Utilities/Hooks/pre-commit-style.bash b/Utilities/Hooks/pre-commit-style.bash index 15dbd3b69c8..1b802dd6513 100644 --- a/Utilities/Hooks/pre-commit-style.bash +++ b/Utilities/Hooks/pre-commit-style.bash @@ -149,7 +149,7 @@ run_KWStyle() { #----------------------------------------------------------------------------- # clangformat. check_for_clangformat() { - clangformat_required_version=8.0 + clangformat_required_version=19.1.4 system_tools=" clang-format-$clangformat_required_version clang-format diff --git a/Utilities/Maintenance/clang-format.bash b/Utilities/Maintenance/clang-format.bash index dd36bbe2f05..502a1b9257c 100755 --- a/Utilities/Maintenance/clang-format.bash +++ b/Utilities/Maintenance/clang-format.bash @@ -81,8 +81,7 @@ test "$#" = 0 || die "$usage" # Find a default tool. tools=' - clang-format-8.0.0 - clang-format-8 + clang-format-19 clang-format ' if test "x$clang_format" = "x"; then @@ -100,8 +99,8 @@ if ! type -p "$clang_format" >/dev/null; then exit 1 fi -if ! "$clang_format" --version | grep 'clang-format version 8\.0\.' >/dev/null 2>/dev/null; then - echo "clang-format version 8.0.x is required" +if ! "$clang_format" --version | grep 'clang-format version 19\.1\.' >/dev/null 2>/dev/null; then + echo "clang-format version 19.1.x is required" exit 1 fi From 694457a8988c02d098d19d1c3d05e5c485eb5be2 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Wed, 4 Dec 2024 16:35:59 -0600 Subject: [PATCH 3/4] STYLE: Update .clang-format config version 19.1.4 Update .clang-format and Example/.clang-format propogating current selection forward to the new version. ```bash cd ${ITK_SOURCE_DIR} clang-format --dump-config > /tmp/ITK_clang_format mv /tmp/ITK_clang_format .clang-format cd ${ITK_SOURCE_DIR}/Examples clang-format --dump-config > /tmp/ITK_Examples_clang_format mv /tmp/ITK_Examples_clang_format .clang-format ``` --- .clang-format | 233 ++++++++++++++++++++++++++++++------- Examples/.clang-format | 255 ++++++++++++++++++++++++++++++++++------- 2 files changed, 403 insertions(+), 85 deletions(-) diff --git a/.clang-format b/.clang-format index ebdb0cd5d92..45b950284d0 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,139 +10,282 @@ ## 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 +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: true -AlignTrailingComments: true -# clang 9.0 AllowAllArgumentsOnNextLine: true -# clang 9.0 AllowAllConstructorInitializersOnNextLine: true +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 @@ -162,6 +305,14 @@ StatementMacros: - 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/.clang-format b/Examples/.clang-format index 9c28e44cb35..6286abadb83 100644 --- a/Examples/.clang-format +++ b/Examples/.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 -## The following line uses shorter lines in documentation code +BreakTemplateDeclarations: Yes +## The following line allows larger lines in non-documentation code ColumnLimit: 78 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 uses shorter lines in documentation code +## The following line allows larger lines in non-documentation code PenaltyBreakFirstLessLess: 88 +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 ... From 9bd6b7506fab77ad3e06525184616f93f5d8ac86 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Thu, 5 Dec 2024 17:11:12 -0600 Subject: [PATCH 4/4] STYLE: Rigorous style conformance with clang-format 19.1.4 The newer version of clang-format has a more rigorous enforcement of the ITK style. Most changes include placing the return value of a function on it's own line, and moving single line function definitions to the ITK multi-line format (even in macros). --- .../itkParticleSwarmOptimizerSAXReader.cxx | 2 +- .../Bridge/VTK/src/itkVTKImageExportBase.cxx | 5 +- Modules/Bridge/VtkGlue/src/QuickView.cxx | 30 +-- .../CMake/itkCheckHasGNUAttributeAligned.cxx | 2 +- Modules/Core/Common/include/itkArray.h | 4 +- Modules/Core/Common/include/itkAutoPointer.h | 6 +- Modules/Core/Common/include/itkBoolean.h | 6 +- .../Core/Common/include/itkCellInterface.h | 17 +- .../Common/include/itkCompensatedSummation.h | 7 +- .../include/itkCompensatedSummation.hxx | 4 +- .../Core/Common/include/itkConceptChecking.h | 11 +- .../itkConnectedImageNeighborhoodShape.h | 5 +- .../Common/include/itkConstSliceIterator.h | 12 +- .../Core/Common/include/itkCovariantVector.h | 16 +- .../Common/include/itkCovariantVector.hxx | 8 +- Modules/Core/Common/include/itkEventObject.h | 4 +- Modules/Core/Common/include/itkFixedArray.h | 36 ++- ...FilledFunctionConditionalConstIterator.hxx | 2 +- Modules/Core/Common/include/itkImage.h | 12 +- .../Core/Common/include/itkImageBufferRange.h | 14 +- .../include/itkImageContainerInterface.h | 6 +- ...RandomNonRepeatingConstIteratorWithIndex.h | 6 +- Modules/Core/Common/include/itkImageRegion.h | 2 +- .../Core/Common/include/itkImageRegionRange.h | 8 +- .../include/itkImageScanlineConstIterator.h | 2 +- .../Common/include/itkImageScanlineIterator.h | 2 +- .../Core/Common/include/itkImageSource.hxx | 3 +- .../Common/include/itkImportImageContainer.h | 12 +- Modules/Core/Common/include/itkIndex.h | 15 +- Modules/Core/Common/include/itkIndexRange.h | 24 +- Modules/Core/Common/include/itkLightObject.h | 6 +- Modules/Core/Common/include/itkMacro.h | 4 +- Modules/Core/Common/include/itkMapContainer.h | 24 +- Modules/Core/Common/include/itkMath.h | 9 +- Modules/Core/Common/include/itkMatrix.h | 39 ++- Modules/Core/Common/include/itkMatrix.hxx | 21 +- .../Common/include/itkMetaDataDictionary.h | 6 +- .../include/itkMetaProgrammingLibrary.h | 4 +- Modules/Core/Common/include/itkNeighborhood.h | 24 +- .../include/itkNeighborhoodAccessorFunctor.h | 4 +- .../Common/include/itkNeighborhoodAllocator.h | 12 +- .../Core/Common/include/itkNumberToString.h | 4 +- .../Core/Common/include/itkNumericTraits.h | 24 +- Modules/Core/Common/include/itkOctree.h | 3 +- Modules/Core/Common/include/itkOffset.h | 12 +- .../include/itkOrientationAdapterBase.h | 6 +- .../itkPhasedArray3DSpecialCoordinatesImage.h | 3 +- Modules/Core/Common/include/itkPromoteType.h | 33 ++- Modules/Core/Common/include/itkRGBAPixel.h | 5 +- Modules/Core/Common/include/itkRGBAPixel.hxx | 3 +- Modules/Core/Common/include/itkRGBPixel.h | 5 +- Modules/Core/Common/include/itkRGBPixel.hxx | 3 +- .../include/itkShapedImageNeighborhoodRange.h | 15 +- Modules/Core/Common/include/itkSize.h | 15 +- .../Core/Common/include/itkSliceIterator.h | 12 +- Modules/Core/Common/include/itkSmartPointer.h | 21 +- .../itkSmartPointerForwardReference.hxx | 3 +- .../Core/Common/include/itkSparseFieldLayer.h | 24 +- .../Common/include/itkSpatialOrientation.h | 2 +- .../include/itkSpecialCoordinatesImage.h | 12 +- .../include/itkSymmetricSecondRankTensor.h | 3 +- .../include/itkSymmetricSecondRankTensor.hxx | 4 +- .../Core/Common/include/itkThreadSupport.h | 4 +- .../include/itkValarrayImageContainer.h | 12 +- .../Common/include/itkVariableLengthVector.h | 15 +- .../Common/include/itkVariableSizeMatrix.h | 27 ++- .../Common/include/itkVariableSizeMatrix.hxx | 12 +- Modules/Core/Common/include/itkVector.h | 9 +- Modules/Core/Common/include/itkVector.hxx | 3 +- .../Core/Common/include/itkVectorContainer.h | 24 +- Modules/Core/Common/include/itkVectorImage.h | 12 +- Modules/Core/Common/include/itkVersor.h | 3 +- Modules/Core/Common/include/itkVersor.hxx | 3 +- Modules/Core/Common/include/itkWeakPointer.h | 6 +- .../Common/include/itkWin32OutputWindow.h | 2 +- ...eumannImageNeighborhoodPixelAccessPolicy.h | 6 +- .../src/itkArrayOutputSpecialization.cxx | 8 +- .../Common/src/itkCompensatedSummation.cxx | 4 +- .../Core/Common/src/itkCovariantVector.cxx | 6 +- .../Core/Common/src/itkFileOutputWindow.cxx | 5 +- .../src/itkFloatingPointExceptions_unix.cxx | 3 +- .../src/itkImageRegionSplitterDirection.cxx | 5 +- Modules/Core/Common/src/itkLightObject.cxx | 4 +- .../Common/src/itkMemoryUsageObserver.cxx | 7 +- ...kMersenneTwisterRandomVariateGenerator.cxx | 5 +- .../Core/Common/src/itkMetaDataDictionary.cxx | 6 +- .../Core/Common/src/itkMultiThreaderBase.cxx | 10 +- Modules/Core/Common/src/itkNumericTraits.cxx | 16 +- Modules/Core/Common/src/itkObject.cxx | 11 +- .../Core/Common/src/itkObjectFactoryBase.cxx | 2 +- Modules/Core/Common/src/itkOctreeNode.cxx | 5 +- Modules/Core/Common/src/itkOutputWindow.cxx | 5 +- Modules/Core/Common/src/itkProcessObject.cxx | 3 +- .../Common/src/itkProgressAccumulator.cxx | 5 +- .../Common/src/itkSimpleFilterWatcher.cxx | 5 +- .../Core/Common/src/itkSmapsFileParser.cxx | 7 +- .../Core/Common/src/itkStdStreamLogOutput.cxx | 5 +- Modules/Core/Common/src/itkVector.cxx | 6 +- .../Core/Common/src/itkWin32OutputWindow.cxx | 2 +- Modules/Core/Common/test/ClientTestLibraryA.h | 4 +- Modules/Core/Common/test/ClientTestLibraryC.h | 4 +- Modules/Core/Common/test/SharedTestLibraryA.h | 2 +- Modules/Core/Common/test/SharedTestLibraryB.h | 2 +- .../Common/test/itkAdaptorComparisonTest.cxx | 6 +- .../test/itkAnatomicalOrientationGTest.cxx | 4 +- .../test/itkCommandObserverObjectTest.cxx | 2 +- .../Common/test/itkFilterDispatchTest.cxx | 9 +- .../Common/test/itkImageBufferRangeGTest.cxx | 2 +- .../itkMultiThreaderParallelizeArrayTest.cxx | 3 +- .../itkShapedImageNeighborhoodRangeGTest.cxx | 2 +- .../Core/Common/test/itkSmartPointerTest.cxx | 8 +- .../test/itkVariableLengthVectorTest.cxx | 227 +++++++++--------- Modules/Core/GPUCommon/include/itkGPUImage.h | 6 +- .../Core/GPUCommon/include/itkGPUImage.hxx | 6 +- .../ImageAdaptors/include/itkImageAdaptor.h | 6 +- .../include/itkConnectedRegionsMeshFilter.hxx | 2 +- .../Mesh/include/itkImageToMeshFilter.hxx | 3 +- Modules/Core/Mesh/include/itkMeshSource.hxx | 3 +- .../itkSimplexMeshVolumeCalculator.hxx | 3 +- .../Core/Mesh/include/itkSphereMeshSource.hxx | 6 +- .../Mesh/include/itkVTKPolyDataReader.hxx | 3 +- .../include/itkQuadEdgeMeshBaseIterator.h | 12 +- ...uadEdgeMeshEulerOperatorFlipEdgeFunction.h | 2 +- .../test/itkQuadEdgeMeshBasicLayerTest.cxx | 4 +- .../test/itkQuadEdgeMeshIteratorTest.cxx | 2 +- .../include/itkDTITubeSpatialObjectPoint.h | 2 +- .../src/itkSpatialObjectProperty.cxx | 5 +- .../TestKernel/test/itkGoogleTestFixture.cxx | 5 +- .../include/itkBSplineDeformableTransform.hxx | 3 +- .../Transform/include/itkBSplineTransform.hxx | 3 +- .../Transform/include/itkKernelTransform.hxx | 8 +- .../include/itkSimilarity2DTransform.hxx | 3 +- .../include/itkTranslationTransform.h | 2 +- .../test/itkCenteredRigid2DTransformTest.cxx | 2 +- .../test/itkEuler2DTransformTest.cxx | 2 +- .../test/itkQuaternionRigidTransformTest.cxx | 2 +- .../test/itkSimilarity2DTransformTest.cxx | 4 +- .../itkN4BiasFieldCorrectionImageFilter.hxx | 8 +- .../include/itkBinaryDilateImageFilter.hxx | 6 +- .../include/itkBinaryErodeImageFilter.hxx | 6 +- .../itkBinaryMorphologyImageFilter.hxx | 4 +- .../include/itkBinaryThinningImageFilter.hxx | 2 +- .../itkScalarToRGBColormapImageFilter.h | 2 +- .../include/itkConvolutionImageFilterBase.h | 2 +- .../itkPatchBasedDenoisingBaseImageFilter.h | 6 +- .../itkPatchBasedDenoisingImageFilter.hxx | 10 +- ...ffusionTensor3DReconstructionImageFilter.h | 6 +- ...usionTensor3DReconstructionImageFilter.hxx | 31 ++- .../itkInvertDisplacementFieldImageFilter.hxx | 5 +- ...iveInverseDisplacementFieldImageFilter.hxx | 2 +- .../itkIsoContourDistanceImageFilter.hxx | 8 +- ...tkSignedDanielssonDistanceMapImageFilter.h | 28 +-- .../itkComplexToComplexFFTImageFilter.h | 2 +- ...lfHermitianToRealInverseFFTImageFilter.hxx | 6 +- .../src/itkFFTWFFTImageFilterInitFactory.cxx | 7 +- .../FFT/src/itkFFTWGlobalConfiguration.cxx | 2 +- .../src/itkVnlFFTImageFilterInitFactory.cxx | 7 +- .../itkFastMarchingExtensionImageFilter.hxx | 4 +- ...tkFastMarchingExtensionImageFilterBase.hxx | 4 +- .../include/itkFastMarchingImageFilter.hxx | 5 +- .../itkFastMarchingImageFilterBase.hxx | 6 +- ...archingImageToNodePairContainerAdaptor.hxx | 4 +- ...chingReachedTargetNodesStoppingCriterion.h | 2 +- ...itkFastMarchingUpwindGradientImageFilter.h | 2 +- .../ImageCompose/include/itkJoinImageFilter.h | 6 +- .../itkHoughTransform2DLinesImageFilter.hxx | 6 +- ...MultiScaleHessianBasedMeasureImageFilter.h | 2 +- .../include/itkUnsharpMaskImageFilter.h | 2 +- .../include/itkTernaryFunctorImageFilter.hxx | 7 +- .../test/itkCastImageFilterTest.cxx | 6 +- .../itkBSplineDownsampleImageFilter.hxx | 6 +- .../include/itkBSplineUpsampleImageFilter.hxx | 6 +- .../include/itkResampleImageFilter.hxx | 5 +- .../include/itkPolylineMaskImageFilter.hxx | 6 +- .../include/itkFlatStructuringElement.h | 8 +- .../include/itkFlatStructuringElement.hxx | 14 +- .../include/itkMathematicalMorphologyEnums.h | 2 +- .../itkContourExtractor2DImageFilter.hxx | 2 +- .../Filtering/Path/include/itkPathSource.hxx | 3 +- .../include/itkBorderQuadEdgeMeshFilter.h | 4 +- .../itkEdgeDecimationQuadEdgeMeshFilter.hxx | 16 +- ...tkLaplacianDeformationQuadEdgeMeshFilter.h | 2 +- .../include/itkNormalQuadEdgeMeshFilter.h | 2 +- ...adEdgeMeshDecimationQuadricElementHelper.h | 3 +- .../include/itkBinomialBlurImageFilter.hxx | 4 +- .../itkFFTDiscreteGaussianImageFilter.h | 2 +- .../include/itkHistogramThresholdCalculator.h | 3 +- Modules/IO/BMP/src/itkBMPImageIOFactory.cxx | 2 +- .../IO/BioRad/src/itkBioRadImageIOFactory.cxx | 2 +- .../src/itkBruker2dseqImageIOFactory.cxx | 2 +- Modules/IO/CSV/src/itkCSVFileReaderBase.cxx | 6 +- Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx | 5 +- .../IO/DCMTK/src/itkDCMTKImageIOFactory.cxx | 2 +- Modules/IO/GDCM/src/itkGDCMImageIO.cxx | 5 +- Modules/IO/GDCM/src/itkGDCMImageIOFactory.cxx | 2 +- Modules/IO/GE/src/itkGE4ImageIOFactory.cxx | 2 +- Modules/IO/GE/src/itkGE5ImageIOFactory.cxx | 2 +- Modules/IO/GE/src/itkGEAdwImageIOFactory.cxx | 2 +- Modules/IO/GIPL/src/itkGiplImageIOFactory.cxx | 2 +- Modules/IO/HDF5/src/itkHDF5ImageIO.cxx | 20 +- Modules/IO/HDF5/src/itkHDF5ImageIOFactory.cxx | 2 +- Modules/IO/IPL/include/itkIPLFileNameList.h | 3 +- Modules/IO/IPL/src/itkIPLCommonImageIO.cxx | 2 +- Modules/IO/ImageBase/src/itkImageIOBase.cxx | 6 +- .../IO/ImageBase/test/itkImageIOBaseTest.cxx | 54 ++--- .../IO/ImageBase/test/itkUnicodeIOTest.cxx | 2 +- Modules/IO/JPEG/src/itkJPEGImageIOFactory.cxx | 2 +- .../src/itkJPEG2000ImageIOFactory.cxx | 2 +- Modules/IO/LSM/src/itkLSMImageIOFactory.cxx | 2 +- Modules/IO/MINC/src/itkMINCImageIO.cxx | 9 +- Modules/IO/MINC/src/itkMINCImageIOFactory.cxx | 2 +- Modules/IO/MRC/src/itkMRCHeaderObject.cxx | 10 +- Modules/IO/MRC/src/itkMRCImageIOFactory.cxx | 2 +- .../IO/MeshBYU/src/itkBYUMeshIOFactory.cxx | 2 +- .../src/itkFreeSurferAsciiMeshIO.cxx | 5 +- .../src/itkFreeSurferAsciiMeshIOFactory.cxx | 2 +- .../src/itkFreeSurferBinaryMeshIOFactory.cxx | 2 +- Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx | 6 +- .../MeshGifti/src/itkGiftiMeshIOFactory.cxx | 2 +- Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx | 5 +- .../IO/MeshOBJ/src/itkOBJMeshIOFactory.cxx | 2 +- .../IO/MeshOFF/src/itkOFFMeshIOFactory.cxx | 2 +- .../IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx | 9 +- .../src/itkVTKPolyDataMeshIOFactory.cxx | 2 +- Modules/IO/Meta/src/itkMetaImageIOFactory.cxx | 2 +- Modules/IO/NIFTI/src/itkNiftiImageIO.cxx | 11 +- .../IO/NIFTI/src/itkNiftiImageIOFactory.cxx | 2 +- Modules/IO/NRRD/src/itkNrrdImageIOFactory.cxx | 2 +- Modules/IO/PNG/src/itkPNGImageIOFactory.cxx | 2 +- Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx | 20 +- .../PhilipsREC/src/itkPhilipsRECImageIO.cxx | 11 +- .../src/itkPhilipsRECImageIOFactory.cxx | 2 +- .../Siemens/src/itkSiemensVisionImageIO.cxx | 2 +- .../src/itkSiemensVisionImageIOFactory.cxx | 2 +- .../src/itkStimulateImageIOFactory.cxx | 2 +- Modules/IO/TIFF/src/itkTIFFImageIOFactory.cxx | 2 +- .../include/itkTransformFileWriter.h | 4 +- .../include/itkHDF5TransformIO.h | 2 +- .../TransformHDF5/src/itkHDF5TransformIO.cxx | 6 +- .../src/itkHDF5TransformIOFactory.cxx | 2 +- .../src/itkTxtTransformIOFactory.cxx | 2 +- .../src/itkMINCTransformIOFactory.cxx | 2 +- .../src/itkMatlabTransformIOFactory.cxx | 2 +- Modules/IO/VTK/src/itkVTKImageIO.cxx | 3 +- Modules/IO/VTK/src/itkVTKImageIOFactory.cxx | 2 +- Modules/IO/XML/include/itkFancyString.h | 12 +- Modules/IO/XML/src/itkFancyString.cxx | 10 +- .../include/itkLabelGeometryImageFilter.h | 123 +++++++--- ...kMultiphaseFiniteDifferenceImageFilter.hxx | 3 +- Modules/Numerics/FEM/include/itkFEMP.h | 6 +- .../FEM/include/itkFEMRobustSolver.hxx | 13 +- Modules/Numerics/FEM/include/itkFEMSolver.hxx | 2 +- .../Numerics/FEM/src/itkFEMElementBase.cxx | 4 +- .../src/itkFEMLinearSystemWrapperItpack.cxx | 12 +- Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx | 3 +- ...MElement3DC0LinearHexahedronStrainTest.cxx | 6 +- .../NarrowBand/include/itkNarrowBand.h | 12 +- .../test/itkNarrowBandImageFilterBaseTest.cxx | 4 +- .../include/itkGradientDescentOptimizer.h | 4 +- ...kRegularStepGradientDescentBaseOptimizer.h | 2 +- .../src/itkCumulativeGaussianOptimizer.cxx | 5 +- .../src/itkGradientDescentOptimizer.cxx | 6 +- .../itkMultipleValuedNonLinearOptimizer.cxx | 5 +- .../src/itkSingleValuedNonLinearOptimizer.cxx | 5 +- .../include/itkLBFGS2Optimizerv4.h | 6 +- .../include/itkObjectToObjectMetricBase.h | 4 +- .../itkRegistrationParameterScalesEstimator.h | 2 +- .../Statistics/include/itkDistanceMetric.hxx | 3 +- ...ctationMaximizationMixtureModelEstimator.h | 2 +- .../include/itkGaussianMembershipFunction.hxx | 3 +- .../Statistics/include/itkHistogram.hxx | 2 +- .../itkHistogramToRunLengthFeaturesFilter.h | 2 +- .../itkHistogramToTextureFeaturesFilter.h | 2 +- .../include/itkImageToListSampleAdaptor.hxx | 3 +- .../itkImageToNeighborhoodSampleAdaptor.hxx | 3 +- ...itkJointDomainImageToListSampleAdaptor.hxx | 3 +- .../Numerics/Statistics/include/itkKdTree.h | 14 +- .../include/itkKdTreeBasedKmeansEstimator.h | 6 +- ...kMahalanobisDistanceMembershipFunction.hxx | 3 +- .../include/itkMahalanobisDistanceMetric.hxx | 6 +- .../itkPointSetToListSampleAdaptor.hxx | 3 +- .../include/itkSampleClassifierFilter.hxx | 4 +- .../include/itkSampleToHistogramFilter.hxx | 2 +- .../include/itkSampleToSubsampleFilter.hxx | 4 +- ...larImageToCooccurrenceListSampleFilter.hxx | 2 +- .../itkVectorContainerToListSampleAdaptor.hxx | 4 +- .../src/itkSparseFrequencyContainer2.cxx | 8 +- .../test/itkStatisticsAlgorithmTest2.cxx | 3 +- .../itkLandmarkBasedTransformInitializer.h | 5 +- .../itkLandmarkBasedTransformInitializer.hxx | 3 +- ...tesMutualInformationImageToImageMetric.hxx | 12 +- .../FEM/include/itkFEMRegistrationFilter.hxx | 2 +- .../FEM/include/itkMIRegistrationFunction.hxx | 2 +- ...itkFEMFiniteDifferenceFunctionLoadTest.cxx | 2 +- .../FEM/test/itkVTKTetrahedralMeshReader.hxx | 3 +- ...ageMetricv4GetValueAndDerivativeThreader.h | 3 +- ...MutualInformationComputeJointPDFThreader.h | 3 +- ...mMutualInformationImageToImageMetricv4.hxx | 2 +- ...sMutualInformationImageToImageMetricv4.hxx | 6 +- .../test/itkImageToImageMetricv4Test.cxx | 2 +- ...ualInformationImageToImageMetricv4Test.cxx | 2 +- .../itkESMDemonsRegistrationFunction.h | 2 +- .../include/itkImageRegistrationMethodv4.h | 2 +- .../itkImageGaussianModelEstimator.hxx | 6 +- ...mplexMesh3DGradientConstraintForceFilter.h | 2 +- .../src/itkKLMSegmentationRegion.cxx | 7 +- .../itkImplicitManifoldNormalVectorFilter.hxx | 2 +- .../itkLevelSetFunctionWithRefitTerm.hxx | 8 +- .../itkNormalVectorDiffusionFunction.hxx | 2 +- .../itkReinitializeLevelSetImageFilter.hxx | 6 +- ...pePriorSegmentationLevelSetImageFilter.hxx | 3 +- .../itkBinaryImageToLevelSetImageAdaptor.h | 3 +- .../include/itkLevelSetContainerBase.h | 24 +- .../include/itkLevelSetEquationContainer.h | 24 +- .../itkLevelSetEquationTermContainer.h | 24 +- .../include/itkLevelSetEvolution.h | 3 +- ...evelSetEvolutionComputeIterationThreader.h | 3 +- ...LevelSetEvolutionUpdateLevelSetsThreader.h | 3 +- .../include/itkMRFImageFilter.hxx | 2 +- .../itkConnectedThresholdImageFilter.h | 2 +- .../include/itkWatershedBoundaryResolver.hxx | 2 +- .../itkWatershedEquivalenceRelabeler.hxx | 2 +- .../BridgeOpenCV/src/itkOpenCVVideoIO.cxx | 10 +- Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx | 10 +- .../Video/Core/src/itkTemporalDataObject.cxx | 23 +- .../Core/src/itkTemporalProcessObject.cxx | 8 +- Modules/Video/IO/src/itkFileListVideoIO.cxx | 10 +- .../Python/PyUtils/itkPyCommand.cxx | 6 +- .../Python/PyUtils/itkPyImageFilter.hxx | 15 +- .../Generators/Python/itkPyITKCommonCAPI.h | 2 +- 330 files changed, 1399 insertions(+), 1060 deletions(-) diff --git a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx index f5264354659..3e007a841ca 100644 --- a/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx +++ b/Examples/IO/XML/itkParticleSwarmOptimizerSAXReader.cxx @@ -282,7 +282,7 @@ ParticleSwarmOptimizerSAXReader::ProcessBoundAttributes( } } } // end if - } // end for + } // end for } /** Search for and return a particular attribute from the attribute list. */ diff --git a/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx b/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx index 87c103a3592..855ba87b4b9 100644 --- a/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx +++ b/Modules/Bridge/VTK/src/itkVTKImageExportBase.cxx @@ -23,10 +23,7 @@ namespace itk * Constructor sets up information for the image-type indepenedent * callbacks implemented in this superclass. */ -VTKImageExportBase::VTKImageExportBase() -{ - m_LastPipelineMTime = 0; -} +VTKImageExportBase::VTKImageExportBase() { m_LastPipelineMTime = 0; } void VTKImageExportBase::PrintSelf(std::ostream & os, Indent indent) const diff --git a/Modules/Bridge/VtkGlue/src/QuickView.cxx b/Modules/Bridge/VtkGlue/src/QuickView.cxx index 287684053e4..ee7527236f9 100644 --- a/Modules/Bridge/VtkGlue/src/QuickView.cxx +++ b/Modules/Bridge/VtkGlue/src/QuickView.cxx @@ -58,27 +58,27 @@ using FloatImageType = itk::Image; using DoubleImageType = itk::Image; template void ITKVtkGlue_EXPORT - QuickView::AddImage(CharImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(CharImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(UnsignedShortImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(UnsignedShortImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(ShortImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(ShortImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(UnsignedIntImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(UnsignedIntImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(IntImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(IntImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(UnsignedLongImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(UnsignedLongImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(LongImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(LongImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(FloatImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(FloatImageType * image, bool FlipVertical, std::string Description); template void ITKVtkGlue_EXPORT - QuickView::AddImage(DoubleImageType * image, bool FlipVertical, std::string Description); +QuickView::AddImage(DoubleImageType * image, bool FlipVertical, std::string Description); template <> void ITKVtkGlue_EXPORT - QuickView::AddImage(UnsignedCharImageType * image, bool FlipVertical, std::string Description) +QuickView::AddImage(UnsignedCharImageType * image, bool FlipVertical, std::string Description) { if (FlipVertical) { @@ -101,7 +101,7 @@ void ITKVtkGlue_EXPORT template void ITK_TEMPLATE_EXPORT - QuickView::AddImage(TImage * image, bool FlipVertical, std::string Description) +QuickView::AddImage(TImage * image, bool FlipVertical, std::string Description) { using rescaleFilterType = itk::RescaleIntensityImageFilter; @@ -116,7 +116,7 @@ void ITK_TEMPLATE_EXPORT template <> void ITKVtkGlue_EXPORT - QuickView::AddImage(UnsignedCharRGBImageType * image, +QuickView::AddImage(UnsignedCharRGBImageType * image, bool FlipVertical, std::string Description) { @@ -141,7 +141,7 @@ void ITKVtkGlue_EXPORT template <> void ITKVtkGlue_EXPORT - QuickView::AddRGBImage(UnsignedCharRGBImageType * image, +QuickView::AddRGBImage(UnsignedCharRGBImageType * image, bool FlipVertical, std::string Description) { @@ -166,7 +166,7 @@ void ITKVtkGlue_EXPORT template <> void ITKVtkGlue_EXPORT - QuickView::AddRGBImage(FloatRGBImageType * image, bool FlipVertical, std::string Description) +QuickView::AddRGBImage(FloatRGBImageType * image, bool FlipVertical, std::string Description) { using AdaptorType = itk::RGBToVectorImageAdaptor; AdaptorType::Pointer adaptor = AdaptorType::New(); @@ -182,7 +182,7 @@ void ITKVtkGlue_EXPORT template <> void ITKVtkGlue_EXPORT - QuickView::AddImage(FloatRGBImageType * image, bool FlipVertical, std::string Description) +QuickView::AddImage(FloatRGBImageType * image, bool FlipVertical, std::string Description) { using AdaptorType = itk::RGBToVectorImageAdaptor; AdaptorType::Pointer adaptor = AdaptorType::New(); diff --git a/Modules/Core/Common/CMake/itkCheckHasGNUAttributeAligned.cxx b/Modules/Core/Common/CMake/itkCheckHasGNUAttributeAligned.cxx index 3c79dbed09d..9b5ee3b8af6 100644 --- a/Modules/Core/Common/CMake/itkCheckHasGNUAttributeAligned.cxx +++ b/Modules/Core/Common/CMake/itkCheckHasGNUAttributeAligned.cxx @@ -77,7 +77,7 @@ main() using AlignedA = A __attribute__((aligned(64))); - return OnlyTrue<__alignof__(AlignedA) == 64>::Result && OnlyTrue<__alignof__(B) == 64>::Result; + return OnlyTrue < __alignof__(AlignedA) == 64 > ::Result && OnlyTrue < __alignof__(B) == 64 > ::Result; return 0; diff --git a/Modules/Core/Common/include/itkArray.h b/Modules/Core/Common/include/itkArray.h index db611da56e1..3ec8454fddf 100644 --- a/Modules/Core/Common/include/itkArray.h +++ b/Modules/Core/Common/include/itkArray.h @@ -229,9 +229,9 @@ operator<<(std::ostream & os, const Array & arr) // declaration of specialization template <> -ITKCommon_EXPORT std::ostream & operator<<(std::ostream & os, const Array & arr); +ITKCommon_EXPORT std::ostream & operator<< (std::ostream & os, const Array & arr); template <> -ITKCommon_EXPORT std::ostream & operator<<(std::ostream & os, const Array & arr); +ITKCommon_EXPORT std::ostream & operator<< (std::ostream & os, const Array & arr); template diff --git a/Modules/Core/Common/include/itkAutoPointer.h b/Modules/Core/Common/include/itkAutoPointer.h index aa3abf945ee..5eccb9151ce 100644 --- a/Modules/Core/Common/include/itkAutoPointer.h +++ b/Modules/Core/Common/include/itkAutoPointer.h @@ -73,7 +73,11 @@ class AutoPointer ~AutoPointer() { this->Reset(); } /** Overload operator ->. */ - ObjectType * operator->() const { return m_Pointer; } + ObjectType * + operator->() const + { + return m_Pointer; + } /** Clear the AutoPointer. If it had a pointer the object is deleted and the pointer is set to null. */ diff --git a/Modules/Core/Common/include/itkBoolean.h b/Modules/Core/Common/include/itkBoolean.h index 9fdb636a0ed..055efc9f19d 100644 --- a/Modules/Core/Common/include/itkBoolean.h +++ b/Modules/Core/Common/include/itkBoolean.h @@ -47,7 +47,11 @@ class Boolean {} /** Supports implicit conversion to `bool`. */ - constexpr operator bool() const { return m_Value; } + constexpr + operator bool() const + { + return m_Value; + } private: bool m_Value = false; diff --git a/Modules/Core/Common/include/itkCellInterface.h b/Modules/Core/Common/include/itkCellInterface.h index cf5e15318a3..a286bf6ac9b 100644 --- a/Modules/Core/Common/include/itkCellInterface.h +++ b/Modules/Core/Common/include/itkCellInterface.h @@ -386,7 +386,11 @@ class ITK_TEMPLATE_EXPORT CellInterface * Array is ordered (xmin, xmax, ymin, ymax, ....). A pointer to the * array is returned for convenience. This allows code like: * "CoordRep* bounds = cell->GetBoundingBox(new CoordRep[6]);". */ - CoordinateType * GetBoundingBox(CoordinateType[PointDimension * 2]) { return nullptr; } + CoordinateType * + GetBoundingBox(CoordinateType[PointDimension * 2]) + { + return nullptr; + } /** Compute the square of the diagonal length of the bounding box. */ CoordinateType @@ -407,11 +411,12 @@ class ITK_TEMPLATE_EXPORT CellInterface * (returned through "t" pointer). * * Returns whether an intersection exists. */ - virtual bool IntersectBoundingBoxWithLine(CoordinateType[PointDimension * 2], - CoordinateType[PointDimension], - CoordinateType[PointDimension], - CoordinateType[PointDimension], - CoordinateType *) + virtual bool + IntersectBoundingBoxWithLine(CoordinateType[PointDimension * 2], + CoordinateType[PointDimension], + CoordinateType[PointDimension], + CoordinateType[PointDimension], + CoordinateType *) { return bool(); } diff --git a/Modules/Core/Common/include/itkCompensatedSummation.h b/Modules/Core/Common/include/itkCompensatedSummation.h index 7b51a9b3cbe..7dbb6235c31 100644 --- a/Modules/Core/Common/include/itkCompensatedSummation.h +++ b/Modules/Core/Common/include/itkCompensatedSummation.h @@ -117,7 +117,8 @@ class ITK_TEMPLATE_EXPORT CompensatedSummation GetSum() const; /** explicit conversion */ - explicit operator FloatType() const; + explicit + operator FloatType() const; private: AccumulateType m_Sum{}; @@ -130,9 +131,9 @@ class ITK_TEMPLATE_EXPORT CompensatedSummation }; void ITKCommon_EXPORT - CompensatedSummationAddElement(float & compensation, float & sum, const float element); +CompensatedSummationAddElement(float & compensation, float & sum, const float element); void ITKCommon_EXPORT - CompensatedSummationAddElement(double & compensation, double & sum, const double element); +CompensatedSummationAddElement(double & compensation, double & sum, const double element); } // end namespace itk diff --git a/Modules/Core/Common/include/itkCompensatedSummation.hxx b/Modules/Core/Common/include/itkCompensatedSummation.hxx index 736433caa23..66c924d55b9 100644 --- a/Modules/Core/Common/include/itkCompensatedSummation.hxx +++ b/Modules/Core/Common/include/itkCompensatedSummation.hxx @@ -23,9 +23,9 @@ namespace itk { void ITKCommon_EXPORT - CompensatedSummationAddElement(float & compensation, float & sum, const float element); +CompensatedSummationAddElement(float & compensation, float & sum, const float element); void ITKCommon_EXPORT - CompensatedSummationAddElement(double & compensation, double & sum, const double element); +CompensatedSummationAddElement(double & compensation, double & sum, const double element); #ifndef itkCompensatedSummation_cxx // We try the looser pragma guards if we don't have an explicit instantiation. diff --git a/Modules/Core/Common/include/itkConceptChecking.h b/Modules/Core/Common/include/itkConceptChecking.h index 6dd565f4435..0480fc6aa2d 100644 --- a/Modules/Core/Common/include/itkConceptChecking.h +++ b/Modules/Core/Common/include/itkConceptChecking.h @@ -140,7 +140,8 @@ struct UniqueType_bool * warning. (BOOST) */ template -inline void IgnoreUnusedVariable(T) +inline void +IgnoreUnusedVariable(T) {} /** @@ -806,7 +807,9 @@ struct SameDimensionOrMinusOne using Type1 = Detail::UniqueType_unsigned_int; using Type2 = Detail::UniqueType_unsigned_int; - void f(Type1) {} + void + f(Type1) + {} void f(Type2, int = 0) {} @@ -831,7 +834,9 @@ struct SameDimensionOrMinusOneOrTwo using Type2 = Detail::UniqueType_unsigned_int; using Type3 = Detail::UniqueType_unsigned_int; - void f(Type1) {} + void + f(Type1) + {} void f(Type2, int = 0) {} diff --git a/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h b/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h index 19eb29a0a12..8a6020df44a 100644 --- a/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h +++ b/Modules/Core/Common/include/itkConnectedImageNeighborhoodShape.h @@ -196,8 +196,9 @@ class ConnectedImageNeighborhoodShape static constexpr uintmax_t CalculateBinomialCoefficient(const uintmax_t n, const uintmax_t k) noexcept { - return (k > n) ? (assert(!"Out of range!"), 0) - : (k == 0) ? 1 : Math::UnsignedProduct(n, CalculateBinomialCoefficient(n - 1, k - 1)) / k; + return (k > n) ? (assert(!"Out of range!"), 0) + : (k == 0) ? 1 + : Math::UnsignedProduct(n, CalculateBinomialCoefficient(n - 1, k - 1)) / k; } diff --git a/Modules/Core/Common/include/itkConstSliceIterator.h b/Modules/Core/Common/include/itkConstSliceIterator.h index 28141401385..46deae7daed 100644 --- a/Modules/Core/Common/include/itkConstSliceIterator.h +++ b/Modules/Core/Common/include/itkConstSliceIterator.h @@ -99,11 +99,19 @@ class ConstSliceIterator /** Returns the element at position n of the slice. Sets the * iterator to point to position n. */ - const TPixel & operator[](SizeValueType n) { return this->Loc(m_Pos = n); } + const TPixel & + operator[](SizeValueType n) + { + return this->Loc(m_Pos = n); + } /** Dereferences the iterator, returning the value that it points * to. */ - const TPixel & operator*() { return Loc(m_Pos); } + const TPixel & + operator*() + { + return Loc(m_Pos); + } /** Returns the logical && of the boolean == of two slice iterator positions, * stride, and start locations. */ diff --git a/Modules/Core/Common/include/itkCovariantVector.h b/Modules/Core/Common/include/itkCovariantVector.h index 2710da12a45..4775dd01e38 100644 --- a/Modules/Core/Common/include/itkCovariantVector.h +++ b/Modules/Core/Common/include/itkCovariantVector.h @@ -190,15 +190,18 @@ class ITK_TEMPLATE_EXPORT CovariantVector : public FixedArray & other) const; + ValueType + operator*(const Vector & other) const; /** Scalar operator*. Scale the elements of a vector by a scalar. * Return a new vector. */ - inline Self operator*(const ValueType & val) const + inline Self + operator*(const ValueType & val) const { Self result; @@ -259,7 +262,8 @@ class ITK_TEMPLATE_EXPORT CovariantVector : public FixedArray = T * CovariantVector< T,N > */ template -inline CovariantVector operator*(const T & scalar, const CovariantVector & v) +inline CovariantVector +operator*(const T & scalar, const CovariantVector & v) { return v.operator*(scalar); } @@ -267,8 +271,8 @@ inline CovariantVector operator*(const T & scalar, const Co /** Performs the scalar product of a covariant with a contravariant. * This scalar product is invariant under affine transformations */ template -inline T operator*(const Vector & contravariant, - const CovariantVector & covariant) +inline T +operator*(const Vector & contravariant, const CovariantVector & covariant) { return covariant.operator*(contravariant); } diff --git a/Modules/Core/Common/include/itkCovariantVector.hxx b/Modules/Core/Common/include/itkCovariantVector.hxx index 41ee35cd288..d33e258c310 100644 --- a/Modules/Core/Common/include/itkCovariantVector.hxx +++ b/Modules/Core/Common/include/itkCovariantVector.hxx @@ -98,8 +98,8 @@ CovariantVector::operator-(const Self & vec) const -> Self } template -typename CovariantVector::ValueType CovariantVector::operator*( - const Self & other) const +typename CovariantVector::ValueType +CovariantVector::operator*(const Self & other) const { typename NumericTraits::AccumulateType value = T{}; for (unsigned int i = 0; i < VVectorDimension; ++i) @@ -110,8 +110,8 @@ typename CovariantVector::ValueType CovariantVector -typename CovariantVector::ValueType CovariantVector::operator*( - const Vector & other) const +typename CovariantVector::ValueType +CovariantVector::operator*(const Vector & other) const { typename NumericTraits::AccumulateType value = T{}; for (unsigned int i = 0; i < VVectorDimension; ++i) diff --git a/Modules/Core/Common/include/itkEventObject.h b/Modules/Core/Common/include/itkEventObject.h index 65f4eaf44e2..6a41cc67695 100644 --- a/Modules/Core/Common/include/itkEventObject.h +++ b/Modules/Core/Common/include/itkEventObject.h @@ -144,7 +144,7 @@ operator<<(std::ostream & os, const EventObject & e) #define itkEventMacroDefinition(classname, super) \ classname::classname(const classname & s) \ - : super(s){}; \ + : super(s) {}; \ classname::~classname() {} \ const char * classname::GetEventName() const { return #classname; } \ bool classname::CheckEvent(const itk::EventObject * e) const \ @@ -190,7 +190,7 @@ operator<<(std::ostream & os, const EventObject & e) return new Self; \ } \ classname(const Self & s) \ - : super(s){}; \ + : super(s) {}; \ \ private: \ void \ diff --git a/Modules/Core/Common/include/itkFixedArray.h b/Modules/Core/Common/include/itkFixedArray.h index d9f154e2705..dd353a8f0c1 100644 --- a/Modules/Core/Common/include/itkFixedArray.h +++ b/Modules/Core/Common/include/itkFixedArray.h @@ -103,8 +103,16 @@ class ITK_TEMPLATE_EXPORT FixedArray { return ReverseIterator(m_Iterator++); } - Iterator operator->() const { return (m_Iterator - 1); } - ValueType & operator*() const { return *(m_Iterator - 1); } + Iterator + operator->() const + { + return (m_Iterator - 1); + } + ValueType & + operator*() const + { + return *(m_Iterator - 1); + } bool operator==(const ReverseIterator & rit) const @@ -150,8 +158,16 @@ class ITK_TEMPLATE_EXPORT FixedArray { return ConstReverseIterator(m_Iterator++); } - ConstIterator operator->() const { return (m_Iterator - 1); } - const ValueType & operator*() const { return *(m_Iterator - 1); } + ConstIterator + operator->() const + { + return (m_Iterator - 1); + } + const ValueType & + operator*() const + { + return *(m_Iterator - 1); + } bool operator==(const ConstReverseIterator & rit) const @@ -263,8 +279,16 @@ class ITK_TEMPLATE_EXPORT FixedArray // false positive warnings with GCC ITK_GCC_PRAGMA_PUSH ITK_GCC_SUPPRESS_Warray_bounds - constexpr reference operator[](unsigned int index) { return m_InternalArray[index]; } - constexpr const_reference operator[](unsigned int index) const { return m_InternalArray[index]; } + constexpr reference + operator[](unsigned int index) + { + return m_InternalArray[index]; + } + constexpr const_reference + operator[](unsigned int index) const + { + return m_InternalArray[index]; + } ITK_GCC_PRAGMA_POP /** Set/Get element methods are more convenient in wrapping languages */ diff --git a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx index 73c8fa88be3..dabf262c0c5 100644 --- a/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx +++ b/Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx @@ -205,7 +205,7 @@ FloodFilledFunctionConditionalConstIterator::DoFloodStep() } } } // end left/right neighbor loop - } // end check all neighbors + } // end check all neighbors // Now that all the potential neighbors have been // inserted we can get rid of the pixel in the front diff --git a/Modules/Core/Common/include/itkImage.h b/Modules/Core/Common/include/itkImage.h index 061c221a475..e756a207c37 100644 --- a/Modules/Core/Common/include/itkImage.h +++ b/Modules/Core/Common/include/itkImage.h @@ -237,13 +237,21 @@ class ITK_TEMPLATE_EXPORT Image : public ImageBase * * For efficiency, this function does not check that the * image has actually been allocated yet. */ - TPixel & operator[](const IndexType & index) { return this->GetPixel(index); } + TPixel & + operator[](const IndexType & index) + { + return this->GetPixel(index); + } /** \brief Access a pixel. This version can only be an rvalue. * * For efficiency, this function does not check that the * image has actually been allocated yet. */ - const TPixel & operator[](const IndexType & index) const { return this->GetPixel(index); } + const TPixel & + operator[](const IndexType & index) const + { + return this->GetPixel(index); + } /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ diff --git a/Modules/Core/Common/include/itkImageBufferRange.h b/Modules/Core/Common/include/itkImageBufferRange.h index 28134ad4482..5c15ac9f3c6 100644 --- a/Modules/Core/Common/include/itkImageBufferRange.h +++ b/Modules/Core/Common/include/itkImageBufferRange.h @@ -317,7 +317,8 @@ class ImageBufferRange final /** Returns a reference to the current pixel. */ - reference operator*() const noexcept + reference + operator*() const noexcept { assert(m_InternalPixelPointer != nullptr); @@ -472,7 +473,11 @@ class ImageBufferRange final /** Returns it[n] for iterator 'it' and integer value 'n'. */ - reference operator[](const difference_type n) const noexcept { return *(*this + n); } + reference + operator[](const difference_type n) const noexcept + { + return *(*this + n); + } }; static constexpr bool IsImageTypeConst = std::is_const_v; @@ -648,7 +653,8 @@ class ImageBufferRange final * \note The return type QualifiedIterator::reference is equivalent to * iterator::reference. */ - typename QualifiedIterator::reference operator[](const size_t n) const noexcept + typename QualifiedIterator::reference + operator[](const size_t n) const noexcept { assert(n < this->size()); assert(n <= static_cast(std::numeric_limits::max())); @@ -660,7 +666,7 @@ class ImageBufferRange final // Deduction guide to avoid compiler warnings (-wctad-maybe-unsupported) when using class template argument deduction. template -ImageBufferRange(TImage &)->ImageBufferRange; +ImageBufferRange(TImage &) -> ImageBufferRange; /** Creates a range to iterate over the pixels of the specified image. diff --git a/Modules/Core/Common/include/itkImageContainerInterface.h b/Modules/Core/Common/include/itkImageContainerInterface.h index 18a439549b6..18751da24b5 100644 --- a/Modules/Core/Common/include/itkImageContainerInterface.h +++ b/Modules/Core/Common/include/itkImageContainerInterface.h @@ -67,10 +67,12 @@ class ImageContainerInterface : public Object using Element = TElement; /** Index operator. This version can be an lvalue. */ - virtual TElement & operator[](const ElementIdentifier) = 0; + virtual TElement & + operator[](const ElementIdentifier) = 0; /** Index operator. This version can only be an rvalue */ - virtual const TElement & operator[](const ElementIdentifier) const = 0; + virtual const TElement & + operator[](const ElementIdentifier) const = 0; /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ diff --git a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h index b0defff6c42..32c6174ee3f 100644 --- a/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h +++ b/Modules/Core/Common/include/itkImageRandomNonRepeatingConstIteratorWithIndex.h @@ -121,7 +121,11 @@ class RandomPermutation std::sort(m_Permutation, m_Permutation + m_Size); } - SizeValueType operator[](SizeValueType i) const { return m_Permutation[i].m_Index; } + SizeValueType + operator[](SizeValueType i) const + { + return m_Permutation[i].m_Index; + } ~RandomPermutation() { delete[] m_Permutation; } diff --git a/Modules/Core/Common/include/itkImageRegion.h b/Modules/Core/Common/include/itkImageRegion.h index 08fa1814850..b373c8b27b0 100644 --- a/Modules/Core/Common/include/itkImageRegion.h +++ b/Modules/Core/Common/include/itkImageRegion.h @@ -413,7 +413,7 @@ class ITK_TEMPLATE_EXPORT ImageRegion final // Deduction guide to avoid compiler warnings (-wctad-maybe-unsupported) when using class template argument deduction. template -ImageRegion(const Index &, const Size &)->ImageRegion; +ImageRegion(const Index &, const Size &) -> ImageRegion; template diff --git a/Modules/Core/Common/include/itkImageRegionRange.h b/Modules/Core/Common/include/itkImageRegionRange.h index e203267d3c7..6a0a7a85fcf 100644 --- a/Modules/Core/Common/include/itkImageRegionRange.h +++ b/Modules/Core/Common/include/itkImageRegionRange.h @@ -225,7 +225,11 @@ class ImageRegionRange final /** Returns a reference to the current pixel. */ - reference operator*() const noexcept { return *m_BufferIterator; } + reference + operator*() const noexcept + { + return *m_BufferIterator; + } /** Prefix increment ('++it'). */ QualifiedIterator & @@ -458,7 +462,7 @@ class ImageRegionRange final // Deduction guide to avoid compiler warnings (-wctad-maybe-unsupported) when using class template argument deduction. template -ImageRegionRange(TImage &)->ImageRegionRange; +ImageRegionRange(TImage &) -> ImageRegionRange; } // namespace itk diff --git a/Modules/Core/Common/include/itkImageScanlineConstIterator.h b/Modules/Core/Common/include/itkImageScanlineConstIterator.h index dc7550086fe..7c4e1906241 100644 --- a/Modules/Core/Common/include/itkImageScanlineConstIterator.h +++ b/Modules/Core/Common/include/itkImageScanlineConstIterator.h @@ -265,7 +265,7 @@ class ITK_TEMPLATE_EXPORT ImageScanlineConstIterator : public ImageConstIterator // Deduction guide for class template argument deduction (CTAD). template ImageScanlineConstIterator(SmartPointer, const typename TImage::RegionType &) - ->ImageScanlineConstIterator>; + -> ImageScanlineConstIterator>; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageScanlineIterator.h b/Modules/Core/Common/include/itkImageScanlineIterator.h index e6479a85107..50104fd5057 100644 --- a/Modules/Core/Common/include/itkImageScanlineIterator.h +++ b/Modules/Core/Common/include/itkImageScanlineIterator.h @@ -99,7 +99,7 @@ class ITK_TEMPLATE_EXPORT ImageScanlineIterator : public ImageScanlineConstItera // Deduction guide for class template argument deduction (CTAD). template -ImageScanlineIterator(SmartPointer, const typename TImage::RegionType &)->ImageScanlineIterator; +ImageScanlineIterator(SmartPointer, const typename TImage::RegionType &) -> ImageScanlineIterator; } // end namespace itk diff --git a/Modules/Core/Common/include/itkImageSource.hxx b/Modules/Core/Common/include/itkImageSource.hxx index bfe8a1ec015..6142c980a8c 100644 --- a/Modules/Core/Common/include/itkImageSource.hxx +++ b/Modules/Core/Common/include/itkImageSource.hxx @@ -52,7 +52,8 @@ ImageSource::ImageSource() } template -ProcessObject::DataObjectPointer ImageSource::MakeOutput(ProcessObject::DataObjectPointerArraySizeType) +ProcessObject::DataObjectPointer +ImageSource::MakeOutput(ProcessObject::DataObjectPointerArraySizeType) { return TOutputImage::New().GetPointer(); } diff --git a/Modules/Core/Common/include/itkImportImageContainer.h b/Modules/Core/Common/include/itkImportImageContainer.h index 189dfcb6a5a..90f25ab04b8 100644 --- a/Modules/Core/Common/include/itkImportImageContainer.h +++ b/Modules/Core/Common/include/itkImportImageContainer.h @@ -80,10 +80,18 @@ class ITK_TEMPLATE_EXPORT ImportImageContainer : public Object SetImportPointer(TElement * ptr, TElementIdentifier num, bool LetContainerManageMemory = false); /** Index operator. This version can be an lvalue. */ - TElement & operator[](const ElementIdentifier id) { return m_ImportPointer[id]; } + TElement & + operator[](const ElementIdentifier id) + { + return m_ImportPointer[id]; + } /** Index operator. This version can only be an rvalue */ - const TElement & operator[](const ElementIdentifier id) const { return m_ImportPointer[id]; } + const TElement & + operator[](const ElementIdentifier id) const + { + return m_ImportPointer[id]; + } /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ diff --git a/Modules/Core/Common/include/itkIndex.h b/Modules/Core/Common/include/itkIndex.h index af2f86f2612..d92ded7e1d7 100644 --- a/Modules/Core/Common/include/itkIndex.h +++ b/Modules/Core/Common/include/itkIndex.h @@ -209,7 +209,8 @@ struct ITK_TEMPLATE_EXPORT Index final /** * Multiply an index by a size (elementwise product). */ - const Self operator*(const SizeType & vec) const + const Self + operator*(const SizeType & vec) const { Self result; @@ -426,9 +427,17 @@ struct ITK_TEMPLATE_EXPORT Index final return false; } - constexpr reference operator[](size_type pos) { return m_InternalArray[pos]; } + constexpr reference + operator[](size_type pos) + { + return m_InternalArray[pos]; + } - constexpr const_reference operator[](size_type pos) const { return m_InternalArray[pos]; } + constexpr const_reference + operator[](size_type pos) const + { + return m_InternalArray[pos]; + } reference at(size_type pos) diff --git a/Modules/Core/Common/include/itkIndexRange.h b/Modules/Core/Common/include/itkIndexRange.h index 2cba176d8a7..b0af309ac4a 100644 --- a/Modules/Core/Common/include/itkIndexRange.h +++ b/Modules/Core/Common/include/itkIndexRange.h @@ -101,11 +101,19 @@ class IndexRange final /** Returns a reference to the current index. */ - constexpr reference operator*() const noexcept { return m_Index; } + constexpr reference + operator*() const noexcept + { + return m_Index; + } /** Returns a pointer to the current index. */ - constexpr pointer operator->() const noexcept { return &(**this); } + constexpr pointer + operator->() const noexcept + { + return &(**this); + } /** Prefix increment ('++it'). */ @@ -250,10 +258,18 @@ class IndexRange final struct ZeroIndex { // The "index" operator. - constexpr IndexValueType operator[](unsigned int) const { return 0; } + constexpr IndexValueType + operator[](unsigned int) const + { + return 0; + } // Implicitly converts to a default-initialized itk::Index. - constexpr operator IndexType() const { return IndexType(); } + constexpr + operator IndexType() const + { + return IndexType(); + } }; diff --git a/Modules/Core/Common/include/itkLightObject.h b/Modules/Core/Common/include/itkLightObject.h index 6fc299eec69..a2a70dcd47f 100644 --- a/Modules/Core/Common/include/itkLightObject.h +++ b/Modules/Core/Common/include/itkLightObject.h @@ -94,9 +94,11 @@ class ITKCommon_EXPORT LightObject #ifdef _WIN32 /** Used to avoid dll boundary problems. */ - void * operator new(size_t); + void * + operator new(size_t); - void * operator new[](size_t); + void * + operator new[](size_t); void operator delete(void *); diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index 18cae7892dc..6d6e68ac13a 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -315,7 +315,7 @@ namespace itk ITK_MACROEND_NOOP_STATEMENT #define itkSimpleFactoryOnlyNewMacro(x) \ - static auto New()->Pointer \ + static auto New() -> Pointer \ { \ Pointer smartPtr = ::itk::ObjectFactory::Create(); \ if (smartPtr == nullptr) \ @@ -1459,7 +1459,7 @@ itkDynamicCastInDebugMode(TSource x) # define ITK_NOEXCEPT_EXPR(X) noexcept(X) # define ITK_NULLPTR nullptr # define ITK_OVERRIDE override -# define ITK_STATIC_ASSERT(X) static_assert(X, # X) +# define ITK_STATIC_ASSERT(X) static_assert(X, #X) # define ITK_STATIC_ASSERT_MSG(X, MSG) static_assert(X, MSG) # define ITK_THREAD_LOCAL thread_local diff --git a/Modules/Core/Common/include/itkMapContainer.h b/Modules/Core/Common/include/itkMapContainer.h index 9a522117bdc..956087a6b43 100644 --- a/Modules/Core/Common/include/itkMapContainer.h +++ b/Modules/Core/Common/include/itkMapContainer.h @@ -181,8 +181,16 @@ class ITK_TEMPLATE_EXPORT MapContainer : m_Iter(i) {} - Iterator & operator*() { return *this; } - Iterator * operator->() { return this; } + Iterator & + operator*() + { + return *this; + } + Iterator * + operator->() + { + return this; + } Iterator & operator++() { @@ -266,8 +274,16 @@ class ITK_TEMPLATE_EXPORT MapContainer : m_Iter(r.m_Iter) {} - ConstIterator & operator*() { return *this; } - ConstIterator * operator->() { return this; } + ConstIterator & + operator*() + { + return *this; + } + ConstIterator * + operator->() + { + return this; + } ConstIterator & operator++() { diff --git a/Modules/Core/Common/include/itkMath.h b/Modules/Core/Common/include/itkMath.h index 17dadefcd70..ebeb0c1a404 100644 --- a/Modules/Core/Common/include/itkMath.h +++ b/Modules/Core/Common/include/itkMath.h @@ -793,11 +793,10 @@ UnsignedPower(const uintmax_t base, const uintmax_t exponent) noexcept // Uses recursive function calls because C++11 does not support other ways of // iterations for a constexpr function. - return (exponent == 0) - ? (assert(base > 0), 1) - : (exponent == 1) ? base - : UnsignedProduct(UnsignedPower(base, exponent / 2), - UnsignedPower(base, (exponent + 1) / 2)); + return (exponent == 0) ? (assert(base > 0), 1) + : (exponent == 1) ? base + : UnsignedProduct(UnsignedPower(base, exponent / 2), + UnsignedPower(base, (exponent + 1) / 2)); } diff --git a/Modules/Core/Common/include/itkMatrix.h b/Modules/Core/Common/include/itkMatrix.h index 017fef23072..59203d1f4a5 100644 --- a/Modules/Core/Common/include/itkMatrix.h +++ b/Modules/Core/Common/include/itkMatrix.h @@ -90,22 +90,28 @@ class ITK_TEMPLATE_EXPORT Matrix using CompatibleSquareMatrixType = Matrix; /** Matrix by Vector multiplication. */ - Vector operator*(const Vector & vect) const; + Vector + operator*(const Vector & vect) const; /** Matrix by Point multiplication. */ - Point operator*(const Point & pnt) const; + Point + operator*(const Point & pnt) const; /** Matrix by CovariantVector multiplication. */ - CovariantVector operator*(const CovariantVector & covect) const; + CovariantVector + operator*(const CovariantVector & covect) const; /** Matrix by vnl_vector_fixed multiplication. */ - vnl_vector_fixed operator*(const vnl_vector_fixed & inVNLvect) const; + vnl_vector_fixed + operator*(const vnl_vector_fixed & inVNLvect) const; /** Matrix by Matrix multiplication. */ - Self operator*(const CompatibleSquareMatrixType & matrix) const; + Self + operator*(const CompatibleSquareMatrixType & matrix) const; template - Matrix operator*(const vnl_matrix_fixed & matrix) const + Matrix + operator*(const vnl_matrix_fixed & matrix) const { const Matrix result(m_Matrix * matrix); return result; @@ -126,7 +132,8 @@ class ITK_TEMPLATE_EXPORT Matrix operator-=(const Self & matrix); /** Matrix by vnl_matrix multiplication. */ - vnl_matrix operator*(const vnl_matrix & matrix) const; + vnl_matrix + operator*(const vnl_matrix & matrix) const; /** Matrix by Matrix multiplication. */ void @@ -137,7 +144,8 @@ class ITK_TEMPLATE_EXPORT Matrix operator*=(const vnl_matrix & matrix); /** Matrix by vnl_vector multiplication. */ - vnl_vector operator*(const vnl_vector & vc) const; + vnl_vector + operator*(const vnl_vector & vc) const; /** Matrix by scalar multiplication. */ void @@ -147,7 +155,8 @@ class ITK_TEMPLATE_EXPORT Matrix } /** Matrix by scalar multiplication. */ - Self operator*(const T & value) const + Self + operator*(const T & value) const { Self result(*this); @@ -187,10 +196,18 @@ class ITK_TEMPLATE_EXPORT Matrix } /** Return a row of the matrix. */ - inline T * operator[](unsigned int i) { return m_Matrix[i]; } + inline T * + operator[](unsigned int i) + { + return m_Matrix[i]; + } /** Return a row of the matrix. */ - inline const T * operator[](unsigned int i) const { return m_Matrix[i]; } + inline const T * + operator[](unsigned int i) const + { + return m_Matrix[i]; + } /** Return the matrix. */ inline InternalMatrixType & diff --git a/Modules/Core/Common/include/itkMatrix.hxx b/Modules/Core/Common/include/itkMatrix.hxx index 28f1d8446c7..557dcef106e 100644 --- a/Modules/Core/Common/include/itkMatrix.hxx +++ b/Modules/Core/Common/include/itkMatrix.hxx @@ -26,7 +26,8 @@ namespace itk * Product by a Vector */ template -Vector Matrix::operator*(const Vector & vect) const +Vector +Matrix::operator*(const Vector & vect) const { Vector result; for (unsigned int r = 0; r < VRows; ++r) @@ -45,7 +46,8 @@ Vector Matrix::operator*(const Vector * Product by a Point */ template -Point Matrix::operator*(const Point & pnt) const +Point +Matrix::operator*(const Point & pnt) const { Point result; for (unsigned int r = 0; r < VRows; ++r) @@ -64,7 +66,8 @@ Point Matrix::operator*(const Point & * Product by a vnl_vector_fixed */ template -vnl_vector_fixed Matrix::operator*(const vnl_vector_fixed & inVNLvect) const +vnl_vector_fixed +Matrix::operator*(const vnl_vector_fixed & inVNLvect) const { vnl_vector_fixed result; for (unsigned int r = 0; r < VRows; ++r) @@ -83,7 +86,8 @@ vnl_vector_fixed Matrix::operator*(const vnl_vecto * Product by a CovariantVector */ template -CovariantVector Matrix::operator*(const CovariantVector & covect) const +CovariantVector +Matrix::operator*(const CovariantVector & covect) const { CovariantVector result; for (unsigned int r = 0; r < VRows; ++r) @@ -102,7 +106,8 @@ CovariantVector Matrix::operator*(const CovariantV * Product by a matrix */ template -Matrix Matrix::operator*(const CompatibleSquareMatrixType & matrix) const +Matrix +Matrix::operator*(const CompatibleSquareMatrixType & matrix) const { const Self result(m_Matrix * matrix.GetVnlMatrix()); return result; @@ -184,7 +189,8 @@ Matrix::operator-=(const Self & matrix) * Product by a vnl_matrix */ template -vnl_matrix Matrix::operator*(const vnl_matrix & matrix) const +vnl_matrix +Matrix::operator*(const vnl_matrix & matrix) const { return m_Matrix * matrix; } @@ -213,7 +219,8 @@ Matrix::operator*=(const vnl_matrix & matrix) * Product by a vnl_vector */ template -vnl_vector Matrix::operator*(const vnl_vector & vc) const +vnl_vector +Matrix::operator*(const vnl_vector & vc) const { return m_Matrix * vc; } diff --git a/Modules/Core/Common/include/itkMetaDataDictionary.h b/Modules/Core/Common/include/itkMetaDataDictionary.h index 9aad3891bf9..dfab483e6dc 100644 --- a/Modules/Core/Common/include/itkMetaDataDictionary.h +++ b/Modules/Core/Common/include/itkMetaDataDictionary.h @@ -121,12 +121,14 @@ class ITKCommon_EXPORT MetaDataDictionary // cannot be exported. This causes problems when building DLL's. // Here we inherit privately from std::map and provide a simple // API. The implementation will be in the DLL. - MetaDataObjectBase::Pointer & operator[](const std::string &); + MetaDataObjectBase::Pointer & + operator[](const std::string &); // \brief Get a constant point to a DataObject // // If the key does not exist then nullptr is returned. - const MetaDataObjectBase * operator[](const std::string &) const; + const MetaDataObjectBase * + operator[](const std::string &) const; const MetaDataObjectBase * Get(const std::string &) const; diff --git a/Modules/Core/Common/include/itkMetaProgrammingLibrary.h b/Modules/Core/Common/include/itkMetaProgrammingLibrary.h index 9714d15befc..8bc605f8ceb 100644 --- a/Modules/Core/Common/include/itkMetaProgrammingLibrary.h +++ b/Modules/Core/Common/include/itkMetaProgrammingLibrary.h @@ -44,7 +44,7 @@ struct TrueType using Type = TrueType; static constexpr ValueType Value = true; - operator ValueType() { return Value; } + operator ValueType() { return Value; } }; /** borrowed from ``. @@ -56,7 +56,7 @@ struct FalseType using ValueType = bool; using Type = FalseType; static constexpr ValueType Value = false; - operator ValueType() { return Value; } + operator ValueType() { return Value; } }; /** MPL \c if control-statement. diff --git a/Modules/Core/Common/include/itkNeighborhood.h b/Modules/Core/Common/include/itkNeighborhood.h index 6456ed81d84..ee71574f423 100644 --- a/Modules/Core/Common/include/itkNeighborhood.h +++ b/Modules/Core/Common/include/itkNeighborhood.h @@ -193,8 +193,16 @@ class ITK_TEMPLATE_EXPORT Neighborhood } /** Pass-through data access methods to the buffer. */ - TPixel & operator[](NeighborIndexType i) { return m_DataBuffer[i]; } - const TPixel & operator[](NeighborIndexType i) const { return m_DataBuffer[i]; } + TPixel & + operator[](NeighborIndexType i) + { + return m_DataBuffer[i]; + } + const TPixel & + operator[](NeighborIndexType i) const + { + return m_DataBuffer[i]; + } TPixel & GetElement(NeighborIndexType i) { @@ -249,8 +257,16 @@ class ITK_TEMPLATE_EXPORT Neighborhood } /** Get pixel value by offset */ - TPixel & operator[](const OffsetType & o) { return this->operator[](this->GetNeighborhoodIndex(o)); } - const TPixel & operator[](const OffsetType & o) const { return this->operator[](this->GetNeighborhoodIndex(o)); } + TPixel & + operator[](const OffsetType & o) + { + return this->operator[](this->GetNeighborhoodIndex(o)); + } + const TPixel & + operator[](const OffsetType & o) const + { + return this->operator[](this->GetNeighborhoodIndex(o)); + } /** Returns the itk::Offset from the center of the Neighborhood to the requested neighbor index. */ diff --git a/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h b/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h index e51bd9e147c..e0b1ee4faf8 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h +++ b/Modules/Core/Common/include/itkNeighborhoodAccessorFunctor.h @@ -88,7 +88,9 @@ class ITK_TEMPLATE_EXPORT NeighborhoodAccessorFunctor final return boundaryCondition->operator()(point_index, boundary_offset, data); } - void SetVectorLength(VectorLengthType) {} + void + SetVectorLength(VectorLengthType) + {} VectorLengthType SetVectorLength() { diff --git a/Modules/Core/Common/include/itkNeighborhoodAllocator.h b/Modules/Core/Common/include/itkNeighborhoodAllocator.h index fb66cd8ddcd..7e7476ed628 100644 --- a/Modules/Core/Common/include/itkNeighborhoodAllocator.h +++ b/Modules/Core/Common/include/itkNeighborhoodAllocator.h @@ -149,8 +149,16 @@ class NeighborhoodAllocator } /** Data access methods */ - const TPixel & operator[](unsigned int i) const { return m_Data[i]; } - TPixel & operator[](unsigned int i) { return m_Data[i]; } + const TPixel & + operator[](unsigned int i) const + { + return m_Data[i]; + } + TPixel & + operator[](unsigned int i) + { + return m_Data[i]; + } /** Allocates a buffer of size n */ void diff --git a/Modules/Core/Common/include/itkNumberToString.h b/Modules/Core/Common/include/itkNumberToString.h index de7b3eaec16..b599c0e4c67 100644 --- a/Modules/Core/Common/include/itkNumberToString.h +++ b/Modules/Core/Common/include/itkNumberToString.h @@ -56,10 +56,10 @@ class ITK_TEMPLATE_EXPORT NumberToString // declaration of specialization template <> ITKCommon_EXPORT std::string -NumberToString::operator()(double val) const; + NumberToString::operator()(double val) const; template <> ITKCommon_EXPORT std::string -NumberToString::operator()(float val) const; + NumberToString::operator()(float val) const; template <> class NumberToString diff --git a/Modules/Core/Common/include/itkNumericTraits.h b/Modules/Core/Common/include/itkNumericTraits.h index 871c86f7dc4..55bce536e3d 100644 --- a/Modules/Core/Common/include/itkNumericTraits.h +++ b/Modules/Core/Common/include/itkNumericTraits.h @@ -1799,8 +1799,16 @@ class NumericTraits : public std::numeric_limits> { return std::numeric_limits::max(); } - static constexpr Self min(Self) { return min(); } - static constexpr Self max(Self) { return max(); } + static constexpr Self + min(Self) + { + return min(); + } + static constexpr Self + max(Self) + { + return max(); + } static constexpr ValueType epsilon() { diff --git a/Modules/Core/Common/include/itkOctree.h b/Modules/Core/Common/include/itkOctree.h index 647468bf4cb..6d5544fa85d 100644 --- a/Modules/Core/Common/include/itkOctree.h +++ b/Modules/Core/Common/include/itkOctree.h @@ -149,7 +149,8 @@ class ITK_TEMPLATE_EXPORT Octree : public OctreeBase const unsigned int ysize, const unsigned int zsize) override; - void BuildFromImage(Image * fromImage); + void + BuildFromImage(Image * fromImage); Octree(); ~Octree() override; diff --git a/Modules/Core/Common/include/itkOffset.h b/Modules/Core/Common/include/itkOffset.h index 87a52713ff6..76edab28cd2 100644 --- a/Modules/Core/Common/include/itkOffset.h +++ b/Modules/Core/Common/include/itkOffset.h @@ -377,9 +377,17 @@ struct ITK_TEMPLATE_EXPORT Offset final return false; } - reference operator[](size_type pos) { return m_InternalArray[pos]; } + reference + operator[](size_type pos) + { + return m_InternalArray[pos]; + } - const_reference operator[](size_type pos) const { return m_InternalArray[pos]; } + const_reference + operator[](size_type pos) const + { + return m_InternalArray[pos]; + } reference at(size_type pos) diff --git a/Modules/Core/Common/include/itkOrientationAdapterBase.h b/Modules/Core/Common/include/itkOrientationAdapterBase.h index 30f47b3b0b8..52c64ae2652 100644 --- a/Modules/Core/Common/include/itkOrientationAdapterBase.h +++ b/Modules/Core/Common/include/itkOrientationAdapterBase.h @@ -53,10 +53,12 @@ class ITK_TEMPLATE_EXPORT [[deprecated("Since ITK 5.3 use SpatialOrientationAdap using DirectionType = typename ImageType::DirectionType; /** Convert direction cosines to the Orientation type */ - virtual OrientationType FromDirectionCosines(const DirectionType & Dir) = 0; + virtual OrientationType + FromDirectionCosines(const DirectionType & Dir) = 0; /** Convert Orientation type direction cosines */ - virtual DirectionType ToDirectionCosines(const OrientationType & Orient) = 0; + virtual DirectionType + ToDirectionCosines(const OrientationType & Orient) = 0; protected: /** destructor, to silence "virtual class has non-virtual destructor()" diff --git a/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h b/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h index 916587681b8..97a8c970224 100644 --- a/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h +++ b/Modules/Core/Common/include/itkPhasedArray3DSpecialCoordinatesImage.h @@ -367,7 +367,8 @@ class ITK_TEMPLATE_EXPORT PhasedArray3DSpecialCoordinatesImage : public SpecialC itkSetMacro(FirstSampleDistance, double); template - void TransformLocalVectorToPhysicalVector(FixedArray &) const + void + TransformLocalVectorToPhysicalVector(FixedArray &) const {} template diff --git a/Modules/Core/Common/include/itkPromoteType.h b/Modules/Core/Common/include/itkPromoteType.h index 39803d892b8..75f0cea3b75 100644 --- a/Modules/Core/Common/include/itkPromoteType.h +++ b/Modules/Core/Common/include/itkPromoteType.h @@ -113,17 +113,28 @@ struct PromoteType static Details::Identity<2>::Type & Check(typename Details::SizeToType<2, TA, TB>::Type, T); // Common numeric types - static Details::Identity<3>::Type & Check(typename Details::SizeToType<3, TA, TB>::Type, int); - static Details::Identity<4>::Type & Check(typename Details::SizeToType<4, TA, TB>::Type, int); - static Details::Identity<5>::Type & Check(typename Details::SizeToType<5, TA, TB>::Type, int); - static Details::Identity<6>::Type & Check(typename Details::SizeToType<6, TA, TB>::Type, int); - static Details::Identity<7>::Type & Check(typename Details::SizeToType<7, TA, TB>::Type, int); - static Details::Identity<8>::Type & Check(typename Details::SizeToType<8, TA, TB>::Type, int); - static Details::Identity<9>::Type & Check(typename Details::SizeToType<9, TA, TB>::Type, int); - static Details::Identity<10>::Type & Check(typename Details::SizeToType<10, TA, TB>::Type, int); - static Details::Identity<11>::Type & Check(typename Details::SizeToType<11, TA, TB>::Type, int); - static Details::Identity<12>::Type & Check(typename Details::SizeToType<12, TA, TB>::Type, int); - static Details::Identity<13>::Type & Check(typename Details::SizeToType<13, TA, TB>::Type, int); + static Details::Identity<3>::Type & + Check(typename Details::SizeToType<3, TA, TB>::Type, int); + static Details::Identity<4>::Type & + Check(typename Details::SizeToType<4, TA, TB>::Type, int); + static Details::Identity<5>::Type & + Check(typename Details::SizeToType<5, TA, TB>::Type, int); + static Details::Identity<6>::Type & + Check(typename Details::SizeToType<6, TA, TB>::Type, int); + static Details::Identity<7>::Type & + Check(typename Details::SizeToType<7, TA, TB>::Type, int); + static Details::Identity<8>::Type & + Check(typename Details::SizeToType<8, TA, TB>::Type, int); + static Details::Identity<9>::Type & + Check(typename Details::SizeToType<9, TA, TB>::Type, int); + static Details::Identity<10>::Type & + Check(typename Details::SizeToType<10, TA, TB>::Type, int); + static Details::Identity<11>::Type & + Check(typename Details::SizeToType<11, TA, TB>::Type, int); + static Details::Identity<12>::Type & + Check(typename Details::SizeToType<12, TA, TB>::Type, int); + static Details::Identity<13>::Type & + Check(typename Details::SizeToType<13, TA, TB>::Type, int); public: /** Type result of operations between \c TA and \c TB. diff --git a/Modules/Core/Common/include/itkRGBAPixel.h b/Modules/Core/Common/include/itkRGBAPixel.h index 65205478704..176d09e5956 100644 --- a/Modules/Core/Common/include/itkRGBAPixel.h +++ b/Modules/Core/Common/include/itkRGBAPixel.h @@ -111,8 +111,9 @@ class ITK_TEMPLATE_EXPORT RGBAPixel : public FixedArray Self operator+(const Self & r) const; Self - operator-(const Self & r) const; - Self operator*(const ComponentType & r) const; + operator-(const Self & r) const; + Self + operator*(const ComponentType & r) const; Self operator/(const ComponentType & r) const; diff --git a/Modules/Core/Common/include/itkRGBAPixel.hxx b/Modules/Core/Common/include/itkRGBAPixel.hxx index 65d5028ec28..ac2c91d1631 100644 --- a/Modules/Core/Common/include/itkRGBAPixel.hxx +++ b/Modules/Core/Common/include/itkRGBAPixel.hxx @@ -103,7 +103,8 @@ RGBAPixel::operator/=(const ComponentType & r) } template -RGBAPixel RGBAPixel::operator*(const ComponentType & r) const +RGBAPixel +RGBAPixel::operator*(const ComponentType & r) const { Self result; diff --git a/Modules/Core/Common/include/itkRGBPixel.h b/Modules/Core/Common/include/itkRGBPixel.h index 643024b15ad..030e635b181 100644 --- a/Modules/Core/Common/include/itkRGBPixel.h +++ b/Modules/Core/Common/include/itkRGBPixel.h @@ -120,8 +120,9 @@ class ITK_TEMPLATE_EXPORT RGBPixel : public FixedArray Self operator+(const Self & r) const; Self - operator-(const Self & r) const; - Self operator*(const ComponentType & r) const; + operator-(const Self & r) const; + Self + operator*(const ComponentType & r) const; Self operator/(const ComponentType & r) const; diff --git a/Modules/Core/Common/include/itkRGBPixel.hxx b/Modules/Core/Common/include/itkRGBPixel.hxx index e89f6ba17e5..42fee507e94 100644 --- a/Modules/Core/Common/include/itkRGBPixel.hxx +++ b/Modules/Core/Common/include/itkRGBPixel.hxx @@ -103,7 +103,8 @@ RGBPixel::operator/=(const ComponentType & r) } template -RGBPixel RGBPixel::operator*(const ComponentType & r) const +RGBPixel +RGBPixel::operator*(const ComponentType & r) const { Self result; diff --git a/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h b/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h index a6594c22c9b..ec74b895a13 100644 --- a/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h +++ b/Modules/Core/Common/include/itkShapedImageNeighborhoodRange.h @@ -347,7 +347,8 @@ class ShapedImageNeighborhoodRange final {} - TImageNeighborhoodPixelAccessPolicy CreatePixelAccessPolicy(EmptyPixelAccessParameter) const + TImageNeighborhoodPixelAccessPolicy + CreatePixelAccessPolicy(EmptyPixelAccessParameter) const { return TImageNeighborhoodPixelAccessPolicy{ m_ImageSize, m_OffsetTable, m_NeighborhoodAccessor, m_RelativeLocation + *m_CurrentOffset @@ -403,7 +404,8 @@ class ShapedImageNeighborhoodRange final /** Returns a reference to the current pixel. */ - reference operator*() const noexcept + reference + operator*() const noexcept { return reference{ m_ImageBufferPointer, CreatePixelAccessPolicy(m_OptionalPixelAccessParameter) }; } @@ -566,7 +568,11 @@ class ShapedImageNeighborhoodRange final /** Returns it[n] for iterator 'it' and integer value 'n'. */ - reference operator[](const difference_type n) const noexcept { return *(*this + n); } + reference + operator[](const difference_type n) const noexcept + { + return *(*this + n); + } }; static constexpr bool IsImageTypeConst = std::is_const_v; @@ -777,7 +783,8 @@ class ShapedImageNeighborhoodRange final * iterator::reference. The return value is a proxy object that behaves like a * reference to the pixel. */ - typename QualifiedIterator::reference operator[](const size_t n) const noexcept + typename QualifiedIterator::reference + operator[](const size_t n) const noexcept { assert(n < this->size()); assert(n <= static_cast(std::numeric_limits::max())); diff --git a/Modules/Core/Common/include/itkSize.h b/Modules/Core/Common/include/itkSize.h index 387a6c33899..c64c5504b32 100644 --- a/Modules/Core/Common/include/itkSize.h +++ b/Modules/Core/Common/include/itkSize.h @@ -138,7 +138,8 @@ struct ITK_TEMPLATE_EXPORT Size final } /** Multiply two sizes (elementwise product). */ - const Self operator*(const Self & vec) const + const Self + operator*(const Self & vec) const { Self result; @@ -350,9 +351,17 @@ struct ITK_TEMPLATE_EXPORT Size final return false; } - constexpr reference operator[](size_type pos) { return m_InternalArray[pos]; } + constexpr reference + operator[](size_type pos) + { + return m_InternalArray[pos]; + } - constexpr const_reference operator[](size_type pos) const { return m_InternalArray[pos]; } + constexpr const_reference + operator[](size_type pos) const + { + return m_InternalArray[pos]; + } reference at(size_type pos) diff --git a/Modules/Core/Common/include/itkSliceIterator.h b/Modules/Core/Common/include/itkSliceIterator.h index 13ab52ff284..9713d26c89b 100644 --- a/Modules/Core/Common/include/itkSliceIterator.h +++ b/Modules/Core/Common/include/itkSliceIterator.h @@ -95,11 +95,19 @@ class SliceIterator /** Returns the element at position n of the slice. Sets the * iterator to point to position n. */ - TPixel & operator[](OffsetValueType n) { return this->Loc(m_Pos = n); } + TPixel & + operator[](OffsetValueType n) + { + return this->Loc(m_Pos = n); + } /** Dereferences the iterator, returning the value that it points * to. */ - TPixel & operator*() { return Loc(m_Pos); } + TPixel & + operator*() + { + return Loc(m_Pos); + } /** Returns the logical && of the boolean == of two slice iterator positions, * stride, and start locations. */ diff --git a/Modules/Core/Common/include/itkSmartPointer.h b/Modules/Core/Common/include/itkSmartPointer.h index 6ed775ac68a..f027648d70d 100644 --- a/Modules/Core/Common/include/itkSmartPointer.h +++ b/Modules/Core/Common/include/itkSmartPointer.h @@ -103,11 +103,23 @@ class SmartPointer ~SmartPointer() { this->UnRegister(); } /** Overload operator -> */ - ObjectType * operator->() const noexcept { return m_Pointer; } + ObjectType * + operator->() const noexcept + { + return m_Pointer; + } - ObjectType & operator*() const noexcept { return *m_Pointer; } + ObjectType & + operator*() const noexcept + { + return *m_Pointer; + } - explicit operator bool() const noexcept { return m_Pointer != nullptr; } + explicit + operator bool() const noexcept + { + return m_Pointer != nullptr; + } /** Return pointer to object. */ operator ObjectType *() const noexcept { return m_Pointer; } @@ -160,7 +172,8 @@ class SmartPointer return *this; } - SmartPointer & operator=(std::nullptr_t) noexcept + SmartPointer & + operator=(std::nullptr_t) noexcept { this->UnRegister(); this->m_Pointer = nullptr; diff --git a/Modules/Core/Common/include/itkSmartPointerForwardReference.hxx b/Modules/Core/Common/include/itkSmartPointerForwardReference.hxx index 2e23865dcc9..e1cffae687a 100644 --- a/Modules/Core/Common/include/itkSmartPointerForwardReference.hxx +++ b/Modules/Core/Common/include/itkSmartPointerForwardReference.hxx @@ -54,7 +54,8 @@ SmartPointerForwardReference::~SmartPointerForwardReference() //---------------------------------------------------------------------------- template -T * SmartPointerForwardReference::operator->() const +T * +SmartPointerForwardReference::operator->() const { return m_Pointer; } diff --git a/Modules/Core/Common/include/itkSparseFieldLayer.h b/Modules/Core/Common/include/itkSparseFieldLayer.h index f5fb3331a0b..90efd525e2e 100644 --- a/Modules/Core/Common/include/itkSparseFieldLayer.h +++ b/Modules/Core/Common/include/itkSparseFieldLayer.h @@ -37,9 +37,17 @@ template class ITK_TEMPLATE_EXPORT ConstSparseFieldLayerIterator { public: - const TNodeType & operator*() const { return *m_Pointer; } + const TNodeType & + operator*() const + { + return *m_Pointer; + } - const TNodeType * operator->() const { return m_Pointer; } + const TNodeType * + operator->() const + { + return m_Pointer; + } const TNodeType * GetPointer() const @@ -104,9 +112,17 @@ class ITK_TEMPLATE_EXPORT SparseFieldLayerIterator : public ConstSparseFieldLaye : Superclass(p) {} - TNodeType & operator*() { return *this->m_Pointer; } + TNodeType & + operator*() + { + return *this->m_Pointer; + } - TNodeType * operator->() { return this->m_Pointer; } + TNodeType * + operator->() + { + return this->m_Pointer; + } TNodeType * GetPointer() diff --git a/Modules/Core/Common/include/itkSpatialOrientation.h b/Modules/Core/Common/include/itkSpatialOrientation.h index 2e72a69e31d..180389a47da 100644 --- a/Modules/Core/Common/include/itkSpatialOrientation.h +++ b/Modules/Core/Common/include/itkSpatialOrientation.h @@ -461,7 +461,7 @@ extern ITKCommon_EXPORT std::ostream & extern ITKCommon_EXPORT std::ostream & operator<<(std::ostream & out, const SpatialOrientationEnums::CoordinateMajornessTerms value); extern ITKCommon_EXPORT std::ostream & - operator<<(std::ostream & out, const SpatialOrientationEnums::ValidCoordinateOrientations value); +operator<<(std::ostream & out, const SpatialOrientationEnums::ValidCoordinateOrientations value); #ifndef ITK_LEGACY_REMOVE namespace SpatialOrientation diff --git a/Modules/Core/Common/include/itkSpecialCoordinatesImage.h b/Modules/Core/Common/include/itkSpecialCoordinatesImage.h index bd63f53fd89..aa3bb0d306d 100644 --- a/Modules/Core/Common/include/itkSpecialCoordinatesImage.h +++ b/Modules/Core/Common/include/itkSpecialCoordinatesImage.h @@ -223,13 +223,21 @@ class ITK_TEMPLATE_EXPORT SpecialCoordinatesImage : public ImageBaseGetPixel(index); } + TPixel & + operator[](const IndexType & index) + { + return this->GetPixel(index); + } /** \brief Access a pixel. This version can only be an rvalue. * * For efficiency, this function does not check that the * image has actually been allocated yet. */ - const TPixel & operator[](const IndexType & index) const { return this->GetPixel(index); } + const TPixel & + operator[](const IndexType & index) const + { + return this->GetPixel(index); + } /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ diff --git a/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h b/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h index 874429862c4..1efcad3e5b7 100644 --- a/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h +++ b/Modules/Core/Common/include/itkSymmetricSecondRankTensor.h @@ -156,7 +156,8 @@ class ITK_TEMPLATE_EXPORT SymmetricSecondRankTensor : public FixedArray::operator/=(const RealValueType & r) * Performs multiplication with a scalar */ template -SymmetricSecondRankTensor SymmetricSecondRankTensor::operator*( - const RealValueType & r) const +SymmetricSecondRankTensor +SymmetricSecondRankTensor::operator*(const RealValueType & r) const { Self result; diff --git a/Modules/Core/Common/include/itkThreadSupport.h b/Modules/Core/Common/include/itkThreadSupport.h index 860898c6980..723225efae4 100644 --- a/Modules/Core/Common/include/itkThreadSupport.h +++ b/Modules/Core/Common/include/itkThreadSupport.h @@ -97,8 +97,8 @@ struct ConditionVariableType // threads to wake up and // release the semaphore - int m_WasBroadcast; // Used as boolean. Keeps track of whether - // we were broadcasting or signaling + int m_WasBroadcast; // Used as boolean. Keeps track of whether + // we were broadcasting or signaling #endif }; diff --git a/Modules/Core/Common/include/itkValarrayImageContainer.h b/Modules/Core/Common/include/itkValarrayImageContainer.h index 7cf966d5ade..d5c492158dc 100644 --- a/Modules/Core/Common/include/itkValarrayImageContainer.h +++ b/Modules/Core/Common/include/itkValarrayImageContainer.h @@ -90,10 +90,18 @@ class ITK_TEMPLATE_EXPORT ValarrayImageContainer itkOverrideGetNameOfClassMacro(ValarrayImageContainer); /** Index operator. This version can be an lvalue. */ - TElement & operator[](const ElementIdentifier id) { return this->ValarrayType::operator[](id); } + TElement & + operator[](const ElementIdentifier id) + { + return this->ValarrayType::operator[](id); + } /** Index operator. This version can only be an rvalue */ - const TElement & operator[](const ElementIdentifier id) const { return this->ValarrayType::operator[](id); } + const TElement & + operator[](const ElementIdentifier id) const + { + return this->ValarrayType::operator[](id); + } /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ diff --git a/Modules/Core/Common/include/itkVariableLengthVector.h b/Modules/Core/Common/include/itkVariableLengthVector.h index 1addcd424c5..9568bd284d1 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.h +++ b/Modules/Core/Common/include/itkVariableLengthVector.h @@ -589,9 +589,17 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector } /** Return reference to the element at specified index. No range checking. */ - TValue & operator[](unsigned int i) { return this->m_Data[i]; } + TValue & + operator[](unsigned int i) + { + return this->m_Data[i]; + } /** Return reference to the element at specified index. No range checking. */ - const TValue & operator[](unsigned int i) const { return this->m_Data[i]; } + const TValue & + operator[](unsigned int i) const + { + return this->m_Data[i]; + } /** Get one element */ const TValue & @@ -1226,7 +1234,8 @@ struct VariableLengthVectorExpression * * \c Load() is in charge of fetching the i-th element of the sub-expressions */ - ResType operator[](unsigned int idx) const + ResType + operator[](unsigned int idx) const { itkAssertInDebugAndIgnoreInReleaseMacro(idx < Size()); return TBinaryOp::Apply(Details::GetType::Load(m_lhs, idx), Details::GetType::Load(m_rhs, idx)); diff --git a/Modules/Core/Common/include/itkVariableSizeMatrix.h b/Modules/Core/Common/include/itkVariableSizeMatrix.h index ef302d781cf..f3ee84e4e7d 100644 --- a/Modules/Core/Common/include/itkVariableSizeMatrix.h +++ b/Modules/Core/Common/include/itkVariableSizeMatrix.h @@ -56,10 +56,12 @@ class ITK_TEMPLATE_EXPORT VariableSizeMatrix using InternalMatrixType = vnl_matrix; /** Matrix by Vector multiplication. */ - Array operator*(const Array & vect) const; + Array + operator*(const Array & vect) const; /** Matrix by Matrix multiplication. */ - Self operator*(const Self & matrix) const; + Self + operator*(const Self & matrix) const; /** Matrix addition. */ Self @@ -80,7 +82,8 @@ class ITK_TEMPLATE_EXPORT VariableSizeMatrix operator-(); /** Matrix by vnl_matrix multiplication. */ - vnl_matrix operator*(const vnl_matrix & matrix) const; + vnl_matrix + operator*(const vnl_matrix & matrix) const; /** Matrix by Matrix multiplication. */ void @@ -91,7 +94,8 @@ class ITK_TEMPLATE_EXPORT VariableSizeMatrix operator*=(const vnl_matrix & matrix); /** Matrix by vnl_vector multiplication. */ - vnl_vector operator*(const vnl_vector & vc) const; + vnl_vector + operator*(const vnl_vector & vc) const; /** Matrix by scalar multiplication. */ void @@ -101,7 +105,8 @@ class ITK_TEMPLATE_EXPORT VariableSizeMatrix } /** Matrix by scalar multiplication. */ - Self operator*(const T & value) const + Self + operator*(const T & value) const { Self result(*this); @@ -141,10 +146,18 @@ class ITK_TEMPLATE_EXPORT VariableSizeMatrix } /** Return a row of the matrix. */ - inline T * operator[](unsigned int i) { return m_Matrix[i]; } + inline T * + operator[](unsigned int i) + { + return m_Matrix[i]; + } /** Return a row of the matrix. */ - inline const T * operator[](unsigned int i) const { return m_Matrix[i]; } + inline const T * + operator[](unsigned int i) const + { + return m_Matrix[i]; + } /** Return the matrix. */ inline InternalMatrixType & diff --git a/Modules/Core/Common/include/itkVariableSizeMatrix.hxx b/Modules/Core/Common/include/itkVariableSizeMatrix.hxx index d6ce69e35a9..e8f6671f4af 100644 --- a/Modules/Core/Common/include/itkVariableSizeMatrix.hxx +++ b/Modules/Core/Common/include/itkVariableSizeMatrix.hxx @@ -31,7 +31,8 @@ VariableSizeMatrix::VariableSizeMatrix(unsigned int rows, unsigned int cols) * Product by a Vector */ template -Array VariableSizeMatrix::operator*(const Array & vect) const +Array +VariableSizeMatrix::operator*(const Array & vect) const { unsigned int rows = this->Rows(); unsigned int cols = this->Cols(); @@ -59,7 +60,8 @@ Array VariableSizeMatrix::operator*(const Array & vect) const * Product by a matrix */ template -VariableSizeMatrix VariableSizeMatrix::operator*(const Self & matrix) const +VariableSizeMatrix +VariableSizeMatrix::operator*(const Self & matrix) const { if (this->Cols() != matrix.Rows()) { @@ -188,7 +190,8 @@ VariableSizeMatrix::operator-() * Product by a vnl_matrix */ template -vnl_matrix VariableSizeMatrix::operator*(const vnl_matrix & matrix) const +vnl_matrix +VariableSizeMatrix::operator*(const vnl_matrix & matrix) const { return m_Matrix * matrix; } @@ -217,7 +220,8 @@ VariableSizeMatrix::operator*=(const vnl_matrix & matrix) * Product by a vnl_vector */ template -vnl_vector VariableSizeMatrix::operator*(const vnl_vector & vc) const +vnl_vector +VariableSizeMatrix::operator*(const vnl_vector & vc) const { return m_Matrix * vc; } diff --git a/Modules/Core/Common/include/itkVector.h b/Modules/Core/Common/include/itkVector.h index f9b8e459c1a..413fe8320b7 100644 --- a/Modules/Core/Common/include/itkVector.h +++ b/Modules/Core/Common/include/itkVector.h @@ -199,11 +199,13 @@ class ITK_TEMPLATE_EXPORT Vector : public FixedArray /** Vector operator*. Performs the inner product of two vectors. * this is also known as the scalar product. */ - ValueType operator*(const Self & other) const; + ValueType + operator*(const Self & other) const; /** Scalar operator*. Scale the elements of a vector by a scalar. * Return a new vector. */ - inline Self operator*(const ValueType & value) const + inline Self + operator*(const ValueType & value) const { Self result; @@ -294,7 +296,8 @@ class ITK_TEMPLATE_EXPORT Vector : public FixedArray /** Premultiply Operator for product of a vector and a scalar. * Vector< T, N > = T * Vector< T,N > */ template -inline Vector operator*(const T & scalar, const Vector & v) +inline Vector +operator*(const T & scalar, const Vector & v) { return v.operator*(scalar); } diff --git a/Modules/Core/Common/include/itkVector.hxx b/Modules/Core/Common/include/itkVector.hxx index aa282a646b0..ecc997f62ff 100644 --- a/Modules/Core/Common/include/itkVector.hxx +++ b/Modules/Core/Common/include/itkVector.hxx @@ -195,7 +195,8 @@ operator>>(std::istream & is, Vector & vct) } template -typename Vector::ValueType Vector::operator*(const Self & other) const +typename Vector::ValueType +Vector::operator*(const Self & other) const { typename NumericTraits::AccumulateType value = T{}; for (unsigned int i = 0; i < TVectorDimension; ++i) diff --git a/Modules/Core/Common/include/itkVectorContainer.h b/Modules/Core/Common/include/itkVectorContainer.h index 0bcfbe09c0a..9ee59857bde 100644 --- a/Modules/Core/Common/include/itkVectorContainer.h +++ b/Modules/Core/Common/include/itkVectorContainer.h @@ -165,8 +165,16 @@ class ITK_TEMPLATE_EXPORT VectorContainer : m_Pos(d) , m_Iter(i) {} - Iterator & operator*() { return *this; } - Iterator * operator->() { return this; } + Iterator & + operator*() + { + return *this; + } + Iterator * + operator->() + { + return this; + } Iterator & operator++() { @@ -293,8 +301,16 @@ class ITK_TEMPLATE_EXPORT VectorContainer : m_Pos(r.m_Pos) , m_Iter(r.m_Iter) {} - ConstIterator & operator*() { return *this; } - ConstIterator * operator->() { return this; } + ConstIterator & + operator*() + { + return *this; + } + ConstIterator * + operator->() + { + return this; + } ConstIterator & operator++() { diff --git a/Modules/Core/Common/include/itkVectorImage.h b/Modules/Core/Common/include/itkVectorImage.h index e405ca612f7..0b1d468d968 100644 --- a/Modules/Core/Common/include/itkVectorImage.h +++ b/Modules/Core/Common/include/itkVectorImage.h @@ -274,13 +274,21 @@ class ITK_TEMPLATE_EXPORT VectorImage : public ImageBase * * For efficiency, this function does not check that the * image has actually been allocated yet. */ - PixelType operator[](const IndexType & index) { return this->GetPixel(index); } + PixelType + operator[](const IndexType & index) + { + return this->GetPixel(index); + } /** \brief Access a pixel. * * For efficiency, this function does not check that the * image has actually been allocated yet. */ - const PixelType operator[](const IndexType & index) const { return this->GetPixel(index); } + const PixelType + operator[](const IndexType & index) const + { + return this->GetPixel(index); + } /** Return a pointer to the beginning of the buffer. This is used by * the image iterator class. */ diff --git a/Modules/Core/Common/include/itkVersor.h b/Modules/Core/Common/include/itkVersor.h index b5a8c82e131..83b706e5146 100644 --- a/Modules/Core/Common/include/itkVersor.h +++ b/Modules/Core/Common/include/itkVersor.h @@ -149,7 +149,8 @@ class ITK_TEMPLATE_EXPORT Versor /** Versor operator*. Performs the composition of two versors. * this operation is NOT commutative. */ - Self operator*(const Self & v) const; + Self + operator*(const Self & v) const; /** Versor operator/. Performs the division of two versors. */ Self diff --git a/Modules/Core/Common/include/itkVersor.hxx b/Modules/Core/Common/include/itkVersor.hxx index 63901c6974f..f75c1c9040b 100644 --- a/Modules/Core/Common/include/itkVersor.hxx +++ b/Modules/Core/Common/include/itkVersor.hxx @@ -59,7 +59,8 @@ Versor::operator*=(const Self & v) } template -Versor Versor::operator*(const Self & v) const +Versor +Versor::operator*(const Self & v) const { Self result; diff --git a/Modules/Core/Common/include/itkWeakPointer.h b/Modules/Core/Common/include/itkWeakPointer.h index ca9320c1836..45aa1a56b5b 100644 --- a/Modules/Core/Common/include/itkWeakPointer.h +++ b/Modules/Core/Common/include/itkWeakPointer.h @@ -63,7 +63,11 @@ class WeakPointer {} /** Overload operator ->. */ - ObjectType * operator->() const { return m_Pointer; } + ObjectType * + operator->() const + { + return m_Pointer; + } /** Return pointer to object. */ operator ObjectType *() const { return m_Pointer; } diff --git a/Modules/Core/Common/include/itkWin32OutputWindow.h b/Modules/Core/Common/include/itkWin32OutputWindow.h index 97fbd874667..aa880c7a346 100644 --- a/Modules/Core/Common/include/itkWin32OutputWindow.h +++ b/Modules/Core/Common/include/itkWin32OutputWindow.h @@ -73,7 +73,7 @@ class ITKCommon_EXPORT Win32OutputWindow : public OutputWindow DisplayText(const char *) override; static LRESULT APIENTRY - WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); + WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); protected: Win32OutputWindow() = default; diff --git a/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h b/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h index 4f1edf0ae9d..0237e55f302 100644 --- a/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h +++ b/Modules/Core/Common/include/itkZeroFluxNeumannImageNeighborhoodPixelAccessPolicy.h @@ -67,9 +67,9 @@ class ZeroFluxNeumannImageNeighborhoodPixelAccessPolicy final GetClampedIndexValue(const IndexValueType indexValue, const ImageSizeValueType imageSizeValue) noexcept { return (indexValue <= 0) ? 0 - : (static_cast(indexValue) < imageSizeValue) - ? indexValue - : static_cast(imageSizeValue - 1); + : (static_cast(indexValue) < imageSizeValue) + ? indexValue + : static_cast(imageSizeValue - 1); } // Private helper function. Calculates and returns the index value of the diff --git a/Modules/Core/Common/src/itkArrayOutputSpecialization.cxx b/Modules/Core/Common/src/itkArrayOutputSpecialization.cxx index 5dd38fdaf24..d6802f9e270 100644 --- a/Modules/Core/Common/src/itkArrayOutputSpecialization.cxx +++ b/Modules/Core/Common/src/itkArrayOutputSpecialization.cxx @@ -22,7 +22,7 @@ namespace itk { template <> -std::ostream & operator<<(std::ostream & os, const Array & arr) +std::ostream & operator<< (std::ostream & os, const Array & arr) { os << '['; const size_t length = arr.size(); @@ -40,7 +40,7 @@ std::ostream & operator<<(std::ostream & os, const Array & arr) } template <> -std::ostream & operator<<(std::ostream & os, const Array & arr) +std::ostream & operator<< (std::ostream & os, const Array & arr) { os << '['; const size_t length = arr.size(); @@ -58,7 +58,7 @@ std::ostream & operator<<(std::ostream & os, const Array & arr) } template <> -std::ostream & operator<<(std::ostream & os, const Array2D & arr) +std::ostream & operator<< (std::ostream & os, const Array2D & arr) { const unsigned int numberOfRows = arr.rows(); const unsigned int numberOfColumns = arr.cols(); @@ -82,7 +82,7 @@ std::ostream & operator<<(std::ostream & os, const Array2D & arr } template <> -std::ostream & operator<<(std::ostream & os, const Array2D & arr) +std::ostream & operator<< (std::ostream & os, const Array2D & arr) { const unsigned int numberOfRows = arr.rows(); const unsigned int numberOfColumns = arr.cols(); diff --git a/Modules/Core/Common/src/itkCompensatedSummation.cxx b/Modules/Core/Common/src/itkCompensatedSummation.cxx index 26a32b14c5a..df1bd3bd95a 100644 --- a/Modules/Core/Common/src/itkCompensatedSummation.cxx +++ b/Modules/Core/Common/src/itkCompensatedSummation.cxx @@ -26,12 +26,12 @@ namespace itk { void ITKCommon_EXPORT - CompensatedSummationAddElement(float & compensation, float & sum, const float element) +CompensatedSummationAddElement(float & compensation, float & sum, const float element) { CompensatedSummationAddElement(compensation, sum, element, 1); } void ITKCommon_EXPORT - CompensatedSummationAddElement(double & compensation, double & sum, const double element) +CompensatedSummationAddElement(double & compensation, double & sum, const double element) { CompensatedSummationAddElement(compensation, sum, element, 1); } diff --git a/Modules/Core/Common/src/itkCovariantVector.cxx b/Modules/Core/Common/src/itkCovariantVector.cxx index 64e8ad75233..2f12b74d6c8 100644 --- a/Modules/Core/Common/src/itkCovariantVector.cxx +++ b/Modules/Core/Common/src/itkCovariantVector.cxx @@ -28,7 +28,7 @@ namespace itk */ void ITKCommon_EXPORT - CrossProduct(CovariantVector & c, const Vector & a, const Vector & b) +CrossProduct(CovariantVector & c, const Vector & a, const Vector & b) { c[0] = a[1] * b[2] - a[2] * b[1]; c[1] = a[2] * b[0] - a[0] * b[2]; @@ -36,7 +36,7 @@ void ITKCommon_EXPORT } void ITKCommon_EXPORT - CrossProduct(CovariantVector & c, const Vector & a, const Vector & b) +CrossProduct(CovariantVector & c, const Vector & a, const Vector & b) { c[0] = a[1] * b[2] - a[2] * b[1]; c[1] = a[2] * b[0] - a[0] * b[2]; @@ -44,7 +44,7 @@ void ITKCommon_EXPORT } void ITKCommon_EXPORT - CrossProduct(CovariantVector & c, const Vector & a, const Vector & b) +CrossProduct(CovariantVector & c, const Vector & a, const Vector & b) { c[0] = a[1] * b[2] - a[2] * b[1]; c[1] = a[2] * b[0] - a[0] * b[2]; diff --git a/Modules/Core/Common/src/itkFileOutputWindow.cxx b/Modules/Core/Common/src/itkFileOutputWindow.cxx index 44984d849c0..43bc59069ac 100644 --- a/Modules/Core/Common/src/itkFileOutputWindow.cxx +++ b/Modules/Core/Common/src/itkFileOutputWindow.cxx @@ -30,10 +30,7 @@ FileOutputWindow::FileOutputWindow() m_FileName = ""; } -FileOutputWindow::~FileOutputWindow() -{ - delete m_Stream; -} +FileOutputWindow::~FileOutputWindow() { delete m_Stream; } void FileOutputWindow::PrintSelf(std::ostream & os, Indent indent) const diff --git a/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx b/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx index aa9145cbefb..a01d2fabfd5 100644 --- a/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx +++ b/Modules/Core/Common/src/itkFloatingPointExceptions_unix.cxx @@ -157,8 +157,7 @@ FloatingPointExceptions::Enable() itk_feenableexcept(FE_DIVBYZERO); itk_feenableexcept(FE_INVALID); # if defined(ITK_FPE_USE_SIGNAL_HANDLER) - struct sigaction act - {}; + struct sigaction act{}; act.sa_sigaction = fhdl; sigemptyset(&act.sa_mask); act.sa_flags = SA_SIGINFO; diff --git a/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx b/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx index 2c3812a9fdd..c8f621417cb 100644 --- a/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx +++ b/Modules/Core/Common/src/itkImageRegionSplitterDirection.cxx @@ -22,10 +22,7 @@ namespace itk { -ImageRegionSplitterDirection::ImageRegionSplitterDirection() -{ - this->m_Direction = 0; -} +ImageRegionSplitterDirection::ImageRegionSplitterDirection() { this->m_Direction = 0; } void ImageRegionSplitterDirection::PrintSelf(std::ostream & os, Indent indent) const diff --git a/Modules/Core/Common/src/itkLightObject.cxx b/Modules/Core/Common/src/itkLightObject.cxx index f7a771c689e..507403767e5 100644 --- a/Modules/Core/Common/src/itkLightObject.cxx +++ b/Modules/Core/Common/src/itkLightObject.cxx @@ -96,13 +96,13 @@ LightObject::operator new[](size_t n) void LightObject::operator delete(void * m) { - delete[](char *) m; + delete[] (char *)m; } void LightObject::operator delete[](void * m, size_t) { - delete[](char *) m; + delete[] (char *)m; } #endif diff --git a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx index 61cbe7b657d..fea46c98e00 100644 --- a/Modules/Core/Common/src/itkMemoryUsageObserver.cxx +++ b/Modules/Core/Common/src/itkMemoryUsageObserver.cxx @@ -169,8 +169,8 @@ struct SYSTEM_PROCESSES ULONG pad4; ULONG pad5; # else - ULONG ProcessId; - ULONG InheritedFromProcessId; + ULONG ProcessId; + ULONG InheritedFromProcessId; # endif ULONG HandleCount; ULONG Reserved2[2]; @@ -211,8 +211,7 @@ WindowsMemoryUsageObserver::GetMemoryUsage() if (!m_hNTLib) { - itkGenericExceptionMacro("Can't find ntdll.dll. " - << "You should probably disable SUPPORT_TOOLHELP32"); + itkGenericExceptionMacro("Can't find ntdll.dll. " << "You should probably disable SUPPORT_TOOLHELP32"); } // the ntdll.dll library could not have been opened (file not found?) if (!ZwQuerySystemInformation) diff --git a/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx b/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx index c277e124947..0a3b2b0ce9a 100644 --- a/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx +++ b/Modules/Core/Common/src/itkMersenneTwisterRandomVariateGenerator.cxx @@ -92,10 +92,7 @@ MersenneTwisterRandomVariateGenerator::ResetNextSeed() } -MersenneTwisterRandomVariateGenerator::MersenneTwisterRandomVariateGenerator() -{ - SetSeed(121212); -} +MersenneTwisterRandomVariateGenerator::MersenneTwisterRandomVariateGenerator() { SetSeed(121212); } MersenneTwisterRandomVariateGenerator::~MersenneTwisterRandomVariateGenerator() = default; diff --git a/Modules/Core/Common/src/itkMetaDataDictionary.cxx b/Modules/Core/Common/src/itkMetaDataDictionary.cxx index 8edd058fd05..04113be49de 100644 --- a/Modules/Core/Common/src/itkMetaDataDictionary.cxx +++ b/Modules/Core/Common/src/itkMetaDataDictionary.cxx @@ -51,13 +51,15 @@ MetaDataDictionary::Print(std::ostream & os) const } } -MetaDataObjectBase::Pointer & MetaDataDictionary::operator[](const std::string & key) +MetaDataObjectBase::Pointer & +MetaDataDictionary::operator[](const std::string & key) { MakeUnique(); return (*m_Dictionary)[key]; } -const MetaDataObjectBase * MetaDataDictionary::operator[](const std::string & key) const +const MetaDataObjectBase * +MetaDataDictionary::operator[](const std::string & key) const { auto iter = m_Dictionary->find(key); if (iter == m_Dictionary->end()) diff --git a/Modules/Core/Common/src/itkMultiThreaderBase.cxx b/Modules/Core/Common/src/itkMultiThreaderBase.cxx index 0e233e2b6b8..f2338b20d72 100644 --- a/Modules/Core/Common/src/itkMultiThreaderBase.cxx +++ b/Modules/Core/Common/src/itkMultiThreaderBase.cxx @@ -481,10 +481,7 @@ MultiThreaderBase::ParallelizeArray(SizeValueType firstIndex, if (firstIndex + 1 < lastIndexPlus1) { - struct ArrayCallback acParams - { - aFunc, firstIndex, lastIndexPlus1, filter - }; + struct ArrayCallback acParams{ aFunc, firstIndex, lastIndexPlus1, filter }; this->SetSingleMethodAndExecute(&MultiThreaderBase::ParallelizeArrayHelper, &acParams); } else if (firstIndex + 1 == lastIndexPlus1) @@ -540,10 +537,7 @@ MultiThreaderBase::ParallelizeImageRegion(unsigned int } ProgressReporter progress(filter, 0, 1); - struct RegionAndCallback rnc - { - funcP, dimension, index, size, filter - }; + struct RegionAndCallback rnc{ funcP, dimension, index, size, filter }; this->SetSingleMethodAndExecute(&MultiThreaderBase::ParallelizeImageRegionHelper, &rnc); } diff --git a/Modules/Core/Common/src/itkNumericTraits.cxx b/Modules/Core/Common/src/itkNumericTraits.cxx index 550dad4a85a..9d1d225629a 100644 --- a/Modules/Core/Common/src/itkNumericTraits.cxx +++ b/Modules/Core/Common/src/itkNumericTraits.cxx @@ -44,11 +44,11 @@ template <> const std::complex NumericTraits>::One = std::complex(1, 0); template <> -const std::complex NumericTraits>::Zero = std::complex(0, - 0); +const std::complex NumericTraits>::Zero = + std::complex(0, 0); template <> -const std::complex NumericTraits>::One = std::complex(1, - 0); +const std::complex NumericTraits>::One = + std::complex(1, 0); template <> const std::complex NumericTraits>::Zero = std::complex(0, 0); @@ -66,11 +66,11 @@ template <> const std::complex NumericTraits>::One = std::complex(1L, 0L); template <> -const std::complex NumericTraits>::Zero = std::complex(0UL, - 0UL); +const std::complex NumericTraits>::Zero = + std::complex(0UL, 0UL); template <> -const std::complex NumericTraits>::One = std::complex(1UL, - 0UL); +const std::complex NumericTraits>::One = + std::complex(1UL, 0UL); #endif // !defined(ITK_LEGACY_REMOVE) template <> diff --git a/Modules/Core/Common/src/itkObject.cxx b/Modules/Core/Common/src/itkObject.cxx index 86001fc936b..e8d219fcb82 100644 --- a/Modules/Core/Common/src/itkObject.cxx +++ b/Modules/Core/Common/src/itkObject.cxx @@ -361,8 +361,7 @@ Object::Modified() const void Object::Register() const { - itkDebugMacro("Registered, " - << "ReferenceCount = " << (m_ReferenceCount + 1)); + itkDebugMacro("Registered, " << "ReferenceCount = " << (m_ReferenceCount + 1)); // call the parent Superclass::Register(); @@ -375,8 +374,7 @@ void Object::UnRegister() const noexcept { // call the parent - itkDebugMacro("UnRegistered, " - << "ReferenceCount = " << (m_ReferenceCount - 1)); + itkDebugMacro("UnRegistered, " << "ReferenceCount = " << (m_ReferenceCount - 1)); if ((m_ReferenceCount - 1) <= 0) { @@ -552,10 +550,7 @@ Object::Object() this->Modified(); } -Object::~Object() -{ - itkDebugMacro("Destructing!"); -} +Object::~Object() { itkDebugMacro("Destructing!"); } /** * Chaining method to print an object's instance variables, as well as diff --git a/Modules/Core/Common/src/itkObjectFactoryBase.cxx b/Modules/Core/Common/src/itkObjectFactoryBase.cxx index ca126369102..5fa492f3c24 100644 --- a/Modules/Core/Common/src/itkObjectFactoryBase.cxx +++ b/Modules/Core/Common/src/itkObjectFactoryBase.cxx @@ -256,7 +256,7 @@ ObjectFactoryBase::LoadDynamicFactories() # ifdef _WIN32 char PathSeparator = ';'; # else - char PathSeparator = ':'; + char PathSeparator = ':'; # endif const std::string itk_autoload_env{ "ITK_AUTOLOAD_PATH" }; diff --git a/Modules/Core/Common/src/itkOctreeNode.cxx b/Modules/Core/Common/src/itkOctreeNode.cxx index ecd4eebd0c0..7ab4dfa87e3 100644 --- a/Modules/Core/Common/src/itkOctreeNode.cxx +++ b/Modules/Core/Common/src/itkOctreeNode.cxx @@ -31,10 +31,7 @@ OctreeNode::OctreeNode() m_Branch = nullptr; } -OctreeNode::~OctreeNode() -{ - this->RemoveChildren(); -} +OctreeNode::~OctreeNode() { this->RemoveChildren(); } OctreeNode & OctreeNode::GetChild(const LeafIdentifierEnum ChildID) const diff --git a/Modules/Core/Common/src/itkOutputWindow.cxx b/Modules/Core/Common/src/itkOutputWindow.cxx index b6890046905..d1bb319e6af 100644 --- a/Modules/Core/Common/src/itkOutputWindow.cxx +++ b/Modules/Core/Common/src/itkOutputWindow.cxx @@ -42,10 +42,7 @@ struct OutputWindowGlobals /** * Prompting off by default */ -OutputWindow::OutputWindow() -{ - m_PromptUser = false; -} +OutputWindow::OutputWindow() { m_PromptUser = false; } OutputWindow::~OutputWindow() = default; diff --git a/Modules/Core/Common/src/itkProcessObject.cxx b/Modules/Core/Common/src/itkProcessObject.cxx index 81982e11638..4a8e6036c03 100644 --- a/Modules/Core/Common/src/itkProcessObject.cxx +++ b/Modules/Core/Common/src/itkProcessObject.cxx @@ -95,7 +95,8 @@ ProcessObject::MakeOutput(const DataObjectIdentifierType & name) } -DataObject::Pointer ProcessObject::MakeOutput(DataObjectPointerArraySizeType) +DataObject::Pointer +ProcessObject::MakeOutput(DataObjectPointerArraySizeType) { return static_cast(DataObject::New().GetPointer()); } diff --git a/Modules/Core/Common/src/itkProgressAccumulator.cxx b/Modules/Core/Common/src/itkProgressAccumulator.cxx index c1e40e1a8f2..41205a91675 100644 --- a/Modules/Core/Common/src/itkProgressAccumulator.cxx +++ b/Modules/Core/Common/src/itkProgressAccumulator.cxx @@ -32,10 +32,7 @@ ProgressAccumulator::ProgressAccumulator() m_CallbackCommand->SetCallbackFunction(this, &Self::ReportProgress); } -ProgressAccumulator::~ProgressAccumulator() -{ - UnregisterAllFilters(); -} +ProgressAccumulator::~ProgressAccumulator() { UnregisterAllFilters(); } void ProgressAccumulator::RegisterInternalFilter(GenericFilterType * filter, float weight) diff --git a/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx b/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx index d7a322759ba..d50fa5ccd35 100644 --- a/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx +++ b/Modules/Core/Common/src/itkSimpleFilterWatcher.cxx @@ -52,10 +52,7 @@ SimpleFilterWatcher::SimpleFilterWatcher() {} -SimpleFilterWatcher::SimpleFilterWatcher(const SimpleFilterWatcher & watch) -{ - this->DeepCopy(watch); -} +SimpleFilterWatcher::SimpleFilterWatcher(const SimpleFilterWatcher & watch) { this->DeepCopy(watch); } SimpleFilterWatcher & SimpleFilterWatcher::operator=(const SimpleFilterWatcher & watch) diff --git a/Modules/Core/Common/src/itkSmapsFileParser.cxx b/Modules/Core/Common/src/itkSmapsFileParser.cxx index 90e2e13ba14..57f8a7c5a76 100644 --- a/Modules/Core/Common/src/itkSmapsFileParser.cxx +++ b/Modules/Core/Common/src/itkSmapsFileParser.cxx @@ -20,7 +20,7 @@ namespace itk { bool ITKCommon_EXPORT - ci_equal(char a, char b) +ci_equal(char a, char b) { return tolower(static_cast(a)) == tolower(static_cast(b)); } @@ -346,10 +346,7 @@ struct MapRecordConditionalPlusor /** --- MapData --- **/ /** MadData destructor */ -MapData::~MapData() -{ - this->Reset(); -} +MapData::~MapData() { this->Reset(); } MapData::MemoryLoadType MapData::GetTotalMemoryUsage() diff --git a/Modules/Core/Common/src/itkStdStreamLogOutput.cxx b/Modules/Core/Common/src/itkStdStreamLogOutput.cxx index 7e7384b9ddb..b5f83935f0d 100644 --- a/Modules/Core/Common/src/itkStdStreamLogOutput.cxx +++ b/Modules/Core/Common/src/itkStdStreamLogOutput.cxx @@ -21,10 +21,7 @@ namespace itk { /** Constructor */ -StdStreamLogOutput::StdStreamLogOutput() -{ - this->m_Stream = nullptr; -} +StdStreamLogOutput::StdStreamLogOutput() { this->m_Stream = nullptr; } /** Destructor */ StdStreamLogOutput::~StdStreamLogOutput() diff --git a/Modules/Core/Common/src/itkVector.cxx b/Modules/Core/Common/src/itkVector.cxx index 44259f07492..8481814507a 100644 --- a/Modules/Core/Common/src/itkVector.cxx +++ b/Modules/Core/Common/src/itkVector.cxx @@ -28,7 +28,7 @@ namespace itk */ Vector ITKCommon_EXPORT - CrossProduct(const Vector & a, const Vector & b) +CrossProduct(const Vector & a, const Vector & b) { Vector c; c[0] = a[1] * b[2] - a[2] * b[1]; @@ -38,7 +38,7 @@ Vector ITKCommon_EXPORT } Vector ITKCommon_EXPORT - CrossProduct(const Vector & a, const Vector & b) +CrossProduct(const Vector & a, const Vector & b) { Vector c; c[0] = a[1] * b[2] - a[2] * b[1]; @@ -48,7 +48,7 @@ Vector ITKCommon_EXPORT } Vector ITKCommon_EXPORT - CrossProduct(const Vector & a, const Vector & b) +CrossProduct(const Vector & a, const Vector & b) { Vector c; c[0] = a[1] * b[2] - a[2] * b[1]; diff --git a/Modules/Core/Common/src/itkWin32OutputWindow.cxx b/Modules/Core/Common/src/itkWin32OutputWindow.cxx index 4e2b4ceb7bf..9e151d3ffc6 100644 --- a/Modules/Core/Common/src/itkWin32OutputWindow.cxx +++ b/Modules/Core/Common/src/itkWin32OutputWindow.cxx @@ -44,7 +44,7 @@ Win32OutputWindow::~Win32OutputWindow() /** */ LRESULT APIENTRY - Win32OutputWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) +Win32OutputWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { diff --git a/Modules/Core/Common/test/ClientTestLibraryA.h b/Modules/Core/Common/test/ClientTestLibraryA.h index cf717be9baa..3092c85ac5b 100644 --- a/Modules/Core/Common/test/ClientTestLibraryA.h +++ b/Modules/Core/Common/test/ClientTestLibraryA.h @@ -43,10 +43,10 @@ class ClientTestLibraryA_EXPORT ITKObjectProducer }; int ClientTestLibraryA_EXPORT - dynamic_castDownCastEquivalencyTable(const char * type, const char * instanceSource, const itk::Object * base); +dynamic_castDownCastEquivalencyTable(const char * type, const char * instanceSource, const itk::Object * base); int ClientTestLibraryA_EXPORT - dynamic_castDownCastImage(const char * type, const char * instanceSource, const itk::Object * base); +dynamic_castDownCastImage(const char * type, const char * instanceSource, const itk::Object * base); } // end namespace LibraryA diff --git a/Modules/Core/Common/test/ClientTestLibraryC.h b/Modules/Core/Common/test/ClientTestLibraryC.h index 79219d542d8..350bde3ce15 100644 --- a/Modules/Core/Common/test/ClientTestLibraryC.h +++ b/Modules/Core/Common/test/ClientTestLibraryC.h @@ -43,10 +43,10 @@ class ClientTestLibraryC_EXPORT ITKObjectProducer }; int ClientTestLibraryC_EXPORT - dynamic_castDownCastEquivalencyTable(const char * type, const char * instanceSource, const itk::Object * base); +dynamic_castDownCastEquivalencyTable(const char * type, const char * instanceSource, const itk::Object * base); int ClientTestLibraryC_EXPORT - dynamic_castDownCastImage(const char * type, const char * instanceSource, const itk::Object * base); +dynamic_castDownCastImage(const char * type, const char * instanceSource, const itk::Object * base); } // end namespace LibraryC diff --git a/Modules/Core/Common/test/SharedTestLibraryA.h b/Modules/Core/Common/test/SharedTestLibraryA.h index f8ebf69e00d..b823c17b2e2 100644 --- a/Modules/Core/Common/test/SharedTestLibraryA.h +++ b/Modules/Core/Common/test/SharedTestLibraryA.h @@ -23,6 +23,6 @@ #include void SharedTestLibraryA_EXPORT - bar(); +bar(); #endif diff --git a/Modules/Core/Common/test/SharedTestLibraryB.h b/Modules/Core/Common/test/SharedTestLibraryB.h index 9a00b166d75..add865bb3f7 100644 --- a/Modules/Core/Common/test/SharedTestLibraryB.h +++ b/Modules/Core/Common/test/SharedTestLibraryB.h @@ -23,6 +23,6 @@ #include void SharedTestLibraryB_EXPORT - foo(); +foo(); #endif diff --git a/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx b/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx index a5ed937ca90..fc477ef4a36 100644 --- a/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx +++ b/Modules/Core/Common/test/itkAdaptorComparisonTest.cxx @@ -198,14 +198,12 @@ itkAdaptorComparisonTest(int, char *[]) std::cout << "Speed of adaptor supporting iterator (for reference) \t"; - const clock_t adaptor_comp = [&]() -> auto - { + const clock_t adaptor_comp = [&]() -> auto { const auto start = clock(); AdaptorSupportedIteratorSpeed(scalar_image); const auto stop = clock(); return stop - start; - } - (); + }(); std::cout << adaptor_comp << std::endl; const clock_t no_adaptor_comp = [=](auto scalarImage) { diff --git a/Modules/Core/Common/test/itkAnatomicalOrientationGTest.cxx b/Modules/Core/Common/test/itkAnatomicalOrientationGTest.cxx index a77a3dfdf8b..4be819bfd80 100644 --- a/Modules/Core/Common/test/itkAnatomicalOrientationGTest.cxx +++ b/Modules/Core/Common/test/itkAnatomicalOrientationGTest.cxx @@ -169,8 +169,8 @@ TEST(AnatomicalOrientation, ConvertDirectionToPositiveEnum) EXPECT_EQ(OE::SPL, AnatomicalOrientation(d)); const itk::SpacePrecisionType data[] = { 0.5986634407395047, 0.22716302314740483, -0.768113953548866, - 0.5627936241740271, 0.563067040943212, 0.6051601804419384, - 0.5699696670095713, -0.794576911518317, 0.20924175102261847 }; + 0.5627936241740271, 0.563067040943212, 0.6051601804419384, + 0.5699696670095713, -0.794576911518317, 0.20924175102261847 }; ImageType::DirectionType::InternalMatrixType m{ data }; d.GetVnlMatrix() = m; EXPECT_EQ(OE::PIR, AnatomicalOrientation(d)); diff --git a/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx b/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx index 23bc60571f9..b72bf939917 100644 --- a/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx +++ b/Modules/Core/Common/test/itkCommandObserverObjectTest.cxx @@ -311,7 +311,7 @@ testLambdaCommand() ITK_TEST_EXPECT_EQUAL(1, cnt); ITK_TEST_EXPECT_EQUAL(1, name_of_class_cnt); - } // A DeleteEvent is called here! as object "o" is deleted + } // A DeleteEvent is called here! as object "o" is deleted ITK_TEST_EXPECT_EQUAL(2, cnt); // Verify that cnt really was incremented during DeleteEvent! ITK_TEST_EXPECT_EQUAL(2, name_of_class_cnt); return EXIT_SUCCESS; diff --git a/Modules/Core/Common/test/itkFilterDispatchTest.cxx b/Modules/Core/Common/test/itkFilterDispatchTest.cxx index bcf3f3f26fe..076c1713763 100644 --- a/Modules/Core/Common/test/itkFilterDispatchTest.cxx +++ b/Modules/Core/Common/test/itkFilterDispatchTest.cxx @@ -150,7 +150,8 @@ ExampleImageFilter::Execute(const DispatchBase &) * instantiation. */ template -void ExampleImageFilter::Execute(Dispatch<2>) +void +ExampleImageFilter::Execute(Dispatch<2>) { std::cout << "2d-specific Execute() has been called." << std::endl; @@ -170,7 +171,8 @@ void ExampleImageFilter::Execute(Dispatch<2>) * instantiation. */ template -void ExampleImageFilter::Execute(Dispatch<3>) +void +ExampleImageFilter::Execute(Dispatch<3>) { std::cout << "3d-specific Execute() has been called." << std::endl; @@ -190,7 +192,8 @@ void ExampleImageFilter::Execute(Dispatch<3>) * fail to compile. */ template -void ExampleImageFilter::Execute(Dispatch<0>) +void +ExampleImageFilter::Execute(Dispatch<0>) { // this_should_not_have_been_instantiated(); throw std::string("The 0-Dispatch method should not have been called."); diff --git a/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx b/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx index d4207ca470d..e7584b994b6 100644 --- a/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx +++ b/Modules/Core/Common/test/itkImageBufferRangeGTest.cxx @@ -747,7 +747,7 @@ TEST(ImageBufferRange, IteratorsSupportRandomAccess) static_assert(std::is_convertible_v b), bool>, "Return type tested"); static_assert(std::is_convertible_v= b), bool>, "Return type tested"); static_assert(std::is_convertible_v, "Return type tested"); - EXPECT_EQ(a 0); + EXPECT_EQ(a < b, b - a > 0); EXPECT_EQ(a > b, b < a); EXPECT_EQ(a >= b, !(a < b)); EXPECT_EQ(a <= b, !(b < a)); diff --git a/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx b/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx index c5f157273e1..15db221b08c 100644 --- a/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx +++ b/Modules/Core/Common/test/itkMultiThreaderParallelizeArrayTest.cxx @@ -70,8 +70,7 @@ itkMultiThreaderParallelizeArrayTest(int argc, char * argv[]) auto progressPO = SomeProcessObject::New(); auto showProgress = ShowProgress::New(); progressPO->AddObserver(itk::ProgressEvent(), showProgress); - mt->ParallelizeArray( - 1, size, [&vec](int i) { vec[i] = i; }, progressPO); + mt->ParallelizeArray(1, size, [&vec](int i) { vec[i] = i; }, progressPO); int result = EXIT_SUCCESS; if (vec[0] != 0) diff --git a/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx b/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx index 012a412d8c8..0d48f301861 100644 --- a/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx +++ b/Modules/Core/Common/test/itkShapedImageNeighborhoodRangeGTest.cxx @@ -855,7 +855,7 @@ TEST(ShapedImageNeighborhoodRange, IteratorsSupportRandomAccess) static_assert(std::is_convertible_v b), bool>, "Return type tested"); static_assert(std::is_convertible_v= b), bool>, "Return type tested"); static_assert(std::is_convertible_v, "Return type tested"); - EXPECT_EQ(a 0); + EXPECT_EQ(a < b, b - a > 0); EXPECT_EQ(a > b, b < a); EXPECT_EQ(a >= b, !(a < b)); EXPECT_EQ(a <= b, !(b < a)); diff --git a/Modules/Core/Common/test/itkSmartPointerTest.cxx b/Modules/Core/Common/test/itkSmartPointerTest.cxx index 671b5efe1bd..b729378cce3 100644 --- a/Modules/Core/Common/test/itkSmartPointerTest.cxx +++ b/Modules/Core/Common/test/itkSmartPointerTest.cxx @@ -44,8 +44,8 @@ class itkTestObject delete this; } } - inline friend std::ostream & - operator<<(std::ostream & os, itkTestObject const & o) + friend inline std::ostream & + operator<<(std::ostream & os, const itkTestObject & o) { os << "itkTestObject " << (const void *)&o << ' ' << o.m_ReferenceCount; return os; @@ -93,7 +93,9 @@ itkTestObjectSubClass::New() // This SHOULD NOT be used in ITK, all functions // should take raw pointers as arguments -void TestUpCastPointer(itkTestObject::Pointer) {} +void +TestUpCastPointer(itkTestObject::Pointer) +{} // Test a function that takes an itkTestObject raw pointer void diff --git a/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx b/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx index e8b8a3606c3..eaa1eaa6227 100644 --- a/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx +++ b/Modules/Core/Common/test/itkVariableLengthVectorTest.cxx @@ -288,128 +288,129 @@ itkVariableLengthVectorTest(int, char *[]) { // Testing arithmetic operations (and rvalue references) - { FloatVariableLengthVectorType v = f + f + f; - ASSERT(v[0] == 3.0 && v[1] == 6.0 && v[2] == 9.0, "Chained additions failed"); -} -{ // rvref + lv - FloatVariableLengthVectorType v = (f + f) + f; - ASSERT(v[0] == 3.0 && v[1] == 6.0 && v[2] == 9.0, "Chained additions failed"); -} -{ // lv + rvref - FloatVariableLengthVectorType v = f + (f + f); - ASSERT(v[0] == 3.0 && v[1] == 6.0 && v[2] == 9.0, "Chained additions failed"); -} -{ // 2xlv+lv ; rvref + rvref - FloatVariableLengthVectorType v = (f + f) + (f + f); - ASSERT(v[0] == 4.0 && v[1] == 8.0 && v[2] == 12.0, "Chained additions failed"); -} + { + FloatVariableLengthVectorType v = f + f + f; + ASSERT(v[0] == 3.0 && v[1] == 6.0 && v[2] == 9.0, "Chained additions failed"); + } + { // rvref + lv + FloatVariableLengthVectorType v = (f + f) + f; + ASSERT(v[0] == 3.0 && v[1] == 6.0 && v[2] == 9.0, "Chained additions failed"); + } + { // lv + rvref + FloatVariableLengthVectorType v = f + (f + f); + ASSERT(v[0] == 3.0 && v[1] == 6.0 && v[2] == 9.0, "Chained additions failed"); + } + { // 2xlv+lv ; rvref + rvref + FloatVariableLengthVectorType v = (f + f) + (f + f); + ASSERT(v[0] == 4.0 && v[1] == 8.0 && v[2] == 12.0, "Chained additions failed"); + } -{ - FloatVariableLengthVectorType v = f - f - f; - ASSERT(v[0] == -1.0 && v[1] == -2.0 && v[2] == -3.0, "Chained subtractions failed"); -} -{ // rvref - lv - FloatVariableLengthVectorType v = (f - f) - f; - ASSERT(v[0] == -1.0 && v[1] == -2.0 && v[2] == -3.0, "Chained subtractions failed"); -} -{ // lv - rvref - FloatVariableLengthVectorType v = f - (f - f); - ASSERT(v[0] == 1.0 && v[1] == 2.0 && v[2] == 3.0, "Chained subtractions failed"); -} -{ // 2xlv-lv ; rvref - rvref - FloatVariableLengthVectorType v = (f - f) - (f - f); - ASSERT(v[0] == 0.0 && v[1] == 0.0 && v[2] == 0.0, "Chained subtractions failed"); -} + { + FloatVariableLengthVectorType v = f - f - f; + ASSERT(v[0] == -1.0 && v[1] == -2.0 && v[2] == -3.0, "Chained subtractions failed"); + } + { // rvref - lv + FloatVariableLengthVectorType v = (f - f) - f; + ASSERT(v[0] == -1.0 && v[1] == -2.0 && v[2] == -3.0, "Chained subtractions failed"); + } + { // lv - rvref + FloatVariableLengthVectorType v = f - (f - f); + ASSERT(v[0] == 1.0 && v[1] == 2.0 && v[2] == 3.0, "Chained subtractions failed"); + } + { // 2xlv-lv ; rvref - rvref + FloatVariableLengthVectorType v = (f - f) - (f - f); + ASSERT(v[0] == 0.0 && v[1] == 0.0 && v[2] == 0.0, "Chained subtractions failed"); + } -{ // c + lv - FloatVariableLengthVectorType v = 2.f + f; - ASSERT(v[0] == 3.0 && v[1] == 4.0 && v[2] == 5.0, "Addition with scalar failed"); -} -{ // lv + c - FloatVariableLengthVectorType v = f + 2.f; - ASSERT(v[0] == 3.0 && v[1] == 4.0 && v[2] == 5.0, "Addition with scalar failed"); -} -{ // rvref + c - FloatVariableLengthVectorType v = (f + f) + 2.f; - ASSERT(v[0] == 4.0 && v[1] == 6.0 && v[2] == 8.0, "Addition with scalar failed"); -} -{ // c + rvref - FloatVariableLengthVectorType v = 2.f + (f + f); - ASSERT(v[0] == 4.0 && v[1] == 6.0 && v[2] == 8.0, "Addition with scalar failed"); -} + { // c + lv + FloatVariableLengthVectorType v = 2.f + f; + ASSERT(v[0] == 3.0 && v[1] == 4.0 && v[2] == 5.0, "Addition with scalar failed"); + } + { // lv + c + FloatVariableLengthVectorType v = f + 2.f; + ASSERT(v[0] == 3.0 && v[1] == 4.0 && v[2] == 5.0, "Addition with scalar failed"); + } + { // rvref + c + FloatVariableLengthVectorType v = (f + f) + 2.f; + ASSERT(v[0] == 4.0 && v[1] == 6.0 && v[2] == 8.0, "Addition with scalar failed"); + } + { // c + rvref + FloatVariableLengthVectorType v = 2.f + (f + f); + ASSERT(v[0] == 4.0 && v[1] == 6.0 && v[2] == 8.0, "Addition with scalar failed"); + } -{ // c - lv - FloatVariableLengthVectorType v = 2.f - f; - ASSERT(v[0] == 1.0 && v[1] == 0.0 && v[2] == -1.0, "Subtraction with scalar failed"); -} -{ // lv - c - FloatVariableLengthVectorType v = f - 2.f; - ASSERT(v[0] == -1.0 && v[1] == 0.0 && v[2] == 1.0, "Subtraction with scalar failed"); -} -{ // rvref - c - FloatVariableLengthVectorType v = (f + f) - 2.f; - ASSERT(v[0] == 0.0 && v[1] == 2.0 && v[2] == 4.0, "Subtraction with scalar failed"); -} -{ // c - rvref - FloatVariableLengthVectorType v = 2.f - (f + f); - ASSERT(v[0] == 0.0 && v[1] == -2.0 && v[2] == -4.0, "Subtraction with scalar failed"); -} + { // c - lv + FloatVariableLengthVectorType v = 2.f - f; + ASSERT(v[0] == 1.0 && v[1] == 0.0 && v[2] == -1.0, "Subtraction with scalar failed"); + } + { // lv - c + FloatVariableLengthVectorType v = f - 2.f; + ASSERT(v[0] == -1.0 && v[1] == 0.0 && v[2] == 1.0, "Subtraction with scalar failed"); + } + { // rvref - c + FloatVariableLengthVectorType v = (f + f) - 2.f; + ASSERT(v[0] == 0.0 && v[1] == 2.0 && v[2] == 4.0, "Subtraction with scalar failed"); + } + { // c - rvref + FloatVariableLengthVectorType v = 2.f - (f + f); + ASSERT(v[0] == 0.0 && v[1] == -2.0 && v[2] == -4.0, "Subtraction with scalar failed"); + } -{ // c * lv - FloatVariableLengthVectorType v = 2 * f; - ASSERT(v[0] == 2.0 && v[1] == 4.0 && v[2] == 6.0, "Multiplication with scalar failed"); -} -{ // lv * c - FloatVariableLengthVectorType v = f * 2; - ASSERT(v[0] == 2.0 && v[1] == 4.0 && v[2] == 6.0, "Multiplication with scalar failed"); -} -{ // rvref * c - FloatVariableLengthVectorType v = (f + f) * 2; - ASSERT(v[0] == 4.0 && v[1] == 8.0 && v[2] == 12.0, "Multiplication with scalar failed"); -} -{ // c * rvref - FloatVariableLengthVectorType v = 2 * (f + f); - ASSERT(v[0] == 4.0 && v[1] == 8.0 && v[2] == 12.0, "Multiplication with scalar failed"); -} + { // c * lv + FloatVariableLengthVectorType v = 2 * f; + ASSERT(v[0] == 2.0 && v[1] == 4.0 && v[2] == 6.0, "Multiplication with scalar failed"); + } + { // lv * c + FloatVariableLengthVectorType v = f * 2; + ASSERT(v[0] == 2.0 && v[1] == 4.0 && v[2] == 6.0, "Multiplication with scalar failed"); + } + { // rvref * c + FloatVariableLengthVectorType v = (f + f) * 2; + ASSERT(v[0] == 4.0 && v[1] == 8.0 && v[2] == 12.0, "Multiplication with scalar failed"); + } + { // c * rvref + FloatVariableLengthVectorType v = 2 * (f + f); + ASSERT(v[0] == 4.0 && v[1] == 8.0 && v[2] == 12.0, "Multiplication with scalar failed"); + } -{ // lv / c - FloatVariableLengthVectorType v = f / 2; - ASSERT(v[0] == 0.5 && v[1] == 1.0 && v[2] == 1.5, "Division with scalar failed"); -} -{ // rvref / c - FloatVariableLengthVectorType v = (f + f) / 2; - ASSERT(v[0] == 1.0 && v[1] == 2.0 && v[2] == 3.0, "Division with scalar failed"); -} -} + { // lv / c + FloatVariableLengthVectorType v = f / 2; + ASSERT(v[0] == 0.5 && v[1] == 1.0 && v[2] == 1.5, "Division with scalar failed"); + } + { // rvref / c + FloatVariableLengthVectorType v = (f + f) / 2; + ASSERT(v[0] == 1.0 && v[1] == 2.0 && v[2] == 3.0, "Division with scalar failed"); + } + } -{ // Testing arithmetic operations and on the fly conversions. - { // f[0]=1.0; f[1] = 2.0; f[2] = 3.0; - // g[0]=4.0; g[1] = 5.0; g[2] = 6.0; - // g += f+1 - FloatVariableLengthVectorType v = f + 2 * g; -ASSERT(v[0] == 13.0 && v[1] == 18.0 && v[2] == 23.0, "On-the-fly conversion failed; v=" << v); -} -{ - DoubleVariableLengthVectorType v = f + 2 * g; - ASSERT(v[0] == 13.0 && v[1] == 18.0 && v[2] == 23.0, "On-the-fly conversion failed; v=" << v); -} -} + { // Testing arithmetic operations and on the fly conversions. + { // f[0]=1.0; f[1] = 2.0; f[2] = 3.0; + // g[0]=4.0; g[1] = 5.0; g[2] = 6.0; + // g += f+1 + FloatVariableLengthVectorType v = f + 2 * g; + ASSERT(v[0] == 13.0 && v[1] == 18.0 && v[2] == 23.0, "On-the-fly conversion failed; v=" << v); + } + { + DoubleVariableLengthVectorType v = f + 2 * g; + ASSERT(v[0] == 13.0 && v[1] == 18.0 && v[2] == 23.0, "On-the-fly conversion failed; v=" << v); + } + } -{ - // Testing empty vectors - FloatVariableLengthVectorType v1{}; - FloatVariableLengthVectorType v2 = v1; - v1 = v2; + { + // Testing empty vectors + FloatVariableLengthVectorType v1{}; + FloatVariableLengthVectorType v2 = v1; + v1 = v2; - FloatVariableLengthVectorType v3; - FloatVariableLengthVectorType v4; - v1 = 2 * v2 + (v3 - v4) / 6; + FloatVariableLengthVectorType v3; + FloatVariableLengthVectorType v4; + v1 = 2 * v2 + (v3 - v4) / 6; - v1.SetSize(0, FloatVariableLengthVectorType::DontShrinkToFit(), FloatVariableLengthVectorType::KeepOldValues()); - v1.SetSize(1, FloatVariableLengthVectorType::DontShrinkToFit(), FloatVariableLengthVectorType::KeepOldValues()); -} + v1.SetSize(0, FloatVariableLengthVectorType::DontShrinkToFit(), FloatVariableLengthVectorType::KeepOldValues()); + v1.SetSize(1, FloatVariableLengthVectorType::DontShrinkToFit(), FloatVariableLengthVectorType::KeepOldValues()); + } -std::cout << (result == EXIT_SUCCESS ? "[PASSED]" : "[FAILED]") << std::endl; + std::cout << (result == EXIT_SUCCESS ? "[PASSED]" : "[FAILED]") << std::endl; -return result; + return result; } diff --git a/Modules/Core/GPUCommon/include/itkGPUImage.h b/Modules/Core/GPUCommon/include/itkGPUImage.h index 20b7da43e80..8c00bd7e943 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImage.h +++ b/Modules/Core/GPUCommon/include/itkGPUImage.h @@ -95,9 +95,11 @@ class ITK_TEMPLATE_EXPORT GPUImage : public Image TPixel & GetPixel(const IndexType & index); - const TPixel & operator[](const IndexType & index) const; + const TPixel & + operator[](const IndexType & index) const; - TPixel & operator[](const IndexType & index); + TPixel & + operator[](const IndexType & index); /** Explicit synchronize CPU/GPU buffers */ void diff --git a/Modules/Core/GPUCommon/include/itkGPUImage.hxx b/Modules/Core/GPUCommon/include/itkGPUImage.hxx index 2db43fc0962..d3eee7a71df 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImage.hxx +++ b/Modules/Core/GPUCommon/include/itkGPUImage.hxx @@ -107,7 +107,8 @@ GPUImage::GetPixel(const IndexType & index) } template -TPixel & GPUImage::operator[](const IndexType & index) +TPixel & +GPUImage::operator[](const IndexType & index) { /* Original version - very conservative m_DataManager->SetGPUBufferDirty(); @@ -118,7 +119,8 @@ TPixel & GPUImage::operator[](const IndexType & index) } template -const TPixel & GPUImage::operator[](const IndexType & index) const +const TPixel & +GPUImage::operator[](const IndexType & index) const { m_DataManager->UpdateCPUBuffer(); return Superclass::operator[](index); diff --git a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h index 1d83f362df2..31ef3b9f1d0 100644 --- a/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h +++ b/Modules/Core/ImageAdaptors/include/itkImageAdaptor.h @@ -224,7 +224,11 @@ class ITK_TEMPLATE_EXPORT ImageAdaptor : public ImageBaseGetPixel(index)); } + PixelType + operator[](const IndexType & index) const + { + return m_PixelAccessor.Get(m_Image->GetPixel(index)); + } /** Get the OffsetTable from the adapted image */ const OffsetValueType * diff --git a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx index 7a6fff154d1..bd9831c73e6 100644 --- a/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkConnectedRegionsMeshFilter.hxx @@ -439,7 +439,7 @@ ConnectedRegionsMeshFilter::PropagateConnectedWave() } } } // if visited - } // for all cells in wave + } // for all cells in wave tmpWave = m_Wave; m_Wave = m_Wave2; diff --git a/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx b/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx index dd52325c777..095d282a49a 100644 --- a/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx +++ b/Modules/Core/Mesh/include/itkImageToMeshFilter.hxx @@ -38,7 +38,8 @@ ImageToMeshFilter::ImageToMeshFilter() * Make Output */ template -DataObject::Pointer ImageToMeshFilter::MakeOutput(DataObjectPointerArraySizeType) +DataObject::Pointer +ImageToMeshFilter::MakeOutput(DataObjectPointerArraySizeType) { OutputMeshPointer outputMesh = OutputMeshType::New(); diff --git a/Modules/Core/Mesh/include/itkMeshSource.hxx b/Modules/Core/Mesh/include/itkMeshSource.hxx index b19e4e53ff2..3160b3b6641 100644 --- a/Modules/Core/Mesh/include/itkMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkMeshSource.hxx @@ -37,7 +37,8 @@ MeshSource::MeshSource() } template -typename MeshSource::DataObjectPointer MeshSource::MakeOutput(DataObjectPointerArraySizeType) +typename MeshSource::DataObjectPointer +MeshSource::MakeOutput(DataObjectPointerArraySizeType) { return TOutputMesh::New().GetPointer(); } diff --git a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx index 4d2e6b505f2..f97a13148bd 100644 --- a/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx +++ b/Modules/Core/Mesh/include/itkSimplexMeshVolumeCalculator.hxx @@ -182,8 +182,7 @@ SimplexMeshVolumeCalculator::CalculateTriangleVolume(InputPointType } else { - itkWarningMacro("Unpredicted situation...!" - << "absu: " << absu[0] << ", " << absu[1] << ", " << absu[2]); + itkWarningMacro("Unpredicted situation...!" << "absu: " << absu[0] << ", " << absu[1] << ", " << absu[2]); return; } diff --git a/Modules/Core/Mesh/include/itkSphereMeshSource.hxx b/Modules/Core/Mesh/include/itkSphereMeshSource.hxx index 2063a07a0c8..63834917151 100644 --- a/Modules/Core/Mesh/include/itkSphereMeshSource.hxx +++ b/Modules/Core/Mesh/include/itkSphereMeshSource.hxx @@ -115,8 +115,7 @@ SphereMeshSource::GenerateData() } p1[0] = m_Scale[0] * signu * - (std::pow(static_cast(itk::Math::abs(std::cos(u))), static_cast(m_Squareness1))) * - signv * + (std::pow(static_cast(itk::Math::abs(std::cos(u))), static_cast(m_Squareness1)))*signv * (std::pow(static_cast(itk::Math::abs(std::cos(v))), static_cast(m_Squareness2))) + m_Center[0]; @@ -130,8 +129,7 @@ SphereMeshSource::GenerateData() } p1[1] = m_Scale[1] * signu * - (std::pow(static_cast(itk::Math::abs(std::cos(u))), static_cast(m_Squareness1))) * - signv * + (std::pow(static_cast(itk::Math::abs(std::cos(u))), static_cast(m_Squareness1)))*signv * (std::pow(static_cast(itk::Math::abs(std::sin(v))), static_cast(m_Squareness2))) + m_Center[1]; diff --git a/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx b/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx index 0615a5a9a25..5ff2a269df9 100644 --- a/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx +++ b/Modules/Core/Mesh/include/itkVTKPolyDataReader.hxx @@ -59,8 +59,7 @@ VTKPolyDataReader::GenerateData() if (!inputFile.is_open()) { - itkExceptionMacro("Unable to open file\n" - << "inputFilename= " << m_FileName); + itkExceptionMacro("Unable to open file\n" << "inputFilename= " << m_FileName); } inputFile.imbue(std::locale::classic()); diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h index 64631eaa881..ecce2858de6 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshBaseIterator.h @@ -281,7 +281,11 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshIteratorGeom : public QuadEdgeMeshIterator QuadEdgeMeshIteratorGeom(const QuadEdgeMeshIteratorGeom &) = default; - OriginRefType operator*() { return (this->m_Iterator->GetOrigin()); } + OriginRefType + operator*() + { + return (this->m_Iterator->GetOrigin()); + } }; /** @@ -369,7 +373,11 @@ class ITK_TEMPLATE_EXPORT QuadEdgeMeshConstIteratorGeom : public QuadEdgeMeshCon return (*this); } - const OriginRefType operator*() const { return (this->m_Iterator->GetOrigin()); } + const OriginRefType + operator*() const + { + return (this->m_Iterator->GetOrigin()); + } }; } // namespace itk diff --git a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h index c73145b9b90..186562c7473 100644 --- a/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h +++ b/Modules/Core/QuadEdgeMesh/include/itkQuadEdgeMeshEulerOperatorFlipEdgeFunction.h @@ -49,7 +49,7 @@ class QuadEdgeMeshEulerOperatorFlipEdgeFunctionEnums }; // Define how to print enumerations extern ITKQuadEdgeMesh_EXPORT std::ostream & - operator<<(std::ostream & out, QuadEdgeMeshEulerOperatorFlipEdgeFunctionEnums::EdgeStatusType value); +operator<<(std::ostream & out, QuadEdgeMeshEulerOperatorFlipEdgeFunctionEnums::EdgeStatusType value); /** * \class QuadEdgeMeshEulerOperatorFlipEdgeFunction diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx index efcab2ba58c..373143d0070 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshBasicLayerTest.cxx @@ -105,7 +105,7 @@ itkQuadEdgeMeshBasicLayerTest(int, char *[]) std::cout << "IsOriginSet() nullptr value failed for edge number " << i << ". Failed" << std::endl; return EXIT_FAILURE; } // fi - } // rof + } // rof std::cout << "Passed" << std::endl; ////////////////////////////////////////////////////////// @@ -136,7 +136,7 @@ itkQuadEdgeMeshBasicLayerTest(int, char *[]) << e[i]->GetDestination() << ". Failed" << std::endl; return EXIT_FAILURE; } // fi - } // rof + } // rof std::cout << "Passed" << std::endl; ////////////////////////////////////////////////////////// diff --git a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx index 1122095e0a1..073dffc63f1 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkQuadEdgeMeshIteratorTest.cxx @@ -50,7 +50,7 @@ itkQuadEdgeMeshIteratorTest(int, char *[]) #define NumEdges 6 MeshType::PixelType a = std::sqrt(3.0) / 2.0; MeshType::PixelType points[NumPoints][3] = { { 1.0, 0.0, 0.0 }, { 0.5, a, 0.0 }, { -0.5, a, 0.0 }, - { -1.0, 0.0, 0.0 }, { -0.5, -a, 0.0 }, { 0.5, -a, 0.0 } }; + { -1.0, 0.0, 0.0 }, { -0.5, -a, 0.0 }, { 0.5, -a, 0.0 } }; MeshType::PointType pnts[NumPoints]; MeshType::PointIdentifier pids[NumPoints]; for (int i = 0; i < NumPoints; ++i) diff --git a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h index 27f5517f72e..9b59f86234f 100644 --- a/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h +++ b/Modules/Core/SpatialObjects/include/itkDTITubeSpatialObjectPoint.h @@ -45,7 +45,7 @@ class DTITubeSpatialObjectPointEnums }; // Define how to print enumeration extern ITKSpatialObjects_EXPORT std::ostream & - operator<<(std::ostream & out, const DTITubeSpatialObjectPointEnums::DTITubeSpatialObjectPointField value); +operator<<(std::ostream & out, const DTITubeSpatialObjectPointEnums::DTITubeSpatialObjectPointField value); /** * \class DTITubeSpatialObjectPoint * \brief Point used for a tube definition diff --git a/Modules/Core/SpatialObjects/src/itkSpatialObjectProperty.cxx b/Modules/Core/SpatialObjects/src/itkSpatialObjectProperty.cxx index 32a18972e62..18f4a2f3eb7 100644 --- a/Modules/Core/SpatialObjects/src/itkSpatialObjectProperty.cxx +++ b/Modules/Core/SpatialObjects/src/itkSpatialObjectProperty.cxx @@ -20,10 +20,7 @@ namespace itk { -SpatialObjectProperty::SpatialObjectProperty() -{ - this->Clear(); -} +SpatialObjectProperty::SpatialObjectProperty() { this->Clear(); } void SpatialObjectProperty::Clear() diff --git a/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx b/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx index 1c92584d774..ae266ab50f6 100644 --- a/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx +++ b/Modules/Core/TestKernel/test/itkGoogleTestFixture.cxx @@ -42,7 +42,4 @@ class GoogleTestFixture : public ::testing::Test } // namespace -TEST_F(GoogleTestFixture, t) -{ - EXPECT_EQ(1, m_C); -} +TEST_F(GoogleTestFixture, t) { EXPECT_EQ(1, m_C); } diff --git a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx index 2c20b603654..61d5bd0e591 100644 --- a/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx @@ -404,8 +404,7 @@ BSplineDeformableTransform::SetC } else { - itkExceptionMacro("SetCoefficientImage() requires that an array of " - << "correctly sized images be supplied."); + itkExceptionMacro("SetCoefficientImage() requires that an array of " << "correctly sized images be supplied."); } } diff --git a/Modules/Core/Transform/include/itkBSplineTransform.hxx b/Modules/Core/Transform/include/itkBSplineTransform.hxx index 06e97b0efff..adf11d6b078 100644 --- a/Modules/Core/Transform/include/itkBSplineTransform.hxx +++ b/Modules/Core/Transform/include/itkBSplineTransform.hxx @@ -440,8 +440,7 @@ BSplineTransform::SetCoefficient if (!validArrayOfImages) { - itkExceptionMacro("SetCoefficientImage() requires that an array of " - << "correctly sized images be supplied."); + itkExceptionMacro("SetCoefficientImage() requires that an array of " << "correctly sized images be supplied."); } diff --git a/Modules/Core/Transform/include/itkKernelTransform.hxx b/Modules/Core/Transform/include/itkKernelTransform.hxx index bdd7057db44..46c3dcdf924 100644 --- a/Modules/Core/Transform/include/itkKernelTransform.hxx +++ b/Modules/Core/Transform/include/itkKernelTransform.hxx @@ -72,14 +72,13 @@ void KernelTransform::ComputeG(const InputVectorType &, GMatrixType & itkNotUsed(gmatrix)) const { - itkExceptionMacro("ComputeG(vector,gmatrix) must be reimplemented" - << " in subclasses of KernelTransform."); + itkExceptionMacro("ComputeG(vector,gmatrix) must be reimplemented" << " in subclasses of KernelTransform."); } template const typename KernelTransform::GMatrixType & - KernelTransform::ComputeReflexiveG(PointsIterator) const +KernelTransform::ComputeReflexiveG(PointsIterator) const { m_GMatrix.fill(TParametersValueType{}); m_GMatrix.fill_diagonal(m_Stiffness); @@ -359,8 +358,7 @@ KernelTransform::ComputeJacobianWithRespectToP // FIXME: TODO // The Jacobian should be computable in terms of the matrices // used to Transform points... - itkExceptionMacro("Get[Local]Jacobian must be implemented in subclasses" - << " of KernelTransform."); + itkExceptionMacro("Get[Local]Jacobian must be implemented in subclasses" << " of KernelTransform."); } diff --git a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx index 1b8caae564b..450325f0600 100644 --- a/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx +++ b/Modules/Core/Transform/include/itkSimilarity2DTransform.hxx @@ -152,8 +152,7 @@ Similarity2DTransform::ComputeMatrixParameters() // https://en.cppreference.com/w/cpp/types/numeric_limits/epsilon if (m_Scale < std::numeric_limits::min()) { - itkExceptionMacro("Bad Rotation Matrix. Scale cannot be zero.\n" - << "m_Scale : " << m_Scale); + itkExceptionMacro("Bad Rotation Matrix. Scale cannot be zero.\n" << "m_Scale : " << m_Scale); } this->SetVarAngle(std::acos(this->GetMatrix()[0][0] / m_Scale)); diff --git a/Modules/Core/Transform/include/itkTranslationTransform.h b/Modules/Core/Transform/include/itkTranslationTransform.h index 42fde9e002a..bb951052e76 100644 --- a/Modules/Core/Transform/include/itkTranslationTransform.h +++ b/Modules/Core/Transform/include/itkTranslationTransform.h @@ -253,7 +253,7 @@ class ITK_TEMPLATE_EXPORT TranslationTransform : public Transform diff --git a/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx b/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx index 94fd5de9275..48dbc8fe5bb 100644 --- a/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkCenteredRigid2DTransformTest.cxx @@ -358,7 +358,7 @@ itkCenteredRigid2DTransformTest(int, char *[]) std::cerr << " [ FAILED ] " << std::endl; return EXIT_FAILURE; } // if - } // for j + } // for j } // for k diff --git a/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx b/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx index 7a18ea75fa0..d76351653c0 100644 --- a/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkEuler2DTransformTest.cxx @@ -334,7 +334,7 @@ itkEuler2DTransformTest(int, char *[]) std::cerr << " [ FAILED ] " << std::endl; return EXIT_FAILURE; } // if - } // for j + } // for j } // for k diff --git a/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx b/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx index d3d7ac5aa61..c4d38ec5282 100644 --- a/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx +++ b/Modules/Core/Transform/test/itkQuaternionRigidTransformTest.cxx @@ -461,7 +461,7 @@ itkQuaternionRigidTransformTest(int, char *[]) std::cerr << " [ FAILED ] " << std::endl; return EXIT_FAILURE; } // if - } // for j + } // for j } // for k diff --git a/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx b/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx index 46e96c9806d..05992c4da55 100644 --- a/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx +++ b/Modules/Core/Transform/test/itkSimilarity2DTransformTest.cxx @@ -417,7 +417,7 @@ itkSimilarity2DTransformTest(int, char *[]) std::cerr << " [ FAILED ] " << std::endl; return EXIT_FAILURE; } // if - } // for j + } // for j } // for k @@ -578,7 +578,7 @@ itkSimilarity2DTransformTest(int, char *[]) std::cerr << " [ FAILED ] " << std::endl; return EXIT_FAILURE; } // if - } // for j + } // for j } // for k diff --git a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx index f9532b0a9a7..5261a304405 100644 --- a/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx +++ b/Modules/Filtering/BiasCorrection/include/itkN4BiasFieldCorrectionImageFilter.hxx @@ -242,10 +242,10 @@ N4BiasFieldCorrectionImageFilter::Generat using CustomBinaryFilter = itk::BinaryGeneratorImageFilter; auto expAndDivFilter = CustomBinaryFilter::New(); auto expAndDivLambda = [](const typename InputImageType::PixelType & input, - const typename RealImageType::PixelType & biasField) -> typename OutputImageType::PixelType - { - return static_cast(input / std::exp(biasField)); - }; + const typename RealImageType::PixelType & biasField) -> + typename OutputImageType::PixelType { + return static_cast(input / std::exp(biasField)); + }; expAndDivFilter->SetFunctor(expAndDivLambda); expAndDivFilter->SetInput1(inputImage); expAndDivFilter->SetInput2(logBiasField); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx index 682355b79ce..bb97e5b3598 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryDilateImageFilter.hxx @@ -332,9 +332,9 @@ BinaryDilateImageFilter::GenerateData() progress.CompletedPixel(); } // if( nit.GetPixel( i ) == onTag ) - } // for (i = 0; i < neighborhoodSize; ++i) - } // while ( !propagQueue.empty() ) - } // if( bIsOnContour ) + } // for (i = 0; i < neighborhoodSize; ++i) + } // while ( !propagQueue.empty() ) + } // if( bIsOnContour ) else { tmpRegIndexIt.Set(innerTag); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx index ca442635943..c56d3776515 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryErodeImageFilter.hxx @@ -324,9 +324,9 @@ BinaryErodeImageFilter::GenerateData() progress.CompletedPixel(); } // if( nit.GetPixel( i ) == onTag ) - } // for (i = 0; i < neighborhoodSize; ++i) - } // while ( !propagQueue.empty() ) - } // if( bIsOnContour ) + } // for (i = 0; i < neighborhoodSize; ++i) + } // while ( !propagQueue.empty() ) + } // if( bIsOnContour ) else { tmpRegIndexIt.Set(innerTag); diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx index 7f3f889e42d..ca3daa58bad 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx @@ -197,7 +197,7 @@ BinaryMorphologyImageFilter::AnalyzeKernel() } } } // while ( !propagQueue.empty() ) - } // if( kernelImageItIndex.Get() ) + } // if( kernelImageItIndex.Get() ) ++kernelImageItIndex; ++kernel_it; @@ -300,7 +300,7 @@ BinaryMorphologyImageFilter::AnalyzeKernel() } } } // for( kernelOnElementsIt = kernelOnElements.begin(); ... - } // for( ii = 0; ii < adjNeigh.Size(); ++ii ) + } // for( ii = 0; ii < adjNeigh.Size(); ++ii ) // For the particular case of the m_KernelDifferenceSets at the // center of the kernel ( the difference set is theoretically empty diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx index d9fe7392f0e..8dc636a2860 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryThinningImageFilter.hxx @@ -272,7 +272,7 @@ BinaryThinningImageFilter::ComputeThinImage() thinImage->SetPixel(*pixelsToDeleteIt, 0); } } // end step loop - } // end noChange while loop + } // end noChange while loop itkDebugMacro("ComputeThinImage End"); } diff --git a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h index 3d8aed81f6b..cf6f87fc466 100644 --- a/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h +++ b/Modules/Filtering/Colormap/include/itkScalarToRGBColormapImageFilter.h @@ -74,7 +74,7 @@ static constexpr RGBColormapFilterEnum OverUnder = RGBColormapFilterEnum::OverUn #endif /** Define how to print enumerations */ extern ITKColormap_EXPORT std::ostream & - operator<<(std::ostream & out, const ScalarToRGBColormapImageFilterEnums::RGBColormapFilter value); +operator<<(std::ostream & out, const ScalarToRGBColormapImageFilterEnums::RGBColormapFilter value); /** * \class ScalarToRGBColormapImageFilter * \brief Implements pixel-wise intensity->rgb mapping operation on one image. diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h index f56c440a0a2..be046213d62 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilterBase.h @@ -43,7 +43,7 @@ class ConvolutionImageFilterBaseEnums }; /** Define how to print enumerations */ extern ITKConvolution_EXPORT std::ostream & - operator<<(std::ostream & out, const ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion value); +operator<<(std::ostream & out, const ConvolutionImageFilterBaseEnums::ConvolutionImageFilterOutputRegion value); /** * \class ConvolutionImageFilterBase diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h index 1a02e0f46cb..3fa77ae658c 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingBaseImageFilter.h @@ -75,12 +75,12 @@ class PatchBasedDenoisingBaseImageFilterEnums }; // Define how to print enumeration extern ITKDenoising_EXPORT std::ostream & - operator<<(std::ostream & out, const PatchBasedDenoisingBaseImageFilterEnums::NoiseModel value); +operator<<(std::ostream & out, const PatchBasedDenoisingBaseImageFilterEnums::NoiseModel value); extern ITKDenoising_EXPORT std::ostream & - operator<<(std::ostream & out, const PatchBasedDenoisingBaseImageFilterEnums::ComponentSpace value); +operator<<(std::ostream & out, const PatchBasedDenoisingBaseImageFilterEnums::ComponentSpace value); // Define how to print enumeration extern ITKDenoising_EXPORT std::ostream & - operator<<(std::ostream & out, const PatchBasedDenoisingBaseImageFilterEnums::FilterState value); +operator<<(std::ostream & out, const PatchBasedDenoisingBaseImageFilterEnums::FilterState value); /** * \class PatchBasedDenoisingBaseImageFilter * \brief Base class for patch-based denoising algorithms. diff --git a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx index 6dc7073986b..c0860b9c9c2 100644 --- a/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx +++ b/Modules/Filtering/Denoising/include/itkPatchBasedDenoisingImageFilter.hxx @@ -738,7 +738,7 @@ typename PatchBasedDenoisingImageFilter::ThreadDataSt } foundMinMax = true; } // end for each pixel in the region - } // end for each region + } // end for each region if (foundMinMax) { threadData.validNorms[0] = 1; @@ -1758,7 +1758,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU (3.0 * distancePatchEntropySquared / pow(sigmaKernel, 4.0))); } } // end for each independent pixel component - } // end for each selected patch + } // end for each selected patch for (unsigned int ic = 0; ic < m_NumIndependentComponents; ++ic) { @@ -1793,8 +1793,8 @@ PatchBasedDenoisingImageFilter::ThreadedComputeSigmaU itk::Math::sqr(probPatchEntropyFirstDerivative[ic] / probPatchEntropy[ic]); } } // end if independent component hasn't converged yet - } // end for each independent component - } // end for each pixel in the sample + } // end for each independent component + } // end for each pixel in the sample for (unsigned int ic = 0; ic < m_NumIndependentComponents; ++ic) { @@ -2117,7 +2117,7 @@ PatchBasedDenoisingImageFilter::ThreadedComputeImageU progress.CompletedPixel(); } // end for each pixel in the sample - } // end for each face in the face list + } // end for each face in the face list return threadData; } diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h index dd03036153b..39463d050f9 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.h @@ -51,7 +51,7 @@ class DiffusionTensor3DReconstructionImageFilterEnums }; // Define how to print enumeration extern ITKDiffusionTensorImage_EXPORT std::ostream & - operator<<(std::ostream & out, const DiffusionTensor3DReconstructionImageFilterEnums::GradientImageFormat value); +operator<<(std::ostream & out, const DiffusionTensor3DReconstructionImageFilterEnums::GradientImageFormat value); /** \class DiffusionTensor3DReconstructionImageFilter * \brief This class takes as input one or more reference image (acquired in the @@ -226,8 +226,8 @@ class ITK_TEMPLATE_EXPORT DiffusionTensor3DReconstructionImageFilter if (m_GradientImageTypeEnumeration == DiffusionTensor3DReconstructionImageFilterEnums::GradientImageFormat::GradientIsInASingleImage) { - itkExceptionMacro("Cannot call both methods:" - << "AddGradientImage and SetGradientImage. Please call only one of them."); + itkExceptionMacro( + "Cannot call both methods:" << "AddGradientImage and SetGradientImage. Please call only one of them."); } this->ProcessObject::SetNthInput(0, referenceImage); diff --git a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx index 8dc77f96dae..94d49ff0b24 100644 --- a/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx +++ b/Modules/Filtering/DiffusionTensorImage/include/itkDiffusionTensor3DReconstructionImageFilter.hxx @@ -132,25 +132,25 @@ DiffusionTensor3DReconstructionImageFilter::AddGradientImage(const GradientDirectionType & - gradientDirection, + gradientDirection, const GradientImageType * gradientImage) { // Make sure crazy users did not call both AddGradientImage and @@ -492,8 +491,8 @@ DiffusionTensor3DReconstructionImageFilter::SetGradientImage(GradientDirectionContainerType * - gradientDirection, + gradientDirection, const GradientImagesType * gradientImage) { // Make sure crazy users did not call both AddGradientImage and @@ -528,8 +527,8 @@ DiffusionTensor3DReconstructionImageFilterm_GradientDirectionContainer = gradientDirection; diff --git a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx index 1a0c17faa55..f3a34b63f7a 100644 --- a/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkInvertDisplacementFieldImageFilter.hxx @@ -109,8 +109,9 @@ InvertDisplacementFieldImageFilter::GenerateData() float oldProgress = 0.0f; - while (iteration++ < this->m_MaximumNumberOfIterations && this->m_MaxErrorNorm > this->m_MaxErrorToleranceThreshold && - this->m_MeanErrorNorm > this->m_MeanErrorToleranceThreshold) + while ((iteration++ < this->m_MaximumNumberOfIterations) && + (this->m_MaxErrorNorm > this->m_MaxErrorToleranceThreshold) && + (this->m_MeanErrorNorm > this->m_MeanErrorToleranceThreshold)) { itkDebugMacro("Iteration " << iteration << ": mean error norm = " << this->m_MeanErrorNorm << ", max error norm = " << this->m_MaxErrorNorm); diff --git a/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx index 9df2fcb1cfa..314b573f39a 100644 --- a/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkIterativeInverseDisplacementFieldImageFilter.hxx @@ -234,7 +234,7 @@ IterativeInverseDisplacementFieldImageFilter::Generat progress.CompletedPixel(); } // end while loop - } // end else + } // end else time.Stop(); m_Time = time.GetMean(); diff --git a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx index ec099580bc1..a9113255955 100644 --- a/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx +++ b/Modules/Filtering/DistanceMap/include/itkIsoContourDistanceImageFilter.hxx @@ -88,9 +88,9 @@ IsoContourDistanceImageFilter::EnlargeOutputRequested else { // pointer could not be cast to TLevelSet * - itkWarningMacro("itk::IsoContourDistanceImageFilter" - << "::EnlargeOutputRequestedRegion cannot cast " << typeid(output).name() << " to " - << typeid(TOutputImage *).name()); + itkWarningMacro("itk::IsoContourDistanceImageFilter" << "::EnlargeOutputRequestedRegion cannot cast " + << typeid(output).name() << " to " + << typeid(TOutputImage *).name()); } } @@ -386,7 +386,7 @@ IsoContourDistanceImageFilter::ComputeValue(const Inp itkExceptionMacro("Gradient norm is lower than pixel precision"); } } // end if (sign != signNeigh) - } // end for n + } // end for n } } // namespace itk diff --git a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h index 7045cfdd83c..454126457b1 100644 --- a/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h +++ b/Modules/Filtering/DistanceMap/include/itkSignedDanielssonDistanceMapImageFilter.h @@ -27,22 +27,16 @@ namespace itk namespace Functor { template -class ITK_TEMPLATE_EXPORT InvertIntensityFunctor +class ITK_TEMPLATE_EXPORT InvertIntensityFunctor{ public: InputPixelType operator()(InputPixelType input) + const { if (input){ return InputPixelType {}; +} +else { -public: - InputPixelType - operator()(InputPixelType input) const - { - if (input) - { - return InputPixelType{}; - } - else - { - return NumericTraits::OneValue(); - } - } // namespace itk -}; + return NumericTraits::OneValue(); +} +} // namespace itk +} +; } // namespace Functor } // namespace itk @@ -235,8 +229,8 @@ class ITK_TEMPLATE_EXPORT SignedDanielssonDistanceMapImageFilter : public ImageT bool m_SquaredDistance{}; bool m_UseImageSpacing{ true }; bool m_InsideIsPositive{}; // ON is treated as inside pixels -}; // end of SignedDanielssonDistanceMapImageFilter - // class +}; // end of SignedDanielssonDistanceMapImageFilter + // class } // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h b/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h index 2f44d05c85b..88ed54c0c89 100644 --- a/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h +++ b/Modules/Filtering/FFT/include/itkComplexToComplexFFTImageFilter.h @@ -45,7 +45,7 @@ class ComplexToComplexFFTImageFilterEnums }; // Define how to print enumeration extern ITKFFT_EXPORT std::ostream & - operator<<(std::ostream & out, const ComplexToComplexFFTImageFilterEnums::TransformDirection value); +operator<<(std::ostream & out, const ComplexToComplexFFTImageFilterEnums::TransformDirection value); /** * \class ComplexToComplexFFTImageFilter diff --git a/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx b/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx index da6102149b9..864bd3e43c9 100644 --- a/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx +++ b/Modules/Filtering/FFT/include/itkFFTWHalfHermitianToRealInverseFFTImageFilter.hxx @@ -75,8 +75,7 @@ FFTWHalfHermitianToRealInverseFFTImageFilter::BeforeT // FFTW_PRESERVE_INPUT flag at this time. So if the input can't be // destroyed, we have to copy the input data to a buffer before // running the IFFT. - typename FFTWProxyType::ComplexType * const in = [&]() -> typename FFTWProxyType::ComplexType * - { + typename FFTWProxyType::ComplexType * const in = [&]() -> typename FFTWProxyType::ComplexType * { if (m_CanUseDestructiveAlgorithm) { // Ok, so lets use the input buffer directly, to save some memory. @@ -88,8 +87,7 @@ FFTWHalfHermitianToRealInverseFFTImageFilter::BeforeT // We must use a buffer where fftw can work and destroy what it wants. return new typename FFTWProxyType::ComplexType[totalInputSize]; } - } - (); + }(); OutputPixelType * out = outputPtr->GetBufferPointer(); typename FFTWProxyType::PlanType plan; diff --git a/Modules/Filtering/FFT/src/itkFFTWFFTImageFilterInitFactory.cxx b/Modules/Filtering/FFT/src/itkFFTWFFTImageFilterInitFactory.cxx index 1b34d742f6c..55648b49ead 100644 --- a/Modules/Filtering/FFT/src/itkFFTWFFTImageFilterInitFactory.cxx +++ b/Modules/Filtering/FFT/src/itkFFTWFFTImageFilterInitFactory.cxx @@ -36,10 +36,7 @@ namespace itk { -FFTWFFTImageFilterInitFactory::FFTWFFTImageFilterInitFactory() -{ - FFTWFFTImageFilterInitFactory::RegisterFactories(); -} +FFTWFFTImageFilterInitFactory::FFTWFFTImageFilterInitFactory() { FFTWFFTImageFilterInitFactory::RegisterFactories(); } FFTWFFTImageFilterInitFactory::~FFTWFFTImageFilterInitFactory() = default; @@ -60,7 +57,7 @@ FFTWFFTImageFilterInitFactory::RegisterFactories() // DO NOT CALL DIRECTLY. // TODO CMake parsing currently does not allow "InitFactory" void ITKFFT_EXPORT - FFTWFFTImageFilterInitFactoryRegister__Private() +FFTWFFTImageFilterInitFactoryRegister__Private() { FFTWFFTImageFilterInitFactory::RegisterFactories(); } diff --git a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx index 07e37cc8e96..d448a22a817 100644 --- a/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx +++ b/Modules/Filtering/FFT/src/itkFFTWGlobalConfiguration.cxx @@ -45,7 +45,7 @@ namespace itk struct FFTWGlobalConfigurationGlobals { FFTWGlobalConfigurationGlobals() - : m_Instance(nullptr){}; + : m_Instance(nullptr) {}; FFTWGlobalConfiguration::Pointer m_Instance; std::mutex m_CreationMutex; diff --git a/Modules/Filtering/FFT/src/itkVnlFFTImageFilterInitFactory.cxx b/Modules/Filtering/FFT/src/itkVnlFFTImageFilterInitFactory.cxx index a20f04a6a91..0ca580db98a 100644 --- a/Modules/Filtering/FFT/src/itkVnlFFTImageFilterInitFactory.cxx +++ b/Modules/Filtering/FFT/src/itkVnlFFTImageFilterInitFactory.cxx @@ -32,10 +32,7 @@ namespace itk { -VnlFFTImageFilterInitFactory::VnlFFTImageFilterInitFactory() -{ - VnlFFTImageFilterInitFactory::RegisterFactories(); -} +VnlFFTImageFilterInitFactory::VnlFFTImageFilterInitFactory() { VnlFFTImageFilterInitFactory::RegisterFactories(); } VnlFFTImageFilterInitFactory::~VnlFFTImageFilterInitFactory() = default; @@ -56,7 +53,7 @@ VnlFFTImageFilterInitFactory::RegisterFactories() // DO NOT CALL DIRECTLY. // TODO CMake parsing currently does not allow "InitFactory" void ITKFFT_EXPORT - VnlFFTImageFilterInitFactoryRegister__Private() +VnlFFTImageFilterInitFactoryRegister__Private() { VnlFFTImageFilterInitFactory::RegisterFactories(); } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx index fee2a254da1..fd61280f597 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilter.hxx @@ -169,7 +169,7 @@ FastMarchingExtensionImageFilterm_AuxImages[k]->SetPixel(node.GetIndex(), auxVec[k]); } } // end container loop - } // if AuxAliveValues set + } // if AuxAliveValues set if (m_AuxTrialValues) { @@ -193,7 +193,7 @@ FastMarchingExtensionImageFilterm_AuxImages[k]->SetPixel(node.GetIndex(), auxVec[k]); } } // end container loop - } // if AuxTrialValues set + } // if AuxTrialValues set } template diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx index 31f42ad9a3d..51122c1428b 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingExtensionImageFilterBase.hxx @@ -166,7 +166,7 @@ FastMarchingExtensionImageFilterBase: ++pointsIter; ++auxIter; } // end container while - } // if AuxAliveValues set + } // if AuxAliveValues set if (m_AuxiliaryTrialValues) { @@ -190,7 +190,7 @@ FastMarchingExtensionImageFilterBase: ++pointsIter; ++auxIter; } // end container loop - } // if AuxTrialValues set + } // if AuxTrialValues set } template diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx index 6b3e2b221df..ad3cdc4973c 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx @@ -107,9 +107,8 @@ FastMarchingImageFilter::EnlargeOutputRequestedRegion(Da else { // Pointer could not be cast to TLevelSet * - itkWarningMacro("itk::FastMarchingImageFilter" - << "::EnlargeOutputRequestedRegion cannot cast " << typeid(output).name() << " to " - << typeid(TLevelSet *).name()); + itkWarningMacro("itk::FastMarchingImageFilter" << "::EnlargeOutputRequestedRegion cannot cast " + << typeid(output).name() << " to " << typeid(TLevelSet *).name()); } } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx index 1e22bda7d2f..bfe2ddd9ac9 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx @@ -98,9 +98,9 @@ FastMarchingImageFilterBase::EnlargeOutputRequestedRegion(DataO else { // Pointer could not be cast to TLevelSet * - itkWarningMacro("itk::FastMarchingImageFilter" - << "::EnlargeOutputRequestedRegion cannot cast " << typeid(output).name() << " to " - << typeid(OutputImageType *).name()); + itkWarningMacro("itk::FastMarchingImageFilter" << "::EnlargeOutputRequestedRegion cannot cast " + << typeid(output).name() << " to " + << typeid(OutputImageType *).name()); } } diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx index add335a6a8f..924e038789d 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageToNodePairContainerAdaptor.hxx @@ -141,7 +141,7 @@ FastMarchingImageToNodePairContainerAdaptor::SetPointsF { nodes->push_back(NodePairType(it.GetIndex(), iValue)); } // end if image iterator > zero - } // end for each pixel + } // end for each pixel } else { @@ -152,7 +152,7 @@ FastMarchingImageToNodePairContainerAdaptor::SetPointsF { nodes->push_back(NodePairType(it.GetIndex(), iValue)); } // end if image iterator > zero - } // end for each pixel + } // end for each pixel } switch (iLabel) diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h index f5c6365b401..ce7e0d2f119 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingReachedTargetNodesStoppingCriterion.h @@ -45,7 +45,7 @@ class FastMarchingReachedTargetNodesStoppingCriterionEnums }; // Define how to print enumeration extern ITKFastMarching_EXPORT std::ostream & - operator<<(std::ostream & out, const FastMarchingReachedTargetNodesStoppingCriterionEnums::TargetCondition value); +operator<<(std::ostream & out, const FastMarchingReachedTargetNodesStoppingCriterionEnums::TargetCondition value); /** * \class FastMarchingReachedTargetNodesStoppingCriterion * \brief Stopping criterion for FastMarchingFilterBase. diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h index c9c7a1b1e36..771906686e8 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingUpwindGradientImageFilter.h @@ -47,7 +47,7 @@ class FastMarchingUpwindGradientImageFilterEnums }; /** Define how to print enumeration values. */ extern ITKFastMarching_EXPORT std::ostream & - operator<<(std::ostream & out, const FastMarchingUpwindGradientImageFilterEnums::TargetCondition value); +operator<<(std::ostream & out, const FastMarchingUpwindGradientImageFilterEnums::TargetCondition value); /** diff --git a/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h b/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h index 9576841112c..65dd34b10f7 100644 --- a/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h +++ b/Modules/Filtering/ImageCompose/include/itkJoinImageFilter.h @@ -127,7 +127,8 @@ class JoinFunctor } /** Copier function specific to a scalar first pixel. */ - void FirstCopier(CopierDispatch<1>, JoinType & out, unsigned int idx, const TPixel1 & A) const + void + FirstCopier(CopierDispatch<1>, JoinType & out, unsigned int idx, const TPixel1 & A) const { out[idx] = static_cast(A); } @@ -154,7 +155,8 @@ class JoinFunctor } /** Copier function specific to a scalar second pixel. */ - void SecondCopier(CopierDispatch<1>, JoinType & out, unsigned int idx, const TPixel2 & B) const + void + SecondCopier(CopierDispatch<1>, JoinType & out, unsigned int idx, const TPixel2 & B) const { out[idx] = static_cast(B); } diff --git a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx index 1810db52459..d39139f7e2a 100644 --- a/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx @@ -64,9 +64,9 @@ HoughTransform2DLinesImageFilter::GenerateOut // Compute the size of the output image Size<2> size; - size[0] = (SizeValueType)( - std::sqrt(m_AngleResolution * m_AngleResolution + - input->GetLargestPossibleRegion().GetSize()[0] * input->GetLargestPossibleRegion().GetSize()[0])); + size[0] = (SizeValueType)(std::sqrt(m_AngleResolution * m_AngleResolution + + input->GetLargestPossibleRegion().GetSize()[0] * + input->GetLargestPossibleRegion().GetSize()[0])); size[1] = (SizeValueType)m_AngleResolution; const typename InputImageType::RegionType region(input->GetLargestPossibleRegion().GetIndex(), size); diff --git a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h index 68be5331bbf..923ef1769d6 100644 --- a/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.h @@ -44,7 +44,7 @@ class MultiScaleHessianBasedMeasureImageFilterEnums }; // Define how to print enumeration extern ITKImageFeature_EXPORT std::ostream & - operator<<(std::ostream & out, const MultiScaleHessianBasedMeasureImageFilterEnums::SigmaStepMethod value); +operator<<(std::ostream & out, const MultiScaleHessianBasedMeasureImageFilterEnums::SigmaStepMethod value); /** \class MultiScaleHessianBasedMeasureImageFilter * \brief A filter to enhance structures using Hessian eigensystem-based diff --git a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h index 1712161fa92..f40da643ad9 100644 --- a/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h +++ b/Modules/Filtering/ImageFeature/include/itkUnsharpMaskImageFilter.h @@ -232,7 +232,7 @@ class ITK_TEMPLATE_EXPORT UnsharpMaskImageFilter : public ImageToImageFilter(result); } }; // end UnsharpMaskingFunctor -}; // end UnsharpMaskImageFilter +}; // end UnsharpMaskImageFilter } // end namespace itk #ifndef ITK_MANUAL_INSTANTIATION diff --git a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx index e883a35da54..9dd9e451621 100644 --- a/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx +++ b/Modules/Filtering/ImageFilterBase/include/itkTernaryFunctorImageFilter.hxx @@ -102,10 +102,9 @@ TernaryFunctorImageFilter -static std::enable_if_t && std::is_integral_v, bool> static_cast_is_well_defined( - TInput) +static std::enable_if_t && std::is_integral_v, bool> +static_cast_is_well_defined(TInput) { return true; // casting from int to int types employes deterministic 2's complement behavior } @@ -104,7 +104,7 @@ template static std::enable_if_t && (std::is_floating_point_v || std::is_integral_v), bool> - static_cast_is_well_defined(TInput) +static_cast_is_well_defined(TInput) { return true; // Floating point to floating point static casts are always consistently defined. } diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx index 3e5e9f87099..c6852beb8d1 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineDownsampleImageFilter.hxx @@ -161,9 +161,9 @@ BSplineDownsampleImageFilter::EnlargeO else { // pointer could not be cast to TLevelSet * - itkWarningMacro("itk::BSplineDownsampleImageFilter" - << "::EnlargeOutputRequestedRegion cannot cast " << typeid(output).name() << " to " - << typeid(TOutputImage *).name()); + itkWarningMacro("itk::BSplineDownsampleImageFilter" << "::EnlargeOutputRequestedRegion cannot cast " + << typeid(output).name() << " to " + << typeid(TOutputImage *).name()); } } } // namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx index 675aa65b483..0fc0c0c19dd 100644 --- a/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkBSplineUpsampleImageFilter.hxx @@ -168,9 +168,9 @@ BSplineUpsampleImageFilter::EnlargeOut else { // pointer could not be cast to TLevelSet * - itkWarningMacro("itk::BSplineUpsampleImageFilter" - << "::EnlargeOutputRequestedRegion cannot cast " << typeid(output).name() << " to " - << typeid(TOutputImage *).name()); + itkWarningMacro("itk::BSplineUpsampleImageFilter" << "::EnlargeOutputRequestedRegion cannot cast " + << typeid(output).name() << " to " + << typeid(TOutputImage *).name()); } } } // namespace itk diff --git a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx index aa767ba6d36..9efed7e7802 100644 --- a/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx +++ b/Modules/Filtering/ImageGrid/include/itkResampleImageFilter.hxx @@ -315,8 +315,9 @@ ResampleImageFilter(maxPixelComponent); // Clamp the value between minPixelComponent and maxPixelComponent: - return (value <= minComponent) ? minPixelComponent - : (value >= maxComponent) ? maxPixelComponent : static_cast(value); + return (value <= minComponent) ? minPixelComponent + : (value >= maxComponent) ? maxPixelComponent + : static_cast(value); } diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx index a3f051f201a..5685389bd57 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx @@ -46,15 +46,13 @@ PolylineMaskImageFilter::Polyline // throw an exception otherwise. if ((TInputImage::ImageDimension != 3) || (TOutputImage::ImageDimension != 3)) { - itkExceptionMacro("PolylineMaskImageFilter must be templated over " - << "input and output images of dimension 3"); + itkExceptionMacro("PolylineMaskImageFilter must be templated over " << "input and output images of dimension 3"); } // View vectors must be of dimension 3 if (TVector::Length != 3) { - itkExceptionMacro("PolylineMaskImageFilter must be templated over " - << "a view vector of length 3"); + itkExceptionMacro("PolylineMaskImageFilter must be templated over " << "a view vector of length 3"); } } diff --git a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h index 71642b23a63..099c10719c0 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.h @@ -237,9 +237,11 @@ class ITK_TEMPLATE_EXPORT FlatStructuringElement : public Neighborhood static void - GeneratePolygon(TStructuringElement & res, TRadius radius, unsigned int lines); - static void GeneratePolygon(itk::FlatStructuringElement<2> & res, itk::Size<2> radius, unsigned int lines); - static void GeneratePolygon(itk::FlatStructuringElement<3> & res, itk::Size<3> radius, unsigned int lines); + GeneratePolygon(TStructuringElement & res, TRadius radius, unsigned int lines); + static void + GeneratePolygon(itk::FlatStructuringElement<2> & res, itk::Size<2> radius, unsigned int lines); + static void + GeneratePolygon(itk::FlatStructuringElement<3> & res, itk::Size<3> radius, unsigned int lines); using LType2 = Vector; diff --git a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx index 40065b71e34..0f09ec56168 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx +++ b/Modules/Filtering/MathematicalMorphology/include/itkFlatStructuringElement.hxx @@ -55,9 +55,10 @@ FlatStructuringElement::GeneratePolygon(TStructuringElement &, TRadi } template -void FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement<2> & res, - itk::Size<2> radius, - unsigned int lines) +void +FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement<2> & res, + itk::Size<2> radius, + unsigned int lines) { // radial decomposition method from "Radial Decomposition of Discs // and Spheres" - CVGIP: Graphical Models and Image Processing @@ -126,9 +127,10 @@ void FlatStructuringElement::GeneratePolygon(itk::FlatStructuringEle // O[2] = k3 * std::sin(theta); template -void FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement<3> & res, - itk::Size<3> radius, - unsigned int lines) +void +FlatStructuringElement::GeneratePolygon(itk::FlatStructuringElement<3> & res, + itk::Size<3> radius, + unsigned int lines) { res.SetRadius(radius); res.SetDecomposable(true); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h b/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h index c3675ad7367..f0094fae724 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkMathematicalMorphologyEnums.h @@ -50,7 +50,7 @@ class MathematicalMorphologyEnums /** Define how to print enumeration values. */ extern ITKMathematicalMorphology_EXPORT std::ostream & - operator<<(std::ostream & out, const MathematicalMorphologyEnums::Algorithm value); +operator<<(std::ostream & out, const MathematicalMorphologyEnums::Algorithm value); } // end namespace itk diff --git a/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx b/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx index de3118106e7..1295c064a5e 100644 --- a/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkContourExtractor2DImageFilter.hxx @@ -374,7 +374,7 @@ ContourExtractor2DImageFilter::GenerateDataForLabels() // all 9 pixels of the extended region. const InputIndexType extendedIndex{ { bbox.min[0] - 1, bbox.min[1] - 1 } }; const InputSizeType extendedSize{ { static_cast(bbox.max[0] - bbox.min[0]) + 2, - static_cast(bbox.max[1] - bbox.min[1]) + 2 } }; + static_cast(bbox.max[1] - bbox.min[1]) + 2 } }; const InputRegionType extendedRegion{ extendedIndex, extendedSize }; totalPixelCount += extendedRegion.GetNumberOfPixels(); labelsRegions[label] = extendedRegion; diff --git a/Modules/Filtering/Path/include/itkPathSource.hxx b/Modules/Filtering/Path/include/itkPathSource.hxx index 281a1b51d72..36916ee6906 100644 --- a/Modules/Filtering/Path/include/itkPathSource.hxx +++ b/Modules/Filtering/Path/include/itkPathSource.hxx @@ -111,7 +111,8 @@ PathSource::GraftNthOutput(unsigned int idx, TOutputPath * graft) * */ template -typename PathSource::DataObjectPointer PathSource::MakeOutput(DataObjectPointerArraySizeType) +typename PathSource::DataObjectPointer +PathSource::MakeOutput(DataObjectPointerArraySizeType) { return itkDynamicCastInDebugMode(TOutputPath::New().GetPointer()); } diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h index 2c02f9036e4..92f930aebc5 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkBorderQuadEdgeMeshFilter.h @@ -53,9 +53,9 @@ class BorderQuadEdgeMeshFilterEnums }; // Define how to print enumeration extern ITKQuadEdgeMeshFiltering_EXPORT std::ostream & - operator<<(std::ostream & out, const BorderQuadEdgeMeshFilterEnums::BorderTransform value); +operator<<(std::ostream & out, const BorderQuadEdgeMeshFilterEnums::BorderTransform value); extern ITKQuadEdgeMeshFiltering_EXPORT std::ostream & - operator<<(std::ostream & out, const BorderQuadEdgeMeshFilterEnums::BorderPick value); +operator<<(std::ostream & out, const BorderQuadEdgeMeshFilterEnums::BorderPick value); /** * \class BorderQuadEdgeMeshFilter * \brief Transform one border of a QuadEdgeMesh into either a circle diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx index 8e87e14aef4..3e329654a65 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkEdgeDecimationQuadEdgeMeshFilter.hxx @@ -414,8 +414,8 @@ EdgeDecimationQuadEdgeMeshFilter::CheckQEProcessing // from the top the drawing of that case looks like an Eye itkDebugMacro("RemoveEye"); return 2; - } // end else if( OriginOrderIsTwo && DestinationOrderIsTwo ) - } // end if( OriginOrderIsTwo || DestinationOrderIsTwo ) + } // end else if( OriginOrderIsTwo && DestinationOrderIsTwo ) + } // end if( OriginOrderIsTwo || DestinationOrderIsTwo ) else // if( OriginOrderIsTwo || DestinationOrderIsTwo ) { if (NumberOfCommonVerticesIn0Ring() > 2) @@ -428,15 +428,15 @@ EdgeDecimationQuadEdgeMeshFilter::CheckQEProcessing { return 0; } - } // end else if( OriginOrderIsTwo || DestinationOrderIsTwo ) - } // end if( LeftIsTriangle && RightIsTriangle ) + } // end else if( OriginOrderIsTwo || DestinationOrderIsTwo ) + } // end if( LeftIsTriangle && RightIsTriangle ) else // if( LeftIsTriangle && RightIsTriangle ) { if (NumberOfCommonVerticesIn0Ring() > 1) { itkDebugMacro("NumberOfCommonVerticesIn0Ring( ) > 1"); return 4; - } // end if( NumberOfCommonVerticesIn0Ring( ) > 1 ) + } // end if( NumberOfCommonVerticesIn0Ring( ) > 1 ) else // if( NumberOfCommonVerticesIn0Ring( ) > 1 ) { if (RightIsTriangle) @@ -448,9 +448,9 @@ EdgeDecimationQuadEdgeMeshFilter::CheckQEProcessing return 6; } } // end else if( NumberOfCommonVerticesIn0Ring( ) > 1 ) - } // end else if( LeftIsTriangle && RightIsTriangle ) - } // end if( LeftIsTriangle || RightIsTriangle ) - else // if( LeftIsTriangle || RightIsTriangle ) + } // end else if( LeftIsTriangle && RightIsTriangle ) + } // end if( LeftIsTriangle || RightIsTriangle ) + else // if( LeftIsTriangle || RightIsTriangle ) { if (NumberOfCommonVerticesIn0Ring() > 0) { diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h index 910a599a5b2..2f06d1c8f14 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkLaplacianDeformationQuadEdgeMeshFilter.h @@ -48,7 +48,7 @@ class LaplacianDeformationQuadEdgeMeshFilterEnums }; // Define how to print enumeration extern ITKQuadEdgeMeshFiltering_EXPORT std::ostream & - operator<<(std::ostream & out, const LaplacianDeformationQuadEdgeMeshFilterEnums::Area value); +operator<<(std::ostream & out, const LaplacianDeformationQuadEdgeMeshFilterEnums::Area value); /** \class LaplacianDeformationQuadEdgeMeshFilter * diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h index d7e73d7e04f..0c35a242ad6 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkNormalQuadEdgeMeshFilter.h @@ -43,7 +43,7 @@ class NormalQuadEdgeMeshFilterEnums }; // Define how to print enumeration extern ITKQuadEdgeMeshFiltering_EXPORT std::ostream & - operator<<(std::ostream & out, const NormalQuadEdgeMeshFilterEnums::Weight value); +operator<<(std::ostream & out, const NormalQuadEdgeMeshFilterEnums::Weight value); /** \class NormalQuadEdgeMeshFilter * diff --git a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h index 309405b0f57..149352df125 100644 --- a/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h +++ b/Modules/Filtering/QuadEdgeMeshFiltering/include/itkQuadEdgeMeshDecimationQuadricElementHelper.h @@ -238,7 +238,8 @@ class QuadEdgeMeshDecimationQuadricElementHelper return *this; } - Self operator*(const CoordType & iV) const + Self + operator*(const CoordType & iV) const { Self oElement(this->m_Coefficients * iV); diff --git a/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx b/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx index 72d706d7a28..c95a2bd113f 100644 --- a/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx +++ b/Modules/Filtering/Smoothing/include/itkBinomialBlurImageFilter.hxx @@ -227,8 +227,8 @@ BinomialBlurImageFilter::GenerateData() ++tempReverseIt; } // end walk the image backwards - } // end dimension loop - } // end number of repetitions loop + } // end dimension loop + } // end number of repetitions loop // Now, copy the temporary image to the output image. Note that the temp // buffer iterator walks a region defined by the output diff --git a/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.h b/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.h index 0acd4f6ba21..b0e2118fc80 100644 --- a/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.h +++ b/Modules/Filtering/Smoothing/include/itkFFTDiscreteGaussianImageFilter.h @@ -56,7 +56,7 @@ class FFTDiscreteGaussianImageFilterEnums }; // Define how to print enumeration extern ITKSmoothing_EXPORT std::ostream & - operator<<(std::ostream & out, const FFTDiscreteGaussianImageFilterEnums::KernelSource value); +operator<<(std::ostream & out, const FFTDiscreteGaussianImageFilterEnums::KernelSource value); /** * \class FFTDiscreteGaussianImageFilter diff --git a/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h b/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h index 1fa797bb6fa..c67e87ca315 100644 --- a/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h +++ b/Modules/Filtering/Thresholding/include/itkHistogramThresholdCalculator.h @@ -95,7 +95,8 @@ class HistogramThresholdCalculator : public ProcessObject } using Superclass::MakeOutput; - typename DataObject::Pointer MakeOutput(DataObjectPointerArraySizeType) override + typename DataObject::Pointer + MakeOutput(DataObjectPointerArraySizeType) override { return DecoratedOutputType::New().GetPointer(); } diff --git a/Modules/IO/BMP/src/itkBMPImageIOFactory.cxx b/Modules/IO/BMP/src/itkBMPImageIOFactory.cxx index b24f4f9a849..bf8682b2f4d 100644 --- a/Modules/IO/BMP/src/itkBMPImageIOFactory.cxx +++ b/Modules/IO/BMP/src/itkBMPImageIOFactory.cxx @@ -44,7 +44,7 @@ BMPImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOBMP_EXPORT - BMPImageIOFactoryRegister__Private() +BMPImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/BioRad/src/itkBioRadImageIOFactory.cxx b/Modules/IO/BioRad/src/itkBioRadImageIOFactory.cxx index 524b2876858..5193a6a701d 100644 --- a/Modules/IO/BioRad/src/itkBioRadImageIOFactory.cxx +++ b/Modules/IO/BioRad/src/itkBioRadImageIOFactory.cxx @@ -54,7 +54,7 @@ BioRadImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOBioRad_EXPORT - BioRadImageIOFactoryRegister__Private() +BioRadImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/Bruker/src/itkBruker2dseqImageIOFactory.cxx b/Modules/IO/Bruker/src/itkBruker2dseqImageIOFactory.cxx index f269f0818ba..380a49d2ab9 100644 --- a/Modules/IO/Bruker/src/itkBruker2dseqImageIOFactory.cxx +++ b/Modules/IO/Bruker/src/itkBruker2dseqImageIOFactory.cxx @@ -57,7 +57,7 @@ Bruker2dseqImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOBruker_EXPORT - Bruker2dseqImageIOFactoryRegister__Private() +Bruker2dseqImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx b/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx index 7daf70c5df7..7c58a86885f 100644 --- a/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx +++ b/Modules/IO/CSV/src/itkCSVFileReaderBase.cxx @@ -52,8 +52,7 @@ CSVFileReaderBase::PrepareForParsing() { if (this->m_FileName.empty()) { - itkExceptionMacro("There is no file name provided!" - << "Please provide a filename."); + itkExceptionMacro("There is no file name provided!" << "Please provide a filename."); } if (this->m_UseStringDelimiterCharacter && !(this->m_HasRowHeaders || this->m_HasColumnHeaders)) @@ -177,8 +176,7 @@ CSVFileReaderBase::GetDataDimension(SizeValueType & rows, SizeValueType & cols) // warning to the user. if (!isSame) { - itkWarningMacro("Warning: Data appears to contain missing data! " - << "These will be set to NaN."); + itkWarningMacro("Warning: Data appears to contain missing data! " << "These will be set to NaN."); } cols = max_cols; diff --git a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx index 44c215534cb..3a1b0c9eac3 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKFileReader.cxx @@ -316,10 +316,7 @@ DCMTKSequence::GetElementTM(const unsigned short group, return EXIT_SUCCESS; } -DCMTKFileReader::~DCMTKFileReader() -{ - delete m_DFile; -} +DCMTKFileReader::~DCMTKFileReader() { delete m_DFile; } void DCMTKFileReader::SetFileName(const std::string & fileName) diff --git a/Modules/IO/DCMTK/src/itkDCMTKImageIOFactory.cxx b/Modules/IO/DCMTK/src/itkDCMTKImageIOFactory.cxx index 177cd5bc3ab..68a5b9676f3 100644 --- a/Modules/IO/DCMTK/src/itkDCMTKImageIOFactory.cxx +++ b/Modules/IO/DCMTK/src/itkDCMTKImageIOFactory.cxx @@ -44,7 +44,7 @@ DCMTKImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIODCMTK_EXPORT - DCMTKImageIOFactoryRegister__Private() +DCMTKImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx index 637d0ffdeeb..daa38b56b13 100644 --- a/Modules/IO/GDCM/src/itkGDCMImageIO.cxx +++ b/Modules/IO/GDCM/src/itkGDCMImageIO.cxx @@ -124,10 +124,7 @@ GDCMImageIO::GDCMImageIO() } } -GDCMImageIO::~GDCMImageIO() -{ - delete this->m_DICOMHeader; -} +GDCMImageIO::~GDCMImageIO() { delete this->m_DICOMHeader; } /** * Helper function to test for some dicom like formatting. diff --git a/Modules/IO/GDCM/src/itkGDCMImageIOFactory.cxx b/Modules/IO/GDCM/src/itkGDCMImageIOFactory.cxx index 875d907d404..a8d3e535618 100644 --- a/Modules/IO/GDCM/src/itkGDCMImageIOFactory.cxx +++ b/Modules/IO/GDCM/src/itkGDCMImageIOFactory.cxx @@ -44,7 +44,7 @@ GDCMImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOGDCM_EXPORT - GDCMImageIOFactoryRegister__Private() +GDCMImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/GE/src/itkGE4ImageIOFactory.cxx b/Modules/IO/GE/src/itkGE4ImageIOFactory.cxx index 71ae577f3be..b699384a7a7 100644 --- a/Modules/IO/GE/src/itkGE4ImageIOFactory.cxx +++ b/Modules/IO/GE/src/itkGE4ImageIOFactory.cxx @@ -48,7 +48,7 @@ GE4ImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOGE_EXPORT - GE4ImageIOFactoryRegister__Private() +GE4ImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/GE/src/itkGE5ImageIOFactory.cxx b/Modules/IO/GE/src/itkGE5ImageIOFactory.cxx index bae43aac4ef..25a3173ebea 100644 --- a/Modules/IO/GE/src/itkGE5ImageIOFactory.cxx +++ b/Modules/IO/GE/src/itkGE5ImageIOFactory.cxx @@ -48,7 +48,7 @@ GE5ImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOGE_EXPORT - GE5ImageIOFactoryRegister__Private() +GE5ImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/GE/src/itkGEAdwImageIOFactory.cxx b/Modules/IO/GE/src/itkGEAdwImageIOFactory.cxx index 78640abfe03..4fa05f06bb2 100644 --- a/Modules/IO/GE/src/itkGEAdwImageIOFactory.cxx +++ b/Modules/IO/GE/src/itkGEAdwImageIOFactory.cxx @@ -48,7 +48,7 @@ GEAdwImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOGE_EXPORT - GEAdwImageIOFactoryRegister__Private() +GEAdwImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/GIPL/src/itkGiplImageIOFactory.cxx b/Modules/IO/GIPL/src/itkGiplImageIOFactory.cxx index 4266557ece5..d75f996f564 100644 --- a/Modules/IO/GIPL/src/itkGiplImageIOFactory.cxx +++ b/Modules/IO/GIPL/src/itkGiplImageIOFactory.cxx @@ -44,7 +44,7 @@ GiplImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOGIPL_EXPORT - GiplImageIOFactoryRegister__Private() +GiplImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx index 0623a40315d..68a4c043972 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIO.cxx @@ -44,10 +44,7 @@ HDF5ImageIO::HDF5ImageIO() this->Self::SetCompressionLevel(5); } -HDF5ImageIO::~HDF5ImageIO() -{ - this->ResetToInitialState(); -} +HDF5ImageIO::~HDF5ImageIO() { this->ResetToInitialState(); } void HDF5ImageIO::PrintSelf(std::ostream & os, Indent indent) const @@ -76,8 +73,7 @@ template H5::PredType GetType() { - itkGenericExceptionMacro("Type not handled " - << "in HDF5 File: " << typeid(TScalar).name()); + itkGenericExceptionMacro("Type not handled " << "in HDF5 File: " << typeid(TScalar).name()); } #define GetH5TypeSpecialize(CXXType, H5Type) \ template <> \ @@ -395,14 +391,12 @@ HDF5ImageIO::ReadScalar(const std::string & DataSetName) if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro("Wrong # of dims for TransformType " - << "in HDF5 File"); + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } Space.getSimpleExtentDims(dim, nullptr); if (dim[0] != 1) { - itkExceptionMacro("Elements > 1 for scalar type " - << "in HDF5 File"); + itkExceptionMacro("Elements > 1 for scalar type " << "in HDF5 File"); } TScalar scalar; H5::PredType scalarType = GetType(); @@ -466,8 +460,7 @@ HDF5ImageIO::ReadVector(const std::string & DataSetName) if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro("Wrong # of dims for TransformType " - << "in HDF5 File"); + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } Space.getSimpleExtentDims(dim, nullptr); vec.resize(dim[0]); @@ -509,8 +502,7 @@ HDF5ImageIO::ReadDirections(const std::string & path) hsize_t dim[2]; if (dirSpace.getSimpleExtentNdims() != 2) { - itkExceptionMacro(" Wrong # of dims for Image Directions " - << "in HDF5 File"); + itkExceptionMacro(" Wrong # of dims for Image Directions " << "in HDF5 File"); } dirSpace.getSimpleExtentDims(dim, nullptr); rval.resize(dim[1]); diff --git a/Modules/IO/HDF5/src/itkHDF5ImageIOFactory.cxx b/Modules/IO/HDF5/src/itkHDF5ImageIOFactory.cxx index bcf77763909..16608693a53 100644 --- a/Modules/IO/HDF5/src/itkHDF5ImageIOFactory.cxx +++ b/Modules/IO/HDF5/src/itkHDF5ImageIOFactory.cxx @@ -48,7 +48,7 @@ HDF5ImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOHDF5_EXPORT - HDF5ImageIOFactoryRegister__Private() +HDF5ImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/IPL/include/itkIPLFileNameList.h b/Modules/IO/IPL/include/itkIPLFileNameList.h index fb587b22bfc..9cd3941dcb4 100644 --- a/Modules/IO/IPL/include/itkIPLFileNameList.h +++ b/Modules/IO/IPL/include/itkIPLFileNameList.h @@ -163,7 +163,8 @@ class ITKIOIPL_EXPORT IPLFileNameList return m_List.end(); } - IPLFileSortInfo * operator[](unsigned int __n) + IPLFileSortInfo * + operator[](unsigned int __n) { auto it = begin(); auto itend = end(); diff --git a/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx b/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx index 041ca40a4eb..58d6dc747c0 100644 --- a/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx +++ b/Modules/IO/IPL/src/itkIPLCommonImageIO.cxx @@ -496,7 +496,7 @@ int IPLCommonImageIO::statTimeToAscii(void * clock, char * timeString, int len) { - auto tclock = (time_t) * ((int *)clock); + auto tclock = (time_t)*((int *)clock); const char * const asciiTime = ctime(&tclock); strncpy(timeString, asciiTime, len); diff --git a/Modules/IO/ImageBase/src/itkImageIOBase.cxx b/Modules/IO/ImageBase/src/itkImageIOBase.cxx index 632ab814131..8d52e8ef180 100644 --- a/Modules/IO/ImageBase/src/itkImageIOBase.cxx +++ b/Modules/IO/ImageBase/src/itkImageIOBase.cxx @@ -25,11 +25,7 @@ namespace itk { -ImageIOBase::ImageIOBase() - -{ - Reset(false); -} +ImageIOBase::ImageIOBase() { Reset(false); } void ImageIOBase::Reset(const bool) diff --git a/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx b/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx index 6359df5105b..8aa6279a8b3 100644 --- a/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx +++ b/Modules/IO/ImageBase/test/itkImageIOBaseTest.cxx @@ -133,35 +133,35 @@ itkImageIOBaseTest(int, char *[]) itk::IOComponentEnum::FLOAT, itk::IOComponentEnum::DOUBLE }; const char * listComponentTypeString[] = { "unknown", "unsigned_char", "char", "unsigned_short", - "short", "unsigned_int", "int", "unsigned_long", - "long", "unsigned_long_long", "long_long", "float", - "double" }; + "short", "unsigned_int", "int", "unsigned_long", + "long", "unsigned_long_long", "long_long", "float", + "double" }; itk::IOPixelEnum listIOPixelType[] = { itk::IOPixelEnum::UNKNOWNPIXELTYPE, - itk::IOPixelEnum::SCALAR, - itk::IOPixelEnum::RGB, - itk::IOPixelEnum::RGBA, - itk::IOPixelEnum::OFFSET, - itk::IOPixelEnum::VECTOR, - itk::IOPixelEnum::POINT, - itk::IOPixelEnum::COVARIANTVECTOR, - itk::IOPixelEnum::SYMMETRICSECONDRANKTENSOR, - itk::IOPixelEnum::DIFFUSIONTENSOR3D, - itk::IOPixelEnum::COMPLEX, - itk::IOPixelEnum::FIXEDARRAY, - itk::IOPixelEnum::MATRIX }; + itk::IOPixelEnum::SCALAR, + itk::IOPixelEnum::RGB, + itk::IOPixelEnum::RGBA, + itk::IOPixelEnum::OFFSET, + itk::IOPixelEnum::VECTOR, + itk::IOPixelEnum::POINT, + itk::IOPixelEnum::COVARIANTVECTOR, + itk::IOPixelEnum::SYMMETRICSECONDRANKTENSOR, + itk::IOPixelEnum::DIFFUSIONTENSOR3D, + itk::IOPixelEnum::COMPLEX, + itk::IOPixelEnum::FIXEDARRAY, + itk::IOPixelEnum::MATRIX }; const char * listIOPixelTypeString[] = { "unknown", - "scalar", - "rgb", - "rgba", - "offset", - "vector", - "point", - "covariant_vector", - "symmetric_second_rank_tensor", - "diffusion_tensor_3D", - "complex", - "fixed_array", - "matrix" }; + "scalar", + "rgb", + "rgba", + "offset", + "vector", + "point", + "covariant_vector", + "symmetric_second_rank_tensor", + "diffusion_tensor_3D", + "complex", + "fixed_array", + "matrix" }; // Compile time verification that the array lengths are correct for type and name static_assert(std::size(listComponentType) == std::size(listComponentTypeString), "listComponentType and listComponentTypeString must be same length"); diff --git a/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx b/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx index 833c97c6e00..f28c177213d 100644 --- a/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx +++ b/Modules/IO/ImageBase/test/itkUnicodeIOTest.cxx @@ -43,7 +43,7 @@ checkAlphaExists() utf8_str.append(1, '\xCE'); utf8_str.append(1, '\xB1'); utf8_str += ".txt"; - FILE * tmp = fopen(utf8_str.c_str(), "r"); + FILE * tmp = fopen(utf8_str.c_str(), "r"); #endif if (tmp != nullptr) { diff --git a/Modules/IO/JPEG/src/itkJPEGImageIOFactory.cxx b/Modules/IO/JPEG/src/itkJPEGImageIOFactory.cxx index 23e67e734c2..73770ed702a 100644 --- a/Modules/IO/JPEG/src/itkJPEGImageIOFactory.cxx +++ b/Modules/IO/JPEG/src/itkJPEGImageIOFactory.cxx @@ -44,7 +44,7 @@ JPEGImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOJPEG_EXPORT - JPEGImageIOFactoryRegister__Private() +JPEGImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIOFactory.cxx b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIOFactory.cxx index 3da92e2332b..ed491b569fc 100644 --- a/Modules/IO/JPEG2000/src/itkJPEG2000ImageIOFactory.cxx +++ b/Modules/IO/JPEG2000/src/itkJPEG2000ImageIOFactory.cxx @@ -45,7 +45,7 @@ JPEG2000ImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOJPEG2000_EXPORT - JPEG2000ImageIOFactoryRegister__Private() +JPEG2000ImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/LSM/src/itkLSMImageIOFactory.cxx b/Modules/IO/LSM/src/itkLSMImageIOFactory.cxx index 1f9b918186a..6ee139a92a0 100644 --- a/Modules/IO/LSM/src/itkLSMImageIOFactory.cxx +++ b/Modules/IO/LSM/src/itkLSMImageIOFactory.cxx @@ -54,7 +54,7 @@ LSMImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOLSM_EXPORT - LSMImageIOFactoryRegister__Private() +LSMImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MINC/src/itkMINCImageIO.cxx b/Modules/IO/MINC/src/itkMINCImageIO.cxx index 3d9b27b36f5..5b5f65110e1 100644 --- a/Modules/IO/MINC/src/itkMINCImageIO.cxx +++ b/Modules/IO/MINC/src/itkMINCImageIO.cxx @@ -269,10 +269,7 @@ MINCImageIO::MINCImageIO() m_MINCPImpl->m_Volume_class = MI_CLASS_REAL; } -MINCImageIO::~MINCImageIO() -{ - this->CloseVolume(); -} +MINCImageIO::~MINCImageIO() { this->CloseVolume(); } void MINCImageIO::PrintSelf(std::ostream & os, Indent indent) const @@ -628,7 +625,7 @@ MINCImageIO::ReadImageInformation() else { this->SetPixelType(IOPixelEnum::VECTOR); // TODO: handle more types (i.e matrix, - } // tensor etc) + } // tensor etc) break; case MI_CLASS_INT: if (numberOfComponents == 1) @@ -638,7 +635,7 @@ MINCImageIO::ReadImageInformation() else { this->SetPixelType(IOPixelEnum::VECTOR); // TODO: handle more types (i.e matrix, - } // tensor etc) + } // tensor etc) break; case MI_CLASS_LABEL: if (numberOfComponents == 1) diff --git a/Modules/IO/MINC/src/itkMINCImageIOFactory.cxx b/Modules/IO/MINC/src/itkMINCImageIOFactory.cxx index dd398b10dce..d8b8ce5e58e 100644 --- a/Modules/IO/MINC/src/itkMINCImageIOFactory.cxx +++ b/Modules/IO/MINC/src/itkMINCImageIOFactory.cxx @@ -44,7 +44,7 @@ MINCImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMINC_EXPORT - MINCImageIOFactoryRegister__Private() +MINCImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MRC/src/itkMRCHeaderObject.cxx b/Modules/IO/MRC/src/itkMRCHeaderObject.cxx index 8c117a77106..3e8015ef4d5 100644 --- a/Modules/IO/MRC/src/itkMRCHeaderObject.cxx +++ b/Modules/IO/MRC/src/itkMRCHeaderObject.cxx @@ -176,15 +176,9 @@ MRCHeaderObject::IsOriginalHeaderBigEndian() const return this->m_BigEndianHeader; } -MRCHeaderObject::MRCHeaderObject() -{ - this->m_BigEndianHeader = ByteSwapper::SystemIsBE(); -} +MRCHeaderObject::MRCHeaderObject() { this->m_BigEndianHeader = ByteSwapper::SystemIsBE(); } -MRCHeaderObject::~MRCHeaderObject() -{ - delete[] static_cast(this->m_ExtendedHeader); -} +MRCHeaderObject::~MRCHeaderObject() { delete[] static_cast(this->m_ExtendedHeader); } void MRCHeaderObject::swapHeader(bool bigEndian) diff --git a/Modules/IO/MRC/src/itkMRCImageIOFactory.cxx b/Modules/IO/MRC/src/itkMRCImageIOFactory.cxx index b2dcb68a1dd..90cb152a08c 100644 --- a/Modules/IO/MRC/src/itkMRCImageIOFactory.cxx +++ b/Modules/IO/MRC/src/itkMRCImageIOFactory.cxx @@ -54,7 +54,7 @@ MRCImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMRC_EXPORT - MRCImageIOFactoryRegister__Private() +MRCImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MeshBYU/src/itkBYUMeshIOFactory.cxx b/Modules/IO/MeshBYU/src/itkBYUMeshIOFactory.cxx index 661c946a911..d379396fb1a 100644 --- a/Modules/IO/MeshBYU/src/itkBYUMeshIOFactory.cxx +++ b/Modules/IO/MeshBYU/src/itkBYUMeshIOFactory.cxx @@ -53,7 +53,7 @@ BYUMeshIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeshBYU_EXPORT - BYUMeshIOFactoryRegister__Private() +BYUMeshIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx index 93f79ca1c5d..3031273ec7e 100644 --- a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx +++ b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIO.cxx @@ -23,10 +23,7 @@ namespace itk { -FreeSurferAsciiMeshIO::FreeSurferAsciiMeshIO() -{ - this->AddSupportedWriteExtension(".fsa"); -} +FreeSurferAsciiMeshIO::FreeSurferAsciiMeshIO() { this->AddSupportedWriteExtension(".fsa"); } FreeSurferAsciiMeshIO::~FreeSurferAsciiMeshIO() = default; diff --git a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIOFactory.cxx b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIOFactory.cxx index 4c95b3af450..e0fffe4b8c5 100644 --- a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIOFactory.cxx +++ b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferAsciiMeshIOFactory.cxx @@ -53,7 +53,7 @@ FreeSurferAsciiMeshIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeshFreeSurfer_EXPORT - FreeSurferAsciiMeshIOFactoryRegister__Private() +FreeSurferAsciiMeshIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIOFactory.cxx b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIOFactory.cxx index f25a8cab6ec..1fa62a382ba 100644 --- a/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIOFactory.cxx +++ b/Modules/IO/MeshFreeSurfer/src/itkFreeSurferBinaryMeshIOFactory.cxx @@ -53,7 +53,7 @@ FreeSurferBinaryMeshIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeshFreeSurfer_EXPORT - FreeSurferBinaryMeshIOFactoryRegister__Private() +FreeSurferBinaryMeshIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx b/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx index a5414b79870..3ec05dee3e3 100644 --- a/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx +++ b/Modules/IO/MeshGifti/src/itkGiftiMeshIO.cxx @@ -37,7 +37,11 @@ class GiftiMeshIO::GiftiImageProxy operator gifti_image *() { return m_ptr; } - gifti_image * operator->() { return m_ptr; } + gifti_image * + operator->() + { + return m_ptr; + } }; diff --git a/Modules/IO/MeshGifti/src/itkGiftiMeshIOFactory.cxx b/Modules/IO/MeshGifti/src/itkGiftiMeshIOFactory.cxx index 84ccbc0f3f6..c36384cdc19 100644 --- a/Modules/IO/MeshGifti/src/itkGiftiMeshIOFactory.cxx +++ b/Modules/IO/MeshGifti/src/itkGiftiMeshIOFactory.cxx @@ -50,7 +50,7 @@ GiftiMeshIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeshGifti_EXPORT - GiftiMeshIOFactoryRegister__Private() +GiftiMeshIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx b/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx index 5cc1aef2e7a..11c8fed9fc0 100644 --- a/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx +++ b/Modules/IO/MeshOBJ/src/itkOBJMeshIO.cxx @@ -26,10 +26,7 @@ namespace itk { -OBJMeshIO::OBJMeshIO() -{ - this->AddSupportedWriteExtension(".obj"); -} +OBJMeshIO::OBJMeshIO() { this->AddSupportedWriteExtension(".obj"); } OBJMeshIO::~OBJMeshIO() = default; diff --git a/Modules/IO/MeshOBJ/src/itkOBJMeshIOFactory.cxx b/Modules/IO/MeshOBJ/src/itkOBJMeshIOFactory.cxx index 302e7cd7025..5dbab165f9e 100644 --- a/Modules/IO/MeshOBJ/src/itkOBJMeshIOFactory.cxx +++ b/Modules/IO/MeshOBJ/src/itkOBJMeshIOFactory.cxx @@ -49,7 +49,7 @@ OBJMeshIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeshOBJ_EXPORT - OBJMeshIOFactoryRegister__Private() +OBJMeshIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MeshOFF/src/itkOFFMeshIOFactory.cxx b/Modules/IO/MeshOFF/src/itkOFFMeshIOFactory.cxx index 52461d5b2e9..68208d8db25 100644 --- a/Modules/IO/MeshOFF/src/itkOFFMeshIOFactory.cxx +++ b/Modules/IO/MeshOFF/src/itkOFFMeshIOFactory.cxx @@ -49,7 +49,7 @@ OFFMeshIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeshOFF_EXPORT - OFFMeshIOFactoryRegister__Private() +OFFMeshIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx index fe036f183b7..697e043fd8c 100644 --- a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx +++ b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIO.cxx @@ -412,8 +412,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() // Check whether numberOfVertices and numberOfVertexIndices are correct if (numberOfVertices < 1) { - itkExceptionMacro("ERROR: numberOfVertices < 1\n " - << "numberOfVertices= " << numberOfVertices); + itkExceptionMacro("ERROR: numberOfVertices < 1\n " << "numberOfVertices= " << numberOfVertices); } if (numberOfVertexIndices < numberOfVertices) @@ -459,8 +458,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() // Check whether numberOfPolylines and numberOfPolylineIndices are correct if (numberOfLines < 1) { - itkExceptionMacro("ERROR: numberOfLines < 1\n " - << "numberOfLines= " << numberOfLines); + itkExceptionMacro("ERROR: numberOfLines < 1\n " << "numberOfLines= " << numberOfLines); } if (numberOfLineIndices < numberOfLines) @@ -506,8 +504,7 @@ VTKPolyDataMeshIO::ReadMeshInformation() // Check whether numberOfPolygons and numberOfPolygonIndices are correct if (numberOfPolygons < 1) { - itkExceptionMacro("ERROR: numberOfPolygons < 1\n " - << "numberOfPolygons= " << numberOfPolygons); + itkExceptionMacro("ERROR: numberOfPolygons < 1\n " << "numberOfPolygons= " << numberOfPolygons); } if (numberOfPolygonIndices < numberOfPolygons) diff --git a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIOFactory.cxx b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIOFactory.cxx index 62a4e570d74..bd5ffdf73ed 100644 --- a/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIOFactory.cxx +++ b/Modules/IO/MeshVTK/src/itkVTKPolyDataMeshIOFactory.cxx @@ -55,7 +55,7 @@ VTKPolyDataMeshIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeshVTK_EXPORT - VTKPolyDataMeshIOFactoryRegister__Private() +VTKPolyDataMeshIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/Meta/src/itkMetaImageIOFactory.cxx b/Modules/IO/Meta/src/itkMetaImageIOFactory.cxx index 320344c2094..49a90658d03 100644 --- a/Modules/IO/Meta/src/itkMetaImageIOFactory.cxx +++ b/Modules/IO/Meta/src/itkMetaImageIOFactory.cxx @@ -44,7 +44,7 @@ MetaImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOMeta_EXPORT - MetaImageIOFactoryRegister__Private() +MetaImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index 4d668c1c071..aaa94c1571c 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -404,7 +404,11 @@ class NiftiImageIO::NiftiImageProxy operator nifti_image *() { return m_ptr; } - nifti_image * operator->() { return m_ptr; } + nifti_image * + operator->() + { + return m_ptr; + } }; @@ -432,10 +436,7 @@ NiftiImageIO::NiftiImageIO() } } -NiftiImageIO::~NiftiImageIO() -{ - nifti_image_free(this->m_NiftiImage); -} +NiftiImageIO::~NiftiImageIO() { nifti_image_free(this->m_NiftiImage); } void NiftiImageIO::PrintSelf(std::ostream & os, Indent indent) const diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIOFactory.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIOFactory.cxx index a2967f64fa5..b839d5858fe 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIOFactory.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIOFactory.cxx @@ -48,7 +48,7 @@ NiftiImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIONIFTI_EXPORT - NiftiImageIOFactoryRegister__Private() +NiftiImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/NRRD/src/itkNrrdImageIOFactory.cxx b/Modules/IO/NRRD/src/itkNrrdImageIOFactory.cxx index 6806cf40d74..08d9e4bc4a6 100644 --- a/Modules/IO/NRRD/src/itkNrrdImageIOFactory.cxx +++ b/Modules/IO/NRRD/src/itkNrrdImageIOFactory.cxx @@ -44,7 +44,7 @@ NrrdImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIONRRD_EXPORT - NrrdImageIOFactoryRegister__Private() +NrrdImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/PNG/src/itkPNGImageIOFactory.cxx b/Modules/IO/PNG/src/itkPNGImageIOFactory.cxx index 19283d9eb65..d54ce60cffa 100644 --- a/Modules/IO/PNG/src/itkPNGImageIOFactory.cxx +++ b/Modules/IO/PNG/src/itkPNGImageIOFactory.cxx @@ -44,7 +44,7 @@ PNGImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOPNG_EXPORT - PNGImageIOFactoryRegister__Private() +PNGImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx index ff95d12a70d..e78c082208c 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsPAR.cxx @@ -211,9 +211,8 @@ struct image_info_defV4 struct image_info_defV3 GetImageInformationDefinitionV3(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { - struct image_info_defV3 tempInfo - {}; - std::string currentLine = ""; + struct image_info_defV3 tempInfo{}; + std::string currentLine = ""; if (lineNum < 89) { @@ -252,9 +251,8 @@ GetImageInformationDefinitionV3(std::string file, int lineNum, PhilipsPAR * phil struct image_info_defV4 GetImageInformationDefinitionV4(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { - struct image_info_defV4 tempInfo - {}; - std::string currentLine = ""; + struct image_info_defV4 tempInfo{}; + std::string currentLine = ""; if (lineNum < 92) { @@ -298,9 +296,8 @@ GetImageInformationDefinitionV4(std::string file, int lineNum, PhilipsPAR * phil struct image_info_defV4 GetImageInformationDefinitionV41(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { - struct image_info_defV4 tempInfo - {}; - std::string currentLine = ""; + struct image_info_defV4 tempInfo{}; + std::string currentLine = ""; if (lineNum < 99) { @@ -347,9 +344,8 @@ GetImageInformationDefinitionV41(std::string file, int lineNum, PhilipsPAR * phi struct image_info_defV4 GetImageInformationDefinitionV42(std::string file, int lineNum, PhilipsPAR * philipsPARClass) { - struct image_info_defV4 tempInfo - {}; - std::string currentLine = ""; + struct image_info_defV4 tempInfo{}; + std::string currentLine = ""; if (lineNum < 101) { diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx index 28ae662f064..89596385562 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIO.cxx @@ -396,10 +396,7 @@ PhilipsRECImageIO::PhilipsRECImageIO() this->m_SliceIndex = new SliceIndexType(); } -PhilipsRECImageIO::~PhilipsRECImageIO() -{ - delete this->m_SliceIndex; -} +PhilipsRECImageIO::~PhilipsRECImageIO() { delete this->m_SliceIndex; } void PhilipsRECImageIO::PrintSelf(std::ostream & os, Indent indent) const @@ -517,8 +514,7 @@ PhilipsRECImageIO::CanReadFile(const char * FileNameToRead) const std::string HeaderFileName = GetHeaderFileName(filename); // Try to read the par file. - struct par_parameter par - {}; + struct par_parameter par{}; auto philipsPAR = PhilipsPAR::New(); try @@ -543,8 +539,7 @@ void PhilipsRECImageIO::ReadImageInformation() { const std::string HeaderFileName = GetHeaderFileName(this->m_FileName); - struct par_parameter par - {}; + struct par_parameter par{}; // Read PAR file. auto philipsPAR = PhilipsPAR::New(); diff --git a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIOFactory.cxx b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIOFactory.cxx index 074f3fdd639..0f6b0dd515d 100644 --- a/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIOFactory.cxx +++ b/Modules/IO/PhilipsREC/src/itkPhilipsRECImageIOFactory.cxx @@ -59,7 +59,7 @@ PhilipsRECImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOPhilipsREC_EXPORT - PhilipsRECImageIOFactoryRegister__Private() +PhilipsRECImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx b/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx index 078cf5957c7..4819e4399a8 100644 --- a/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx +++ b/Modules/IO/Siemens/src/itkSiemensVisionImageIO.cxx @@ -80,7 +80,7 @@ SiemensVisionImageIO::ReadHeader(const char * FileNameToRead) // #define DEBUGHEADER #if defined(DEBUGHEADER) -# define DB(x) std::cerr << # x << ' ' << x << std::endl +# define DB(x) std::cerr << #x << ' ' << x << std::endl #else # define DB(x) #endif diff --git a/Modules/IO/Siemens/src/itkSiemensVisionImageIOFactory.cxx b/Modules/IO/Siemens/src/itkSiemensVisionImageIOFactory.cxx index 00fe77abf24..59f4790c768 100644 --- a/Modules/IO/Siemens/src/itkSiemensVisionImageIOFactory.cxx +++ b/Modules/IO/Siemens/src/itkSiemensVisionImageIOFactory.cxx @@ -51,7 +51,7 @@ SiemensVisionImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOSiemens_EXPORT - SiemensVisionImageIOFactoryRegister__Private() +SiemensVisionImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/Stimulate/src/itkStimulateImageIOFactory.cxx b/Modules/IO/Stimulate/src/itkStimulateImageIOFactory.cxx index ce2a5224f9a..8ae70965f2b 100644 --- a/Modules/IO/Stimulate/src/itkStimulateImageIOFactory.cxx +++ b/Modules/IO/Stimulate/src/itkStimulateImageIOFactory.cxx @@ -54,7 +54,7 @@ StimulateImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOStimulate_EXPORT - StimulateImageIOFactoryRegister__Private() +StimulateImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/TIFF/src/itkTIFFImageIOFactory.cxx b/Modules/IO/TIFF/src/itkTIFFImageIOFactory.cxx index 98ea5213cb6..c3f1e6e204a 100644 --- a/Modules/IO/TIFF/src/itkTIFFImageIOFactory.cxx +++ b/Modules/IO/TIFF/src/itkTIFFImageIOFactory.cxx @@ -44,7 +44,7 @@ TIFFImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOTIFF_EXPORT - TIFFImageIOFactoryRegister__Private() +TIFFImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/TransformBase/include/itkTransformFileWriter.h b/Modules/IO/TransformBase/include/itkTransformFileWriter.h index 4db55116e02..3a0c326de9d 100644 --- a/Modules/IO/TransformBase/include/itkTransformFileWriter.h +++ b/Modules/IO/TransformBase/include/itkTransformFileWriter.h @@ -137,10 +137,10 @@ ITK_GCC_PRAGMA_DIAG(ignored "-Wattributes") /** Declare specializations */ template <> void ITKIOTransformBase_TEMPLATE_EXPORT - TransformFileWriterTemplate::PushBackTransformList(const Object * transObj); +TransformFileWriterTemplate::PushBackTransformList(const Object * transObj); template <> void ITKIOTransformBase_TEMPLATE_EXPORT - TransformFileWriterTemplate::PushBackTransformList(const Object * transObj); +TransformFileWriterTemplate::PushBackTransformList(const Object * transObj); ITK_GCC_PRAGMA_DIAG_POP() diff --git a/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h b/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h index 0eed59c7f39..48461b81e8f 100644 --- a/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h +++ b/Modules/IO/TransformHDF5/include/itkHDF5TransformIO.h @@ -161,7 +161,7 @@ class ITK_TEMPLATE_EXPORT HDF5TransformIOTemplate }; std::string ITKIOTransformHDF5_EXPORT - GetTransformName(int); +GetTransformName(int); /** This helps to meet backward compatibility */ using HDF5TransformIO = HDF5TransformIOTemplate; diff --git a/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx b/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx index 9e50f8e96cd..c1defe3619f 100644 --- a/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx +++ b/Modules/IO/TransformHDF5/src/itkHDF5TransformIO.cxx @@ -173,8 +173,7 @@ HDF5TransformIOTemplate::ReadParameters(const std::string const H5::DataSpace Space = paramSet.getSpace(); if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro("Wrong # of dims for TransformType " - << "in HDF5 File"); + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } hsize_t dim; Space.getSimpleExtentDims(&dim, nullptr); @@ -220,8 +219,7 @@ HDF5TransformIOTemplate::ReadFixedParameters(const std::st const H5::DataSpace Space = paramSet.getSpace(); if (Space.getSimpleExtentNdims() != 1) { - itkExceptionMacro("Wrong # of dims for TransformType " - << "in HDF5 File"); + itkExceptionMacro("Wrong # of dims for TransformType " << "in HDF5 File"); } hsize_t dim; Space.getSimpleExtentDims(&dim, nullptr); diff --git a/Modules/IO/TransformHDF5/src/itkHDF5TransformIOFactory.cxx b/Modules/IO/TransformHDF5/src/itkHDF5TransformIOFactory.cxx index 2a6c42111dc..5a444e95720 100644 --- a/Modules/IO/TransformHDF5/src/itkHDF5TransformIOFactory.cxx +++ b/Modules/IO/TransformHDF5/src/itkHDF5TransformIOFactory.cxx @@ -59,7 +59,7 @@ HDF5TransformIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOTransformHDF5_EXPORT - HDF5TransformIOFactoryRegister__Private() +HDF5TransformIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIOFactory.cxx b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIOFactory.cxx index a0b23b8d9ec..5cd1e0a5907 100644 --- a/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIOFactory.cxx +++ b/Modules/IO/TransformInsightLegacy/src/itkTxtTransformIOFactory.cxx @@ -58,7 +58,7 @@ TxtTransformIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOTransformInsightLegacy_EXPORT - TxtTransformIOFactoryRegister__Private() +TxtTransformIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/TransformMINC/src/itkMINCTransformIOFactory.cxx b/Modules/IO/TransformMINC/src/itkMINCTransformIOFactory.cxx index 0fdaa6563d3..7a51cae74bd 100644 --- a/Modules/IO/TransformMINC/src/itkMINCTransformIOFactory.cxx +++ b/Modules/IO/TransformMINC/src/itkMINCTransformIOFactory.cxx @@ -61,7 +61,7 @@ MINCTransformIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOTransformMINC_EXPORT - MINCTransformIOFactoryRegister__Private() +MINCTransformIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); diff --git a/Modules/IO/TransformMatlab/src/itkMatlabTransformIOFactory.cxx b/Modules/IO/TransformMatlab/src/itkMatlabTransformIOFactory.cxx index c38abf07867..f5b6a8488b0 100644 --- a/Modules/IO/TransformMatlab/src/itkMatlabTransformIOFactory.cxx +++ b/Modules/IO/TransformMatlab/src/itkMatlabTransformIOFactory.cxx @@ -58,7 +58,7 @@ MatlabTransformIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOTransformMatlab_EXPORT - MatlabTransformIOFactoryRegister__Private() +MatlabTransformIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/VTK/src/itkVTKImageIO.cxx b/Modules/IO/VTK/src/itkVTKImageIO.cxx index 87f69cd3ad6..d8be6385316 100644 --- a/Modules/IO/VTK/src/itkVTKImageIO.cxx +++ b/Modules/IO/VTK/src/itkVTKImageIO.cxx @@ -396,7 +396,8 @@ VTKImageIO::ReadHeaderSize(std::ifstream & file) file.seekg(pos); } else - {} + { + } } // found scalars } diff --git a/Modules/IO/VTK/src/itkVTKImageIOFactory.cxx b/Modules/IO/VTK/src/itkVTKImageIOFactory.cxx index 9fc667401ae..24f6b4540bf 100644 --- a/Modules/IO/VTK/src/itkVTKImageIOFactory.cxx +++ b/Modules/IO/VTK/src/itkVTKImageIOFactory.cxx @@ -54,7 +54,7 @@ VTKImageIOFactory::GetDescription() const // Undocumented API used to register during static initialization. // DO NOT CALL DIRECTLY. void ITKIOVTK_EXPORT - VTKImageIOFactoryRegister__Private() +VTKImageIOFactoryRegister__Private() { ObjectFactoryBase::RegisterInternalFactoryOnce(); } diff --git a/Modules/IO/XML/include/itkFancyString.h b/Modules/IO/XML/include/itkFancyString.h index b3385a626db..1a3c050504d 100644 --- a/Modules/IO/XML/include/itkFancyString.h +++ b/Modules/IO/XML/include/itkFancyString.h @@ -213,18 +213,18 @@ class ITKIOXML_EXPORT FancyString ///////////////////////////////////////////////////////////////////////////// bool ITKIOXML_EXPORT - operator!=(itk::FancyString & s, const std::string &); +operator!=(itk::FancyString & s, const std::string &); bool ITKIOXML_EXPORT - operator!=(itk::FancyString & s, const char *); +operator!=(itk::FancyString & s, const char *); bool ITKIOXML_EXPORT - operator!=(itk::FancyString & s, const itk::FancyString &); +operator!=(itk::FancyString & s, const itk::FancyString &); bool ITKIOXML_EXPORT - operator==(itk::FancyString & s, const std::string &); +operator==(itk::FancyString & s, const std::string &); bool ITKIOXML_EXPORT - operator==(itk::FancyString & s, const char *); +operator==(itk::FancyString & s, const char *); bool ITKIOXML_EXPORT - operator==(itk::FancyString & s, const itk::FancyString &); +operator==(itk::FancyString & s, const itk::FancyString &); namespace itk { diff --git a/Modules/IO/XML/src/itkFancyString.cxx b/Modules/IO/XML/src/itkFancyString.cxx index 27a9bd4905a..8e44e8e5e4d 100644 --- a/Modules/IO/XML/src/itkFancyString.cxx +++ b/Modules/IO/XML/src/itkFancyString.cxx @@ -49,16 +49,10 @@ FancyString::operator=(const char * s) } /** Function to cast this type to "const char *". */ -FancyString::operator const char *() const -{ - return this->m_Value.c_str(); -} +FancyString::operator const char *() const { return this->m_Value.c_str(); } /** Function to convert this value to a "std::string". */ -FancyString::operator const std::string &() const -{ - return this->ToString(); -} +FancyString::operator const std::string &() const { return this->ToString(); } /** Function to convert this value to a "std::string". */ const std::string & diff --git a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h index bea39414724..f53edd99fd4 100644 --- a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h +++ b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.h @@ -255,7 +255,8 @@ class ITK_TEMPLATE_EXPORT // Macros for enabling the calculation of additional features. itkGetMacro(CalculatePixelIndices, bool); itkBooleanMacro(CalculatePixelIndices); - void SetCalculatePixelIndices(const bool value) + void + SetCalculatePixelIndices(const bool value) { // CalculateOrientedBoundingBox, CalculateOrientedLabelImage, and // CalculateOrientedIntensityImage all need CalculatePixelIndices to be @@ -281,7 +282,8 @@ class ITK_TEMPLATE_EXPORT itkGetMacro(CalculateOrientedBoundingBox, bool); itkBooleanMacro(CalculateOrientedBoundingBox); - void SetCalculateOrientedBoundingBox(const bool value) + void + SetCalculateOrientedBoundingBox(const bool value) { if (this->m_CalculateOrientedBoundingBox != value) { @@ -299,7 +301,8 @@ class ITK_TEMPLATE_EXPORT itkGetMacro(CalculateOrientedLabelRegions, bool); itkBooleanMacro(CalculateOrientedLabelRegions); - void SetCalculateOrientedLabelRegions(const bool value) + void + SetCalculateOrientedLabelRegions(const bool value) { if (this->m_CalculateOrientedLabelRegions != value) { @@ -317,7 +320,8 @@ class ITK_TEMPLATE_EXPORT itkGetMacro(CalculateOrientedIntensityRegions, bool); itkBooleanMacro(CalculateOrientedIntensityRegions); - void SetCalculateOrientedIntensityRegions(const bool value) + void + SetCalculateOrientedIntensityRegions(const bool value) { if (this->m_CalculateOrientedIntensityRegions != value) { @@ -334,83 +338,117 @@ class ITK_TEMPLATE_EXPORT } /** Set the intensity image */ - void SetIntensityInput(const TIntensityImage * input) + void + SetIntensityInput(const TIntensityImage * input) { // Process object is not const-correct so the const casting is required. this->SetNthInput(1, const_cast(input)); } /** Get the label image */ - const TIntensityImage * GetIntensityInput() const + const TIntensityImage * + GetIntensityInput() const { return static_cast(const_cast(this->ProcessObject::GetInput(1))); } /** Does the specified label exist? Can only be called after * a call to Update(). */ - bool HasLabel(LabelPixelType label) const { return m_LabelGeometryMapper.find(label) != m_LabelGeometryMapper.end(); } + bool + HasLabel(LabelPixelType label) const + { + return m_LabelGeometryMapper.find(label) != m_LabelGeometryMapper.end(); + } /** Get the number of labels used */ - SizeValueType GetNumberOfObjects() const { return m_LabelGeometryMapper.size(); } + SizeValueType + GetNumberOfObjects() const + { + return m_LabelGeometryMapper.size(); + } - SizeValueType GetNumberOfLabels() const { return this->GetNumberOfObjects(); } + SizeValueType + GetNumberOfLabels() const + { + return this->GetNumberOfObjects(); + } /** Get the labels that are in the image. */ - std::vector GetLabels() const { return m_AllLabels; } + std::vector + GetLabels() const + { + return m_AllLabels; + } /** Return the all pixel indices for a label. */ - LabelIndicesType GetPixelIndices(LabelPixelType label) const; + LabelIndicesType + GetPixelIndices(LabelPixelType label) const; /** Return the number of pixels for a label. This is the same as * the volume and the zero order moment */ - SizeValueType GetVolume(LabelPixelType label) const; + SizeValueType + GetVolume(LabelPixelType label) const; /** Return the computed integrated pixel intensity for a label. */ - RealType GetIntegratedIntensity(LabelPixelType label) const; + RealType + GetIntegratedIntensity(LabelPixelType label) const; /** Return the unweighted centroid for a label. */ - LabelPointType GetCentroid(LabelPixelType label) const; + LabelPointType + GetCentroid(LabelPixelType label) const; /** Return the weighted centroid for a label. */ - LabelPointType GetWeightedCentroid(LabelPixelType label) const; + LabelPointType + GetWeightedCentroid(LabelPixelType label) const; /** Return the eigenvalues as a vector. */ - VectorType GetEigenvalues(LabelPixelType label) const; + VectorType + GetEigenvalues(LabelPixelType label) const; /** Return the eigenvectors as a matrix. */ - MatrixType GetEigenvectors(LabelPixelType label) const; + MatrixType + GetEigenvectors(LabelPixelType label) const; /** Return the axes length for a label. */ - AxesLengthType GetAxesLength(LabelPixelType label) const; + AxesLengthType + GetAxesLength(LabelPixelType label) const; /** Return the minor axis length for a label. This is a convenience * class that returns the shortest length from GetAxesLength. */ - RealType GetMinorAxisLength(LabelPixelType label) const; + RealType + GetMinorAxisLength(LabelPixelType label) const; /** Return the major axis length for a label. This is a convenience * class that returns the longest length from GetAxesLength. */ - RealType GetMajorAxisLength(LabelPixelType label) const; + RealType + GetMajorAxisLength(LabelPixelType label) const; /** Return the eccentricity for a label. */ - RealType GetEccentricity(LabelPixelType label) const; + RealType + GetEccentricity(LabelPixelType label) const; /** Return the elongation for a label. This is defined as the * length of the major axis divided by the length of the minor axis. */ - RealType GetElongation(LabelPixelType label) const; + RealType + GetElongation(LabelPixelType label) const; /** Return the orientation for a label defined in radians. */ - RealType GetOrientation(LabelPixelType label) const; + RealType + GetOrientation(LabelPixelType label) const; /** Return the computed bounding box for a label. * This is organized in min/max pairs as [min(X), max(X), min(Y), * max(Y), min(Z), max(Z),...] */ - BoundingBoxType GetBoundingBox(LabelPixelType label) const; + BoundingBoxType + GetBoundingBox(LabelPixelType label) const; /** Return the volume of the bounding box. */ - RealType GetBoundingBoxVolume(LabelPixelType label) const; + RealType + GetBoundingBoxVolume(LabelPixelType label) const; /** Return the size of the bounding box. */ - LabelSizeType GetBoundingBoxSize(LabelPixelType label) const; + LabelSizeType + GetBoundingBoxSize(LabelPixelType label) const; /** Return the oriented bounding box vertices. The order of the * vertices corresponds with binary counting, where min is zero and @@ -418,30 +456,38 @@ class ITK_TEMPLATE_EXPORT * [0,0],[0,1],[1,0],[1,1], which corresponds to * [minX,minY],[minX,maxY],[maxX,minY],[maxX,maxY]. Each * vertex is defined as an ND point. */ - BoundingBoxVerticesType GetOrientedBoundingBoxVertices(LabelPixelType label) const; + BoundingBoxVerticesType + GetOrientedBoundingBoxVertices(LabelPixelType label) const; /** Return the volume of the oriented bounding box. */ - RealType GetOrientedBoundingBoxVolume(LabelPixelType label) const; + RealType + GetOrientedBoundingBoxVolume(LabelPixelType label) const; /** Return the size of the oriented bounding box. */ - LabelPointType GetOrientedBoundingBoxSize(LabelPixelType label) const; + LabelPointType + GetOrientedBoundingBoxSize(LabelPixelType label) const; /** Return the origin of the oriented bounding box. */ - LabelPointType GetOrientedBoundingBoxOrigin(LabelPixelType label) const; + LabelPointType + GetOrientedBoundingBoxOrigin(LabelPixelType label) const; /** Return the rotation matrix defined by the * eigenvalues/eigenvectors. */ - MatrixType GetRotationMatrix(LabelPixelType label) const; + MatrixType + GetRotationMatrix(LabelPixelType label) const; /** Return the region defined by the bounding box. */ - RegionType GetRegion(LabelPixelType label) const; + RegionType + GetRegion(LabelPixelType label) const; /** Return the label region defined by the oriented bounding box. */ - TLabelImage * GetOrientedLabelImage(LabelPixelType label) const; + TLabelImage * + GetOrientedLabelImage(LabelPixelType label) const; /** Return the intensity region defined by the oriented bounding * box. */ - TIntensityImage * GetOrientedIntensityImage(LabelPixelType label) const; + TIntensityImage * + GetOrientedIntensityImage(LabelPixelType label) const; #ifdef ITK_USE_CONCEPT_CHECKING // Begin concept checking @@ -452,12 +498,15 @@ class ITK_TEMPLATE_EXPORT protected: LabelGeometryImageFilter(); ~LabelGeometryImageFilter() override = default; - void PrintSelf(std::ostream & os, Indent indent) const override; + void + PrintSelf(std::ostream & os, Indent indent) const override; - void GenerateData() override; + void + GenerateData() override; private: - bool CalculateOrientedBoundingBoxVertices(vnl_symmetric_eigensystem eig, LabelGeometry & m_LabelGeometry); + bool + CalculateOrientedBoundingBoxVertices(vnl_symmetric_eigensystem eig, LabelGeometry & m_LabelGeometry); bool m_CalculatePixelIndices{}; bool m_CalculateOrientedBoundingBox{}; diff --git a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx index f2eddcc1704..0550381134f 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.hxx @@ -34,8 +34,7 @@ MultiphaseFiniteDifferenceImageFilterm_FunctionCount) { - itkExceptionMacro("Number of level set functions not specified. " - << "Please set using SetFunctionCount()"); + itkExceptionMacro("Number of level set functions not specified. " << "Please set using SetFunctionCount()"); } if (!this->m_InitializedState) diff --git a/Modules/Numerics/FEM/include/itkFEMP.h b/Modules/Numerics/FEM/include/itkFEMP.h index e7dc73c2f5c..5374a7e901c 100644 --- a/Modules/Numerics/FEM/include/itkFEMP.h +++ b/Modules/Numerics/FEM/include/itkFEMP.h @@ -104,7 +104,11 @@ class FEMP /** * Easy access to members of stored object */ - typename T::Pointer operator->() const { return m_Data; } + typename T::Pointer + operator->() const + { + return m_Data; + } /** * Dereferencing operator provides automatic conversion from diff --git a/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx b/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx index f79e0de4e16..95cdf2bfda6 100644 --- a/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx +++ b/Modules/Numerics/FEM/include/itkFEMRobustSolver.hxx @@ -708,7 +708,7 @@ RobustSolver::AssembleLandmarkStiffnessMatrix() const int dofn = element->GetDegreeOfFreedom(k * numberOfDOFs + n); const int dofm = element->GetDegreeOfFreedom(k * numberOfDOFs + m); const auto value = static_cast(barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * - (tens(n, m)) * confidence); + (tens(n, m))*confidence); this->m_LinearSystem->AddMatrixValue(dofn, dofm, value, m_LandmarkStiffnessMatrixIndex); } @@ -729,7 +729,7 @@ RobustSolver::AssembleLandmarkStiffnessMatrix() const int dofn = element->GetDegreeOfFreedom(i * numberOfDOFs + n); const int dofm = element->GetDegreeOfFreedom(j * numberOfDOFs + m); const auto value = static_cast(barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * - (tens(n, m)) * confidence); + (tens(n, m))*confidence); this->m_LinearSystem->AddMatrixValue(dofn, dofm, value, m_LandmarkStiffnessMatrixIndex); this->m_LinearSystem->AddMatrixValue(dofm, dofn, value, m_LandmarkStiffnessMatrixIndex); @@ -750,8 +750,7 @@ RobustSolver::RemoveUnselectedLandmarkContributionInPointStiffnessMa const double pointTensorPonderation = GetLandmarkTensorPonderation(); - itkDebugMacro("Removing unselected blocks contribution, " - << "pointTensorPonderation is " << pointTensorPonderation); + itkDebugMacro("Removing unselected blocks contribution, " << "pointTensorPonderation is " << pointTensorPonderation); LoadContainerType * container = this->m_FEMObject->GetModifiableLoadContainer(); @@ -794,7 +793,7 @@ RobustSolver::RemoveUnselectedLandmarkContributionInPointStiffnessMa const int dofn = element->GetDegreeOfFreedom(k * numberOfDOFs + n); const int dofm = element->GetDegreeOfFreedom(k * numberOfDOFs + m); const auto value = static_cast(-barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * - (tens(n, m)) * confidence); + (tens(n, m))*confidence); this->m_LinearSystem->AddMatrixValue(dofn, dofm, value, m_LandmarkStiffnessMatrixIndex); } @@ -814,7 +813,7 @@ RobustSolver::RemoveUnselectedLandmarkContributionInPointStiffnessMa const int dofn = element->GetDegreeOfFreedom(i * numberOfDOFs + n); const int dofm = element->GetDegreeOfFreedom(j * numberOfDOFs + m); const auto value = static_cast(-barCoor * m_TradeOffImageMeshEnergy * pointTensorPonderation * - (tens(n, m)) * confidence); + (tens(n, m))*confidence); this->m_LinearSystem->AddMatrixValue(dofn, dofm, value, m_LandmarkStiffnessMatrixIndex); this->m_LinearSystem->AddMatrixValue(dofm, dofn, value, m_LandmarkStiffnessMatrixIndex); @@ -1058,7 +1057,7 @@ RobustSolver::InitializeInterpolationGrid() iter.Set(element); } } // next point in region - } // next element + } // next element } } // end namespace fem diff --git a/Modules/Numerics/FEM/include/itkFEMSolver.hxx b/Modules/Numerics/FEM/include/itkFEMSolver.hxx index 2d5f8e3f2b2..295e78970f9 100644 --- a/Modules/Numerics/FEM/include/itkFEMSolver.hxx +++ b/Modules/Numerics/FEM/include/itkFEMSolver.hxx @@ -869,7 +869,7 @@ Solver::FillInterpolationGrid() iter.Set(e); } } // next point in region - } // next element + } // next element } template diff --git a/Modules/Numerics/FEM/src/itkFEMElementBase.cxx b/Modules/Numerics/FEM/src/itkFEMElementBase.cxx index b758504c4ef..bde925d6ed3 100644 --- a/Modules/Numerics/FEM/src/itkFEMElementBase.cxx +++ b/Modules/Numerics/FEM/src/itkFEMElementBase.cxx @@ -518,7 +518,9 @@ Element::GetMaterial() const return nullptr; } -void Element::SetMaterial(Material::ConstPointer) {} +void +Element::SetMaterial(Material::ConstPointer) +{} void Element::SetNode(unsigned int n, Node::Pointer node) diff --git a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx index b23c34f4e69..be28b0b95b5 100644 --- a/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLinearSystemWrapperItpack.cxx @@ -132,7 +132,7 @@ LinearSystemWrapperItpack::InitializeVector(unsigned int vectorIndex) } /* delete old vector */ - delete[](*m_Vectors)[vectorIndex]; + delete[] (*m_Vectors)[vectorIndex]; /* insert new vector */ (*m_Vectors)[vectorIndex] = new doublereal[m_Order]; @@ -180,7 +180,7 @@ LinearSystemWrapperItpack::InitializeSolution(unsigned int solutionIndex) } /* delete old vector */ - delete[](*m_Solutions)[solutionIndex]; + delete[] (*m_Solutions)[solutionIndex]; /* insert new vector */ (*m_Solutions)[solutionIndex] = new doublereal[m_Order]; @@ -235,7 +235,7 @@ LinearSystemWrapperItpack::DestroyVector(unsigned int vectorIndex) } /* delete vector */ - delete[](*m_Vectors)[vectorIndex]; + delete[] (*m_Vectors)[vectorIndex]; (*m_Vectors)[vectorIndex] = nullptr; } } @@ -253,7 +253,7 @@ LinearSystemWrapperItpack::DestroySolution(unsigned int solutionIndex) } /* delete vector */ - delete[](*m_Solutions)[solutionIndex]; + delete[] (*m_Solutions)[solutionIndex]; (*m_Solutions)[solutionIndex] = nullptr; } } @@ -996,7 +996,7 @@ LinearSystemWrapperItpack::~LinearSystemWrapperItpack() { for (i = 0; i < m_NumberOfVectors; ++i) { - delete[](*m_Vectors)[i]; + delete[] (*m_Vectors)[i]; } delete m_Vectors; } @@ -1005,7 +1005,7 @@ LinearSystemWrapperItpack::~LinearSystemWrapperItpack() { for (i = 0; i < m_NumberOfSolutions; ++i) { - delete[](*m_Solutions)[i]; + delete[] (*m_Solutions)[i]; } delete m_Solutions; } diff --git a/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx b/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx index c604b90b94e..2d36635e053 100644 --- a/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx +++ b/Modules/Numerics/FEM/src/itkFEMLoadGrav.cxx @@ -49,7 +49,8 @@ LoadGravConst::CreateAnother() const return smartPtr; } -vnl_vector LoadGravConst::GetGravitationalForceAtPoint(vnl_vector) +vnl_vector +LoadGravConst::GetGravitationalForceAtPoint(vnl_vector) { return m_GravityForce; } diff --git a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx index 098cfd05525..29e87947869 100644 --- a/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx +++ b/Modules/Numerics/FEM/test/itkFEMElement3DC0LinearHexahedronStrainTest.cxx @@ -82,9 +82,9 @@ itkFEMElement3DC0LinearHexahedronStrainTest(int argc, char * argv[]) int numDOF = femSO->GetFEMObject()->GetNumberOfDegreesOfFreedom(); vnl_vector soln(numDOF); float exectedResult[24] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, - 0.00597587f, 0.000594286f, 0.00250921f, 0.00597587f, -0.000594286f, -0.00250921f, - 0.00597587f, 0.000594286f, -0.00250921f, 0.00597587f, -0.000594286f, 0.00250921f }; + 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, + 0.00597587f, 0.000594286f, 0.00250921f, 0.00597587f, -0.000594286f, -0.00250921f, + 0.00597587f, 0.000594286f, -0.00250921f, 0.00597587f, -0.000594286f, 0.00250921f }; bool foundError = false; for (int i = 0; i < numDOF; ++i) diff --git a/Modules/Numerics/NarrowBand/include/itkNarrowBand.h b/Modules/Numerics/NarrowBand/include/itkNarrowBand.h index fd9d42e06fd..11431dea49f 100644 --- a/Modules/Numerics/NarrowBand/include/itkNarrowBand.h +++ b/Modules/Numerics/NarrowBand/include/itkNarrowBand.h @@ -153,9 +153,17 @@ class ITK_TEMPLATE_EXPORT NarrowBand : public LightObject m_NodeContainer.resize(n); } - NodeType & operator[](SizeType n) { return m_NodeContainer[n]; } + NodeType & + operator[](SizeType n) + { + return m_NodeContainer[n]; + } - const NodeType & operator[](SizeType n) const { return m_NodeContainer[n]; } + const NodeType & + operator[](SizeType n) const + { + return m_NodeContainer[n]; + } /** Set/Get the narrow band total radius. The narrow band width will be twice this value (positive and negative distance to the zero level set). diff --git a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx index 60167347931..99334f0f74b 100644 --- a/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx +++ b/Modules/Numerics/NarrowBand/test/itkNarrowBandImageFilterBaseTest.cxx @@ -77,9 +77,9 @@ class NbTestClass : public NarrowBandImageFilterBaseGetInput()->GetRequestedRegion().GetIndex(); typename Superclass::IndexType in; - for (in [0] = 32 + tl[0]; in[0] < tl[0] + static_cast(sz[0]); in[0]++) + for (in[0] = 32 + tl[0]; in[0] < tl[0] + static_cast(sz[0]); in[0]++) { - for (in [1] = tl[1] + 32; in[1] < tl[1] + static_cast(sz[1]); in[1]++) + for (in[1] = tl[1] + 32; in[1] < tl[1] + static_cast(sz[1]); in[1]++) { this->InsertNarrowBandNode(in); } diff --git a/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h b/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h index 0685a027cc5..ee802a3642a 100644 --- a/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkGradientDescentOptimizer.h @@ -42,7 +42,7 @@ class GradientDescentOptimizerEnums }; // Define how to print enumeration extern ITKOptimizers_EXPORT std::ostream & - operator<<(std::ostream & out, const GradientDescentOptimizerEnums::StopConditionGradientDescentOptimizer value); +operator<<(std::ostream & out, const GradientDescentOptimizerEnums::StopConditionGradientDescentOptimizer value); /** \class GradientDescentOptimizer * \brief Implement a gradient descent optimizer @@ -192,7 +192,7 @@ class ITKOptimizers_EXPORT GradientDescentOptimizer : public SingleValuedNonLine // Define how to print enumeration extern ITKOptimizers_EXPORT std::ostream & - operator<<(std::ostream & out, const GradientDescentOptimizer::StopConditionGradientDescentOptimizerEnum value); +operator<<(std::ostream & out, const GradientDescentOptimizer::StopConditionGradientDescentOptimizerEnum value); } // end namespace itk diff --git a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h index d013314f2c7..1beb716d798 100644 --- a/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h +++ b/Modules/Numerics/Optimizers/include/itkRegularStepGradientDescentBaseOptimizer.h @@ -47,7 +47,7 @@ class RegularStepGradientDescentBaseOptimizerEnums }; // Define how to print enumeration extern ITKOptimizers_EXPORT std::ostream & - operator<<(std::ostream & out, const RegularStepGradientDescentBaseOptimizerEnums::StopCondition value); +operator<<(std::ostream & out, const RegularStepGradientDescentBaseOptimizerEnums::StopCondition value); /** \class RegularStepGradientDescentBaseOptimizer * \brief Implement a gradient descent optimizer diff --git a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx index a28af7df230..e9b2cd10ad1 100644 --- a/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkCumulativeGaussianOptimizer.cxx @@ -39,10 +39,7 @@ CumulativeGaussianOptimizer::CumulativeGaussianOptimizer() m_StopConditionDescription << this->GetNameOfClass() << ": Constructed"; } -CumulativeGaussianOptimizer::~CumulativeGaussianOptimizer() -{ - delete m_FinalSampledArray; -} +CumulativeGaussianOptimizer::~CumulativeGaussianOptimizer() { delete m_FinalSampledArray; } CumulativeGaussianOptimizer::MeasureType * CumulativeGaussianOptimizer::ExtendGaussian(MeasureType * originalArray, diff --git a/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx index 8bd4e635f17..cb96cd12b35 100644 --- a/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkGradientDescentOptimizer.cxx @@ -23,11 +23,7 @@ namespace itk /** * Constructor */ -GradientDescentOptimizer::GradientDescentOptimizer() - -{ - m_StopConditionDescription << this->GetNameOfClass() << ": "; -} +GradientDescentOptimizer::GradientDescentOptimizer() { m_StopConditionDescription << this->GetNameOfClass() << ": "; } std::string GradientDescentOptimizer::GetStopConditionDescription() const diff --git a/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx index 21291ee0fe1..bfa7c035f92 100644 --- a/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkMultipleValuedNonLinearOptimizer.cxx @@ -20,10 +20,7 @@ namespace itk { -MultipleValuedNonLinearOptimizer::MultipleValuedNonLinearOptimizer() -{ - m_CostFunction = nullptr; -} +MultipleValuedNonLinearOptimizer::MultipleValuedNonLinearOptimizer() { m_CostFunction = nullptr; } /** * Connect a Cost Function diff --git a/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx b/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx index 92191e0ba2b..4f2ceecb82c 100644 --- a/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx +++ b/Modules/Numerics/Optimizers/src/itkSingleValuedNonLinearOptimizer.cxx @@ -20,10 +20,7 @@ namespace itk { -SingleValuedNonLinearOptimizer::SingleValuedNonLinearOptimizer() -{ - m_CostFunction = nullptr; -} +SingleValuedNonLinearOptimizer::SingleValuedNonLinearOptimizer() { m_CostFunction = nullptr; } /** * Connect a Cost Function diff --git a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h index 971fe3fe0f4..5750626287d 100644 --- a/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h +++ b/Modules/Numerics/Optimizersv4/include/itkLBFGS2Optimizerv4.h @@ -519,11 +519,13 @@ class ITK_TEMPLATE_EXPORT LBFGS2Optimizerv4Template /** * itkGradientDecentOptimizerv4Template specific non supported methods. */ - void SetMinimumConvergenceValue(PrecisionType) override + void + SetMinimumConvergenceValue(PrecisionType) override { itkWarningMacro("Not supported. Please use LBFGS specific convergence methods."); } - void SetConvergenceWindowSize(SizeValueType) override + void + SetConvergenceWindowSize(SizeValueType) override { itkWarningMacro("Not supported. Please use LBFGS specific convergence methods."); } diff --git a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h index eabc0fdd736..b2e86e1d3a7 100644 --- a/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h +++ b/Modules/Numerics/Optimizersv4/include/itkObjectToObjectMetricBase.h @@ -59,9 +59,9 @@ class ObjectToObjectMetricBaseTemplateEnums }; // Define how to print enumeration extern ITKOptimizersv4_EXPORT std::ostream & - operator<<(std::ostream & out, const ObjectToObjectMetricBaseTemplateEnums::GradientSource value); +operator<<(std::ostream & out, const ObjectToObjectMetricBaseTemplateEnums::GradientSource value); extern ITKOptimizersv4_EXPORT std::ostream & - operator<<(std::ostream & out, const ObjectToObjectMetricBaseTemplateEnums::MetricCategory value); +operator<<(std::ostream & out, const ObjectToObjectMetricBaseTemplateEnums::MetricCategory value); /** * \class ObjectToObjectMetricBaseTemplate * \brief Base class for all object-to-object similarity metrics added in ITKv4. diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h index fcc368afbd7..c317aa2203c 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h @@ -54,7 +54,7 @@ class RegistrationParameterScalesEstimatorEnums using SamplingStrategyEnum = RegistrationParameterScalesEstimatorEnums::SamplingStrategy; // Define how to print enumeration extern ITKOptimizersv4_EXPORT std::ostream & - operator<<(std::ostream & out, const RegistrationParameterScalesEstimatorEnums::SamplingStrategy value); +operator<<(std::ostream & out, const RegistrationParameterScalesEstimatorEnums::SamplingStrategy value); /** * \class RegistrationParameterScalesEstimator diff --git a/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx index 305feddbacd..958400b604a 100644 --- a/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkDistanceMetric.hxx @@ -51,8 +51,7 @@ DistanceMetric::SetOrigin(const OriginType & x) { if (x.Size() != this->m_MeasurementVectorSize) { - itkExceptionMacro("Size of the origin must be same as the length of" - << " each measurement vector."); + itkExceptionMacro("Size of the origin must be same as the length of" << " each measurement vector."); } } diff --git a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h index a7f997c9cfd..3331ae9afee 100644 --- a/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h +++ b/Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.h @@ -45,7 +45,7 @@ class ExpectationMaximizationMixtureModelEstimatorEnums }; // Define how to print enumeration extern ITKStatistics_EXPORT std::ostream & - operator<<(std::ostream & out, const ExpectationMaximizationMixtureModelEstimatorEnums::TERMINATION_CODE value); +operator<<(std::ostream & out, const ExpectationMaximizationMixtureModelEstimatorEnums::TERMINATION_CODE value); /** * \class ExpectationMaximizationMixtureModelEstimator diff --git a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx index 7a250e2e2e6..b5c4112711d 100644 --- a/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkGaussianMembershipFunction.hxx @@ -91,8 +91,7 @@ GaussianMembershipFunction::SetCovariance(const CovarianceMa { if (cov.GetVnlMatrix().rows() != this->GetMeasurementVectorSize()) { - itkExceptionMacro("Length of measurement vectors must be" - << " the same as the size of the covariance."); + itkExceptionMacro("Length of measurement vectors must be" << " the same as the size of the covariance."); } } else diff --git a/Modules/Numerics/Statistics/include/itkHistogram.hxx b/Modules/Numerics/Statistics/include/itkHistogram.hxx index d84ac37e933..15d9ee76ecf 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.hxx +++ b/Modules/Numerics/Statistics/include/itkHistogram.hxx @@ -329,7 +329,7 @@ Histogram::GetIndex(const MeasurementVectorTy mid = begin + (end - begin) / 2; median = m_Min[dim][mid]; } // end of while - } // end of for() + } // end of for() return true; } diff --git a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h index 797632e4779..6af83ecf71f 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToRunLengthFeaturesFilter.h @@ -56,7 +56,7 @@ class HistogramToRunLengthFeaturesFilterEnums using RunLengthFeatureEnum = HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature; // Define how to print enumeration extern ITKStatistics_EXPORT std::ostream & - operator<<(std::ostream & out, const HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature value); +operator<<(std::ostream & out, const HistogramToRunLengthFeaturesFilterEnums::RunLengthFeature value); /** * \class HistogramToRunLengthFeaturesFilter * \brief This class computes texture feature coefficients from a grey level diff --git a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h index 28991917724..add13997a37 100644 --- a/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h +++ b/Modules/Numerics/Statistics/include/itkHistogramToTextureFeaturesFilter.h @@ -53,7 +53,7 @@ class HistogramToTextureFeaturesFilterEnums }; // Define how to print enumeration extern ITKStatistics_EXPORT std::ostream & - operator<<(std::ostream & out, const HistogramToTextureFeaturesFilterEnums::TextureFeature value); +operator<<(std::ostream & out, const HistogramToTextureFeaturesFilterEnums::TextureFeature value); /** * \class HistogramToTextureFeaturesFilter diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx index 3044020440e..fb2de9cdc35 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.hxx @@ -56,7 +56,8 @@ ImageToListSampleAdaptor::Size() const -> InstanceIdentifier } template -inline auto ImageToListSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType +inline auto +ImageToListSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType { if (m_Image.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx index 3d043a54da7..6a3ca6f0904 100644 --- a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.hxx @@ -82,7 +82,8 @@ ImageToNeighborhoodSampleAdaptor::Size() const -> In } template -inline auto ImageToNeighborhoodSampleAdaptor::GetFrequency(InstanceIdentifier) const +inline auto +ImageToNeighborhoodSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType { if (m_Image.IsNull()) diff --git a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx index e980b18ffa7..47db8f83327 100644 --- a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.hxx @@ -45,7 +45,8 @@ JointDomainImageToListSampleAdaptor::Size() const -> InstanceIdentifier } template -inline auto JointDomainImageToListSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType +inline auto +JointDomainImageToListSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType { if (m_Image.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkKdTree.h b/Modules/Numerics/Statistics/include/itkKdTree.h index d080365a145..0e227bcb402 100644 --- a/Modules/Numerics/Statistics/include/itkKdTree.h +++ b/Modules/Numerics/Statistics/include/itkKdTree.h @@ -129,7 +129,7 @@ struct ITK_TEMPLATE_EXPORT KdTreeNode /** Destructor */ virtual ~KdTreeNode() = default; // needed to subclasses will actually be deleted -}; // end of class +}; // end of class /** * \class KdTreeNonterminalNode @@ -225,7 +225,11 @@ struct ITK_TEMPLATE_EXPORT KdTreeNonterminalNode : public KdTreeNode * this node in the tree. This MeasurementVector will be used later during * the distance computation when querying the tree. */ - InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const override { return this->m_InstanceIdentifier; } + InstanceIdentifier + GetInstanceIdentifier(InstanceIdentifier) const override + { + return this->m_InstanceIdentifier; + } /** * Set the identifier of the node. @@ -354,7 +358,11 @@ struct ITK_TEMPLATE_EXPORT KdTreeWeightedCentroidNonterminalNode : public KdTree * this node in the tree. This MeasurementVector will be used later during * the distance computation when querying the tree. */ - InstanceIdentifier GetInstanceIdentifier(InstanceIdentifier) const override { return this->m_InstanceIdentifier; } + InstanceIdentifier + GetInstanceIdentifier(InstanceIdentifier) const override + { + return this->m_InstanceIdentifier; + } /** * Set the identifier of the node. diff --git a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h index 87cba36fbb5..2298f7eb3ae 100644 --- a/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h +++ b/Modules/Numerics/Statistics/include/itkKdTreeBasedKmeansEstimator.h @@ -247,7 +247,11 @@ class ITK_TEMPLATE_EXPORT KdTreeBasedKmeansEstimator : public Object } /** gets the index-th candidates */ - Candidate & operator[](int index) { return m_Candidates[index]; } + Candidate & + operator[](int index) + { + return m_Candidates[index]; + } private: /** internal storage for the candidates */ diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx index 99292775cf8..809f24a835d 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMembershipFunction.hxx @@ -78,8 +78,7 @@ MahalanobisDistanceMembershipFunction::SetCovariance(const CovarianceMa { if (cov.GetVnlMatrix().rows() != this->GetMeasurementVectorSize()) { - itkExceptionMacro("Length of measurement vectors must be" - << " the same as the size of the covariance."); + itkExceptionMacro("Length of measurement vectors must be" << " the same as the size of the covariance."); } } else diff --git a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx index 89715ed4306..4f19057fedf 100644 --- a/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx +++ b/Modules/Numerics/Statistics/include/itkMahalanobisDistanceMetric.hxx @@ -71,8 +71,7 @@ MahalanobisDistanceMetric::SetCovariance(const CovarianceMatrixType & c { if (cov.rows() != this->GetMeasurementVectorSize() || cov.cols() != this->GetMeasurementVectorSize()) { - itkExceptionMacro("Size of the covariance matrix must be same as the length of" - << " the measurement vector."); + itkExceptionMacro("Size of the covariance matrix must be same as the length of" << " the measurement vector."); } } @@ -88,8 +87,7 @@ MahalanobisDistanceMetric::SetInverseCovariance(const CovarianceMatrixT { if (invcov.rows() != this->GetMeasurementVectorSize() || invcov.cols() != this->GetMeasurementVectorSize()) { - itkExceptionMacro("Size of the covariance matrix xcmust be same as the length of" - << " each measurement vector."); + itkExceptionMacro("Size of the covariance matrix xcmust be same as the length of" << " each measurement vector."); } } diff --git a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx index 82c2c543b62..7848ca5ae0c 100644 --- a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.hxx @@ -96,7 +96,8 @@ PointSetToListSampleAdaptor::GetMeasurementVector(InstanceIdentifier } template -inline auto PointSetToListSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType +inline auto +PointSetToListSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType { if (m_PointSet.IsNull()) { diff --git a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx index 54b33f313d9..896468a0829 100644 --- a/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleClassifierFilter.hxx @@ -87,8 +87,8 @@ SampleClassifierFilter::SetMembershipFunctionsWeightsArray( } template -typename SampleClassifierFilter::DataObjectPointer SampleClassifierFilter::MakeOutput( - DataObjectPointerArraySizeType) +typename SampleClassifierFilter::DataObjectPointer +SampleClassifierFilter::MakeOutput(DataObjectPointerArraySizeType) { return MembershipSampleType::New().GetPointer(); } diff --git a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx index 4fa745e022d..e4f3c661f65 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleToHistogramFilter.hxx @@ -75,7 +75,7 @@ SampleToHistogramFilter::GraftOutput(DataObject * graft) template typename SampleToHistogramFilter::DataObjectPointer - SampleToHistogramFilter::MakeOutput(DataObjectPointerArraySizeType) +SampleToHistogramFilter::MakeOutput(DataObjectPointerArraySizeType) { return HistogramType::New().GetPointer(); } diff --git a/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx b/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx index e3e116a86a1..15b72900784 100644 --- a/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkSampleToSubsampleFilter.hxx @@ -50,8 +50,8 @@ SampleToSubsampleFilter::GetInput() const -> const SampleType * } template -typename SampleToSubsampleFilter::DataObjectPointer SampleToSubsampleFilter::MakeOutput( - DataObjectPointerArraySizeType) +typename SampleToSubsampleFilter::DataObjectPointer +SampleToSubsampleFilter::MakeOutput(DataObjectPointerArraySizeType) { return SubsampleType::New().GetPointer(); } diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx index 8094bc133c8..d7ca2677c3e 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx @@ -65,7 +65,7 @@ ScalarImageToCooccurrenceListSampleFilter::GetOutput() const -> const Sa template typename ScalarImageToCooccurrenceListSampleFilter::DataObjectPointer - ScalarImageToCooccurrenceListSampleFilter::MakeOutput(DataObjectPointerArraySizeType) +ScalarImageToCooccurrenceListSampleFilter::MakeOutput(DataObjectPointerArraySizeType) { return SampleType::New().GetPointer(); } diff --git a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx index 775093d37e3..01c47c01a76 100644 --- a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx +++ b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.hxx @@ -63,8 +63,8 @@ VectorContainerToListSampleAdaptor::GetMeasurementVector(Insta } template -inline auto VectorContainerToListSampleAdaptor::GetFrequency(InstanceIdentifier) const - -> AbsoluteFrequencyType +inline auto +VectorContainerToListSampleAdaptor::GetFrequency(InstanceIdentifier) const -> AbsoluteFrequencyType { if (this->m_VectorContainer.IsNull()) { diff --git a/Modules/Numerics/Statistics/src/itkSparseFrequencyContainer2.cxx b/Modules/Numerics/Statistics/src/itkSparseFrequencyContainer2.cxx index 30c57f1d506..efb6a087ee2 100644 --- a/Modules/Numerics/Statistics/src/itkSparseFrequencyContainer2.cxx +++ b/Modules/Numerics/Statistics/src/itkSparseFrequencyContainer2.cxx @@ -21,12 +21,10 @@ namespace itk { namespace Statistics { -SparseFrequencyContainer2::SparseFrequencyContainer2() -{ - m_TotalFrequency = TotalAbsoluteFrequencyType{}; -} +SparseFrequencyContainer2::SparseFrequencyContainer2() { m_TotalFrequency = TotalAbsoluteFrequencyType{}; } -void SparseFrequencyContainer2::Initialize(SizeValueType) +void +SparseFrequencyContainer2::Initialize(SizeValueType) { this->SetToZero(); } diff --git a/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx b/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx index b333bcd70a8..0734b1663bb 100644 --- a/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx +++ b/Modules/Numerics/Statistics/test/itkStatisticsAlgorithmTest2.cxx @@ -31,7 +31,8 @@ using SubsampleType = itk::Statistics::Subsample; constexpr unsigned int testDimension = 1; -void resetData(itk::Image::Pointer image, std::vector & refVector) +void +resetData(itk::Image::Pointer image, std::vector & refVector) { ImageType::IndexType index; ImageType::SizeType size; diff --git a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h index 434f2c52d3f..1c7ad80566a 100644 --- a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h +++ b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.h @@ -212,8 +212,9 @@ class ITK_TEMPLATE_EXPORT LandmarkBasedTransformInitializer : public Object PointType3D ComputeCentroid(const LandmarkPointContainer); - void CreateMatrix(itk::Matrix &, - const itk::Matrix); + void + CreateMatrix(itk::Matrix &, + const itk::Matrix); FixedImagePointer m_ReferenceImage{}; TransformPointer m_Transform{}; diff --git a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx index 01a338b032a..0dc994120f0 100644 --- a/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx +++ b/Modules/Registration/Common/include/itkLandmarkBasedTransformInitializer.hxx @@ -785,7 +785,8 @@ LandmarkBasedTransformInitializer::Comput } template -void LandmarkBasedTransformInitializer::CreateMatrix( +void +LandmarkBasedTransformInitializer::CreateMatrix( itk::Matrix & N, const itk::Matrix M) { diff --git a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx index 9d01af602f5..e696bb3c1b7 100644 --- a/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx +++ b/Modules/Registration/Common/include/itkMattesMutualInformationImageToImageMetric.hxx @@ -533,8 +533,8 @@ MattesMutualInformationImageToImageMetric::GetValue(c sum += jointPDFValue * (pRatio - std::log(fixedImagePDFValue)); } } // end if-block to check non-zero bin contribution - } // end for-loop over moving index - } // end for-loop over fixed index + } // end for-loop over moving index + } // end for-loop over fixed index return static_cast(-1.0 * sum); } @@ -788,8 +788,8 @@ MattesMutualInformationImageToImageMetric::GetValueAn this->m_PRatioArray[fixedIndex][movingIndex] = pRatio * nFactor; } } // end if-block to check non-zero bin contribution - } // end for-loop over moving index - } // end for-loop over fixed index + } // end for-loop over moving index + } // end for-loop over fixed index if (!(this->m_UseExplicitPDFDerivatives)) { @@ -1029,8 +1029,8 @@ MattesMutualInformationImageToImageMetric::ComputePDF precomputedWeight * derivativeContribution; } } // end mu for loop - } // end dim for loop - } // end if-block transform is BSpline + } // end dim for loop + } // end if-block transform is BSpline } } // end namespace itk diff --git a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx index ae8a864ca83..dad8c68f7ea 100644 --- a/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx +++ b/Modules/Registration/FEM/include/itkFEMRegistrationFilter.hxx @@ -765,7 +765,7 @@ FEMRegistrationFilter::InterpolateVectorF } } } // end of for loops - } // end of elt array loop + } // end of elt array loop } // Ensure that the values are exact at the nodes. They won't necessarily be unless we use this code. diff --git a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx index ebf9b41cdb9..a71a56e9f4f 100644 --- a/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx +++ b/Modules/Registration/FEM/include/itkMIRegistrationFunction.hxx @@ -481,7 +481,7 @@ MIRegistrationFunction::ComputeUp derivative[i] += (fixedGradientsB[bsamples][i] - fixedGradientsA[asamples][i]) * weight; } } // end of sample A loop - } // end of sample B loop + } // end of sample B loop const double threshold = -0.1 * nsamp * std::log(m_MinProbability); if (dLogSumMoving > threshold || dLogSumFixed > threshold || dLogSumJoint > threshold) diff --git a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx index de7068a1005..422f491493e 100644 --- a/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx +++ b/Modules/Registration/FEM/test/itkFEMFiniteDifferenceFunctionLoadTest.cxx @@ -330,7 +330,7 @@ RunTest(InputImageType * fixedImage, outField->SetPixel(index, pixelVal); } // end of for (each node in an element) - } // end of for(each element) + } // end of for(each element) // Write to vector image auto forceFieldWriter = FieldWriterType::New(); diff --git a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx index 448aed82c92..610f8520ec8 100644 --- a/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx +++ b/Modules/Registration/FEM/test/itkVTKTetrahedralMeshReader.hxx @@ -64,8 +64,7 @@ VTKTetrahedralMeshReader::GenerateData() if (!inputFile.is_open()) { - itkExceptionMacro("Unable to open file\n" - << "inputFilename= " << m_FileName); + itkExceptionMacro("Unable to open file\n" << "inputFilename= " << m_FileName); } inputFile.imbue(std::locale::classic()); diff --git a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h index dbf1bddee9e..d12ea1c964e 100644 --- a/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h +++ b/Modules/Registration/Metricsv4/include/itkImageToImageMetricv4GetValueAndDerivativeThreader.h @@ -41,8 +41,7 @@ namespace itk * \ingroup ITKMetricsv4 * */ template -class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreader -{}; +class ITK_TEMPLATE_EXPORT ImageToImageMetricv4GetValueAndDerivativeThreader{}; /** \class ImageToImageMetricv4GetValueAndDerivativeThreader * \brief Specialization for ThreadedImageRegionPartitioner. diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h index ee60b8adae9..f732a47e7ab 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationComputeJointPDFThreader.h @@ -41,8 +41,7 @@ namespace itk * \ingroup ITKMetricsv4 */ template -class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader -{}; +class ITK_TEMPLATE_EXPORT JointHistogramMutualInformationComputeJointPDFThreader{}; /** \class JointHistogramMutualInformationComputeJointPDFThreader * \brief Specialization for ThreadedImageRegionPartitioner. diff --git a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx index b89e79a0071..eaa6a8e54cd 100644 --- a/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkJointHistogramMutualInformationImageToImageMetricv4.hxx @@ -381,7 +381,7 @@ JointHistogramMutualInformationImageToImageMetricv4m_Log2); } diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx index d16bb94552c..3ddafd1d91e 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx @@ -415,9 +415,9 @@ MattesMutualInformationImageToImageMetricv4 closeToZero && movingImageMarginalPDF > closeToZero ) - } // end for-loop over moving index - } // end conditional for fixedMarginalPDF > close to zero - } // end for-loop over fixed index + } // end for-loop over moving index + } // end conditional for fixedMarginalPDF > close to zero + } // end for-loop over fixed index // Apply the pRatio and sum the per-window derivative // contributions, in the local-support case. diff --git a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx index 803eefcc3ff..089a88b3cce 100644 --- a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx @@ -521,7 +521,7 @@ itkImageToImageMetricv4Test(int, char ** const) computeNewTruthValues = false; } } // loop through permutations - } // loop thru # of threads + } // loop thru # of threads // Test that non-overlapping images will generate a warning diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx index 2f33211a728..8598954a644 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx @@ -64,7 +64,7 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo const unsigned int ImageDimension = MovingImageType::ImageDimension; // Image size is scaled to represent sqrt(256^3) typename MovingImageType::SizeType size = { { static_cast(imageSize), - static_cast(imageSize) } }; + static_cast(imageSize) } }; typename MovingImageType::IndexType index = { { 0, 0 } }; typename MovingImageType::RegionType region{ index, size }; diff --git a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h index f970655f57b..74654d3a32d 100644 --- a/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h +++ b/Modules/Registration/PDEDeformable/include/itkESMDemonsRegistrationFunction.h @@ -47,7 +47,7 @@ class ESMDemonsRegistrationFunctionEnums }; // Define how to print enumeration extern ITKPDEDeformableRegistration_EXPORT std::ostream & - operator<<(std::ostream & out, const ESMDemonsRegistrationFunctionEnums::Gradient value); +operator<<(std::ostream & out, const ESMDemonsRegistrationFunctionEnums::Gradient value); /** * \class ESMDemonsRegistrationFunction * diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h index 471b3bbc42f..70593ae9f58 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h +++ b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.h @@ -57,7 +57,7 @@ class ImageRegistrationMethodv4Enums }; // Define how to print enumeration extern ITKRegistrationMethodsv4_EXPORT std::ostream & - operator<<(std::ostream & out, const ImageRegistrationMethodv4Enums::MetricSamplingStrategy value); +operator<<(std::ostream & out, const ImageRegistrationMethodv4Enums::MetricSamplingStrategy value); /** \class ImageRegistrationMethodv4 * \brief Interface method for the current registration framework. diff --git a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx index 0926fb8245d..518b223fde9 100644 --- a/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx +++ b/Modules/Segmentation/Classifiers/include/itkImageGaussianModelEstimator.hxx @@ -251,9 +251,9 @@ ImageGaussianModelEstimator::E { m_Covariance[classIndex][band_x][band_y] = m_Covariance[classIndex][band_y][band_x]; } // end band_y loop - } // end band_x loop - } // end if loop - } // end class index loop + } // end band_x loop + } // end if loop + } // end class index loop } } // end namespace itk diff --git a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h index 12d04986e23..0919b95a2b8 100644 --- a/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h +++ b/Modules/Segmentation/DeformableMesh/include/itkDeformableSimplexMesh3DGradientConstraintForceFilter.h @@ -131,7 +131,7 @@ class DeformableSimplexMesh3DGradientConstraintForceFilterEnums }; // Define how to print enumeration extern ITKDeformableMesh_EXPORT std::ostream & - operator<<(std::ostream & out, const DeformableSimplexMesh3DGradientConstraintForceFilterEnums::SIDE value); +operator<<(std::ostream & out, const DeformableSimplexMesh3DGradientConstraintForceFilterEnums::SIDE value); /** * \class DeformableSimplexMesh3DGradientConstraintForceFilter * \brief diff --git a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx index 370456da3f9..63281415caa 100644 --- a/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx +++ b/Modules/Segmentation/KLMRegionGrowing/src/itkKLMSegmentationRegion.cxx @@ -19,10 +19,7 @@ namespace itk { -KLMSegmentationRegion::KLMSegmentationRegion() -{ - m_MeanRegionIntensity = 0; -} +KLMSegmentationRegion::KLMSegmentationRegion() { m_MeanRegionIntensity = 0; } KLMSegmentationRegion::~KLMSegmentationRegion() = default; @@ -378,7 +375,7 @@ KLMSegmentationRegion::SpliceRegionBorders(Self * region) { itkExceptionMacro("Invalid region border"); } // end else - } // end of while + } // end of while // If any borders remain in thisRegionBordersIt, put them in the back while (thisRegionBordersIt != endOfThisRegionBorders) diff --git a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx index de84e8c3119..075a7ccb4db 100644 --- a/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkImplicitManifoldNormalVectorFilter.hxx @@ -184,7 +184,7 @@ ImplicitManifoldNormalVectorFilter::InitializeN derivative -= it.GetPixel(position); } } // if - } // counter loop + } // counter loop derivative *= m_DimConst2; } // if i!=j else diff --git a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx index fd86eeb46eb..b61ad1493b1 100644 --- a/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx +++ b/Modules/Segmentation/LevelSets/include/itkLevelSetFunctionWithRefitTerm.hxx @@ -28,8 +28,8 @@ const typename LevelSetFunctionWithRefitTerm::Neig template const typename LevelSetFunctionWithRefitTerm::ScalarValueType - LevelSetFunctionWithRefitTerm::m_DimConst = static_cast(2.0 / - m_NumVertex); + LevelSetFunctionWithRefitTerm::m_DimConst = + static_cast(2.0 / m_NumVertex); template LevelSetFunctionWithRefitTerm::LevelSetFunctionWithRefitTerm() @@ -129,7 +129,7 @@ LevelSetFunctionWithRefitTerm::ComputeCurvature( normalvector[j] -= neighborhood.GetPixel(positionP) * neighborhoodScales[j]; } } // end counterP - } // end derivative axis + } // end derivative axis normalvector = normalvector / (m_MinVectorNorm + normalvector.GetNorm()); // add normal to curvature computation for (j = 0; j < TImageType::ImageDimension; ++j) // derivative axis @@ -143,7 +143,7 @@ LevelSetFunctionWithRefitTerm::ComputeCurvature( curvature += normalvector[j] * neighborhoodScales[j]; } } // end derivative axis - } // end counterN + } // end counterN curvature *= m_DimConst; diff --git a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx index 26291e0c023..21da994d9ad 100644 --- a/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx +++ b/Modules/Segmentation/LevelSets/include/itkNormalVectorDiffusionFunction.hxx @@ -161,7 +161,7 @@ NormalVectorDiffusionFunction::PrecomputeSparseUpdate(Neighbor CenterNode->m_Flux[i] = flux; } } // end if-else PreviousNode==0 - } // end flux offset axis + } // end flux offset axis } template diff --git a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx index a06a0d8fc04..26dcc789095 100644 --- a/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkReinitializeLevelSetImageFilter.hxx @@ -91,9 +91,9 @@ ReinitializeLevelSetImageFilter::EnlargeOutputRequestedRegion(DataObj else { // pointer could not be cast to TLevelSet * - itkWarningMacro("itk::ReinitializeLevelSetImageFilter" - << "::EnlargeOutputRequestedRegion cannot cast " << typeid(output).name() << " to " - << typeid(TLevelSet *).name()); + itkWarningMacro("itk::ReinitializeLevelSetImageFilter" << "::EnlargeOutputRequestedRegion cannot cast " + << typeid(output).name() << " to " + << typeid(TLevelSet *).name()); } } diff --git a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx index 919a20e61f4..7855bc13a8b 100644 --- a/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkShapePriorSegmentationLevelSetImageFilter.hxx @@ -129,8 +129,7 @@ ShapePriorSegmentationLevelSetImageFilterGetNumberOfParameters()) { - itkExceptionMacro("InitialParameters size does not match " - << "the number of parameters required by ShapeFunction"); + itkExceptionMacro("InitialParameters size does not match " << "the number of parameters required by ShapeFunction"); } m_CurrentParameters = m_InitialParameters; diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h index 3fffab90458..ec0f49524c6 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.h @@ -48,8 +48,7 @@ namespace itk * \ingroup ITKLevelSetsv4 */ template -class ITK_TEMPLATE_EXPORT BinaryImageToLevelSetImageAdaptor -{}; +class ITK_TEMPLATE_EXPORT BinaryImageToLevelSetImageAdaptor{}; /** \brief Partial template specialization for LevelSetDenseImage diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h index 01e383bdf40..eefc5a39ff7 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetContainerBase.h @@ -110,8 +110,16 @@ class ITK_TEMPLATE_EXPORT LevelSetContainerBase : public Object : m_Iterator(it.m_Iterator) {} - ConstIterator & operator*() { return *this; } - ConstIterator * operator->() { return this; } + ConstIterator & + operator*() + { + return *this; + } + ConstIterator * + operator->() + { + return this; + } ConstIterator & operator++() { @@ -186,8 +194,16 @@ class ITK_TEMPLATE_EXPORT LevelSetContainerBase : public Object {} ~Iterator() = default; - Iterator & operator*() { return *this; } - Iterator * operator->() { return this; } + Iterator & + operator*() + { + return *this; + } + Iterator * + operator->() + { + return this; + } Iterator & operator++() { diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h index cef6a9e9a46..c0fc33eb320 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationContainer.h @@ -138,8 +138,16 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationContainer : public Object ConstIterator(const Iterator & it) : m_Iterator(it.m_Iterator) {} - ConstIterator & operator*() { return *this; } - ConstIterator * operator->() { return this; } + ConstIterator & + operator*() + { + return *this; + } + ConstIterator * + operator->() + { + return this; + } ConstIterator & operator++() { @@ -211,8 +219,16 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationContainer : public Object {} ~Iterator() = default; - Iterator & operator*() { return *this; } - Iterator * operator->() { return this; } + Iterator & + operator*() + { + return *this; + } + Iterator * + operator->() + { + return this; + } Iterator & operator++() diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h index 234da8c0424..77a87cd6486 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEquationTermContainer.h @@ -155,8 +155,16 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationTermContainer : public Object ConstIterator(const Iterator & it) : m_Iterator(it.m_Iterator) {} - ConstIterator & operator*() { return *this; } - ConstIterator * operator->() { return this; } + ConstIterator & + operator*() + { + return *this; + } + ConstIterator * + operator->() + { + return this; + } ConstIterator & operator++() { @@ -228,8 +236,16 @@ class ITK_TEMPLATE_EXPORT LevelSetEquationTermContainer : public Object {} ~Iterator() = default; - Iterator & operator*() { return *this; } - Iterator * operator->() { return this; } + Iterator & + operator*() + { + return *this; + } + Iterator * + operator->() + { + return this; + } Iterator & operator++() diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h index 1cff1c57a40..0463be2d3ce 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolution.h @@ -45,8 +45,7 @@ namespace itk * \ingroup ITKLevelSetsv4 */ template -class ITK_TEMPLATE_EXPORT LevelSetEvolution -{}; +class ITK_TEMPLATE_EXPORT LevelSetEvolution{}; template class ITK_TEMPLATE_EXPORT LevelSetEvolution> diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h index 3dd10577847..c9f3eaa42d0 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionComputeIterationThreader.h @@ -37,8 +37,7 @@ namespace itk * \ingroup ITKLevelSetsv4 */ template -class ITK_TEMPLATE_EXPORT LevelSetEvolutionComputeIterationThreader -{}; +class ITK_TEMPLATE_EXPORT LevelSetEvolutionComputeIterationThreader{}; // For dense image level set split by putting part of the level set region in // each thread. diff --git a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h index 57f8e4e9538..831b8671827 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h +++ b/Modules/Segmentation/LevelSetsv4/include/itkLevelSetEvolutionUpdateLevelSetsThreader.h @@ -35,8 +35,7 @@ namespace itk * \ingroup ITKLevelSetsv4 */ template -class ITK_TEMPLATE_EXPORT LevelSetEvolutionUpdateLevelSetsThreader -{}; +class ITK_TEMPLATE_EXPORT LevelSetEvolutionUpdateLevelSetsThreader{}; // For dense image level set. template diff --git a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx index b9730252cbc..b494731b170 100644 --- a/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx +++ b/Modules/Segmentation/MarkovRandomFieldsClassifiers/include/itkMRFImageFilter.hxx @@ -530,7 +530,7 @@ MRFImageFilter::DoNeighborhoodOperation( maximumDistance = tmpPixDistance; pixLabel = index; } // if - } // for + } // for // Read the current pixel label LabelledImagePixelType * previousLabel = labelledIter.GetCenterValue(); diff --git a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h index 5a5d55e6b31..f35ff95d789 100644 --- a/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h +++ b/Modules/Segmentation/RegionGrowing/include/itkConnectedThresholdImageFilter.h @@ -49,7 +49,7 @@ class ConnectedThresholdImageFilterEnums // Define how to print enumeration extern ITKRegionGrowing_EXPORT std::ostream & - operator<<(std::ostream & out, const ConnectedThresholdImageFilterEnums::Connectivity value); +operator<<(std::ostream & out, const ConnectedThresholdImageFilterEnums::Connectivity value); /** * \class ConnectedThresholdImageFilter * \brief Label pixels that are connected to a seed and lie within a range of values diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.hxx index d84ad72fae1..5905ff510d6 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedBoundaryResolver.hxx @@ -96,7 +96,7 @@ BoundaryResolver::GenerateOutputRequestedRegion(DataObje template typename BoundaryResolver::DataObjectPointer - BoundaryResolver::MakeOutput(DataObjectPointerArraySizeType) +BoundaryResolver::MakeOutput(DataObjectPointerArraySizeType) { return EquivalencyTable::New().GetPointer(); } diff --git a/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx b/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx index 6cd7d62161e..d0897854cc9 100644 --- a/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx +++ b/Modules/Segmentation/Watersheds/include/itkWatershedEquivalenceRelabeler.hxx @@ -114,7 +114,7 @@ EquivalenceRelabeler::PrintSelf(std::ostream & os, Ind template typename EquivalenceRelabeler::DataObjectPointer - EquivalenceRelabeler::MakeOutput(DataObjectPointerArraySizeType) +EquivalenceRelabeler::MakeOutput(DataObjectPointerArraySizeType) { return ImageType::New().GetPointer(); } diff --git a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx index 2ea5f1fc428..33fa58facf7 100644 --- a/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx +++ b/Modules/Video/BridgeOpenCV/src/itkOpenCVVideoIO.cxx @@ -21,15 +21,9 @@ namespace itk { -OpenCVVideoIO::OpenCVVideoIO() -{ - this->ResetMembers(); -} +OpenCVVideoIO::OpenCVVideoIO() { this->ResetMembers(); } -OpenCVVideoIO::~OpenCVVideoIO() -{ - this->FinishReadingOrWriting(); -} +OpenCVVideoIO::~OpenCVVideoIO() { this->FinishReadingOrWriting(); } void OpenCVVideoIO::FinishReadingOrWriting() diff --git a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx index 9fc34776e0b..8f334423d85 100644 --- a/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx +++ b/Modules/Video/BridgeVXL/src/itkVXLVideoIO.cxx @@ -29,19 +29,13 @@ namespace itk // // Constructor // -VXLVideoIO::VXLVideoIO() -{ - this->ResetMembers(); -} +VXLVideoIO::VXLVideoIO() { this->ResetMembers(); } // // Destructor // -VXLVideoIO::~VXLVideoIO() -{ - this->FinishReadingOrWriting(); -} +VXLVideoIO::~VXLVideoIO() { this->FinishReadingOrWriting(); } // diff --git a/Modules/Video/Core/src/itkTemporalDataObject.cxx b/Modules/Video/Core/src/itkTemporalDataObject.cxx index d30a52bbd83..2e87bd47561 100644 --- a/Modules/Video/Core/src/itkTemporalDataObject.cxx +++ b/Modules/Video/Core/src/itkTemporalDataObject.cxx @@ -157,8 +157,7 @@ TemporalDataObject::GetUnbufferedRequestedTemporalRegion() // Handle case with unbuffered frames at beginning and end if (reqStart < bufStart && reqEnd > bufEnd) { - itkDebugMacro("Unbuffered frames at beginning and end. Returning entire " - << "requested region as unbuffered"); + itkDebugMacro("Unbuffered frames at beginning and end. Returning entire " << "requested region as unbuffered"); return this->m_RequestedTemporalRegion; } @@ -223,9 +222,8 @@ TemporalDataObject::RequestedRegionIsOutsideOfTheBufferedRegion() return frameFlag || realTimeFlag; } default: - itkExceptionMacro("itk::TemporalDataObject::" - << "RequestedRegionIsOutsideOfTheBufferedRegion() " - << "Invalid Temporal Unit"); + itkExceptionMacro("itk::TemporalDataObject::" << "RequestedRegionIsOutsideOfTheBufferedRegion() " + << "Invalid Temporal Unit"); } } @@ -252,8 +250,7 @@ TemporalDataObject::VerifyRequestedRegion() return frameFlag && realTimeFlag; } default: - itkExceptionMacro("itk::TemporalDataObject::VerifyRequestedRegion() " - << "Invalid Temporal Unit"); + itkExceptionMacro("itk::TemporalDataObject::VerifyRequestedRegion() " << "Invalid Temporal Unit"); } } @@ -282,8 +279,8 @@ TemporalDataObject::CopyInformation(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro("itk::TemporalDataObject::CopyInformation() " - << "cannot cast " << typeid(data).name() << " to " << typeid(const TemporalDataObject *).name()); + itkExceptionMacro("itk::TemporalDataObject::CopyInformation() " << "cannot cast " << typeid(data).name() << " to " + << typeid(const TemporalDataObject *).name()); } } @@ -312,8 +309,8 @@ TemporalDataObject::Graft(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro("itk::TemporalDataObject::Graft() " - << "cannot cast " << typeid(data).name() << " to " << typeid(const TemporalDataObject *).name()); + itkExceptionMacro("itk::TemporalDataObject::Graft() " << "cannot cast " << typeid(data).name() << " to " + << typeid(const TemporalDataObject *).name()); } } @@ -340,8 +337,8 @@ TemporalDataObject::SetRequestedRegion(const DataObject * data) else { // pointer could not be cast back down - itkExceptionMacro("itk::TemporalDataObject:SetRequestedRegion() " - << "cannot cast " << typeid(data).name() << " to " << typeid(const TemporalDataObject *).name()); + itkExceptionMacro("itk::TemporalDataObject:SetRequestedRegion() " << "cannot cast " << typeid(data).name() << " to " + << typeid(const TemporalDataObject *).name()); } } diff --git a/Modules/Video/Core/src/itkTemporalProcessObject.cxx b/Modules/Video/Core/src/itkTemporalProcessObject.cxx index 122deaef00e..87deb6cc6af 100644 --- a/Modules/Video/Core/src/itkTemporalProcessObject.cxx +++ b/Modules/Video/Core/src/itkTemporalProcessObject.cxx @@ -408,8 +408,8 @@ TemporalProcessObject::GenerateData() auto * output = dynamic_cast(this->GetOutput(0)); if (output == nullptr) { - itkExceptionMacro("itk::TemporalProcessObject::GenerateData() " - << "cannot cast " << typeid(output).name() << " to " << typeid(TemporalDataObject *).name()); + itkExceptionMacro("itk::TemporalProcessObject::GenerateData() " << "cannot cast " << typeid(output).name() << " to " + << typeid(TemporalDataObject *).name()); } SizeValueType outputStartFrame = output->GetUnbufferedRequestedTemporalRegion().GetFrameStart(); @@ -548,8 +548,8 @@ TemporalProcessObject::SplitRequestedTemporalRegion() // Make sure we're not trying to get a negative frame if (regionStartFrame < 0) { - itkExceptionMacro("itk::TemporalProcessObject::SplitRequestedTemporalRegion() " - << "cannot start at frame number " << regionStartFrame); + itkExceptionMacro("itk::TemporalProcessObject::SplitRequestedTemporalRegion() " << "cannot start at frame number " + << regionStartFrame); } for (SizeValueType i = 0; i < numRequests; ++i) diff --git a/Modules/Video/IO/src/itkFileListVideoIO.cxx b/Modules/Video/IO/src/itkFileListVideoIO.cxx index 7a0d60d0ae2..1b15211ff88 100644 --- a/Modules/Video/IO/src/itkFileListVideoIO.cxx +++ b/Modules/Video/IO/src/itkFileListVideoIO.cxx @@ -23,15 +23,9 @@ namespace itk { -FileListVideoIO::FileListVideoIO() -{ - this->ResetMembers(); -} +FileListVideoIO::FileListVideoIO() { this->ResetMembers(); } -FileListVideoIO::~FileListVideoIO() -{ - this->FinishReadingOrWriting(); -} +FileListVideoIO::~FileListVideoIO() { this->FinishReadingOrWriting(); } void FileListVideoIO::FinishReadingOrWriting() diff --git a/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx b/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx index 74a51e1f428..431808b0894 100644 --- a/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx +++ b/Wrapping/Generators/Python/PyUtils/itkPyCommand.cxx @@ -116,8 +116,7 @@ PyCommand::PyExecute() // we throw a standard ITK exception: this makes it possible for // our standard Swig exception handling logic to take this // through to the invoking Python process - itkExceptionMacro("CommandCallable is not a callable Python object, " - << "or it has not been set."); + itkExceptionMacro("CommandCallable is not a callable Python object, " << "or it has not been set."); } else { @@ -134,8 +133,7 @@ PyCommand::PyExecute() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro("There was an error executing the " - << "CommandCallable."); + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } } diff --git a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx index 011c5e156ef..31849bb00d7 100644 --- a/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx +++ b/Wrapping/Generators/Python/PyUtils/itkPyImageFilter.hxx @@ -171,8 +171,7 @@ PyImageFilter::GenerateOutputInformation() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro("There was an error executing the " - << "CommandCallable."); + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } } @@ -204,8 +203,7 @@ PyImageFilter::EnlargeOutputRequestedRegion(DataObjec PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro("There was an error executing the " - << "CommandCallable."); + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } } @@ -236,8 +234,7 @@ PyImageFilter::GenerateInputRequestedRegion() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro("There was an error executing the " - << "CommandCallable."); + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } } @@ -252,8 +249,7 @@ PyImageFilter::GenerateData() // we throw a standard ITK exception: this makes it possible for // our standard Swig exception handling logic to take this // through to the invoking Python process - itkExceptionMacro("CommandCallable is not a callable Python object, " - << "or it has not been set."); + itkExceptionMacro("CommandCallable is not a callable Python object, " << "or it has not been set."); } else { @@ -273,8 +269,7 @@ PyImageFilter::GenerateData() PyErr_Print(); // make sure the invoking Python code knows there was a problem // by raising an exception - itkExceptionMacro("There was an error executing the " - << "CommandCallable."); + itkExceptionMacro("There was an error executing the " << "CommandCallable."); } } } diff --git a/Wrapping/Generators/Python/itkPyITKCommonCAPI.h b/Wrapping/Generators/Python/itkPyITKCommonCAPI.h index 5f43dc63836..5cbfb42bd7b 100644 --- a/Wrapping/Generators/Python/itkPyITKCommonCAPI.h +++ b/Wrapping/Generators/Python/itkPyITKCommonCAPI.h @@ -51,7 +51,7 @@ extern "C" /* This section is used when compiling ITKCommonPython.cpp */ static _ITKCommonPython_GetGlobalSingletonIndex_RETURN _ITKCommonPython_GetInstance - _ITKCommonPython_GetGlobalSingletonIndex_PROTO; + _ITKCommonPython_GetGlobalSingletonIndex_PROTO; #else /* This section is used in modules that use _ITKCommonPython's C API */