<div dir="ltr">Hi Eric,<div><div><br></div><div>I don't know if you are still working on this, but would it be possible to send me a dataset and compilable code sample to try to replicate this problem?</div><div><br></div><div>Thank you,</div><div>Cory</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 11, 2015 at 11:11 AM, Eric D. Robertson <span dir="ltr"><<a href="mailto:eric.robertson@cfdrc.com" target="_blank">eric.robertson@cfdrc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thank you for the reply. However, that seems to not have an effect. Here is my snippet of code<br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><br>
threshold->SetInputData(unstructuredGrid);<br>
threshold->SetInputArrayToProcess(0, 0, 0, vtkDataObject::FIELD_ASSOCIATION_POINTS, "Flag");<br>
threshold->ThresholdByUpper(1); //Cut off everything that isn't Flag = 1</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">threshold->AllScalarsOff();<br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">threshold->Update();<br>
</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">There are 20402 original points in "unstructuredGrid."</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">There are 16492 points after thresholding.</span></p>
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">However, there are 16495 points designated with Flag = 1 in "unstructuredGrid."</span>
<div><br>
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-family:Tahoma;font-size:13px">
<div style="font-size:13px;font-family:Tahoma">
<p><font size="2"><font face="Verdana"><span class="">Eric Robertson<br>
Research Engineer, BET<br>
CFD Research Corporation<br>
701 McMillian Way NW, Suite D<br>
Huntsville, AL 35806<br>
Ph: <a href="tel:256-726-4912" value="+12567264912" target="_blank">256-726-4912</a><br></span>
Email:  <a href="mailto:eric.robertson@cfdrc.com" target="_blank">eric.robertson@cfdrc.com</a></font></font></p>
<p><br>
<a href="mailto:eric.robertson@cfdrc.com" target="_blank"></a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family:Times New Roman;color:#000000;font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma" size="2"><b>From:</b> Cory Quammen [<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>]<br>
<b>Sent:</b> Tuesday, November 10, 2015 4:58 PM<br>
<b>To:</b> Eric D. Robertson<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] VTK Threshold Discrepancy<br>
</font><br>
</div><div><div class="h5">
<div></div>
<div>
<div dir="ltr">
<div>Eric,</div>
<div><br>
</div>
Try unchecking the "All Scalars" option in the Threshold filter properties.
<div><br>
</div>
<div>HTH,</div>
<div>Cory</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Nov 10, 2015 at 5:47 PM, Eric D. Robertson <span dir="ltr">
<<a href="mailto:eric.robertson@cfdrc.com" target="_blank">eric.robertson@cfdrc.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">I am using vtkThreshold to filter point data stored as vtkStructuredGrid.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">The data is essentially an array of 0’s and 1’s, where I am looking to only keep the cells with 1’s stored.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">When I apply the vtkThreshold, the result is a domain slightly smaller than the number of cells with 1’s. In other words, the number of cells in the vtkThreshold doesn’t
 exactly match up to the number of 1’s available in the original unthresholded domain. Is this a known issue?<br clear="all">
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif""><u></u> <u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Eric Robertson<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Research Engineer, BET<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">CFD Research Corporation<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">701 McMillian Way NW, Suite D<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Huntsville, AL 35806<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Ph: <a href="tel:256-726-4912" value="+12567264912" target="_blank">
256-726-4912</a><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">
http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.</div>
</div>
</div>
</div></div></div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div>