[vtkusers] extract/filter the underlying vtkPolyData from vtkPolyDataMapper

Jochen Kling Jochen.Kling at gmx.de
Mon Jul 20 10:42:01 EDT 2009


Hi all,

reading an mesh file (wavefront obj format) looks like being straight forward:

	vtk.vtkOBJReader reader = new vtk.vtkOBJReader();
	vtk.vtkPolyDataMapper pDataMapper = new vtk.vtkPolyDataMapper();
        reader.SetFileName("c:/data/grid.obj");
        pDataMapper.SetInputConnection(reader.GetOutputPort());
        ...

This is working fine and I'm able to render it. 

Now I would like to convert it to an unstructured grid. In order to do this I thought it might be worth having access to the underlying vtkPolyData object of the vtkPolyDataMapper.

Can anybody explain me how to accomplish this?

Altenativelly is there a way to read the file directly into a vtkPolyData object?

Or might it be possible to extract a vtkUnstructuredGrid directly from the pPolyDataMapper object?

I know these are lot of questions.

Thanks a lot in advance.

with best regards
Jochen Kling


-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser



More information about the vtkusers mailing list