[vtkusers] 2D Surface Plot - how to get "outlines"?

Johnson, Mike (IS) michael.l.johnson at ngc.com
Mon Feb 15 12:48:31 EST 2010


Hi all!  VTK newbie here.  I work on an application that plots various
data to a normal Wndows bitmap (lines, circles, etc)  I am now using VTK
to generate a surface plot for a set of data that needs to be plotted to
the bitmap.  This means I am not using any kind of VTK rendering engine
or OpenGL or anything like that.  Also note that this is all in 2D
space, so probably much simpler than what most of the folks deal with
here on a day-to-day basis :-)  Here's how my pipeline looks:

Structured points -> Threshold -> Geometry Filter -> Poly Data Mapper

(The structured points is basically the "grid of data points" which the
geometry filter and poly data mapper generate poly data from.)

I then take the output polys from the poly data mapper and "draw" those
on my bitmap using plain GDI calls in Windows.  This all works well.
However, my problem now is that my data ends up generating around
250,000 small "squares"  (seems to be one square per data point; my grid
is around 500x500).  Since I am not using any kind of
hardware-accelerated rendering pipeline, it takes quite a while to
render these squares.  In my object, lots of the squares sitting next to
each other have the same data value (and hence the same rendering
color), so I was hoping that there would be some way to "combine" the
adjacent squares of the same color into larger polygons so that I can
decrease the # of polygons I must render from ~250,000 to a much smaller
#.  Or is there some way to tell VTK to give me the traces of the
outlines of the areas with the same color?  In general, I am trying to
vastly reduce the # of polygons to draw in order to speed up the
rendering of my bitmap, yet still keeping the same representation (ie, I
don't want it to lose any detail).  Any suggestions?

Thanks in advance,
Mike Johnson



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100215/c1ea64a7/attachment.htm>


More information about the vtkusers mailing list