<div dir="ltr"><div><div><div><div><div><div>Sorry I do not know of the way how to disable specific warning,<br>but this warning comes from  void vtkRenderWindow::SetStereoRender(int stereo)<br><br></div><div>it would be called from <br>
vtkInteractorStyle::OnChar()<br><br><br>You may subclass vtkInteractorStyle you use -<br></div>(for example vtkInteractorStyleTrackballCamera ), override <br>  virtual void OnChar();<br><br></div><div>Something like below will work:<br>
</div><div><br></div>//--------------------------------------------------------------------------<br>void vtkInteractorStyleRubberBand::OnChar()<br>{<br>   switch (this-&gt;Interactor-&gt;GetKeyCode())<br>   {<br>     case &#39;3&#39;:<br>
         vtkObject::GlobalWarningDisplayOff();<br>         this-&gt;Superclass::OnChar();<br>         vtkObject::GlobalWarningDisplayOn();<br>         return;<br>   }<br>    this-&gt;Superclass::OnChar();<br>}<br></div><br>
</div><br></div>Basically you are not guaranteed that other warnings which may happen are enabled, but you limit time warnings are disabled.<br><br></div><div><br></div><div><br></div>Alex<br><div><div><div><br><div><br></div>
</div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 2, 2013 at 12:51 PM, Mengda Wu <span dir="ltr">&lt;<a href="mailto:wumengda@gmail.com" target="_blank">wumengda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi All,<br><br></div>   Is there away to disable this warning message?<br><br>Warning: In ..\..\Rendering\vtkRenderWindow.cxx, line 236<br>
vtkWin32OpenGLRenderWindow (0000000010C070D0): Adjusting stereo mode on a window that does not support stereo type CrystalEyes is not possible.<br>
<br></div>  I always get this message when pressing key &#39;3&#39; in the vtk window. I know my screen does not support stereo. I also know that I can globally disable all warnings using the static function vtkObject::GlobalWarningDisplayOff(). But I would like to keep warned of other errors.<br>

<br></div>Thanks,<br></div>Mengda<br><div><div><div><br></div></div></div></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>