<html dir="ltr">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 09:43:45 Tuesday, 5 July 2011 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.41ec207d-0f11-4a05-a32e-391d70f0e03d {
        MARGIN: 0cm 0cm 0pt
}
LI.41ec207d-0f11-4a05-a32e-391d70f0e03d {
        MARGIN: 0cm 0cm 0pt
}
DIV.41ec207d-0f11-4a05-a32e-391d70f0e03d {
        MARGIN: 0cm 0cm 0pt
}
TABLE.41ec207d-0f11-4a05-a32e-391d70f0e03dTable {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style><style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<p class="41ec207d-0f11-4a05-a32e-391d70f0e03d"></p>
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi Jérôme,
<div><br>
</div>
<div>I've tried using vtkContourFilter, but that does not help with the coloring on the polygonal data set. It only extracts the isolines, which can be added to the scene using a separate vtkActor (optionally with a vtkTubeFilter to enhance the isoline 'width').&nbsp;</div>
<div><br>
</div>
<div>Best wishes,</div>
<div>Menno<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px"></div>
</div>
</div>
<p></p>
<p class="41ec207d-0f11-4a05-a32e-391d70f0e03d">&nbsp;</p>
<p><font color="#7d7d7d" size="2" face="Arial">MARIN news: </font><span style="font-family:Arial; font-size:x-small; color: #366092; "><span style="color: #366092; text-decoration: underline; "><span style="color: #366092; text-decoration: underline; "><a href="http://www.marin.nl/web/News/News-items/Are-you-a-PhDMSc-student-with-no-fear-of-depth.htm" title="" target=""><span style="color: #366092; text-decoration: underline; ">Are
 you a PhD/MSc student with no fear of depth?</span></a></span></span><br>
</span></p>
<p class="41ec207d-0f11-4a05-a32e-391d70f0e03d"><font color="#7d7d7d" size="2" face="Arial">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 class="41ec207d-0f11-4a05-a32e-391d70f0e03d">&nbsp;</p>
<p class="41ec207d-0f11-4a05-a32e-391d70f0e03d"></p>
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div id="divRpF259952" style="direction: ltr; "><font face="Tahoma" size="2" color="#000000"><b>From:</b> Jérôme [jerome.velut@gmail.com]<br>
<b>Sent:</b> Tuesday, July 05, 2011 8:37 PM<br>
<b>To:</b> Deij, Menno<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] Coloring 2D surface along contourlines<br>
</font><br>
</div>
<div></div>
<div>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">&lt;<a href="mailto:M.Deij@marin.nl" target="_blank">M.Deij@marin.nl</a>&gt;</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 lang="EN-US">
<p></p>
<p></p>
<div>
<p class="MsoNormal">Dear vtk-users,<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<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>&nbsp;<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>&nbsp;<u></u></p>
<p class="MsoNormal">[vtkStructuredGrid with points having scalar data: elevation] --&gt; [vtkStructuredGridGeometryFilter] --&gt; [vtkPolyDataNormals] --&gt;&nbsp; [vtkPolyDataMapper] -&gt; [vtkActor]
<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<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>&nbsp;<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>&nbsp;<u></u></p>
<p class="MsoNormal">Thanks and best wishes,<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<u></u></p>
<p class="MsoNormal">Menno<u></u><u></u></p>
<p class="MsoNormal"><u></u>&nbsp;<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 border="0" cellpadding="0" cellspacing="0" cols="1" style="width:475px; border-collapse:collapse">
<tbody>
<tr>
<td colspan="2"><font color="#7d7d7d" face="Arial" size="2"></font></td>
</tr>
<tr>
<td colspan="2" style="min-height:17px">
<p><font face="Arial"><font face="Arial" size="2"><font color="#7d7d7d">dr. ir. Menno A.&nbsp;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 border="0" cellpadding="0" cellspacing="0" cols="3" style="width:475px; border-collapse:collapse">
<tbody>
<tr>
<td style="width:217px">
<p><font color="#7d7d7d" face="Arial" size="2"></font>&nbsp;</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>&nbsp;</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 &#43;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 &nbsp;</font></font></td>
<td><font color="#7d7d7d" face="Arial" size="2">The Netherlands</font></td>
<td><font color="#7d7d7d" face="Arial" size="2">I &nbsp;</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>&nbsp;</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>&nbsp;</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>
</div>
</div>
</div>
</div>
<p></p>
</body>
</html>