[vtkusers] How to Recover vtkPolyData from vtkThreshold
Mathieu Malaterre
mathieu.malaterre at kitware.com
Wed Jun 16 12:26:57 EDT 2004
John,
I don't know why vtkThreshold has an output of vtkUnstructuredGrid,
this is generic enough for all type of dataset containing cells (it
should fail on vtkPointSet though).
Anyway if you have time you can surely write your own
vtkPolyDataToPolyDataThresholdFilter.
HTH
Mathieu
Ps: vtkUnstructuredGridToPolyDataFilter is an abstract class you
shouldn't use it (only if you want to hide the ShallowCopy inside a nice
class)
John Platt wrote:
> 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
>
>
> _______________________________________________
> 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