[vtkusers] Not getting to use the vtkThreshold with a vtkRectilinearGrid
David Doria
daviddoria+vtk at gmail.com
Fri Dec 18 12:38:48 EST 2009
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
More information about the vtkusers
mailing list