[vtkusers] How to display one single image!

verena kinder verena.kinder at web.de
Mon May 9 13:21:32 EDT 2005


Hi all,

I've got a problem with displaying one single jpg-image in an RenderWindow.

My problem is that it is not possible to display the image in various sizes.
When I change the image-size (e.g. by gimp) there are no differences in displaying-size!

I also observe that images that have the same size are displayed in different sizes ???????
Can anybody tell my why this problerm appeares ???

Above you can take a look of my code.

***********************************************************************

 vtkJPEGReader * jpeg2= vtkJPEGReader ::New();
	jpeg2->SetDataExtent(0,767,0,767,0,1);
	jpeg2->SetFileName("../../IMAGES/LOGO/uni2_.jpg");

	vtkImageActor * imageActor=vtkImageActor ::New();
	imageActor->SetInput(jpeg2->GetOutput());

	vtkRenderer *aRenderer = vtkRenderer::New();
	aRenderer->AddProp(imageActor);
	aRenderer->SetBackground(1.0,1.0,1.0);
	aRenderer->SetViewport(0.0,0.0,1.0,1.0);
	renWin->AddRenderer(aRenderer);

	iren->SetRenderWindow(renWin);
	renWin->Render();
	iren->Initialize();
	iren->Start();
	
	///DELETING

	renWin->RemoveRenderer(aRenderer);
	aRenderer->Delete();
	jpeg2->Delete();
	imageActor->Delete();
***************************************************************************

Thanks
Verena


__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201




More information about the vtkusers mailing list