[Insight-users] Problem with FloodFilledFunctionConditionalConstIterator

Luis Ibanez luis . ibanez at kitware . com
Wed, 02 Jul 2003 16:27:41 -0400


Hi Mathias,


Thanks for pointing this out.

The code in

  FloodFilledFunctionConditionalConstIterator::InitializeIterator()

has been modified according to your suggestion.

The tempRegion is now equal to the LargestPossibleRegion().
a CVS update should give you the new version.


Please let us know if you find further problems,


Regards,


    Luis


---------------------
Mathias Seitel wrote:
> Hello,
> 
> I'm applying a connected threshold segmentation to a volume 
> (256x256x16). For testing purposes I extract one slice, say #12, of the 
> volume, using ExtractImageFilter. The slice has an index of (0, 0, 12) 
> and a size of (256, 256, 1). For the region growing algorithm I add a 
> seed point at (150, 100, 12).
> 
> FloodFilledFunctionConditionalConstIterator::InitializeIterator() 
> creates a temporary image with the same size as the original image but 
> an index of (0, 0, 0). A set pixel
> method called later on this image however uses the original seed (z = 
> 12) and thus calculates a wrong offset, which results in a runtime error.
> 
> With the following lines added to InitializeIterator() everything seems 
> to work fine (at least in my case):
> 
>  IndexType imageIndex = m_Image->GetLargestPossibleRegion().GetIndex();
>  tempRegion.SetIndex( imageIndex );
> 
> Regards,
> Mathias
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk . org
> http://www . itk . org/mailman/listinfo/insight-users
>