[vtkusers] set image as background

Giancarlo Amati ilferraresebono at hotmail.it
Thu Feb 11 10:54:33 EST 2010


mmm now it get confusing because that's the style of my code:

this is the declaration:
    vtkSmartPointer<vtkRenderer> L0= vtkSmartPointer<vtkRenderer>::New();
    vtkSmartPointer<vtkCamera> camL0 = vtkCamera::New();




    vtkSmartPointer<vtkRenderer> L1 = vtkSmartPointer<vtkRenderer>::New();
    vtkSmartPointer<vtkCamera> camL1 = vtkCamera::New();
    

    vtkSmartPointer<vtkRenderWindow> renderWindow = vtkSmartPointer<vtkRenderWindow>::New();


    renderWindow->SetSize(720,576);
 

Than I create a plane with texture the image I load up and then... I add the plane to L1;
L0->AddActor(Scene);
L1->AddActor(texturedPlane);

renderWindow->AddRenderer(L0);


renderWindow->AddRenderer(L1);

and I call start() of the interactor.

but I just got my Texture rendered..but not the 3D Model. so what u mean with Layers?

Regards.
Giancarlo



From: dave.demarle at kitware.com
Date: Thu, 11 Feb 2010 09:57:35 -0500
Subject: Re: [vtkusers] set image as background


To: ilferraresebono at hotmail.it

I do no think so, unless you have multiple renderers at the same layer, which you do not want in this case.

David E DeMarle


Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662


Phone: 518-371-3971 x109



On Thu, Feb 11, 2010 at 9:38 AM, Giancarlo Amati <ilferraresebono at hotmail.it> wrote:









David,
many thanks. Just a quick questions: does in make any difference the order I add each renderer to the renderwindow?
l
Thanks!
From: dave.demarle at kitware.com




Date: Thu, 11 Feb 2010 09:08:20 -0500
Subject: Re: [vtkusers] set image as background
To: ilferraresebono at hotmail.it
CC: vtkusers at vtk.org





I would have two renderers, layer 0 and layer 1, both will cover the same viewport. Put what you want to be the background on a quad or a 2D image data in layer 0 and set layer 0's camera to show it exclusively. Then render the scene in layer 1. Layer 1's





 background will not be drawn, but objects in layer 1 will appear in front of the image from layer 0.


David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109



On Wed, Feb 10, 2010 at 11:28 AM, Giancarlo Amati <ilferraresebono at hotmail.it> wrote:











Hello Users,

this is question already occurred many times, so please forgive me.
I have an image, how can I set it as a background of my renderwindow?

and the rendering my dataset as usual.

Kind regards.






Giancarlo
 		 	   		  
Troppe caselle di posta? Gestiscile da Hotmail!



_______________________________________________

Powered by www.kitware.com



Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html



Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ



Follow this link to subscribe/unsubscribe:

http://www.vtk.org/mailman/listinfo/vtkusers



 		 	   		  
Annoiato? Prova i giochi di Messenger!

 		 	   		  
La tua privacy è al sicuro con Internet Explorer 8.  Scopri di più



 		 	   		  
_________________________________________________________________
Personalizza la tua vita digitale, scarica i nuovi gadget!
http://www.pimpit.it/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100211/aabcdb4c/attachment.htm>


More information about the vtkusers mailing list