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