Skip to content

Commit

Permalink
COMP: Fix gcc4.8 warnings + errors itkContourExtractor2DImageFilter.hxx
Browse files Browse the repository at this point in the history
  • Loading branch information
Leengit authored and N-Dekker committed Mar 14, 2021
1 parent b6a142a commit 396c2a1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ ContourExtractor2DImageFilter<TInputImage>::CreateSingleContour(InputPixelType
const InputOffsetType down{ { 0, 1 } };
const InputOffsetType diag{ { 1, 1 } };

const std::array<InputOffsetType, 4> offsets{ none, right, down, diag };
const std::array<InputOffsetType, 4> offsets{ { none, right, down, diag } };
using Policy = itk::ConstantBoundaryImageNeighborhoodPixelAccessPolicy<InputImageType>;
using NeighborhoodRange = itk::ShapedImageNeighborhoodRange<const InputImageType, Policy>;
NeighborhoodRange neighborhoodRange{ *input, InputIndexType{}, offsets, m_UnusedLabel };
Expand Down Expand Up @@ -299,7 +299,7 @@ ContourExtractor2DImageFilter<TInputImage>::GenerateDataForLabels()
{
allLabels.assign(inputRange.cbegin(), inputRange.cend());
std::sort(allLabels.begin(), allLabels.end());
const LabelsConstIterator last{ std::unique(allLabels.begin(), allLabels.end()) };
const LabelsIterator last{ std::unique(allLabels.begin(), allLabels.end()) };
allLabels.erase(last, allLabels.end());
}

Expand Down Expand Up @@ -362,7 +362,7 @@ ContourExtractor2DImageFilter<TInputImage>::GenerateDataForLabels()
// Build the extended regions from the bounding boxes
for (InputPixelType label : allLabels)
{
const BoundingBoxType & bbox{ labelBoundingBoxes[label] };
const BoundingBoxType & bbox = labelBoundingBoxes[label];
// Compute a extendedRegion that includes one-pixel border on all
// sides. However, we don't want the 3-by-3 SquareIterator to be centered
// in the bottom row or right column of this one-pixel-extended region
Expand All @@ -384,7 +384,7 @@ ContourExtractor2DImageFilter<TInputImage>::GenerateDataForLabels()
mt->ParallelizeArray(
0,
allLabels.size(),
[this, &allLabels, &input, &labelsRegions, totalPixelCount, &labelsContoursOutput](SizeValueType i) {
[this, &allLabels, &input, &labelsRegions, totalPixelCount, &labelsContoursOutput](SizeValueType i) -> void {
const InputPixelType label{ allLabels[i] };
this->CreateSingleContour(label, input, labelsRegions[label], totalPixelCount, labelsContoursOutput[label]);
},
Expand Down

0 comments on commit 396c2a1

Please sign in to comment.