Skip to content

Commit

Permalink
BUG: CleanUp did not compile
Browse files Browse the repository at this point in the history
Fixed that, and called it from rleStats to make sure it compiles in the future.
  • Loading branch information
dzenanz committed Jan 25, 2021
1 parent 7773480 commit 6a99edc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
13 changes: 5 additions & 8 deletions include/itkRLEImage.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,12 @@ RLEImage<TPixel, VImageDimension, CounterType>::CleanUp() const
{
return;
}
#ifndef __GNUC__
# pragma omp parallel for
#endif
for (CounterType z = 0; z < m_Buffer.size(); z++)

itk::ImageRegionConstIterator<BufferType> it(m_Buffer, m_Buffer->GetBufferedRegion());
while (!it.IsAtEnd())
{
for (CounterType y = 0; y < m_Buffer[0].size(); y++)
{
CleanUpLine(m_Buffer[z][y]);
}
CleanUpLine(it.Get());
++it;
}
}

Expand Down
3 changes: 3 additions & 0 deletions test/rleStats.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ main(int argc, char * argv[])
inConv->Update();
myRLEImage::Pointer test = inConv->GetOutput();
std::cout << test;
std::cout << "Invoking CleanUp() method\n";
test->CleanUp();
std::cout << test;
}
catch (itk::ExceptionObject & error)
{
Expand Down

0 comments on commit 6a99edc

Please sign in to comment.