<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">Yup, it works!</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Thanks David!</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Cheers</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Jothy</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 1:10 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You can try vtkLinearExtrusionFilter, to extrude the filled contour towards the camera (use CappingOn()).<div><div class="h5"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 7:53 PM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif">Looks like it has something to do with the resolveCoincidentTopology. The filled contour is at the same depth as the image slice -that's why it is not shown.</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Jothy</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 12:41 PM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif">I commented this line in the original code.</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><pre style="white-space:pre-wrap;margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,0)">polyActor</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetProperty</span><span style="color:rgb(0,0,0)">()-></span><span style="color:rgb(0,0,0)">SetRepresentationToWireframe</span><span style="color:rgb(0,0,0)">();</span></pre></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 12:40 PM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif">Hi David</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">If I set the representation to surface only the outline is shown. I even tried it with a vtkPolyDataMapper and the results are same.</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Here is the rough pipeline</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkPolyData</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(0,0,0)">contour</span><span style="color:rgb(0,0,0)">=</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkPolyData</span><span style="color:rgb(0,0,0)">>::</span><span style="color:rgb(0,0,0)">New</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">contour</span><span style="color:rgb(0,0,0)">=</span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">ContourWidget</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetContourRepresentation</span><span style="color:rgb(0,0,0)">()-></span><span style="font-style:italic;color:rgb(0,0,0)">GetContourRepresentationAsPolyData</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkContourTriangulator</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(0,0,0)">tc</span><span style="color:rgb(0,0,0)">=</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkContourTriangulator</span><span style="color:rgb(0,0,0)">>::</span><span style="color:rgb(0,0,0)">New</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">tc</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">SetInputData</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">contour</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">tc</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">Update</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkDataSetMapper</span><span style="color:rgb(0,0,0)">></span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">polyMapper</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkDataSetMapper</span><span style="color:rgb(0,0,0)">>::</span><span style="color:rgb(0,0,0)">New</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">polyMapper</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">SetInputData</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">tc</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetOutput</span><span style="color:rgb(0,0,0)">());</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">polyMapper</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">ScalarVisibilityOn</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">polyMapper</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">Update</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">polyActor</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,0)">=</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,128)">vtkSmartPointer</span><span style="color:rgb(0,0,0)"><</span><span style="color:rgb(128,0,128)">vtkActor</span><span style="color:rgb(0,0,0)">>::</span><span style="color:rgb(0,0,0)">New</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">polyActor</span><span style="color:rgb(0,0,0)">-></span><span style="font-style:italic;color:rgb(0,0,0)">SetMapper</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,0)">polyMapper</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">polyActor</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetProperty</span><span style="color:rgb(0,0,0)">()-></span><span style="font-style:italic;color:rgb(0,0,0)">SetColor</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,128)">1</span><span style="color:rgb(0,0,0)">,</span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(0,0,0)">);</span><span style="color:rgb(192,192,192);font-family:verdana,sans-serif"> </span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,0,0)">polyActor</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetProperty</span><span style="color:rgb(0,0,0)">()-></span><span style="color:rgb(0,0,0)">SetRepresentationToWireframe</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">ViewRenderer</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">AddActor</span><span style="color:rgb(0,0,0)">(</span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">polyActor</span><span style="color:rgb(0,0,0)">);</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">ViewRenderer</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">GetRenderWindow</span><span style="color:rgb(0,0,0)">()-></span><span style="font-style:italic;color:rgb(0,0,0)">Render</span><span style="color:rgb(0,0,0)">();</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(128,128,0)">this</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(128,0,0)">ViewRenderer</span><span style="color:rgb(0,0,0)">-></span><span style="color:rgb(0,0,0)">ResetCamera</span><span style="color:rgb(0,0,0)">();</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">Thanks</span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(0,0,0)">Jothy</span></pre></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 16, 2016 at 12:24 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Jothy,<div><br></div><div>The vtkContourTriangulator always produces a filled contour, so there must be something wrong with the way it is being rendered. Are you sure that you aren't calling SetRepresentationToWireframe() on the actor's property?</div><span><font color="#888888"><div><br></div></font></span><div><span><font color="#888888"> - David</font></span><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 15, 2016 at 5:45 PM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div style="font-family:verdana,sans-serif">Hi All</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">I am trying to fill a 2D contour generated by vtkContourWidget. I pass the polydata from the contour widget to vtkContourTriangulator and the output is as shown in the attached image. But, I want a filled contour. How do I do that?</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Thanks</div><div style="font-family:verdana,sans-serif"><br></div><div style="font-family:verdana,sans-serif">Jothy</div></div>
</blockquote></div><br></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>