Skip to content

Commit

Permalink
BUG: In SLICFilter address second location of same value write
Browse files Browse the repository at this point in the history
  • Loading branch information
blowekamp authored and hjmjohnson committed Jul 10, 2024
1 parent 98dece1 commit 7acfb08
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ SLICImageFilter<TInputImage, TOutputImage, TDistancePixel>::SingleThreadedConnec

std::vector<IndexType> indexStack;

// Next we relabel the remaining regions ( defined by having the a
// Next we relabel the remaining regions ( defined by having the
// label id ) not connected to the SuperPixel centroids. If the
// region is larger than the minimum superpixel size than it gets
// a new label, otherwise it just gets the previously encountered
Expand Down Expand Up @@ -791,7 +791,10 @@ SLICImageFilter<TInputImage, TOutputImage, TDistancePixel>::RelabelConnectedRegi
indexStack.clear();
indexStack.push_back(seed);
m_MarkerImage->SetPixel(seed, 1);
outputImage->SetPixel(seed, outputLabel);
if (requiredLabel != outputLabel)
{
outputImage->SetPixel(seed, outputLabel);
}

size_t indexStackCount = 0;
while (indexStackCount < indexStack.size())
Expand Down

0 comments on commit 7acfb08

Please # to comment.