[Insight-users] Re: Specifying connectivity while using confidence connected image filter
cspl
affable@hd2.dot.net.in
Sun, 8 Dec 2002 16:36:42 +0530
Dear Mr.Luis,
Thnak U for your reply.Here are the few lines what I understood about the
ConfidenceConnectImagefilter class and floodfill iterator.Tell me whether I
am correct or not?
ConfidenceConnectImagefilter extracts a connected set of pixels whose pixel
intensities are consistent with the pixel statistics of a seed point. The
mean and variance across a neighborhood (8-connected, 26-connected, etc.)
are calculated for a seed point. Then pixels connected to this seed point
whose values are within the confidence interval for the seed point are
grouped. The width of the confidence interval is controlled by the
"Multiplier" variable (the confidence interval is the mean plus or minus the
"Multiplier" times the standard deviation).
Connectivity problem comes into picture while calculating mean and variance.
ConfidenceConnectImageFilter class uses following classes internally.
itkFloodFilledImageFunctionConditionalIterator.h
itkFloodFilledImageFunctionConditionalConstIterator.h
itkBinaryThresholdImageFunction.h
itkMeanImageFunction.h
Calculate the mean value in the neighborhood of a pixel.
Calculate the mean pixel value over the standard 8, 26, etc. connected
neighborhood.
This class is using the itkConstSmartNeighborhoodIterator to create kernel
and calculating mean based on that.
In the floodfilliterator i didn't found any lines related to connectivity to
modify.
Could u please help in modifying the code.
This is what i understood after reading the documentation and code.
If I am wrong then sorry and please correct me.
Regards,
Valli.
----- Original Message -----
From: "Luis Ibanez" <luis.ibanez@kitware.com>
To: "cspl" <affable@hd2.dot.net.in>
Cc: <insight-users@public.kitware.com>
Sent: Saturday, December 07, 2002 08:34 PM
Subject: Re: Specifying connectivity while using confidence connected image
filter
>
> Hi Valli,
>
> The correct connectivities in 3D are
> 12-connectedness which reproduces the
> neighborhood structure of the FCC grid,
> and the 14-connectedness which reproduces
> the neighborhood structure of the BCC grid.
>
> You may replace the current 6-connectedness
> with a 26-connectedness but the second one
> will have the complementary problems of the
> first one.
>
> The ConfidenceConnected filter uses internally a
> FloodFill iterator. The iterator uses a 2N
> conectivity (4-connectedness in 2D, 6-connectedness
> in 3D, 8-connectedness in 4D...)
>
> At the moment there is no a direct way to modify
> the connectivity in the iterator.
>
> An option you may want to consider is to write your
> own flood fill iterator by modifying the code in the
> FloodFill.
>
> You probably only want to do this for 3D...
>
> Please let us know if you need any details on how
> to modify the iterator.
>
>
> Thanks
>
>
> Luis
>
>
> ==========================================
>
> cspl wrote:
>
> > Dear Mr. Luis,
> >
> >
> >
> > Thanks for your help in implementing the Fillholes algorithm.
> >
> > We used confidence connectedImageFilter on your suggestion. We find that
> > it is working fine for an image. But when we use a volume of about
> > 256X256x120 the ouput is not correct and the process is very slow.
> >
> >
> >
> > I feel the problem is with connectivity.
> >
> > For a slice, identifying 4 /8 connected pixels could be done easily
> > using the above filter.
> >
> > But for a volume, it should identify 6 / 26 connected pixels which I
> > feel the class is not able to do.
> >
> > How to specify the connectivity when we use the confidence
> > connectedImage filter.
> >
> >
> >
> >
> >
> > Regards,
> >
> > Valli
> >
>
>
>
>
>