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

Jesse Corrington corrington_j at hotmail.com
Tue Jan 10 15:25:55 EST 2006


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/




More information about the vtkusers mailing list