diff --git a/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx b/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx index 5726b41a5e0..b7a75ad40da 100644 --- a/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkStatisticsLabelMapFilterGTest.cxx @@ -162,6 +162,7 @@ class StatisticsLabelMapFixture : public ::testing::Test TEST_F(StatisticsLabelMapFixture, 2D_zero) { using Utils = FixtureUtilities<2, unsigned char>; + using namespace itk::GTest::TypedefsAndConstructors::Dimension2; auto image = Utils::CreateImage(); auto labelImage = Utils ::CreateLabelImage(); @@ -190,21 +191,22 @@ TEST_F(StatisticsLabelMapFixture, 2D_zero) TEST_F(StatisticsLabelMapFixture, 2D_ones_with_outliers) { using Utils = FixtureUtilities<2, signed short>; + using namespace itk::GTest::TypedefsAndConstructors::Dimension2; auto image = Utils::CreateImage(); Utils::PixelType value = 1; image->FillBuffer(value); // Test with outliers outside the label. - image->SetPixel({ 0, 0 }, 32000); - image->SetPixel({ 0, 1 }, -32000); + image->SetPixel(IndexType{ 0, 0 }, 32000); + image->SetPixel(IndexType{ 0, 1 }, -32000); auto labelImage = Utils ::CreateLabelImage(); Utils::LabelPixelType label = 1; labelImage->FillBuffer(label); - labelImage->SetPixel({ 0, 0 }, 0); - labelImage->SetPixel({ 0, 1 }, 0); + labelImage->SetPixel(IndexType{ 0, 0 }, 0); + labelImage->SetPixel(IndexType{ 0, 1 }, 0); Utils::LabelObjectType::ConstPointer labelObject = Utils::ComputeLabelObject(labelImage, image, label, 1 << 16); @@ -225,21 +227,22 @@ TEST_F(StatisticsLabelMapFixture, 2D_ones_with_outliers) TEST_F(StatisticsLabelMapFixture, 2D_rand_with_outliers) { using Utils = FixtureUtilities<2, signed short>; + using namespace itk::GTest::TypedefsAndConstructors::Dimension2; auto image = Utils::CreateImageRandom(500, 0); auto labelImage = Utils ::CreateLabelImage(); // Test with outliers outside the label. - image->SetPixel({ 0, 0 }, 32000); - image->SetPixel({ 0, 1 }, -2000); + image->SetPixel(IndexType{ 0, 0 }, 32000); + image->SetPixel(IndexType{ 0, 1 }, -2000); // Set min/max in label - image->SetPixel({ 0, 2 }, 0); - image->SetPixel({ 0, 3 }, 500); + image->SetPixel(IndexType{ 0, 2 }, 0); + image->SetPixel(IndexType{ 0, 3 }, 500); Utils::LabelPixelType label = 1; labelImage->FillBuffer(label); - labelImage->SetPixel({ 0, 0 }, 0); - labelImage->SetPixel({ 0, 1 }, 0); + labelImage->SetPixel(IndexType{ 0, 0 }, 0); + labelImage->SetPixel(IndexType{ 0, 1 }, 0); Utils::LabelObjectType::ConstPointer labelObject = Utils::ComputeLabelObject(labelImage, image, label, 1 << 16); @@ -259,21 +262,22 @@ TEST_F(StatisticsLabelMapFixture, 2D_rand_with_outliers) TEST_F(StatisticsLabelMapFixture, 2D_even) { using Utils = FixtureUtilities<2, unsigned char>; + using namespace itk::GTest::TypedefsAndConstructors::Dimension2; auto image = Utils::CreateImage(); auto labelImage = Utils ::CreateLabelImage(); // Set label with two elements far apart, the median should be average - image->SetPixel({ 0, 0 }, 10); - image->SetPixel({ 0, 1 }, 100); - image->SetPixel({ 0, 2 }, 1); - image->SetPixel({ 0, 3 }, 200); + image->SetPixel(IndexType{ 0, 0 }, 10); + image->SetPixel(IndexType{ 0, 1 }, 100); + image->SetPixel(IndexType{ 0, 2 }, 1); + image->SetPixel(IndexType{ 0, 3 }, 200); Utils::LabelPixelType label = 1; - labelImage->SetPixel({ 0, 0 }, label); - labelImage->SetPixel({ 0, 1 }, label); - labelImage->SetPixel({ 0, 2 }, label); - labelImage->SetPixel({ 0, 3 }, label); + labelImage->SetPixel(IndexType{ 0, 0 }, label); + labelImage->SetPixel(IndexType{ 0, 1 }, label); + labelImage->SetPixel(IndexType{ 0, 2 }, label); + labelImage->SetPixel(IndexType{ 0, 3 }, label); Utils::LabelObjectType::ConstPointer labelObject = Utils::ComputeLabelObject(labelImage, image, label, 1 << 8); @@ -296,19 +300,20 @@ TEST_F(StatisticsLabelMapFixture, 2D_even) TEST_F(StatisticsLabelMapFixture, 2D_three) { using Utils = FixtureUtilities<2, unsigned char>; + using namespace itk::GTest::TypedefsAndConstructors::Dimension2; auto image = Utils::CreateImage(); auto labelImage = Utils ::CreateLabelImage(); // Set label with two elements far apart, the median should be average - image->SetPixel({ 0, 0 }, 1); - image->SetPixel({ 0, 1 }, 3); - image->SetPixel({ 0, 2 }, 10); + image->SetPixel(IndexType{ 0, 0 }, 1); + image->SetPixel(IndexType{ 0, 1 }, 3); + image->SetPixel(IndexType{ 0, 2 }, 10); Utils::LabelPixelType label = 1; - labelImage->SetPixel({ 0, 0 }, label); - labelImage->SetPixel({ 0, 1 }, label); - labelImage->SetPixel({ 0, 2 }, label); + labelImage->SetPixel(IndexType{ 0, 0 }, label); + labelImage->SetPixel(IndexType{ 0, 1 }, label); + labelImage->SetPixel(IndexType{ 0, 2 }, label); Utils::LabelObjectType::ConstPointer labelObject = Utils::ComputeLabelObject(labelImage, image, label, 1 << 8);