Hi there,<br><br>This looks luch better! However, I cannot get it to show.<br><br>I am calling the SetPosition() method as follows:<br><br>m_actor->SetPosition(x, y, 1.0);<br><br>I tried various values for the Z position but it just does not show it... Seems to load everything fine though and there are no error messages.
<br><br>Thanks,<br><br>Pankaj<br><br><div><span class="gmail_quote">On 10/2/06, <b class="gmail_sendername">David Gobbi</b> <<a href="mailto:dgobbi@atamai.com">dgobbi@atamai.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Pankaj,<br><br>If you are using VTK 5, you should be able to use vtkImageActor and then<br>just set a rotation transform for the actor. That way you won't have to<br>mess around with mappers and textures. The only thing you would have to
<br>worry about is getting the center-of-rotation right.<br><br> - David<br><br><br>Pankaj Daga wrote:<br>> Hi guys,<br>><br>> I am trying this idea of using vtkActor and vtkMapper and then<br>> converting the image to an OpenGL texture.
<br>><br>> However, I have one problem now... Which vtkMapper based object will<br>> actually work with vtkImageData. The only class that I can see is<br>> vtkImageMapper and that only works with 2D actors.<br>
><br>> Thanks,<br>> Pankaj<br>><br>> On 10/2/06, *Pankaj Daga* <<a href="mailto:deluded.soul@gmail.com">deluded.soul@gmail.com</a><br>> <mailto:<a href="mailto:deluded.soul@gmail.com">deluded.soul@gmail.com
</a>>> wrote:<br>><br>> Hi,<br>><br>> That's an idea worth trying. I will definitely give it a shot...<br>><br>> Thanks again,<br>><br>><br>> Pankaj<br>><br>> On 10/2/06, * Kalpathi Subramanian* <
<a href="mailto:krs@uncc.edu">krs@uncc.edu</a><br>> <mailto:<a href="mailto:krs@uncc.edu">krs@uncc.edu</a>>> wrote:<br>><br>> One way to to do this is to make a texture(vtkTexture) out of<br>
> this image and then map it on to vtkPlaneSource (I think thats<br>> right, just<br>> use a single quadrilateral). Then that object can be<br>> transformed as you please. The texture is input to the actor
<br>> (there is a actor<br>> method for this)..<br>><br>> I have done this long time back..<br>><br>><br>> == krs<br>><br>><br>> Pankaj Daga wrote:
<br>>> Hi Kalpathi,<br>>><br>>> Thanks for replying.<br>>><br>>> Basically, I have a PNG imag that I read using vtkPNGReader<br>>> and display it using vtkActor2D and vtkImageMapper objects.
<br>>> So, I just wanted to do a simple 2D rotation on it.<br>>><br>>> Cheers and thanks,<br>>><br>>> Pankaj<br>>><br>>> On 10/2/06, *Kalpathi Subramanian* <
<a href="mailto:krs@uncc.edu">krs@uncc.edu</a><br>>> <mailto:<a href="mailto:krs@uncc.edu">krs@uncc.edu</a>>> wrote:<br>>><br>>> Pankaj:<br>>><br>>> There is no transformation matrix associated with 2D
<br>>> actors and hence you cannot transform it (like rotate)..<br>>> if you<br>>> need to transform your objects use vtkActor. Tell us<br>>> what object you need to rotate in your app and we might be
<br>>> able to offer suggestions. (again, read the vtk doc for<br>>> vtkAcor2D you will see this in the description).<br>>><br>>> == krs<br>>><br>>>
<br>>> Pankaj Daga wrote:<br>>>> Hi there,<br>>>><br>>>> @Tony: I am a bit confused as to how a vtkCubeAxesActor2D fits into this??? Could you elaborate a bit
<br>>>><br>>>> Posting my original message again, as the old one is in September thread.<br>>>><br>>>> I have a vtkActor2D object that I wish to rotate. Is there a simple way to
<br>>>><br>>>><br>>>><br>>>> rotate it about its center?<br>>>><br>>>> I know all vtkProp3D based objects have built in rotation functions. How can
<br>>>><br>>>> I implement something similar in a vtkActor2D?<br>>>><br>>>> Basically, I have a 2D image that I wish to rotate on the screen.<br>>>><br>
>>><br>>>><br>>>><br>>>> Thanks,<br>>>><br>>>> Pankaj<br>>>> ------------------------------------------------------------------------
<br>>>><br>>>> _______________________________________________<br>>>> This is the private VTK discussion list.<br>>>> Please keep messages on-topic. Check the FAQ at:
<br>>>><br>>>><br>>>> <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>>>> Follow this link to subscribe/unsubscribe:<br>>>>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>>>><br>>><br>>> --<br>>> K.R.Subramanian Phone: (704) 687-8579
<br>>> Department of Computer Science FAX: (704) 687-3516<br>>> UNC Charlotte, Woodward 435E Email:<br>>><br>>><br>>> <a href="mailto:krs@uncc.edu">
krs@uncc.edu</a> <mailto:<a href="mailto:krs@uncc.edu">krs@uncc.edu</a>><br>>> Charlotte, NC 28223-0001 Web: <a href="http://www.cs.uncc.edu/~krs">http://www.cs.uncc.edu/~krs</a> <
<a href="http://www.cs.uncc.edu/%7Ekrs">http://www.cs.uncc.edu/%7Ekrs</a>><br>>><br>>><br>>><br>><br>> --<br>> K.R.Subramanian Phone: (704) 687-8579<br>
> Department of Computer Science FAX: (704) 687-3516<br>> UNC Charlotte, Woodward 435E Email:<br>><br>> <a href="mailto:krs@uncc.edu">krs@uncc.edu</a> <mailto:<a href="mailto:krs@uncc.edu">
krs@uncc.edu</a>><br>> Charlotte, NC 28223-0001 Web: <a href="http://www.cs.uncc.edu/~krs">http://www.cs.uncc.edu/~krs</a> <<a href="http://www.cs.uncc.edu/%7Ekrs">http://www.cs.uncc.edu/%7Ekrs
</a>><br>><br>><br>><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> This is the private VTK discussion list.
<br>> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>> Follow this link to subscribe/unsubscribe:<br>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br>><br><br></blockquote></div><br>