[vtkusers] Displaying vtkImageData in 2D with vtkPolyData
Sean Larkin
sean.larkin at lickenbrocktech.com
Mon Apr 21 16:40:40 EDT 2014
I am trying to display a 2D image in vtkImageData with an overlay of
vtkPolyData. I can get the image to display as intended - setting the
extent and using vtkInteractorStyleImage. I can then render the
vtkPolyData, which is composed of vtkPoints and vtkTriangles in
vtkCellArray. I render the polydata with vtkActor2D and vtkPolyDataMapper2D
and add vtkActor to the vtkRenderer that I use to render my image data. The
extent of the image data and the coordinates of the polydata are aligned,
but they do not display this way. The polydata just seems to be anchored in
the lower left of the vtkRenderWindow, and its display does not adjust when
I zoom or pan. I am using vtkImageActor and vtkImageActor3D(this is the
mapper that is returned when I call ->GetMapper() on the actor) to render
the image. Does anyone have any ideas what I might be doing wrong. How can
I get the polydata to share the same camera view and extent as the image
data?
Thanks,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140421/41879397/attachment.html>
More information about the vtkusers
mailing list