Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ class ITK_TEMPLATE_EXPORT NumberOfPointsCriterion
using typename Superclass::PriorityType;

inline bool
is_satisfied(MeshType * iMesh, const ElementType & itkNotUsed(iElement), const MeasureType & itkNotUsed(iValue)) const override
is_satisfied(MeshType * iMesh,
const ElementType & itkNotUsed(iElement),
const MeasureType & itkNotUsed(iValue)) const override
Comment thread
hjmjohnson marked this conversation as resolved.
{
return (iMesh->GetNumberOfPoints() <= this->m_NumberOfElements);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ bool
ActualTest(const std::string & inputFileName,
const std::string & outputFileNameBase,
const std::string & outputFileNameExtension,
bool streamWriting,
bool pasteWriting,
bool compressWriting,
int expectException = -1)
bool streamWriting,
bool pasteWriting,
bool compressWriting,
int expectException = -1)
{

std::cout << "Writing Combination: ";
Expand Down
5 changes: 4 additions & 1 deletion Modules/IO/NRRD/test/itkNrrdImageIOTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ itkNrrdImageIOTestGenerateRandomImage(unsigned int size)

template <typename TPixelType, unsigned int VImageDimension>
int
itkNrrdImageIOTestReadWriteTest(const std::string & fn, unsigned int size, const std::string & inputFile, bool compression = false)
itkNrrdImageIOTestReadWriteTest(const std::string & fn,
unsigned int size,
const std::string & inputFile,
bool compression = false)
{
using ImageType = itk::Image<TPixelType, VImageDimension>;

Expand Down
6 changes: 5 additions & 1 deletion Modules/IO/VTK/test/itkVTKImageIO2Test.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,11 @@ class VTKImageIOTester

template <typename TScalar>
int
Test1AsciiBinary(std::string filePrefix, std::string outputPath, const std::string & typeName, bool ascii, bool read = true)
Test1AsciiBinary(std::string filePrefix,
std::string outputPath,
const std::string & typeName,
bool ascii,
bool read = true)
{
std::string ab;
if (ascii)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

template <typename TMovingTransform>
int
itkAutoScaledGradientDescentRegistrationOnVectorTestTemplated(int numberOfIterations,
double shiftOfStep,
itkAutoScaledGradientDescentRegistrationOnVectorTestTemplated(int numberOfIterations,
double shiftOfStep,
const std::string & scalesOption)
{
const unsigned int Dimension = TMovingTransform::SpaceDimension;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@

template <typename TMovingTransform>
int
itkAutoScaledGradientDescentRegistrationTestTemplated(int numberOfIterations,
double shiftOfStep,
itkAutoScaledGradientDescentRegistrationTestTemplated(int numberOfIterations,
double shiftOfStep,
const std::string & scalesOption,
bool usePhysicalSpaceForShift,
bool estimateLearningRateOnce,
bool estimateLearningRateAtEachIteration,
bool estimateScales)
bool usePhysicalSpaceForShift,
bool estimateLearningRateOnce,
bool estimateLearningRateAtEachIteration,
bool estimateScales)
{
const unsigned int Dimension = TMovingTransform::SpaceDimension;
using PixelType = double;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

template <typename TMovingTransform>
int
itkQuasiNewtonOptimizerv4TestTemplated(int numberOfIterations,
double shiftOfStep,
itkQuasiNewtonOptimizerv4TestTemplated(int numberOfIterations,
double shiftOfStep,
const std::string & scalesOption,
bool usePhysicalSpaceForShift = true)
bool usePhysicalSpaceForShift = true)
{
const unsigned int Dimension = TMovingTransform::SpaceDimension;
using PixelType = double;
Expand Down