graphic objects?

Kerrie Holton Tainter tainter at stdavids.picker.com
Thu Aug 5 16:38:53 EDT 1999


Sven

When I do this, I create a vtkImageViewer, then a source, mapper, and actor
for the graphic object.  The actor is added to the Viewers Imager [viewer
GetImager]
.

To move things around just create a mouse button binding that keeps track of the

x, y location and modifies the actor's position (actor SetPosition).  If you
have more
than one actor, I think you have to write your own method to determine which one

to move.

Depending  on your object (if its a solid for instance) you may want to first
create a contour of it then attach the contour mapper to a vtkPolyDataMapper2D.
Then use the mapper's ScalarVisibilityOff method, and you should be able to see
through to the underlying image.

Also note, if you pan the underlying image, the overlay object won't move, so
you
have to update it's position as well.


Kerrie

Sven Prevrhal wrote:

> What's the easiest way to diplay a graphic object in an image overlay -
> let's say a circle or a rectanlge and then interactively move it around?
>
> Can I use a vtkCanvasSource2D? It seems to block the underlying image -
> maybe it has a transparency mode?
> --
> Sven



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list