[vtkusers] display bmp file
Toon Huysmans
denhuys at hotmail.com
Thu Oct 7 06:04:45 EDT 2004
Hi John,
Maybe you could use an ImageActor to display your image instead of using a textured plane:
http://www.vtk.org/doc/nightly/html/classvtkImageActor.html
Greetings
Toon.
----- Original Message -----
From: John Mosso
To: vtkusers at vtk.org
Sent: Thursday, October 07, 2004 5:41 AM
Subject: [vtkusers] display bmp file
Greetings!
I'm VTK freshman (know nothing so far!)
I have an MFC app and I'm trying to display a bmp file using VTK. This is the code I'm using for:
bmpReader = vtkBMPReader::New();
bmpReader->SetFileName("C:\\MyFile.bmp");
atext = vtkTexture::New();
atext->SetInput(bmpReader->GetOutput());
plane = vtkPlaneSource::New();
planeMapper = vtkPolyDataMapper::New();
planeMapper->SetInput(plane->GetOutput());
ActorImage = vtkActor::New();
ActorImage->SetMapper(planeMapper);
ActorImage->SetTexture(atext);
ren->AddActor(ActorImage);
This code display the file but it does not conserve lenght-heigth relationship (it's a square!) and centered; plus, I want to display the file starting at the left corner of the window and full size. Does anyone have any suggestions?
Thanks in advance.
John Mosso
------------------------------------------------------------------------------
_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041007/a89bdff2/attachment.htm>
More information about the vtkusers
mailing list