<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=GB2312">
<META content="MSHTML 6.00.2900.3199" name=GENERATOR>
<STYLE>BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 10pt; BORDER-BOTTOM-WIDTH: 0px; FONT-FAMILY: verdana; BORDER-RIGHT-WIDTH: 0px">
<DIV><FONT face=Verdana size=2>Hi,&nbsp; jspinola,</FONT></DIV>
<DIV><FONT face=Verdana size=2>&nbsp; I saw your message in vtk user list 
:Problems trying to remove observers. I have the same problem, can you help me 
to solve it? Thank you.</FONT></DIV>
<DIV><FONT face=Verdana size=2></FONT>&nbsp;</DIV>
<DIV>----------------------------------------------------------------</DIV>
<DIV>Hi,<BR><BR>I want to remove the observers on the window level events on 
the<BR>vtkImageViewer2 class. First I've got the intercator with 
the<BR>GetInteractorStyle() method and then call RemoveObserver() 
eg<BR><BR>vtkImageViewer2 *viewer = vtkImageViewer2::New();<BR>..<BR>if( 
viewer-&gt;GetInteractorStyle()-&gt;HasObserver(<BR>vtkCommand::StartWindowLevelEvent 
)<BR>{<BR>&nbsp;&nbsp; 
viewer-&gt;GetInteractorStyle()-&gt;RemoveObserver(<BR>vtkCommand::StartWindowLevelEvent 
)<BR>}<BR><BR>but with no success... what I'm doing wrong?<BR><BR>A second 
question i have is: is it possible to get the vtkCommand from<BR>vtkImageViewer, 
remove it or disable it for a while and then add it or<BR>enable it again later 
? If yes, what's the suitable way to do it<BR><BR>thanks<BR></DIV>
<DIV align=left><FONT face=Verdana color=#c0c0c0 size=2>2007-11-14 
</FONT></DIV><FONT face=Verdana size=2>
<HR style="WIDTH: 122px; HEIGHT: 2px" align=left SIZE=2>

<DIV><FONT face=Verdana color=#c0c0c0 size=2>Dai 
Liang&nbsp;</FONT></DIV></FONT></BODY></HTML>