[Insight-developers] FloodFilledSpatialFunctionIterator

Stephen R. Aylward aylward@unc.edu
Tue, 05 Jun 2001 13:28:22 -0400


Sounds like a great idea.

What about having it derive from a class hierarchy like

			SpatialIterator
           -------------------+-----------------------
           |                                         |
      FilledSpatialIterator            SurfaceSpatialIterator
    |------+-----------------------|
FunctionFilledSpatialIterator  MaskFilledSpatialIterator

Or something general like that...
	- These can be used to generate a mesh from a mask or
function...cool...

s

Damion Shelton wrote:
> 
> Hi all...
> 
> I'm working on a new iterator class and was wondering if anyone has any
> preliminary feedback on the concept.
> 
> Essentially, FloodFilledSpatialFunctionIterator allows you to iterate over
> any group of contiguous pixels (with the n-dimensional equivalent of
> 4-connectivity) that can be defined as "inside" a spatial function. The
> group of pixels is established by doing a conventional flood-fill given a
> known starting index. The flood fill does not ensure a particular order of
> traversal of pixels in the group, which is why I hesitate to call it a
> region, but does allow you to iterate over an arbitrarily complex continuous
> shape.
> 
> The iterator stores an internal linked list of the indices identified by the
> fill operation, and ++ operations on FloodFilledSpatialFunctionIterator
> actually iterate this internal list.
> 
> Right now, the steps to create and set up the iterator look like:
> 
>   typedef itk::FloodFilledSpatialFunctionIterator<TImageType,
> TSphereFunctionType> TSphereItType;
>   TSphereItType sfi = TSphereItType(sourceImage, spatialFunc);
> 
>   TImageType::IndexType seedPos;
>   const unsigned long pos[] = {15,15,15};
>   seedPos.SetIndex(pos);
> 
>   sfi.SetSeedPosition(seedPos);
>   sfi.BuildIterator();
> 
> The iterator can then be used like a "normal" iterator.
> 
> Any comments?
> 
> Thanks,
> 
> -Damion-
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers

-- 
===============================================
Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://www.cs.unc.edu/~aylward
aylward@unc.edu
(919) 966-9695