[vtkusers] how can I add a 2D image to the render window

Jesse Corrington corrington_j at hotmail.com
Tue Jan 10 16:06:55 EST 2006


I tried calling render, and now i see nothing in the render window, not even 
the volume that should be there.  Also, with this 2d image i want it to not 
be effected by interaction from the user.  I just want a static image in the 
corner with our company logo, this way when the user takes a snapshot it 
will be there.  Any other ideas to get this working.  The help is much 
appreciated.  Thanks


>From: David Cole <david.cole at kitware.com>
>To: Jesse Corrington <corrington_j at hotmail.com>
>CC: vtkusers at vtk.org
>Subject: Re: [vtkusers] how can I add a 2D image to the render window
>Date: Tue, 10 Jan 2006 15:44:50 -0500
>
>Did you try calling vtkRenderWindow::Render after the AddActor2D call? It's 
>not automatic, so that you can do many AddActor calls in a row and then 
>call Render at the end...
>
>HTH,
>David
>
>Jesse Corrington wrote:
>
>>I am trying to add a 2D image to the render window, and nothing is showing 
>>up. What am i doing wrong. Thanks
>>
>>//add vg logo
>>char fullPath[512];
>>sprintf(fullPath, "%s/vglogo.bmp", directory.c_str());
>>
>>vtkImageReader *reader = vtkImageReader::New();
>>reader->SetFileName("vglogo.bmp");
>>reader->Update();
>>
>>vtkImageMapper *mapper = vtkImageMapper::New();
>>mapper->SetInput(reader->GetOutput());
>>
>>vgLogo = vtkActor2D::New();
>>vgLogo->SetMapper(mapper);
>>pvtkRenderer->AddActor2D(vgLogo);
>>
>>_________________________________________________________________
>>Don’t just search. Find. Check out the new MSN Search! 
>>http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>>
>>_______________________________________________
>>This is the private VTK discussion list. Please keep messages on-topic. 
>>Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>Follow this link to subscribe/unsubscribe:
>>http://www.vtk.org/mailman/listinfo/vtkusers
>>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




More information about the vtkusers mailing list