[vtkusers] Re: vtkThreshold Question

Goodwin Lawlor goodwin.lawlor at ucd.ie
Fri Mar 31 11:54:50 EST 2006


Andrea Gavana wrote:
> Hello Goodwin,
>  
>     thank you very much for your help. It seems to me (if I have read 
> correctly the doc), that vtkExtractCells requires a vtkDataSet, a file 
> in other words... is that correct?

No, it requires an input dataset- any subclass of vtkDataSet. You could 
read the data from file using vtkXMLUnstructuredGridReader or create the 
vtkUnstructuredGrid yourself.

> Well, I already have a vtkUnstructuredGrid built by reading an external 
> file (not VTK format). The idea of extracting cells based on Ids 
> implemented in vtkExtractCells is very promising... there is nothing 
> similar but without using a vtkDataSet?
> The problem is, I should be able to filter out cells by certain 
> criteria: for example, at the moment I am trying to exclude inactive 
> cells using this ACTNUM, but I would like to be able to filter out the 
> cell based on, i.e., cell centroid depth, cell permeability, cell 
> saturations and so on. This seems to me something like a vtkFilter*, and 
> if every time I set up a new filter I have to create a file and re-read 
> it I will end up in doing slow things. 

Sounds like vtkThreshold is what you want here. Set the cell scalars to 
the values you calculate.

Goodwin




More information about the vtkusers mailing list