[vtkusers] vtkImageViewer2 do not fit my needs

Karthik Krishnan karthik.krishnan at kitware.com
Wed May 19 04:32:06 EDT 2010

On Tue, May 18, 2010 at 9:35 PM, Raúl Ferriz <raul at torresyvalero.com> wrote:

> Hello again!
> I have created next class only for testing porpouses:
> Later on my code I have something like:
> myInteractorStyle2d* style = myInteractorStyle2d::New();
> m_Interactor->SetInteractorStyle(style);
> m_ImageViewer2->SetupInteactor(m_Interactor);
> But this doesn't seem to work. Before I had StyleTrallbackActor, and when I
> changed to ImageStyle, I can see the diferences. But seems like my overrides
> do not want to work, it act just like I was using vtkInteractorStyleImage...
> What am I doing wrong?

Your line "m_Interactor->SetInteractorStyle(style)" no effect here, since
the ImageViewer overrides this with its own interactor style
(vtkInteractorStyleImage) in the very next line. Specifically the line
m_ImageViewer2->SetupInteractor(..), invokes


where the connections are made..

Move that line after setting up the pipeline :

   myInteractorStyle2d* style = myInteractorStyle2d::New();

Please dig a bit deeper by looking at the source code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100519/0e5cac29/attachment.htm>

More information about the vtkusers mailing list