[Insight-users] FloodFilledFunctionConditionalConstIterator

Mathias Seitel mathias . seitel at igd . fhg . de
Mon, 21 Jul 2003 10:18:16 +0200


Hello all,

I came across another bug in 
FloodFilledFunctionConditionalConstIterator. When checking if the new 
index in DoFloodStep() is valid, not only the size but also the index of 
the image should be taken into account, something like

const long int* m_ImageIndex;

InitializeIterator()
{
  //...
  m_ImageIndex = m_Image->GetLargestPossibleRegion().GetIndex().m_Index;
  //...
}

DoFloodStep()
{
  //...
  if ((tempIndex.m_Index[k] < static_cast<long int>(m_ImageIndex[k])) ||
      (tempIndex.m_Index[k] >= static_cast<long int>(m_ImageIndex[k] + 
m_ImageSize[k])))
  {
    //...
  }
  //...
}

Regards,
Mathias