[vtkusers] accuracy of vtkContourFilter

Lisa Avila lisa.avila at kitware.com
Thu Apr 21 14:30:32 EDT 2005


Hi,

The contouring method is generating triangles based on linear interpolation 
along each edge of the cell. The isosurface function is solving the cubic 
equation (defined using trilinear interpolation and the cell scalar values) 
along the ray.

Looking at the example you sent (just looking at the numbers - I haven't 
rendered the data) it seems the issue is along the diagonal between the 120 
and the 104 values - chances are the contouring method assumes that those 
are two separate surfaces, and when you evaluate the cubic function they 
are actually connected, and hence your topological difference. Unless the 
contouring method samples some interior points (I don't know if any of the 
VTK contouring methods do?) then these two possibilities (one connected 
surface or two disjoint surfaces) are not distinguishable, and the 
contouring method just picks one.


Lisa



At 10:12 AM 4/21/2005, you wrote:

>Hello vtkUsers,
>
>I've been using vtkVolumeRayCastIsosurfaceFunction and vtkContourFilter 
>(as used in the medical examples that come with vtk) to visualize isosurfaces.
>
>More specifically, I've been using vtkStructuredPointsReader to read data 
>from a vtk file with the option of visualising an isosurface either with 
>vtkVolumeRayCastIsosurfaceFunction or with vtkContourFilter (with 
>vtkPolyDataNormals and vtkPolyDataMapper).
>
>The problem I'm facing is that it appears I get different results when I
>visualize the same isosurface with the same data with the two different 
>methods.
>I'm aware that vtkVolumeRayCastIsosurfaceFunction is supposed to be slower 
>but
>more accurate, but it seems that the results are even topologically different.
>
>Since I'm only doing some experiences, I'm using a very simple vtk data file
>with only 8 vertices of a single cube (with STRUCTURED_POINTS) and I visualize
>an isosurface that intersects that cube. I've been using several examples, 
>but
>the ones I see problems were adapted from this IEEE TVCG paper (section 5
>table 2):
>"Improving the Robustness and Accuracy of the Marching Cubes Algorithm
>for Isosurfacing" from Lopes and Brodlie.
>
>I don't have much experience with vtk so I might be doing something wrong...
>it's just that I would expect the result of using vtkContourFilter to be 
>faster
>but not as high-quality as vtkVolumeRayCastIsosurfaceFunction, but i would 
>not
>expect that the isosurfaces resulting from it to be topologically different...
>
>Is there something i'm missing/doing wrong or is this something internal 
>to vtk?
>
>As an example, when i visualize an isosurface of value 100 with this next 
>file,
>I get different isosurfaces.
>
># vtk DataFile Version 1.0
>My testing for cubes!!!
>ASCII
>
>DATASET STRUCTURED_POINTS
>DIMENSIONS 2 2 2
>ASPECT_RATIO 1 1 1
>ORIGIN 0.0 0.0 0.0
>
>POINT_DATA 8
>SCALARS volume_scalars unsigned_char 1
>LOOKUP_TABLE default
>103
>97
>94
>104
>120
>98
>98
>98
>
>thxs in advance,
>
>Sérgio
>
>
>
>----------
><a href="http://www.gamedev.net">GameDev.net Email Service</a> - "Plenty 
>of 1's and 0's"
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the 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/20050421/d78ec3ca/attachment.htm>


More information about the vtkusers mailing list