Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## This config file is only relevant for clang-format version 19.1.4
## This config file is only relevant for clang-format version 19.1.7
##
## 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
Expand All @@ -10,11 +10,11 @@
## maintaining a consistent code style.
##
## EXAMPLE apply code style enforcement before commit:
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --modified
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.7} --modified
## EXAMPLE apply code style enforcement after commit:
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --last
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.7} --last
---
# This configuration requires clang-format version 19.1.4 exactly.
# This configuration requires clang-format version 19.1.7 exactly.
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: pre-commit

on:
pull_request:
push:
branches: [master]

jobs:
pre-commit:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Check install of Python, pre-commit
run: |
./Utilities/GitSetup/setup-precommit
git config hooks.SetupForDevelopment 99
git config user.email "you@example.com"
git config user.name "Your Name"
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: pre-commit/action@v3.0.1
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ repos:
- id: trailing-whitespace
exclude: "\\.(sha|sha512|svg|vtk|vtp)$|\\/ThirdParty\\/|\\/Data\\/"
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
rev: v19.1.7
hooks:
- id: clang-format
args: ['--style=file']
Expand Down
4 changes: 2 additions & 2 deletions Documentation/docs/releases/5.4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ Unpack optional testing data in the same directory where the Library Source is u
- Add `itk::Copy(const T & original)`, which simply returns a copy
- Make `itk::ImageRegion` trivially copyable, remove inheritance (FUTURE)
- `itk::VTKPolyDataMeshIO` support for reading VTK 5.1 format
- Add `ITK_DEFAULT_COPY_AND_MOVE(TypeName)` macro definition
- Add `ITK_DEFAULT_COPY_AND_MOVE(TypeName)` macro definition
- Replace `(const std::string)` casts with C++17 `std::string_view`
- Replace SetSize/Index calls in tests with `region{ index, size }`
- Optionally limit an `ImageMask` to a specific pixel value
Expand Down Expand Up @@ -229,7 +229,7 @@ We extend our gratitude to all the ITK community members who have contributed to
🗣️ What's Next
---------------

ITK 5.4.0 represents a transformative milestone in our documentation journey. The finalization of 5.4.0 was delayed due to dependency issues in the example documentation's infrastructure. While these are addressed, we'll continue to refine the 5.4 series through patch releases. We're excited to eventually migrate the examples to a similar robust foundation in future innovations.
ITK 5.4.0 represents a transformative milestone in our documentation journey. The finalization of 5.4.0 was delayed due to dependency issues in the example documentation's infrastructure. While these are addressed, we'll continue to refine the 5.4 series through patch releases. We're excited to eventually migrate the examples to a similar robust foundation in future innovations.

Looking ahead, we're thrilled to announce that ITK 6, our next major release, will showcase a substantial array of modernizations. The community has been hard at work implementing significant improvements that will elevate development with and on the toolkit. Watch for upcoming alpha and beta releases of ITK 6, which will run parallel to our 5.4 maintenance efforts.

Expand Down
8 changes: 4 additions & 4 deletions Examples/.clang-format
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## This config file is only relevant for clang-format version 19.1.4
## This config file is only relevant for clang-format version 19.1.7
##
## 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
Expand All @@ -10,11 +10,11 @@
## maintaining a consistent code style.
##
## EXAMPLE apply code style enforcement before commit:
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --modified
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.7} --modified
## EXAMPLE apply code style enforcement after commit:
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.4} --last
# Utilities/Maintenance/clang-format.bash --clang ${PATH_TO_CLANG_FORMAT_19.1.7} --last
---
# This configuration requires clang-format version 19.1.4 exactly.
# This configuration requires clang-format version 19.1.7 exactly.
Language: Cpp
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class BufferedImageNeighborhoodPixelAccessPolicy final
{
m_NeighborhoodAccessor.Set(imageBufferPointer + m_PixelIndexValue, pixelValue);
}

};

} // namespace itk
Expand Down
4 changes: 2 additions & 2 deletions Modules/Core/Common/include/itkCommonEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ class OctreeEnums
*/
enum class Octree : uint8_t
{
UNKNOWN_PLANE, ///< The plane is Unknown
SAGITTAL_PLANE, ///< The plane is Sagittal
UNKNOWN_PLANE, ///< The plane is Unknown
SAGITTAL_PLANE, ///< The plane is Sagittal
#if !defined(ITK_LEGACY_REMOVE)
SAGITAL_PLANE [[deprecated("Use SAGITTAL_PLANE instead")]] = SAGITTAL_PLANE, ///< Support misspelling
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ class ConnectedImageNeighborhoodShape
{
return (includeCenterPixel ? 1 : 0) + CalculateNumberOfConnectedNeighbors(maximumCityblockDistance);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these spaces removals will counteract changes from #3805.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a hard time following the issue and resolution in #3805.

These were necessary to get the CI green.

};

/** Generates the offsets for a connected image neighborhood shape. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ class ConstantBoundaryImageNeighborhoodPixelAccessPolicy final
m_NeighborhoodAccessor.Set(imageBufferPointer + m_PixelIndexValue, pixelValue);
}
}

};

} // namespace itk
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkContinuousIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class ITK_TEMPLATE_EXPORT ContinuousIndex : public Point<TCoordinate, VIndexDime
(*this)[i] = static_cast<TCoordinate>(index[i]);
}
}

};
} // namespace itk

Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkCovariantVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,6 @@ class ITK_TEMPLATE_EXPORT CovariantVector : public FixedArray<T, VVectorDimensio
(*this)[i] = static_cast<T>(pa[i]);
}
}

};

/** Premultiply Operator for product of a vector and a scalar.
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkDefaultConvertPixelTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class ITK_TEMPLATE_EXPORT DefaultConvertPixelTraits
{
return pixel.GetScalarValue();
}

};

#define ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(type) \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ class ITK_TEMPLATE_EXPORT ExtractImageFilterRegionCopier : public ImageRegionCop
{
ImageRegionCopier<T1, T2>::operator()(destRegion, srcRegion);
}

};
} // end namespace ImageToImageFilterDetail
} // end namespace itk
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkFixedArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ class ITK_TEMPLATE_EXPORT FixedArray
{
return MakeFilled<FixedArray>(value);
}

};

template <typename TValue, unsigned int VLength>
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkForwardDifferenceOperator.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ class ITK_TEMPLATE_EXPORT ForwardDifferenceOperator : public NeighborhoodOperato
{
this->FillCenteredDirectional(coeff);
}

};
} // namespace itk

Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkImageIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ class ITK_TEMPLATE_EXPORT ImageIterator : public ImageConstIterator<TImage>
ImageIterator(const ImageConstIterator<TImage> & it);
Self &
operator=(const ImageConstIterator<TImage> & it);

};
} // end namespace itk

Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkImageIteratorWithIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ class ITK_TEMPLATE_EXPORT ImageIteratorWithIndex : public ImageConstIteratorWith
ImageIteratorWithIndex(const ImageConstIteratorWithIndex<TImage> & it);
Self &
operator=(const ImageConstIteratorWithIndex<TImage> & it);

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class ITK_TEMPLATE_EXPORT ImageLinearIteratorWithIndex : public ImageLinearConst
ImageLinearIteratorWithIndex(const ImageLinearConstIteratorWithIndex<TImage> & it);
Self &
operator=(const ImageLinearConstIteratorWithIndex<TImage> & it);

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class ITK_TEMPLATE_EXPORT ImageRandomIteratorWithIndex : public ImageRandomConst
ImageRandomIteratorWithIndex(const ImageRandomConstIteratorWithIndex<TImage> & it);
Self &
operator=(const ImageRandomConstIteratorWithIndex<TImage> & it);

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ class ITK_TEMPLATE_EXPORT ImageRandomNonRepeatingIteratorWithIndex
ImageRandomNonRepeatingIteratorWithIndex(const ImageRandomNonRepeatingConstIteratorWithIndex<TImage> & it);
Self &
operator=(const ImageRandomNonRepeatingConstIteratorWithIndex<TImage> & it);

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionConstIteratorWithIndex : public ImageConstI
* \sa operator++ */
Self &
operator--();

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionConstIteratorWithOnlyIndex : public ImageCo
* \sa operator++ */
Self &
operator--();

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionExclusionIteratorWithIndex
ImageRegionExclusionIteratorWithIndex(const ImageRegionExclusionConstIteratorWithIndex<TImage> & it);
Self &
operator=(const ImageRegionExclusionConstIteratorWithIndex<TImage> & it);

};
} // end namespace itk

Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkImageRegionIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionIterator : public ImageRegionConstIterator<
ImageRegionIterator(const ImageRegionConstIterator<TImage> & it);
Self &
operator=(const ImageRegionConstIterator<TImage> & it);

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionIteratorWithIndex : public ImageRegionConst
ImageRegionIteratorWithIndex(const ImageRegionConstIteratorWithIndex<TImage> & it);
Self &
operator=(const ImageRegionConstIteratorWithIndex<TImage> & it);

};
} // end namespace itk

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class ITK_TEMPLATE_EXPORT ImageRegionReverseIterator : public ImageRegionReverse
ImageRegionReverseIterator(const ImageRegionReverseConstIterator<TImage> & it);
Self &
operator=(const ImageRegionReverseConstIterator<TImage> & it);

};
} // end namespace itk

Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkImageReverseIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ class ITK_TEMPLATE_EXPORT ImageReverseIterator : public ImageRegionReverseConstI
ImageReverseIterator(const ImageRegionReverseConstIterator<TImage> & it);
Self &
operator=(const ImageRegionReverseConstIterator<TImage> & it);

};
} // end namespace itk

Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkImageScanlineIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ class ITK_TEMPLATE_EXPORT ImageScanlineIterator : public ImageScanlineConstItera
ImageScanlineIterator(const ImageScanlineConstIterator<TImage> & it);
Self &
operator=(const ImageScanlineConstIterator<TImage> & it);

};

// Deduction guide for class template argument deduction (CTAD).
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkImageSink.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ class ImageSink
*/
double m_CoordinateTolerance{ Self::GetGlobalDefaultCoordinateTolerance() };
double m_DirectionTolerance{ Self::GetGlobalDefaultDirectionTolerance() };

};

} // namespace itk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ class ITK_TEMPLATE_EXPORT ImageSliceIteratorWithIndex : public ImageSliceConstIt
ImageSliceIteratorWithIndex(const ImageSliceConstIteratorWithIndex<TImage> & it);
Self &
operator=(const ImageSliceConstIteratorWithIndex<TImage> & it);

};
} // end namespace itk

Expand Down
5 changes: 0 additions & 5 deletions Modules/Core/Common/include/itkMemoryUsageObserver.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class ITKCommon_EXPORT LinuxMemoryUsageObserver : public MemoryUsageObserverBase

MemoryLoadType
GetMemoryUsage() override;

};
#endif // __linux__

Expand All @@ -103,7 +102,6 @@ class ITKCommon_EXPORT MacOSXMemoryUsageObserver : public MemoryUsageObserverBas

MemoryLoadType
GetMemoryUsage() override;

};
#endif // Mac OS X

Expand All @@ -116,7 +114,6 @@ class ITKCommon_EXPORT SunSolarisMemoryUsageObserver : public MemoryUsageObserve

virtual MemoryLoadType
GetMemoryUsage();

};
#endif // Sun Solaris

Expand All @@ -129,7 +126,6 @@ class ITKCommon_EXPORT SysResourceMemoryUsageObserver : public MemoryUsageObserv

MemoryLoadType
GetMemoryUsage() override;

};

# if defined(ITK_HAS_MALLINFO) || defined(ITK_HAS_MALLINFO2)
Expand All @@ -145,7 +141,6 @@ class ITKCommon_EXPORT MallinfoMemoryUsageObserver : public MemoryUsageObserverB

MemoryLoadType
GetMemoryUsage() override;

};

# endif // Mallinfo
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkMultiThreaderBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ INTEL_PRAGMA_WARN_POP
STD_EXCEPTION,
UNKNOWN
} ThreadExitCode;

};
// clang-format off
ITK_GCC_PRAGMA_DIAG_POP()
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkNeighborhoodIterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ class ITK_TEMPLATE_EXPORT NeighborhoodIterator : public ConstNeighborhoodIterato
{
this->SetPixel(this->GetCenterNeighborhoodIndex() - this->GetStride(axis), v);
}

};
} // namespace itk

Expand Down
12 changes: 6 additions & 6 deletions Modules/Core/Common/include/itkOctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ class ITKCommon_EXPORT OctreeBase : public Object
#if !defined(ITK_LEGACY_REMOVE)
// We need to expose the enum values at the class level
// for backwards compatibility
static constexpr OctreeEnum UNKNOWN_PLANE = OctreeEnum::UNKNOWN_PLANE;
static constexpr OctreeEnum SAGITTAL_PLANE = OctreeEnum::SAGITTAL_PLANE;
static constexpr OctreeEnum UNKNOWN_PLANE = OctreeEnum::UNKNOWN_PLANE;
static constexpr OctreeEnum SAGITTAL_PLANE = OctreeEnum::SAGITTAL_PLANE;
[[deprecated("Use SAGITTAL_PLANE instead")]] static constexpr OctreeEnum SAGITAL_PLANE = OctreeEnum::SAGITTAL_PLANE;
static constexpr OctreeEnum CORONAL_PLANE = OctreeEnum::CORONAL_PLANE;
static constexpr OctreeEnum CORONAL_PLANE = OctreeEnum::CORONAL_PLANE;
static constexpr OctreeEnum TRANSVERSE_PLANE = OctreeEnum::TRANSVERSE_PLANE;
#endif

Expand Down Expand Up @@ -187,10 +187,10 @@ class ITK_TEMPLATE_EXPORT Octree : public OctreeBase
* Exposes enum values for backwards compatibility
* */
#if !defined(ITK_LEGACY_REMOVE)
static constexpr OctreeEnum UNKNOWN_PLANE = OctreeEnum::UNKNOWN_PLANE;
static constexpr OctreeEnum SAGITTAL_PLANE = OctreeEnum::SAGITTAL_PLANE;
static constexpr OctreeEnum UNKNOWN_PLANE = OctreeEnum::UNKNOWN_PLANE;
static constexpr OctreeEnum SAGITTAL_PLANE = OctreeEnum::SAGITTAL_PLANE;
[[deprecated("Use SAGITTAL_PLANE instead")]] static constexpr OctreeEnum SAGITAL_PLANE = OctreeEnum::SAGITTAL_PLANE;
static constexpr OctreeEnum CORONAL_PLANE = OctreeEnum::CORONAL_PLANE;
static constexpr OctreeEnum CORONAL_PLANE = OctreeEnum::CORONAL_PLANE;
static constexpr OctreeEnum TRANSVERSE_PLANE = OctreeEnum::TRANSVERSE_PLANE;
#endif

Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkOrientationAdapterBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class ITK_TEMPLATE_EXPORT [[deprecated("Since ITK 5.3 use SpatialOrientationAdap
/** destructor, to silence "virtual class has non-virtual destructor()"
warnings */
virtual ~OrientationAdapterBase() = default;

};
} // namespace itk
#else // ITK_LEGACY_REMOVE
Expand Down
1 change: 0 additions & 1 deletion Modules/Core/Common/include/itkPeriodicBoundaryCondition.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ class ITK_TEMPLATE_EXPORT PeriodicBoundaryCondition : public ImageBoundaryCondit
*/
OutputPixelType
GetPixel(const IndexType & index, const TInputImage * image) const override;

};
} // end namespace itk

Expand Down
Loading