[Insight-developers] FloodFill Iterator : Stack vs Queue

Joshua Cates cates@sci.utah.edu
Wed, 2 Apr 2003 13:03:48 -0700 (MST)


Hi Luis, et al.

Are the flood fill algorithms multithreaded?  If so, it would be
worthwhile to investigate the memory allocation strategies of STL linked
list implementations for possible problems like heap-contention.

Josh.

______________________________
 Josh Cates			
 School of Computer Science	
 University of Utah
 Email: cates@sci.utah.edu
 Phone: (801) 587-7697
 URL:   http://www.sci.utah.edu/~cates


On Wed, 2 Apr 2003, Luis Ibanez wrote:

> 
> Hi,
> 
> As we discussed in one of the recent Tcons, the FloodFill
> iterator is using the STL stack container for holding the
> pixels to be visited.
> 
> However,  the queue is more appropriate for this task
> 
> 
> Andy Cedilnik just made a very convincing test of the
> advantge of using the Queue instead of the Stack.
> 
> His test is a python script that implements both
> approaches for flood fill and display their evolution.
> 
> The test prints out both the computing time and the
> maximum depth of the container (queue or stack).
> 
> 
> Andy's  script is attached.
> 
> I'll give it a shot at replacing the std::stack container with
> the std::queue container in the itkFloodFill iterator.
> 
> 
>     Luis
> 
> 
> BTW
> Andy is joking about rewriting ITK in Python,
> at least I think it was a joke...    :-)
>