<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
El 18/05/2010 16:48, Jothy escribió:
<blockquote
cite="mid:AANLkTil8ZqbbpW5FxISaRw7EPzdrLl_GbhRz99U4V0Xq@mail.gmail.com"
type="cite">
<div dir="ltr">You should set the Interactorstyle to
InteractorstyleToImage, inorder not to allow it to rotate in any
direction.<br>
</div>
</blockquote>
<br>
<blockquote
cite="mid:AANLkTil8ZqbbpW5FxISaRw7EPzdrLl_GbhRz99U4V0Xq@mail.gmail.com"
type="cite">
<div dir="ltr">On Tue, May 18, 2010 at 3:43 PM, Raúl Ferriz <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:raul@torresyvalero.com">raul@torresyvalero.com</a>></span>
wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello!<br>
<br>
<br>
I'm trying to find a good image viewer class for an image. My only
needs is: image should fill renderwindow, do NOT allowed to rotate on
any axis. Could be cool, but not a need, to make zoom in and out.
Allowed to click on image and return point coord on original non zoomed
in or out image.<br>
<br>
Is there any class or example that achieves that? Any advice in other
case?<br>
</blockquote>
</div>
</div>
</blockquote>
<br>
<br>
Hello again!<br>
<br>
I have created next class only for testing porpouses:<br>
<br>
<pre>// Define interaction style
class myInteractorStyle2d : public vtkInteractorStyleImage
{
public:
static myInteractorStyle2d* New();
vtkTypeRevisionMacro(myInteractorStyle2d, vtkInteractorStyleImage);
public:
virtual void OnLeftButtonDown()
{
// Do nothing!
// forward events
//vtkInteractorStyleImage::OnLeftButtonDown();
}
public:
virtual void OnRightButtonDown()
{
// Do nothing
return;
}
};
vtkCxxRevisionMacro(myInteractorStyle2d, "$Revision: 1.1 $");
vtkStandardNewMacro(myInteractorStyle2d);</pre>
<br>
Later on my code I have something like:<br>
<pre>
myInteractorStyle2d* style = myInteractorStyle2d::New();
m_Interactor->SetInteractorStyle(style);
m_ImageViewer2->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>
<br>
Many thanks!<br>
</body>
</html>