[vtkusers] vtkMarchingSquares outputs many 2-point lines

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Mon Sep 9 20:34:57 EDT 2002


Ive never done this... but I think its time for a 'walk on the wild side'
of vtk, check out vtkStripper...
   Dave Pont



|--------+--------------------------------->
|        |          Jeremy Winston         |
|        |          <winston at cat.rpi.edu>  |
|        |          Sent by:               |
|        |          vtkusers-admin at public.k|
|        |          itware.com             |
|        |                                 |
|        |                                 |
|        |          10/09/2002 12:00       |
|        |                                 |
|--------+--------------------------------->
  >------------------------------------------------------------------------------------------------------------|
  |                                                                                                            |
  |      To:     VTK Users <vtkusers at public.kitware.com>                                                       |
  |      cc:                                                                                                   |
  |      Subject:     [vtkusers] vtkMarchingSquares outputs many 2-point lines                                 |
  >------------------------------------------------------------------------------------------------------------|




VTK Congnoscenti,
     I am using vtkPolyDataWriter to output to a
file the results of vtkMarchingSquares on an image.
It works OK, but it seems that MarchingSquares
generates a whole bunch of 2-point lines instead of
a single multi-point line for a given contour.  E.g.,

   # vtk DataFile Version 3.0
   vtk output
   ASCII
   DATASET POLYDATA
   POINTS 3 float
   ...
   LINES 2 6
   2 0 1
   2 1 2

instead of

   # vtk DataFile Version 3.0
   vtk output
   ASCII
   DATASET POLYDATA
   POINTS 3 float
   ...
   LINES 1 4
   3 0 1 2

is there any way to get MarchingSquares to figure out
(via connectivity) that each of the 2-point lines is
part of a single multi-part line?  Or is there a filter
that will do this?

I can write my own code to do it, but I don't want to
reinvent the wheel if I don't have to.

Thanks,
-Jeremy
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers







More information about the vtkusers mailing list