[vtkusers] Draw on the image
Jeremy Winston
winston at cat.rpi.edu
Sun Nov 10 10:41:03 EST 2002
Yi-Yu Chou wrote:
>
> How can I draw some dots and lines on an image(BMP or PPM) ?
> Please give me some ideas or examples. (using Python)
Yi-Yu,
I don't know Python, but here's an idea:
Use vtkBMPReader to read in your image.
Use vtkImageMapper to map it.
Use vtkActor2D, and the AddActor2D method of vtkRenderer
to render it.
Next, use a combination of vtkPoints & vtkPolyLine, then
vtkPolyData, vtkPolyDataMapper2D & vtkActor2D
to add your dots and lines.
Make sure you add the points/lines actors to the renderer
after you add the image actor (otherwise, the image will
cover them up).
HTH,
-Jeremy
More information about the vtkusers
mailing list