[vtkusers] How to Recover vtkPolyData from vtkThreshold

John Platt jcplatt at lineone.net
Tue Jun 15 18:09:42 EDT 2004


Hi Mathieu,

That must rate as one of the quickest replies ever!

The polydata just contains surface edges of cells. Since I am trying to
speed up an animation, I would like to avoid going through
vtkDataSetSurfaceFilter therefore it looks like the ShallowCopy()
option.

I nearly got excited when I saw vtkUnstructuredGridToPolyDataFilter...

Would it be more beneficial to write a threshold filter with the output
the same as the input derived from vtkDataSetToDataSetFilter? Or are
there some complications which explain why this has not been done.

Many thanks.

John. 

-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
Behalf Of Mathieu Malaterre
Sent: 15 June 2004 22:03
To: John Platt
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] How to Recover vtkPolyData from vtkThreshold

John Platt wrote:
> Hi Users,
> 
>  
> 
> I would like to render selective cells from vtkPolyData. I tried
> 
>  
> 
>             vtkPolyData > vtkThreshold > vtkPolyDataMapper
> 
>  
> 
> but this does not compile because the output of vtkThreshold is of
type 
> vtkUnstructuredGrid.
> 
>  
> 
> Is there anyway of recovering the output of vtkThreshold as
vtkPolyData 
> or an alternative filter?

You can use vtkDataSetMapper or vtkGeometryFilter to display a 
vtkUnstructuredGrid.

Otherwise if you know the types of elements you are using you can create

your own vtkPolyData after the vtkThreshold (don't forget to call 
Update) and shallow copy all triangles/quad/strips/points...

HTH
Mathieu


_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list