[vtkusers] vtkEdgeFollower?

m.petrone at cineca.it m.petrone at cineca.it
Fri Sep 22 05:22:24 EDT 2000

Sven Prevrhal wrote:

> Hello,
> I'd like to have a threshold-based edge follower with a seed point. Is
> there something similar available? If not, how would I write it?
> I guess derived from vtkImageToPolyDataFilter since the output would be
> ..hmmm.. vtkPoints, as part of poly data?

Some times ago I did something similar with this pipeline:

 vtkImageThreshold thresh
 thresh ThresholdByUpper $myvars(thresh)
 thresh ReplaceInOn
 thresh ReplaceOutOn
 thresh SetOutValue 0
 thresh SetInValue 255
 thresh SetInput [clipper GetOutput]

 vtkMarchingSquares contour
 contour SetInput [thresh GetOutput]
 contour SetNumberOfContours 1
 contour SetValue 1 255

 vtkPolyDataConnectivityFilter connect
 connect SetExtractionModeToLargestRegion
 connect SetInput [contour GetOutput]

 vtkCleanPolyData cleaner
 cleaner SetInput [connect GetOutput]

Where clipper was a vtkClipImage applied to the input image. I used this to extract contours
of "flints". In that case flints were putted over a dark background, which allowed to have a
good precision in reproducing contours from the initial image. The obtained polydata was
composed of one or more cells of lines, from which I tried to extract invariant moments of the

-------------- next part --------------
A non-text attachment was scrubbed...
Name: m.petrone.vcf
Type: text/x-vcard
Size: 344 bytes
Desc: Card for 
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20000922/c91d5656/attachment.vcf>

More information about the vtkusers mailing list