[vtkusers] Not getting to use the vtkThreshold with a vtkRectilinearGrid
Bill Lorensen
bill.lorensen at gmail.com
Fri Dec 18 12:51:43 EST 2009
>From vtkThreshold:
// vtkThreshold is a filter that EXTRACTS CELLS from any dataset type that
// satisfy a threshold criterion. A cell satisfies the criterion if the
// scalar value of (every or any) point satisfies the criterion. The
// criterion can take three forms: 1) greater than a particular value; 2)
// less than a particular value; or 3) between two values. The output of this
// filter is an unstructured grid.
I don't think you have defined any cells have you?
On Fri, Dec 18, 2009 at 12:38 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> 2009/12/18 Adriano Gonçalves <adriano at esss.com.br>
>>
>> Hi David, I've gotten to solve the problem using the method SetInputArrayToProcess thus:
>>
>> thresh.SetInputArrayToProcess(0, 0, 0, 1, 'test')
>>
>> (this "1" at the 4th parameter is the same of the vtkDataObject::FIELD_ASSOCIATION_CELLS constant)
>>
>> Thank you so much for your help!
>>
>> Adriano
>>
>
> Adriano,
>
> I'm glad you got it to work, but I'm not sure you used it correctly.
>
> In my example:
> http://www.cmake.org/Wiki/VTK/Examples/Thresholding
>
> Since I set the array to the PointData, I used
>
> threshold->SetInputArrayToProcess(0, 0, 0,
> vtkDataObject::FIELD_ASSOCIATION_POINTS,
> vtkDataSetAttributes::SCALARS);
>
> These first three parameters (idx, port, connection) should all be 0
> because I only have one array and input data set, right? The last two
> params seem reasonable.
>
> Anyone know why this still wouldn't work? Is there no way to set the
> array to process by it's name as is done with many other filters?
>
> Thanks,
>
> David
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list