Skip to content

Commit

Permalink
COMP: Add missing brackets to RelabelComponentsImageFilterGTest
Browse files Browse the repository at this point in the history
To address the dashboard warning:

   Standard Error

[CTest: warning matched] /Users/builder/externalModules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterGTest.cxx:141:54: warning: suggest braces around initialization of subobject [-Wmissing-braces]
  image->SetRegions(typename ImageType::RegionType({ 512, 512, 512 }));
                                                     ^~~~~~~~~~~~~
                                                     {            }
[CTest: warning suppressed] 1 warning generated.

Also, disambiguate construction re:

  Modules/Segmentation/ConnectedComponents/test/itkRelabelComponentImageFilterGTest.cxx:141:21: error: call to constructor of 'typename ImageType::RegionType' (aka 'ImageRegion<3U>') is ambiguous
  • Loading branch information
thewtex authored and hjmjohnson committed Feb 20, 2020
1 parent 445a0d5 commit 808cd8b
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -137,8 +137,10 @@ TEST(RelabelComponentImageFilter, big_zero)
using PixelType = unsigned short;
using ImageType = itk::Image<PixelType, Dimension>;

auto image = ImageType::New();
image->SetRegions(typename ImageType::RegionType({ 512, 512, 512 }));
auto image = ImageType::New();
typename ImageType::RegionType region;
region.SetSize({ { 512, 512, 512 } });
image->SetRegions(region);
image->Allocate(true);

auto filter = itk::RelabelComponentImageFilter<ImageType, ImageType>::New();
Expand Down

0 comments on commit 808cd8b

Please sign in to comment.