<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 'vtkDecimate' filter after generating mesh.</div>
<div>But the problem is ,sometimes 'vtkVoxelContoursToSurfaceFilter' 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 'vtkVoxelContoursToSurfaceFilter'.</div><div><br></div><div>Thanks </div></span><br><div class="gmail_quote">On 22 October 2010 12:45, John Haiducek <span dir="ltr"><<a href="mailto:jhaiduce@gmail.com">jhaiduce@gmail.com</a>></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'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>
> Anyone ..please?<br>
><br>
> On 20 October 2010 12:20, Ashika Umanga Umagiliya<br>
> <<a href="mailto:aumanga@biggjapan.com">aumanga@biggjapan.com</a>> wrote:<br>
> Greetings all,<br>
><br>
><br>
> We generate contour data using a seperate contour detecting<br>
> algorithm and use "vtkVoxelContoursToSurfaceFilter" to<br>
> generate the mesh.<br>
> Source image size is around 1000x1000 pixels.<br>
> Please refer image at - <a href="http://oi55.tinypic.com/2e2f2xd.jpg" target="_blank">http://oi55.tinypic.com/2e2f2xd.jpg</a> .<br>
><br>
><br>
> So,the maximum x,y coordinates of contour data is also in the<br>
> range 1000x1000.<br>
> As see in the image at - <a href="http://oi51.tinypic.com/4lt9c3.jpg" target="_blank">http://oi51.tinypic.com/4lt9c3.jpg</a> ,<br>
> , every small circle is added as a "vtkPoint" when generating<br>
> "vtkPolyData".<br>
><br>
><br>
> At first vtk could not generate mesh and crashed .<br>
> So I divide original node x,y data by 5 (scaled down by 5)<br>
> before sending to "vtkPoints.SetPoint()".<br>
><br>
><br>
> Still the generated mesh has huge number of triangles.<br>
> Here is the genereated mesh -<br>
> <a href="http://oi51.tinypic.com/98soib.jpg" target="_blank">http://oi51.tinypic.com/98soib.jpg</a><br>
> Wireframe of the mesh - <a href="http://oi51.tinypic.com/r7ly10.jpg" target="_blank">http://oi51.tinypic.com/r7ly10.jpg</a><br>
> Zoomed in - <a href="http://oi53.tinypic.com/r08k07.jpg" target="_blank">http://oi53.tinypic.com/r08k07.jpg</a><br>
><br>
><br>
> My question is ,is there a way to produce the optimized number<br>
> of triangles for the mesh ? ()<br>
> Our target image range is from 512x512 to 2000x2000. (that<br>
> is,counter )<br>
> Any tips of adjusting the best triangle count depend of the<br>
> image size?<br>
><br>
><br>
> Thanks in advance,<br>
> umanga<br>
><br>
</div></div>> _______________________________________________<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>
<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>