<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Thank John for your reply.<div><br></div><div>Yes ,I use &#39;vtkDecimate&#39; filter after generating mesh.</div>
<div>But the problem is ,sometimes &#39;vtkVoxelContoursToSurfaceFilter&#39; crash .May be because the dimensions of vtkPolyData are too large to handle.(as my contour data x,y range is 1000x1000 and about 200 slices on Z axis,and has lots of nodes as seen in the images)</div>
<div>I thought there is any way/filter to optimize vtkPolyData before sending to &#39;vtkVoxelContoursToSurfaceFilter&#39;.</div><div><br></div><div>Thanks </div></span><br><div class="gmail_quote">On 22 October 2010 12:45, John Haiducek <span dir="ltr">&lt;<a href="mailto:jhaiduce@gmail.com">jhaiduce@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">After creating the mesh, you can pass it to vtkDecimate or<br>
vtkDecimatePro to reduce the number of triangles. You may need to first<br>
run it through vtkTriangleFilter since the decimate filters don&#39;t work<br>
on quads.<br>
<br>
John Haiducek<br>
<div><div></div><div class="h5"><br>
On Fri, 2010-10-22 at 10:09 +0900, Ashika Umanga Umagiliya wrote:<br>
&gt; Anyone ..please?<br>
&gt;<br>
&gt; On 20 October 2010 12:20, Ashika Umanga Umagiliya<br>
&gt; &lt;<a href="mailto:aumanga@biggjapan.com">aumanga@biggjapan.com</a>&gt; wrote:<br>
&gt;         Greetings all,<br>
&gt;<br>
&gt;<br>
&gt;         We generate contour data using a seperate contour detecting<br>
&gt;         algorithm and use &quot;vtkVoxelContoursToSurfaceFilter&quot; to<br>
&gt;         generate the mesh.<br>
&gt;         Source image size is around 1000x1000 pixels.<br>
&gt;         Please refer image at - <a href="http://oi55.tinypic.com/2e2f2xd.jpg" target="_blank">http://oi55.tinypic.com/2e2f2xd.jpg</a> .<br>
&gt;<br>
&gt;<br>
&gt;         So,the maximum x,y coordinates of contour data is also in the<br>
&gt;         range 1000x1000.<br>
&gt;         As see in the image at - <a href="http://oi51.tinypic.com/4lt9c3.jpg" target="_blank">http://oi51.tinypic.com/4lt9c3.jpg</a> ,<br>
&gt;         , every small circle is added as a &quot;vtkPoint&quot; when generating<br>
&gt;         &quot;vtkPolyData&quot;.<br>
&gt;<br>
&gt;<br>
&gt;         At first vtk could not generate mesh and crashed .<br>
&gt;         So I divide original node x,y data by 5 (scaled down by 5)<br>
&gt;         before sending to  &quot;vtkPoints.SetPoint()&quot;.<br>
&gt;<br>
&gt;<br>
&gt;         Still the generated mesh has huge number of triangles.<br>
&gt;         Here is the genereated mesh -<br>
&gt;         <a href="http://oi51.tinypic.com/98soib.jpg" target="_blank">http://oi51.tinypic.com/98soib.jpg</a><br>
&gt;         Wireframe of the mesh  - <a href="http://oi51.tinypic.com/r7ly10.jpg" target="_blank">http://oi51.tinypic.com/r7ly10.jpg</a><br>
&gt;         Zoomed in -  <a href="http://oi53.tinypic.com/r08k07.jpg" target="_blank">http://oi53.tinypic.com/r08k07.jpg</a><br>
&gt;<br>
&gt;<br>
&gt;         My question is ,is there a way to produce the optimized number<br>
&gt;         of triangles for the mesh ? ()<br>
&gt;         Our target image range is from 512x512 to 2000x2000. (that<br>
&gt;         is,counter )<br>
&gt;         Any tips of adjusting the best triangle count depend of the<br>
&gt;         image size?<br>
&gt;<br>
&gt;<br>
&gt;         Thanks in advance,<br>
&gt;         umanga<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; 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>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
<br>
<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>
</blockquote></div><br>