[vtkusers] rotate a vtkActor2D

Tony Willis Tony.Willis at nrc-cnrc.gc.ca
Sun Oct 1 12:51:57 EDT 2006


> Date: Sat, 30 Sep 2006 17:58:03 +0100
> From: "Pankaj Daga" <deluded.soul at gmail.com>
> Subject: [vtkusers] rotate a vtkActor2D
> To: vtkusers <vtkusers at vtk.org>
> Message-ID:
> 	<9779cb90609300958y5ba51f6cme2a375ff3cc33178 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi there,
>
> Sorry for asking again, but did not get any replies and pretty frustrated
> with this problem.
>
> I have a vtkActor2D object that I wish to rotate. Is there a simple way to
> rotate it about its center?
>
> I know all vtkProp3D based objects have built in rotation functions. How can
> I implement something similar in a vtkActor2D?
>
> Basically, I have a 2D image that I wish to rotate on the screen.

Then why not use vtkCubeAxesActor2D - it will do all the messy work
for you. e.g. something like (in Python):

axes = vtk.vtkCubeAxesActor2D()
axes.SetInput(image_array.GetOutput())
axes.SetZLabel(" ")

Cheers

Tony
___________
Tony Willis
National Research Council   Tony.Willis at nrc-cnrc.gc.ca
Box 248                     (250)493-2277
Penticton, BC  V2A 6J9      fax: 493-7767
Government of Canada        Gouvernement du Canada




More information about the vtkusers mailing list