[Insight-users] Finding Connctedness

Luis Ibanez luis . ibanez at kitware . com
Mon, 12 Aug 2002 13:46:58 -0400


Hi Suresh,

Just for the record: Both 6 and 26 connectedness are a
ill-defined digital topologies since they lead to an
asymmetrical definition of object and background.

26 connected objects require  6 connected backgrounds and
  6 connected objects require 26 connected backgrounds

When it comes to fully segment a medical image there is
no such thing as "background". We only have tissue classes.
That means that some tissues should be considered 26
connected while others are 6 connected. The choice is totally
arbitrary and there is no way to get it right.

All this is the consequence of the poor choice made early in
the image processing field for using rectilinear grids a
sampling grids.

We should be using hexagonal grids in 2D, and BCC grids in 3D
as has been continously recommended by the mathematical morphology
community.


but...
given that we are now stuck with rectilinear grids here is what
you could do for obtaining 26-connected regions:


The current connected filters in ITK are based on the powerful
itkFloodFillFunctionConditionalIterator.

This iterator visits all the pixels that are connected to a
seed provided by the user.

The neighborhood relationship used in this iterator in 3D is
six connectedness. Note that this is a N-D iterator, so in
general it only looks for the 2N nearest neighbors of a pixel.

It should be relatively easy to modify this iterator in order
to make it visit another neighborhood structure (e.g. 26 in 3D).

You will find the neighborhood related code in lines 98 to 143
of the file:

Insight/Code/Common/itkFloodFilleFunctionConditionalIterator.txx

By creating a variant of this iterator, it will be pretty straight
forward to rebuild any of the region growing filters. (it will be
basically a typedef change since all the walking process is encoded
inside the iterator )

Please let us know if you would like more details in how to
implement this.


Thanks

    Luis


============================================================

suresh kumar buddhavarapu wrote:
> Hi friends,
> 
> I'm working on finding on all connected components within avolume for a 
> specific connectedness 26 or 6 .
> I looked at RegionGrowingFilters. I unable find any clas or function to 
> do it.
> Can you help me...
> 
> Thanks
> 
> suresh
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-users
>