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

Darshan Pai darshanpai at gmail.com
Mon Feb 15 13:42:30 EST 2010


Not sure but maybe you can try to use vtkAppendPolyData to append common
polydatas together . This should be much faster to render than rendering one
polydata at a time

On Mon, Feb 15, 2010 at 12:48 PM, Johnson, Mike (IS) <
michael.l.johnson at ngc.com> wrote:

>  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 J  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*
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100215/d26166e4/attachment.htm>


More information about the vtkusers mailing list