[vtkusers] Number of points in the surface generated from vtkContourFilter

Yang, Jinzhong jinzhong76 at gmail.com
Fri Aug 7 10:41:08 EDT 2009


Hi Bryn,

Thank you for your detailed information. I just found the points are much
denser than I expected. My input is an image and the resolution is not high
actually. By the way, I set the resolution of the image in the unit of
centimeter. Is the default unit of resolution for the input image the
millimeter?

Thanks,
-Jinzhong


-----Original Message-----
From: Bryn Lloyd [mailto:blloyd at vision.ee.ethz.ch] 
Sent: Friday, August 07, 2009 12:51 AM
To: Yang, Jinzhong
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Number of points in the surface generated from
vtkContourFilter

No, the point density of the output of contour filter depends on the 
density of it's input (image/mesh/what is your input?).

For images it is running marching cubes (squares), and similar 
algorithms for other input such as unstructured meshes. The edges of the 
input grid are checked for a sign change between the two end points. If 
there is a sign change the edge is bisected and a new point is added. 
These points define the resulting contour surface.

You would have reduce the resolution of the input (resample if it is an 
image), or as you have done use a decimation filter on the output.

/Bryn




Yang, Jinzhong wrote:
> Hi,
> 
> I just wonder if there is any way to control the number of points in the 
> surface generated from vtkContourFilter. I use vtkContourFilter to 
> generate one surface, but the surface has too many points. Currently I 
> use vtkDecimationPro to reduce the number of points, but this requires 
> extra time.
> 
> Thanks a lot if you can help.
> 
>  
> 
> -Jinzhong
> 
>  
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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


-- 
-------------------------------------------------
Bryn Lloyd
Computer Vision Laboratory
ETH Zürich, Sternwartstrasse 7, ETF C110
CH - 8092 Zürich, Switzerland
Tel: +41 44 63 26668
Fax: +41 44 63 21199
-------------------------------------------------




More information about the vtkusers mailing list