Hi,<br><br>You may want to use vtkContourFilter: It implements an isoline extraction from any type of dataset.<br><br>HTH<br>Jerome<br><br><div class="gmail_quote">2011/7/5 Deij, Menno <span dir="ltr"><<a href="mailto:M.Deij@marin.nl">M.Deij@marin.nl</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<p></p>
<p></p>
<div>
<p class="MsoNormal">Dear vtk-users,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">First a disclaimer: I’m quite new to VTK and this is my first post to the users list.
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m trying to do the following: read in a list of 3D-coordinates representing a wavy surface as a vtkStructuredGrid, color it according to the elevation and show it. The structured grid has dimensions i=50, j=100, k=1 (note that k=1, the
surface is made up of polygons).<u></u><u></u></p>
<p class="MsoNormal">My first attempt was using the following pipeline:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">[vtkStructuredGrid with points having scalar data: elevation] --> [vtkStructuredGridGeometryFilter] --> [vtkPolyDataNormals] --> [vtkPolyDataMapper] -> [vtkActor]
<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">But the result is quite blurred and full of ‘kinks’ between the colored sections (see screenshot_1.png).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">What I want to achieve is something that has smooth/crisp lines along the contourlines, similar to screenshot_2.png. Here the colors change depending on constant elevation. I achieved this picture by cutting the wavy surface using vtkClipPolyData
at 10 different elevations and creating 10 different actors for this (for more clarity see screenshot_3.png).<u></u><u></u></p>
<p class="MsoNormal"><br>
My question is: is there a more simple way to achieve the smooth/crisp lines along contourlines, or is clipping multiple times the only solution? I’ve been trying to do something with vtkMarchingSquares, but this does not act on vtkPolyData only on vtkImageData.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks and best wishes,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Menno<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">PS. I hope the pictures are viewable in the list, if not I can make them available on request.<u></u><u></u></p>
</div>
<p></p>
<p>
</p><table style="width: 475px; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" cols="1">
<tbody>
<tr>
<td colspan="2"><font color="#7d7d7d" face="Arial" size="2"><img src="" align="absMiddle" border="0" height="19" width="60"><img src="" align="bottom" border="0" height="26" width="410"></font></td>
</tr>
<tr>
<td style="min-height: 17px;" colspan="2">
<p><font face="Arial"><font face="Arial" size="2"><font color="#7d7d7d">dr. ir. Menno A. Deij</font></font></font></p>
</td>
</tr>
<tr>
<td style="width: 222px; min-height: 17px;">
<p><span style="font-size: 10pt;"><font face="Arial"><font color="#7d7d7d"></font><span style="color: rgb(125, 125, 125);">Software Engineer</span></font></span></p>
</td>
<td style="width: 252px;"><font face="Arial" size="2"><font color="#7d7d7d"></font></font></td>
</tr>
<tr>
<td><span style="font-size: 10pt;"><font color="#7d7d7d" face="Arial">Maritime Simulation Group</font></span></td>
<td><font face="Arial" size="2"></font></td>
</tr>
</tbody>
</table>
<p>
</p><table style="width: 475px; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" cols="3">
<tbody>
<tr>
<td style="width: 217px;">
<p><font color="#7d7d7d" face="Arial" size="2"></font> </p>
</td>
<td style="width: 139px;">
<p><font color="#7d7d7d" face="Arial" size="2"><b>MARIN</b></font></p>
</td>
<td style="width: 117px;">
<p><font color="#7d7d7d" face="Arial" size="2"></font> </p>
</td>
</tr>
<tr>
<td style="min-height: 17px;"><font color="#7d7d7d" face="Arial" size="2"></font></td>
<td><font color="#7d7d7d" face="Arial" size="2">2, Haagsteeg</font></td>
<td><font color="#7d7d7d" face="Arial" size="2"></font></td>
</tr>
<tr>
<td style="min-height: 17px;"><font face="Arial"><font face="Arial" size="2"><font color="#366092"><font color="#7d7d7d">E</font>
<a href="mailto:M.Deij@marin.nl" title="Click to send email to Deij, Menno" target="_blank">
M.Deij@marin.nl</a></font></font></font></td>
<td><font color="#7d7d7d" face="Arial" size="2">P.O. Box 28</font></td>
<td><font color="#7d7d7d" face="Arial" size="2">T +31 317 49 39 11</font></td>
</tr>
<tr>
<td style="min-height: 17px;"><font face="Arial" size="2"><font color="#7d7d7d"></font></font></td>
<td><font color="#7d7d7d" face="Arial" size="2">6700 AA Wageningen</font></td>
<td><font face="Arial" size="2"><font color="#7d7d7d"></font></font></td>
</tr>
<tr>
<td><font face="Arial" size="2"><font color="#7d7d7d">T </font></font></td>
<td><font color="#7d7d7d" face="Arial" size="2">The Netherlands</font></td>
<td><font color="#7d7d7d" face="Arial" size="2">I </font><a href="http://www.marin.nl" target="_blank"><font color="#366092" face="Arial" size="2">www.marin.nl</font></a></td>
</tr>
</tbody>
</table>
<p><u></u></p>
<u></u><u></u><u></u>
<p></p>
<p> </p>
<p><font color="#7d7d7d" face="Arial" size="2">MARIN news: </font><span style="font-family: Arial; font-size: x-small; color: rgb(54, 96, 146);"><span style="color: rgb(54, 96, 146); text-decoration: underline;"><span style="color: rgb(54, 96, 146); text-decoration: underline;"><a href="http://www.marin.nl/web/News/News-items/Practical-Application-Viscousflow-Calculations-for-Simulation-of-Manoeuvring-Ships.htm" title="" target="_blank"><span style="color: rgb(54, 96, 146); text-decoration: underline;">Practical
Application Viscous-flow Calculations for Simulation of Manoeuvring Ships</span></a></span></span><br>
</span></p>
<p><font color="#7d7d7d" face="Arial" size="2">This e-mail may be confidential, privileged and/or protected by copyright. If you are not the intended recipient, you should return it to the sender immediately and
delete your copy from your system.</font></p>
<p> </p>
<p></p>
</div>
<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>
<br></blockquote></div><br>