[Insight-developers] itkShapeDetectionLevelSetFilter
Lydia Ng
lng@insightful.com
Mon, 4 Feb 2002 12:45:07 -0800
Dan,
These are very good questions.
The need for a large number of iterations (300-1000) is the nature of
PDE
algorithms. If you set your TimeStepSize too high there is the
danger of running into numerical unstabilities.
One way to speed things up is to use a narrow band approach where
only grid points near the front are updated. The narrow band approached
has been implementated and used in the example I sent you.
Another way might be the sparse-field approach which the Utah
folks are currently implementing.
In the literature, typically people compute the level set using
a smaller grid. I.e. downsample your 512x512 image to a grid size
of 256x256 or 128x128.
With TimeStepSize=3D3,Iterations=3D450,NarrowBandWidth=3D5.0,=20
current implementation takes approx 167 sec (500MHz,VC++).
There are several tweaks in the implementation that can be made but
it's a good question whether or not one can get that down to
"interactive" speed.
=20
Does anyone have any experience of with other implementation
of Malladi et al type algorithm. If so, what was the computational
speed?
All in all, I think the downsampling will probably give you the
fastest speedup.
-Lydia
Reference:
Malladi, R., Sethian, J.A., and Vemuri, B., Shape Modeling with Front
Propagation: A Level Set Approach , IEEE Trans. on Pattern Analysis and
Machine Intelligence, Vol. 17, No. 2, February 1995.=20
=20
> -----Original Message-----
> From: Blezek, Daniel J (CRD) [mailto:blezek@crd.ge.com]
> Sent: Monday, February 04, 2002 11:28 AM
> To: Lydia Ng; insight-developers@public.kitware.com
> Subject: RE: [Insight-developers] itkShapeDetectionLevelSetFilter
>=20
>=20
> Lydia,
>=20
> Thank you for the example. I used a TimeStepSize of 3, and=20
> 450 iterations to get the same
> segmentation that you got in my example. The documentation=20
> is a little slim on how to choose these
> parameters effectively. The algorithm seems to need a large=20
> number of iterations to produce any
> useful segmentation, even with the band set quite small.
>=20
> Is there some way of speeding this algorithm up? I think=20
> it has great potential for my
> segmentation problem, but it's way to slow for interactive use.
>=20
> Thanks,
> -dan
>=20
> > -----Original Message-----
> > From: Lydia Ng [mailto:lng@insightful.com]
> > Sent: Friday, February 01, 2002 11:00 PM
> > To: insight-developers@public.kitware.com
> > Subject: FW: [Insight-developers] itkShapeDetectionLevelSetFilter
> >=20
> >=20
> > =20
> > Dan, Jim:
> > =20
> > Attached are some results and sample code.
> > =20
> > output-1.png: initial seed point inside the square, after 300 iter.
> > output-2.png: initial seed point in the background, after=20
> 1000 iters.
> > =20
> > Missing/faulty ITK components:
> > =20
> > [1] This algorithm requires a smoothed gradient such as that=20
> > produced by
> > a derivative of Gaussian (DoG) operation. I've updated the docs for
> > ShapeDetectionLevelSetFilter to say this.
> > =20
> > [2] The only filter that I can find that performs a DoG=20
> > operation is the
> > GradientResursiveGaussianImageFilter. However, the output I=20
> > get is a bit
> > strange. The functionality of this filter needs to be validated.
> > =20
> > A workaround for DoG is to first do a Gaussian smooth and=20
> > then take the
> > derivative. I have used DiscreteGaussianImageFilter and
> > GradientImageFilter.
> > =20
> > [3] DiscreteGaussianImageFilter is bit quirky as it won't compile
> > unlesss the input image type is same as the output image type - this
> > seems a bit restrictive + it's not documented.
> > =20
> > My workaround is to cast the input char image to a double image=20
> > ( via CastImageFilter) before calling DisceteGaussianImageFilter.
> > =20
> > [4] There was no ITK component to create an edge image potential.
> > I've just checked one in. The filter is called=20
> > EdgePotentialImageFilter
> > an takes an input a CovariantVector image which represents=20
> > the gradient
> > of an image.
> > =20
> > [5] The output level set needs to be binarized (by=20
> > thresholding at zero)
> > to produce the output segmentation mask. Currently there is=20
> > no ITK that
> > does this. ThresholdImageFilter sets out of range value to=20
> an outside
> > value while in-range values are passed straight through.
> > =20
> > [6] PNGImageIO::Write() doesn't do anything.
> > =20
> > - Lydia
> >=20
> > =20
> >=20
> > -----Original Message-----=20
> > From: Blezek, Daniel J (CRD)=20
> > Sent: Fri 2/1/2002 8:48 AM=20
> > To: 'insight-developers@public.kitware.com'=20
> > Cc:=20
> > Subject: [Insight-developers]
> > itkShapeDetectionLevelSetFilter
> > =09
> > =09
> >=20
> > Hi all,
> > =09
> > I'm trying to figure out exactly how to use
> > the ShapeDetectionLevelSetFilter. I have a small test
> > image that I've enclosed (png format). Can
> > anyone send me an example of how to get the level set
> > code to segment any of the shapes in this image?
> > =09
> > Thanks,
> > -dan
> > =09
> > --
> > Daniel Blezek, Ph.D.
> > blezek@crd.ge.com
> > Visualization and Computer Vision Lab, Imaging
> > Technologies
> > GE Corporate Research & Development
> > =09
> > =09
> > =09
> >=20
> >=20
>=20