[vtkusers] vtkThreshold Question

Andrea Gavana andrea.gavana at gmail.com
Fri Mar 31 10:03:09 EST 2006


 Hello NG,

    sorry if this question is simple, but I have searched over the web and I
have't found anything close to what I should so. Basically, I have a
vtkUnstructuredGrid in which I set the cell data using some property. By
switching with a wxPython radiobutton I can change on the fly the property
displayed on the grid (like permeability, saturation, cell centroids and so
on). Well, my group of data has also a property called "ACTNUM", that tells
which cells are active (ACTNUM=1) and which are not active (ACTNUM=0).
Active cells should be displayed while inactive cells should be hidden.
I have succeeded to use vtkThreshold to filter out inactive cells, but only
when I set cell_data=ACTNUM, using something like:

grid.GetCellData().SetScalars(ACTNUM)

What I would like to do is, whatever property is displayed on screen, to
hide inactive cells based on ACTNUM value. For example, I would like to
display cell centroids property on the grid filtering out inactive cells.
Something like:

grid.GetCellData().SetScalars(Whatever)
??? Apply threshold on grid using ACTNUM ???

Is there a way to do this?

Thank you very much for your help and suggestions.

Andrea.

--
"Imagination Is The Only Weapon In The War Against Reality."

http://xoomer.virgilio.it/infinity77/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060331/e3e89799/attachment.htm>


More information about the vtkusers mailing list