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<br><br><div class="gmail_quote">On Mon, Feb 15, 2010 at 12:48 PM, Johnson, Mike (IS) <span dir="ltr"><<a href="mailto:michael.l.johnson@ngc.com">michael.l.johnson@ngc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<p dir="LTR"><span lang="en-us"><font face="Calibri">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</font></span><span lang="en-us"> <font face="Wingdings" size="3">J</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font face="Calibri"> Here’s how my pipeline looks:</font></span></p>
<p dir="LTR"><span lang="en-us"><font color="#ff0000" face="Calibri">Structured points -> Threshold -> Geometry Filter -> Poly Data Mapper</font></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">(The structured points is basically the “grid of data points” which the geometry filter and poly data mapper generate poly data from.)</font></span></p>
<p dir="LTR"><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"><font face="Calibri">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 2</font></span><span lang="en-us"><font face="Calibri">5</font></span><span lang="en-us"><font face="Calibri">0,000 small “squares” </font></span><span lang="en-us"> <font face="Calibri">(seems to be one square per data point; my grid is around 500x500). </font></span><span lang="en-us"> <font face="Calibri">Since I am not using any kind of hardware-accelerated rendering pipeline, it takes quite a while to render these squares. </font></span><span lang="en-us"> <font face="Calibri">In my object, lots of the squares sitting next to each other have the same data value (and hence the same rendering color), so</font></span><span lang="en-us"> <font face="Calibri">I was hoping that there would be some way to</font></span><span lang="en-us"> <font face="Calibri">“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?</font></span><span lang="en-us"></span></p>
<p dir="LTR"><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><font face="Arial" size="2">Thanks in advance,</font></span><span lang="en-us"></span><span lang="en-us"></span><span lang="en-us"><br>
</span><span lang="en-us"><b></b></span><span lang="en-us"><b></b></span><span lang="en-us"><b></b></span><b><span lang="en-us"><font face="Arial" size="2">Mike Johnson</font></span></b><span lang="en-us"></span><span lang="en-us"><br>
</span></p>
<p dir="LTR"><span lang="en-us"></span></p>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>