[vtkusers] VTK Threshold Discrepancy
Cory Quammen
cory.quammen at kitware.com
Tue Jan 5 15:18:02 EST 2016
Hi Eric,
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?
Thank you,
Cory
On Wed, Nov 11, 2015 at 11:11 AM, Eric D. Robertson <
eric.robertson at cfdrc.com> wrote:
> Thank you for the reply. However, that seems to not have an effect. Here
> is my snippet of code
>
>
> threshold->SetInputData(unstructuredGrid);
> threshold->SetInputArrayToProcess(0, 0, 0,
> vtkDataObject::FIELD_ASSOCIATION_POINTS, "Flag");
> threshold->ThresholdByUpper(1); //Cut off everything that isn't Flag = 1
>
> threshold->AllScalarsOff();
>
> threshold->Update();
>
>
>
> There are 20402 original points in "unstructuredGrid."
>
> There are 16492 points after thresholding.
> However, there are 16495 points designated with Flag = 1 in
> "unstructuredGrid."
>
> Eric Robertson
> Research Engineer, BET
> CFD Research Corporation
> 701 McMillian Way NW, Suite D
> Huntsville, AL 35806
> Ph: 256-726-4912
> Email: eric.robertson at cfdrc.com
>
>
> <eric.robertson at cfdrc.com>
> ------------------------------
> *From:* Cory Quammen [cory.quammen at kitware.com]
> *Sent:* Tuesday, November 10, 2015 4:58 PM
> *To:* Eric D. Robertson
> *Cc:* vtkusers at vtk.org
> *Subject:* Re: [vtkusers] VTK Threshold Discrepancy
>
> Eric,
>
> Try unchecking the "All Scalars" option in the Threshold filter
> properties.
>
> HTH,
> Cory
>
> On Tue, Nov 10, 2015 at 5:47 PM, Eric D. Robertson <
> eric.robertson at cfdrc.com> wrote:
>
>> I am using vtkThreshold to filter point data stored as vtkStructuredGrid.
>>
>>
>>
>> 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.
>>
>>
>>
>> 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?
>>
>>
>>
>>
>>
>>
>>
>> Eric Robertson
>>
>> Research Engineer, BET
>>
>> CFD Research Corporation
>>
>> 701 McMillian Way NW, Suite D
>>
>> Huntsville, AL 35806
>>
>> Ph: 256-726-4912
>>
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Search the list archives at: http://markmail.org/search/?q=vtkusers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>>
>
>
> --
> Cory Quammen
> R&D Engineer
> Kitware, Inc.
>
--
Cory Quammen
R&D Engineer
Kitware, Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160105/ce824b2b/attachment.html>
More information about the vtkusers
mailing list