[Insight-users] connected components as seeds for fastmarching

Lydia Ng lng at insightful . com
Thu, 19 Jun 2003 14:11:55 -0700


Hi Tim,

If what you want to do is to initialize the level set so that the zero
level set corresponds to the boundary between the zero and non-zero
pixels in your binary image then you could try
ReinitializeLevelSetImageFilter filter.

First you need to BinaryThresholdImageFilter your binary so that your
non-zero pixels correspond to -0.5 and the zero pixels to 0.5

Then,

   typedef typename itk::ReinitializeLevelSetImageFilter<
                                             RealImageType >
                                                     DistanceFilterType;
   m_DistanceFilter =3D DistanceFilterType::New();
   m_DistanceFilter->SetInput( inputBinaryImage );
   m_DistanceFilter->NarrowBandingOn();
   m_DistanceFilter->SetNarrowBandwidth( 10 );

   m_DistanceFilter->Update();


You should be able to use the output of m_DistanceFilter as the input to
the ShapeDetectionLevelSetImageFilter.


Hope this helps.

Lydia


> -----Original Message-----
> From: Tim Rudge [mailto:tjr34 at cam . ac . uk]
> Sent: Thursday, June 19, 2003 1:08 PM
> To: Insight List
> Subject: [Insight-users] connected components as seeds for
fastmarching
>=20
> Hi again,
>=20
> I'd like to have a filter that given a binary image will produce a
node
> for
> each connected group of non-zero voxels (so that I can pass them as
seeds
> to fastmarchingimagefilter to produce a distance map for the
> ShapeDetectionLevelSetImageFilter).
>=20
> I have tried simply passing each non-zero location as a seed with
initial
> distance of zero - this gives wierd unexpected results, perhaps
because
> some of them are neighbouring each other? I figure if I only pass a
single
> seed node for each connected group this will work? Or perhaps only
non-
> zero
> points which have a zero neighbour and are therefore on the border of
a
> non-zero region?
>=20
> If this is a reasonable approach, how can I implement this, pref.
without
> writing my own filter from scratch.
>=20
> The background to this is that we have confocal microscope images
where
> the
> regions we want are dark, seperated by bright boundaries. I want to
use a
> threshold to find points in the dark regions and start the level sets
> around these points.
>=20
> Many thanks,
>=20
> Tim
>=20
> Tim Rudge
> ---------
> Cellular Development Lab
> Dept. Plant Sciences
> Cambridge University
> _______________________________________________
> Insight-users mailing list
> Insight-users at www . itk . org
> http://www . itk . org/mailman/listinfo/insight-users