<div class="gmail_extra">I&#39;ve been looking at this all day, and I think the answer lies within the vtkCTPFCheckPolygonSense method.  It would appear that for complex drawings which are correctly filled in, this method returns a sense of 1 for all but the outer contour and incorrectly filled in contours return a sense of 0 for all but the outer contour.  Before I continue down this road, I was wondering if there might be a more straightforward way to solve my problem.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I have a 3D binary volume from which I am extracting a contour for visualization using vtkMarchingSquares and a 2D region.  I want to visualize the interior of this contour with varying levels of opacity.  Is there another way to do this other than</div>
<div class="gmail_extra">1.  Use vtkMarchingSquares to vtkStripper to generate a 2D mesh</div><div class="gmail_extra">2.  Run 2D mesh through <span style="background-color:rgb(255,255,255)">vtkContourToPolygonFilter</span></div>
<div class="gmail_extra">3.  Visualize</div><div class="gmail_extra"><br></div><div class="gmail_extra">Is there someway to just tell vtkMarchingSquares to fill in the output, or maybe something else I haven&#39;t thought of?<br>
<br><div class="gmail_quote">On Mon, Apr 23, 2012 at 9:20 AM, Jonathan Morra <span dir="ltr">&lt;<a href="mailto:jonmorra@gmail.com" target="_blank">jonmorra@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_extra">I&#39;m just getting around to looking into this now.  I&#39;ll let you know if I fix this for my case.  On a related note, does there exist a filter which takes as input a specified 2D vtkPolyData, and a set of candidate 2D vtkPolyDatas, and returns a list of those candidate vtkPolyDatas which are wholly inside the specified input?  This seems to be related to this filter.<div>
<div class="h5"><br>
<br><div class="gmail_quote">On Thu, Apr 19, 2012 at 11:03 AM, David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Jonathan,<br>
<br>
This is why I haven&#39;t added this filter to VTK yet.  When the input<br>
has multiple contours, the code doesn&#39;t yet have the necessary logic<br>
for determining which contours are holes.  In your case, it has<br>
incorrectly marked the large contour as a hole.<br>
<br>
Unfortunately I cannot provide you with a timeline for when I will<br>
finish this filter, lately I&#39;ve been crazy busy on other projects.<br>
But if you want to give it a shot yourself, take a look at the code<br>
for vtkContourToPolygonFilter::MakePolysFromContours(). The<br>
section that needs to be modified is the block that starts with<br>
&quot;if (normal == 0)&quot;.<br>
<span><font color="#888888"><br>
 - David<br>
</font></span><div><br>
<br>
On Thu, Apr 19, 2012 at 11:44 AM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com" target="_blank">jonmorra@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; After using your filter for a little while, for the most part it works great, however I have discovered a few cases where it doesn&#39;t work.  I&#39;ve attached a screen shot showing a failure,  The first image is the input vtkPolyData, and the second is the result of running through your filter.  Can you determine what is going on?  If not, I&#39;d be happy to give you the poly data I&#39;m using, just let me know how to export it to disk, and I can email it to you.<br>


&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; PS The behavior seems unpredictable, as sometimes with shapes just as complicated it works fine, I can&#39;t seem to tell what makes it fail.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div><div><div>&gt; On Tue, Apr 10, 2012 at 12:26 PM, David Gobbi &lt;<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Use the PickableOff() method (on the actor, not the data).<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Apr 10, 2012 at 1:17 PM, Jonathan Morra &lt;<a href="mailto:jonmorra@gmail.com" target="_blank">jonmorra@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; One more question along this same line.  Now that I have opaque vtkPolyData,<br>
&gt;&gt; &gt; I&#39;m noticing that my vtkPicker is no longer hitting the same data it was<br>
&gt;&gt; &gt; before, it&#39;s hitting the now opaque poly data.  This makes sense to me, but<br>
&gt;&gt; &gt; I don&#39;t want it to happen.  Is there a way to tell the vtkPicker to ignore<br>
&gt;&gt; &gt; some vtkPolyData (ie always pick the underlying data).<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thanks<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>