Skip to content

Commit 9500387

Browse files
committed
COMP: Update CI, fix build issues, and bump Python to 3.10+
- Update ITKRemoteModuleBuildTestPackageAction from v5.4.2 to v5.4.6 - Update clang-format linter action to use @main branch - Bump requires-python from >=3.8 to >=3.10 - Fix wrapping filename typos (Diffeomophic -> Diffeomorphic) - Fix ContinuousBorderWarpImageFilter: don't throw on out-of-bounds warp points (the clamping below provides continuous-border behavior) - Fix include path for external module builds (add ITK include dir) - Apply clang-format 19 to src/ files
1 parent 35af135 commit 9500387

31 files changed

Lines changed: 45 additions & 45 deletions

.github/workflows/build-test-package.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@ on:
1212

1313
jobs:
1414
cxx-build-workflow:
15-
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.0
15+
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.4.6
1616

1717
python-build-workflow:
18-
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.0
18+
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.4.6
19+
with:
20+
itk-wheel-tag: 'v5.4.5'
21+
itk-python-package-tag: 'v5.4.5'
22+
test-notebooks: false
1923
secrets:
2024
pypi_password: ${{ secrets.pypi_password }}

.github/workflows/clang-format-linter.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v4
10+
- uses: actions/checkout@v5
1111

12-
- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master
12+
- uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@main
13+
with:
14+
itk-branch: main

include/itkContinuousBorderWarpImageFilter.hxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ ContinuousBorderWarpImageFilter<TInputImage, TOutputImage, TDisplacementField>::
7171
}
7272

7373
// project point into image region
74-
inputPtr->TransformPhysicalPointToContinuousIndex(point, contIndex);
74+
if (!inputPtr->TransformPhysicalPointToContinuousIndex(point, contIndex))
75+
{
76+
itkExceptionMacro("Physical point " << point << " is outside the image domain");
77+
}
7578

7679
for (unsigned int j = 0; j < ImageDimension; j++)
7780
{

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ classifiers = [
3434
"Topic :: Scientific/Engineering :: Medical Science Apps.",
3535
"Topic :: Software Development :: Libraries",
3636
]
37-
requires-python = ">=3.8"
37+
requires-python = ">=3.10"
3838
dependencies = [
3939
"itk",
4040
]

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include_directories("${VariationalRegistration_SOURCE_DIR}/include")
12
include_directories("${VariationalRegistration_SOURCE_DIR}/src")
23

34
# Test if ITK is built with FFTW. FFTWD is recommended and required for the

src/VariationalRegistrationMain.cxx

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,7 @@ main(int argc, char * argv[])
640640
FunctionType::Pointer function;
641641
switch (forceType)
642642
{
643-
case 0:
644-
{
643+
case 0: {
645644
DemonsFunctionType::Pointer demonsFunction = DemonsFunctionType::New();
646645
switch (forceDomain)
647646
{
@@ -659,8 +658,7 @@ main(int argc, char * argv[])
659658
function = demonsFunction;
660659
}
661660
break;
662-
case 1:
663-
{
661+
case 1: {
664662
SSDFunctionType::Pointer ssdFunction = SSDFunctionType::New();
665663
switch (forceDomain)
666664
{
@@ -678,8 +676,7 @@ main(int argc, char * argv[])
678676
function = ssdFunction;
679677
}
680678
break;
681-
case 2:
682-
{
679+
case 2: {
683680
NCCFunctionType::Pointer nccFunction = NCCFunctionType::New();
684681
NCCFunctionType::RadiusType r;
685682
for (unsigned int dim = 0; dim < NCCFunctionType::ImageDimension; dim++)
@@ -722,22 +719,19 @@ main(int argc, char * argv[])
722719
RegularizerType::Pointer regularizer;
723720
switch (regularizerType)
724721
{
725-
case 0:
726-
{
722+
case 0: {
727723
GaussianRegularizerType::Pointer gaussRegularizer = GaussianRegularizerType::New();
728724
gaussRegularizer->SetStandardDeviations(std::sqrt(regulVar));
729725
regularizer = gaussRegularizer;
730726
}
731727
break;
732-
case 1:
733-
{
728+
case 1: {
734729
DiffusionRegularizerType::Pointer diffRegularizer = DiffusionRegularizerType::New();
735730
diffRegularizer->SetAlpha(regulAlpha);
736731
regularizer = diffRegularizer;
737732
}
738733
break;
739-
case 2:
740-
{
734+
case 2: {
741735
#if defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)
742736
ElasticRegularizerType::Pointer elasticRegularizer = ElasticRegularizerType::New();
743737
elasticRegularizer->SetMu(regulMu);
@@ -748,8 +742,7 @@ main(int argc, char * argv[])
748742
#endif
749743
}
750744
break;
751-
case 3:
752-
{
745+
case 3: {
753746
#if defined(ITK_USE_FFTWD) || defined(ITK_USE_FFTWF)
754747
CurvatureRegularizerType::Pointer curvatureRegularizer = CurvatureRegularizerType::New();
755748
curvatureRegularizer->SetAlpha(regulAlpha);
@@ -775,20 +768,17 @@ main(int argc, char * argv[])
775768
RegistrationFilterType::Pointer regFilter;
776769
switch (searchSpace)
777770
{
778-
case 0:
779-
{
771+
case 0: {
780772
regFilter = RegistrationFilterType::New();
781773
break;
782774
}
783-
case 1:
784-
{
775+
case 1: {
785776
DiffeomorphicRegistrationFilterType::Pointer diffeoRegFilter = DiffeomorphicRegistrationFilterType::New();
786777
diffeoRegFilter->SetNumberOfExponentiatorIterations(numberOfExponentiatorIterations);
787778
regFilter = diffeoRegFilter;
788779
break;
789780
}
790-
case 2:
791-
{
781+
case 2: {
792782
SymmetricDiffeomorphicRegistrationFilterType::Pointer symmDiffeoRegFilter =
793783
SymmetricDiffeomorphicRegistrationFilterType::New();
794784
symmDiffeoRegFilter->SetNumberOfExponentiatorIterations(numberOfExponentiatorIterations);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
096c01e745f76aa448ca78c6b078fd708265eb8ae08373309b41aee65675f565b28590d9771ef2d098a5ad92b5d1a931b2ff451b0422927bb539e303fe7cf3e2
1+
8795756507ad71886458f3733431505f9fbac322da666c33550b05fea73be523b81047bf844d39a4ba6d60cfb710946c200f003a78d22b65276743e955da0d5a

test/Baseline/VariationalRegistrationDiffeomorph3DTest.nii.gz.md5

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e869948506ba902718e8df41295f9a2c40d535acfc6480ce020fff46e2789ba200116b00e40f2fdfbc08db4af669582c2705a8b13da3f878ff4ded433624049d
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c6d11466cc763ed727375d0fd3c6da488f557e9bbf080b5a07ecdfd1f5166bc196602ee9d5c28700b47aa0b1dfb69f87b0c0e830df6e927af80686c8d46f607d
1+
be5af8d653905718e1691f31d3047985362e94ad73c9c4bb355c77bdf950e38930337133cf6b9e10a46745e32f4dc6a14d8dc20cfa87d4d0bc04c39e4a912836

0 commit comments

Comments
 (0)