[vtkusers] Centering an image in the window

Jahn Otto Næsgaard Andersen jotto at jotto.no
Wed Mar 13 15:15:42 EDT 2013


I'm using vtkTexturedActor2D and vtkImageMapper to display a 2D image. I
can use

actor.GetPositionCoordinate().SetCoordinateSystemToNormalizedDisplay();
actor.this.Actor.SetPosition(0.5, 0.9);

to place the image in the center of the window, but it's not
center-aligned. The corner of the image is placed in the center. How can I
center-align the image so that the center of the image is at the center of
the window?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130313/2b141705/attachment.htm>


More information about the vtkusers mailing list