<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-15"
 http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
El 19/05/2010 10:32, Karthik Krishnan escribió:
<blockquote
 cite="mid:AANLkTikWjMidYcLYvPN6c8jG7ZAt-rYZjvm6zSB4-HSL@mail.gmail.com"
 type="cite">
  <div class="gmail_quote">On Tue, May 18, 2010 at 9:35 PM, Raśl Ferriz
  <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:raul@torresyvalero.com" target="_blank">raul@torresyvalero.com</a>&gt;</span>
wrote:<br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div bgcolor="#ffffff" text="#000000"><br>
Hello again!<br>
    <br>
I have created next class only for testing porpouses:<br>
    <br>
    <br>
Later on my code I have something like:<br>
    <pre>myInteractorStyle2d* style = myInteractorStyle2d::New();
m_Interactor-&gt;SetInteractorStyle(style);
m_ImageViewer2-&gt;SetupInteactor(m_Interactor);
    </pre>
    <br>
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?<br>
    </div>
  </blockquote>
  <div><br>
  <br>
Your line "m_Interactor-&gt;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-&gt;SetupInteractor(..), invokes <br>
  <br>
 vtkImageViewer2::InstallPipeline()<br>
  <br>
where the connections are made.. <br>
  <br>
Move that line after setting up the pipeline :<br>
  <br>
  <br>
  
myInteractorStyle2d* style = myInteractorStyle2d::New();<br>
   m_ImageViewer2-&gt;SetupInteactor(m_Interactor);<br>
   m_Interactor-&gt;SetInteractorStyle(style);<br>
  <br>
  <br>
Please dig a bit deeper by looking at the source code.<br>
  <br>
  </div>
  </div>
  <br>
</blockquote>
Ouch, did not thought that order can be crucial!<br>
That worked! <br>
<br>
Now myInteractorStyle2d is finally used. I was currently looking at
sourcecode and try to find what logic was used, but I currently did not
find that piece of code. Next time I will find deeper before asking.<br>
<br>
Many thanks to all interested.<br>
</body>
</html>