[vtkusers] use QVTKWidget
Massi
Massinissa.Bandou at USherbrooke.ca
Wed May 16 16:54:27 EDT 2012
Not exactly
But here is my code, I don't know why it shouldn't work
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
CoregistrationForm form;
//********************************Get
input*********************************
vtkJPEGReader *jpegReader = vtkJPEGReader::New();
jpegReader->SetFileName("/Users/Massi/Desktop/bin_myProject/Release/test.jpg");
jpegReader->Update();
vtkImageMapper *imageMapper =vtkImageMapper::New();
imageMapper->SetInput(jpegReader->GetOutput());
imageMapper->GetInput();
vtkImageActor *mapActor= vtkImageActor::New();
mapActor->SetInput(imageMapper->GetInput());
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
renderer->AddActor(mapActor);
form.widget.qvtkWidget->GetRenderWindow()->AddRenderer(renderer);
form.show();
return app.exec();
}
Massi
--
View this message in context: http://vtk.1045678.n5.nabble.com/use-QVTKWidget-tp5710369p5711129.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list