[vtkusers] very strange vtkImageViewer2 problem

Pankaj Daga deluded.soul at gmail.com
Tue Aug 1 08:30:58 EDT 2006


Hi everyone,

I have a very strange vtkImageViewer2 problem.

When I initialize vtkImageViewer2 as:

vtkImageViewer2 * view = vtkImageViewer2::New();
view->SetInput(reader->GetOutput());

// widget1 is my host window
widget1.SetRenderWindow(view1->GetRenderWindow());
view1->Render();

Everything works fine...

Now, as soon as I add this line:
view1->SetupInteractor(widget1.GetRenderWindow()->GetInteractor());

I notice 2 things:
- The size of the display image has become smaller
and
- The interaction (with the F key is different). The flyby function is not
the same.

Now, I have been digging through the VTK code and I think that the
InstallPipeline() method will not set up the interactor till I call:
view1->SetupInteractor(widget1.GetRenderWindow()->GetInteractor());

However, there is clearly an interaction object working and I do not know
where it comes from! Is it the vtkImageActor or is the InteractorStyle
object is being initialized from somewhere else, I could not find out.

If anyone has any clue as to what is happening, please help!

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060801/1a7030af/attachment.htm>


More information about the vtkusers mailing list