<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Thanks guys that's roughly what I wanted to get to.<br>althought he image should fill in the window viewport. :) instead of staying right there<br><br>Many thanks!!!<br><br>> From: david.gobbi@gmail.com<br>> Date: Thu, 11 Feb 2010 09:24:39 -0700<br>> Subject: Re: [vtkusers] set image as background<br>> To: ilferraresebono@hotmail.it<br>> CC: daviddoria+vtk@gmail.com; vtkusers@vtk.org<br>> <br>> I don't think that it is enough to just set up the layers, because by<br>> default the Renderer will always erase everything and set the<br>> background color.<br>> <br>> Try renderer->EraseOff() on all but the rear-most renderer.<br>> <br>> Note that EraseOff will also keep the depth buffer from being cleared<br>> between renders, so you will have to manually set the camera position<br>> and camera clipping planes in your background renderer so that the<br>> image is just barely in front of the rear clipping plane.<br>> <br>> David<br>> <br>> <br>> On Thu, Feb 11, 2010 at 9:20 AM, Giancarlo Amati<br>> <ilferraresebono@hotmail.it> wrote:<br>> > Yup, it's roughly the same structure my code has.<br>> > But apparently whatever is the order or the AddRenderer..... the one<br>> > containing the image seems prevailing over the other one<br>> ><br>> > Many thanks anyway!<br>> ><br>> ><br>> > ________________________________<br>> > Date: Thu, 11 Feb 2010 11:08:50 -0500<br>> > From: daviddoria+vtk@gmail.com<br>> > CC: vtkusers@vtk.org<br>> > Subject: Re: [vtkusers] set image as background<br>> ><br>> > On Thu, Feb 11, 2010 at 10:54 AM, Giancarlo Amati<br>> > <ilferraresebono@hotmail.it> wrote:<br>> ><br>> > mmm now it get confusing because that's the style of my code:<br>> ><br>> > this is the declaration:<br>> > vtkSmartPointer<vtkRenderer> L0= vtkSmartPointer<vtkRenderer>::New();<br>> > vtkSmartPointer<vtkCamera> camL0 = vtkCamera::New();<br>> ><br>> ><br>> > vtkSmartPointer<vtkRenderer> L1 = vtkSmartPointer<vtkRenderer>::New();<br>> > vtkSmartPointer<vtkCamera> camL1 = vtkCamera::New();<br>> ><br>> ><br>> > vtkSmartPointer<vtkRenderWindow> renderWindow =<br>> > vtkSmartPointer<vtkRenderWindow>::New();<br>> > renderWindow->SetSize(720,576);<br>> ><br>> ><br>> > Than I create a plane with texture the image I load up and then... I add the<br>> > plane to L1;<br>> > L0->AddActor(Scene);<br>> > L1->AddActor(texturedPlane);<br>> ><br>> > renderWindow->AddRenderer(L0);<br>> > renderWindow->AddRenderer(L1);<br>> ><br>> > and I call start() of the interactor.<br>> ><br>> > but I just got my Texture rendered..but not the 3D Model. so what u mean<br>> > with Layers?<br>> ><br>> > Regards.<br>> > Giancarlo<br>> ><br>> > I tried to make a demo of this:<br>> > http://www.vtk.org/Wiki/VTK/Examples/BackgroundImage<br>> > However, it seems like one renderer covers up the other. For now it is just<br>> > trying to display an ImageActor in backgroundRenderer and then a sphere in<br>> > sceneRenderer.<br>> > Thanks,<br>> ><br>> > David<br>                                            <br /><hr />Troppe caselle di posta? <a href='http://www.windowslive.it/hotmail/GestisciAltriAccount.aspx' target='_new'>Gestiscile da Hotmail!</a></body>
</html>