I was able to reproduce this. It was a bug in that filter (actually, the bug is in vtkConvertSelection). Threshold selections were being double-negated. The fix is now committed to VTK master.<div><div><br></div><div>Jeff<br>
<br><div class="gmail_quote">On Thu, Feb 3, 2011 at 11:20 AM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I am guessing that vtkExtractSelectedRows() has a bug and does not<br>
respect the inverse flag.<br>
<font color="#888888"><br>
David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
28 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: 518-371-3971 x109<br>
</font><div><div></div><div><br>
<br>
<br>
On Thu, Feb 3, 2011 at 11:13 AM, William McLendon <<a href="mailto:wcmclen@sandia.gov" target="_blank">wcmclen@sandia.gov</a>> wrote:<br>
> Anyone else seeing this?  I'm trying to filter out edges in a table that are<br>
> really close or equal to zero using code like this:<br>
>><br>
>>    # filter out rows that have 0 area.<br>
>>    areaRowSelection = vtkSelectionSource()<br>
>>    areaRowSelection.SetContentType(vtkSelectionNode.THRESHOLDS)<br>
>>    areaRowSelection.SetFieldType(vtkSelectionNode.ROW)<br>
>>    areaRowSelection.SetInverse(1)   # selection should exclude these rows<br>
>>    areaRowSelection.SetArrayName('area')<br>
>>    areaRowSelection.AddThreshold(-1E-15, 1E-15)  # non-matches=0,<br>
>> matches=1<br>
>><br>
>>    filteredTable = vtkExtractSelectedRows()<br>
>>    filteredTable.SetInputConnection(0, vert_source_csv.GetOutputPort() )<br>
>>    filteredTable.SetInputConnection(1, areaRowSelection.GetOutputPort() )<br>
>>    filteredTable.Update()<br>
><br>
> If I understand the selectionsource filter properly, then adding<br>
> SetInverse(1) should have the threshold filter select rows that are not in<br>
> the threshold range, right?  But this is the result I'm getting:<br>
>><br>
>> +-------------+-------------+-------------+-------------+<br>
>> | area        | boundary are| centroid x  | centroid y  |<br>
>> +-------------+-------------+-------------+-------------+<br>
>> | 0           | 0           | -72.8572    | 41.2743     |<br>
>> | 0           | 0           | -73.8846    | 33.2743     |<br>
>> | 0           | 0           | -71.8381    | 36.2743     |<br>
>> | 0           | 0           | -72.8288    | 31.2743     |<br>
><br>
> Am I missing something?  I'm going from the doxygen api at:<br>
><br>
> <a href="http://www.vtk.org/doc/nightly/html/classvtkSelectionSource.html#accd91cdb84f1c13c020a736d521f2686" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkSelectionSource.html#accd91cdb84f1c13c020a736d521f2686</a><br>


><br>
> Thanks!<br>
>  -William<br>
><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<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
><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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jeff Baumes, Ph.D.<br>Technical Lead, Kitware Inc.<br>(518) 881-4932<br>
</div>
</div>