[Insight-users] FW: FloodFilledFunctionConditionalConstIterator neighborhood

Hauke Heibel heibel at cs.tum.edu
Sun Nov 25 11:24:30 EST 2007


Hi Luis,

I have now a version that uses a ShapedNeighborhoodIterator. Per default the
FloodFilledFunctionConditionalConstIterator performs iteration in the same
way as the original iterator though it offers now methods to Set/Get a
parameter called m_FullyConnected. I used the implementation of
setConnectivity(...) from itkConnectedComponentAlgorithm.h to setup the
ShapedNeighborhoodIterator.

The new code is attached to this mail and should integrate and work out of
the box though I have to mention that I did not check, if by chance the
order in which points are processed changed - this might be the case if the
ShapedNeighborhoodIterator computes the offset value in a different way than
the old filter.

By the way, is the only way to make even such minor changes to existing code
become integrated into the repository by filing a complete Journal
Publication? If that really is the case I will follow the rules and do it
but I was just wondering if e.g. a feature request on mantis would already
be sufficient (I could attach the code as well as a CVS patch).

Best regards,
Hauke

-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: Sunday, November 25, 2007 3:27 PM
To: Hauke Heibel
Cc: insight-users at itk.org
Subject: Re: [Insight-users] FW: FloodFilledFunctionConditionalConstIterator
neighborhood


Hi Hauke,

Yes the FloodFilledFunctionConditionalConstIterator uses 4-connectivity
when used in 2D images, and, in general, it uses face-connectivity in
N-D images.

If you wanted to modify this behavior, the key place in the code is
in lines 175-178 of


   Insight/Code/Common/
      itkFloodFilledFunctionConditionalConstIterator.txx


It is suggested the code, that the existing for loop could be replaced
with a ShapeNeighborhoodIteration, in order to provide flexibility
in the connectivity.


     That will make an interesting course project,
     and...
     a nice paper for the Insight Journal   :-)



   Regards,


     Luis


-----------------
Hauke Heibel wrote:
> Hi everybody,
> 
>  
> 
> A colleague and me are wondering if it is true that the 
> FloodFilledFunctionConditionalConstIterator uses a hard coded 
> 4-neighborhood (in 2D)?
> 
>  
> 
> If that is the case does anybody already have a version at hand in which 
> the neighborhood can be defined in a more generic way?
> 
>  
> 
> Any help is highly appreciated!
> 
>  
> 
> Best regards,
> 
> Hauke
> 
>  
> 
> p.s. I hope the message will not arrive twice since I sent it through 
> the wrong account in the beginning.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: neighbor.zip
Type: application/x-zip-compressed
Size: 2258 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20071125/76810cad/neighbor.bin


More information about the Insight-users mailing list