[vtkusers] vtkImageViewer2 and Qt

Ale notinmyhead at gmail.com
Thu May 3 09:53:29 EDT 2012


Hello,

I recently discover the vtkImageViewer2 class, which perfectly fits most of my software requirements (volume navigation basically) so I substitute the previous instantiation of vtkImageViewer with the 2 one in a Qt project (as viewer of a QVTKWidget). I notice few strange behaviors that I wasnt' able to correct:

1. when the Qt program run i get this message two times: "invalid drawable". The current slice seems to show up correctly (but with the point two issue), so what am I missing?

2. when the current slice is paint, it's dimension differs from the one I set by a piece of code like the following code (where dim is the output of vtkImageData GetDimensions() method):
	viewer->SetSize(dim[0], dim[1]);
    	/* Set the Redender Window */
    	ui->mainImage->SetRenderWindow(viewer->GetRenderWindow());

3. the "quality" of the displayed slice is lower than the same slice displayer through a vtkImageViewer. Why? Is there a way to obtain the same output?

Thank in advance.
Alessandro


More information about the vtkusers mailing list