[vtkusers] Re: Wireframe+vtkPolyDataMapper2D

Goodwin Lawlor goodwin.lawlor at ucd.ie
Wed May 10 14:42:23 EDT 2006


David Cash wrote:
> Hello,
> I am looking to overlay a wireframe or points version of a vtkPolyData
> object onto an image being displayed by vtkImageViewer. I tried using
> vtkPolyDataMapper2D and vtkActor2D, but the vtkProperty2D doesn't have a
> way of changing the representation to wireframe.
> Is there a way of doing this without specifically setting up my polydata
> to have only lines and vertex cells?


Hi David,

Can you just get the renderer from vtkImageViewer and add a vtkActor?

ren = viewer->GetRenderer();
ren->AddActor(actor);
actor->GetProperty()->SetRepresentationToWireframe();

Alternatively, you could use vtkExtractEdges and use vtkActor2D.


hth

Goodwin





More information about the vtkusers mailing list