Skip to content

Commit

Permalink
Update to ITK 5.3rc2
Browse files Browse the repository at this point in the history
The MakeIndex and MakeVector methods are now in the itk namespace.
  • Loading branch information
blowekamp committed Nov 4, 2021
1 parent 73ecf38 commit c1ab584
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
- os: ubuntu-18.04
c-compiler: "gcc"
cxx-compiler: "g++"
itk-git-tag: "v5.2.0"
itk-git-tag: "v5.3rc02"
cmake-build-type: "MinSizeRel"
- os: windows-2019
c-compiler: "cl.exe"
cxx-compiler: "cl.exe"
itk-git-tag: "v5.2.0"
itk-git-tag: "v5.3rc02"
cmake-build-type: "Release"
- os: macos-10.15
c-compiler: "clang"
cxx-compiler: "clang++"
itk-git-tag: "v5.2.0"
itk-git-tag: "v5.3rc02"
cmake-build-type: "MinSizeRel"

steps:
Expand Down
24 changes: 12 additions & 12 deletions test/itkHessianImageFilterGTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,16 @@ TEST_F(HessianImageFilterFixture, ValueTest_3D)
Utils::HessianImageType::Pointer output = filter->GetOutput();


std::cout << "Value: " << image->GetPixel(MakeIndex(11, 12, 12)) << std::endl;
std::cout << "Value: " << image->GetPixel(MakeIndex(12, 12, 12)) << std::endl;
std::cout << "Value: " << image->GetPixel(MakeIndex(13, 12, 12)) << std::endl;
std::cout << "Value: " << image->GetPixel(MakeIndex(14, 12, 12)) << std::endl;
std::cout << "Value: " << image->GetPixel(itk::MakeIndex(11, 12, 12)) << std::endl;
std::cout << "Value: " << image->GetPixel(itk::MakeIndex(12, 12, 12)) << std::endl;
std::cout << "Value: " << image->GetPixel(itk::MakeIndex(13, 12, 12)) << std::endl;
std::cout << "Value: " << image->GetPixel(itk::MakeIndex(14, 12, 12)) << std::endl;

ITK_EXPECT_VECTOR_NEAR(
MakeFixedArray(-0.0001615, 0.0, 0.0, -0.0001615, 0.0, -0.0001615), output->GetPixel(MakeIndex(12, 12, 12)), 1e-6);
MakeFixedArray(-0.0001615, 0.0, 0.0, -0.0001615, 0.0, -0.0001615), output->GetPixel(itk::MakeIndex(12, 12, 12)), 1e-6);

ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-0.00014602, 0.0, 0.0, -0.00014602, 0.0, -0.00014602),
output->GetPixel(MakeIndex(10, 10, 10)),
output->GetPixel(itk::MakeIndex(10, 10, 10)),
1e-5);
}

Expand All @@ -179,7 +179,7 @@ TEST_F(HessianImageFilterFixture, ValueTest_2D)

for (unsigned int i = 0; i < Utils::imageSize; ++i)
{
image->SetPixel(MakeIndex(10, i), 1);
image->SetPixel(itk::MakeIndex(10, i), 1);
}

using Utils = FixtureUtilities<2>;
Expand All @@ -190,16 +190,16 @@ TEST_F(HessianImageFilterFixture, ValueTest_2D)

Utils::HessianImageType::Pointer output = filter->GetOutput();

ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-2.0, 0.0, 0.0), output->GetPixel(MakeIndex(10, 10)), 1e-6);
ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-2.0, 0.0, 0.0), output->GetPixel(itk::MakeIndex(10, 10)), 1e-6);

ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-2.0, 0.0, 0.0), output->GetPixel(MakeIndex(10, 0)), 1e-6);
ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-2.0, 0.0, 0.0), output->GetPixel(itk::MakeIndex(10, 0)), 1e-6);

image->SetSpacing(MakeVector(10.0, 2.0));
image->SetSpacing(itk::MakeVector(10.0, 2.0));
image->Modified();

filter->Update();

ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-.02, 0.0, 0.0), output->GetPixel(MakeIndex(10, 10)), 1e-6);
ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-.02, 0.0, 0.0), output->GetPixel(itk::MakeIndex(10, 10)), 1e-6);

ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-.02, 0.0, 0.0), output->GetPixel(MakeIndex(10, 0)), 1e-6);
ITK_EXPECT_VECTOR_NEAR(MakeFixedArray(-.02, 0.0, 0.0), output->GetPixel(itk::MakeIndex(10, 0)), 1e-6);
}

0 comments on commit c1ab584

Please sign in to comment.