<html>
<head>
</head>
<body>
thank you very much. I'm going to be careful.<br>
<br>
Steffen<br>
<br>
Jerome, Ron wrote:<br>
<blockquote type="cite" cite="mid:17C47B340D0BD411B0C70004AC5676BC1D2A92@nrcmrdex1c.imsb.nrc.ca">
  <title>Nachricht</title>
  <meta content="MSHTML 6.00.2716.2200" name="GENERATOR">
  <div><span class="161561913-09092002"><font face="Arial" color="#0000ff" size="2">
Hi  Steffen,</font></span></div>
  <div><span class="161561913-09092002"></span>&nbsp;</div>
  <div><span class="161561913-09092002"><font face="Arial" color="#0000ff" size="2">
Attached you will find the .cpp and .h files.&nbsp; Please note that this  is
very much a work in progress, so there are no guaranties as to the quality,
 stability or robustness of this code (use at your own risk).</font></span></div>
  <div><span class="161561913-09092002"></span>&nbsp;</div>
  <div><span class="161561913-09092002"><font face="Arial" color="#0000ff" size="2">
That  being said, I hope it is of use to you.</font></span></div>
  <div>&nbsp;</div>
  <div>Ron Jerome</div>
  <div>Institute for Chemical Process and </div>
  <div>Environmental Technology</div>
  <div>National Research Council Canada</div>
  <div>613-993-5346</div>
  <div>&nbsp;</div>
  <blockquote style="padding-left: 5px; margin-left: 5px; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(0,0,255); ">
    <div class="OutlookMessageHeader"><font face="Times New Roman" size="2">
-----Original Message-----<br>
    <b>From:</b> Steffen Oeltze    [<a class="moz-txt-link-freetext" href="mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE">mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE</a>]<br>
    <b>Sent:</b> Monday,    September 09, 2002 2:55 AM<br>
    <b>To:</b> Jerome, Ron<br>
    <b>Subject:</b> Re:    [vtkusers] Re: Best vtk / QT package?<br>
    <br>
    </font></div>
Hi Ron,<br>
    <br>
I'm    very interested in your vtkRenderWidget-class. Could you please send
me<br>
the    *.cpp and *.h files. <br>
    <br>
Thank's a lot,<br>
Steffen Oeltze<br>
    <br>
Jerome,    Ron wrote:<br>
    <blockquote cite="mid:17C47B340D0BD411B0C70004AC5676BC1D2A8F@nrcmrdex1c.imsb.nrc.ca" type="cite">
      <meta content="MSHTML 6.00.2716.2200" name="GENERATOR">
      <div><font face="Arial" size="2"><span class="612383618-06092002">Be
aware that      some of these solutions (including <font face="Times New Roman">
VTK_QT      solution by </font><a href="http://wwwipr.ira.uka.de/%7Ekuebler"><font face="Times New Roman" color="#000000">
Carsten K&uuml;bler</font></a>
      <font face="Times New Roman">) have issues with&nbsp;&nbsp;(will not display)
2D      actors such as scalar bars and 2D text.</font></span></font></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">I
created a      render widget by subclassing QWidget, then in the constructor
doing      something like what is shown below.&nbsp; This has no problem with
2D      stuff.&nbsp; </font></span></div>
      <div><span class="612383618-06092002"></span>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">vtkRenderWidget::vtkRenderWidget(
QWidget * parent, const char *      name,WFlags f&nbsp; )<br>
: QWidget(parent, name,f)      {<br>
&nbsp;this-&gt;setFocusPolicy(QWidget::StrongFocus);<br>
&nbsp;this-&gt;setMouseTracking(TRUE);<br>
&nbsp;this-&gt;setUpdatesEnabled(      FALSE      );<br>
&nbsp;this-&gt;setMinimumSize(QSize(300,300));<br>
&nbsp;this-&gt;InitRenderWindow();<br>
}</font></span></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">void
     vtkRenderWidget::InitRenderWindow() {<br>
      </font></span></div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">&nbsp;this-&gt;renderWindow
=      vtkRenderWindow::New();</font></span></div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">&nbsp;this-&gt;interactor
=      vtkRenderWindowInteractor::New();<br>
&nbsp;this-&gt;interactor-&gt;SetRenderWindow(this-&gt;renderWindow);<br>
      </font></span></div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">}</font></span></div>
      <div><span class="612383618-06092002"></span>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">void
     vtkRenderWidget::resizeEvent(QResizeEvent *event) {<br>
&nbsp;<br>
&nbsp;if      (!this-&gt;initNeeded)      <br>
&nbsp;&nbsp;this-&gt;renderWindow-&gt;Render();<br>
&nbsp;<br>
}</font></span></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">void
     vtkRenderWidget::paintEvent(QPaintEvent *event )<br>
{<br>
&nbsp;// Get the      native window ID and pass it<br>
&nbsp;// to the VTK render      window<br>
&nbsp;// before we render for the first time...<br>
&nbsp;if      (this-&gt;initNeeded) {<br>
&nbsp;&nbsp;WId nId =      winId();<br>
&nbsp;&nbsp;this-&gt;renderWindow-&gt;SetWindowId( (void*) nId      );<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;Initialize();<br>
&nbsp;&nbsp;this-&gt;initNeeded      =      false;<br>
&nbsp;&nbsp;this-&gt;renderWindow-&gt;Render();<br>
&nbsp;&nbsp;<br>
&nbsp;}<br>
&nbsp;else      {<br>
&nbsp;&nbsp;this-&gt;renderWindow-&gt;Render();<br>
&nbsp;}<br>
}<br>
void      vtkRenderWidget::TimerFunc() {<br>
&nbsp;if( !      this-&gt;interactor-&gt;GetEnabled() ) {<br>
&nbsp;&nbsp;return      ;<br>
&nbsp;}<br>
&nbsp;<br>
&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4    
 &amp;&amp;<br>
&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;{<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::TimerEvent,NULL);<br>
&nbsp;}<br>
&nbsp;else<br>
&nbsp;{<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnTimer()      ;<br>
&nbsp;}<br>
&nbsp;<br>
&nbsp;<br>
}</font></span></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"></span>&nbsp;</div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2">void
     vtkRenderWidget::mouseMoveEvent( QMouseEvent *event )      {<br>
&nbsp;<br>
&nbsp;//&nbsp;mTimer-&gt;start(10, TRUE) ;<br>
&nbsp;mX =      event-&gt;x() ;<br>
&nbsp;mY = event-&gt;y() ;<br>
&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4    
 &amp;&amp;<br>
&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;= 1)<br>
&nbsp;{<br>
#if VTK_MAJOR_VERSION &gt;=      4<br>
#if&nbsp;VTK_MINOR_VERSION &gt;=      1<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;SetEventInformationFlipY(<br>
&nbsp;&nbsp;&nbsp;event-&gt;x(),      <br>
&nbsp;&nbsp;&nbsp;event-&gt;y(),      <br>
&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp;      ShiftButton));<br>
#endif<br>
#endif<br>
&nbsp;&nbsp;if      (!this-&gt;mouseInWindow &amp;&amp; <br>
&nbsp;&nbsp;&nbsp;(event-&gt;x()      &gt;= 0 &amp;&amp; event-&gt;x() &lt; this-&gt;geometry().width()
&amp;&amp;      <br>
&nbsp;&nbsp;&nbsp;event-&gt;y() &gt;= 0 &amp;&amp; event-&gt;y() &lt;      this-&gt;geometry().height()))<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::EnterEvent,      NULL);<br>
&nbsp;&nbsp;&nbsp;this-&gt;mouseInWindow =      1;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;if      (this-&gt;mouseInWindow &amp;&amp; <br>
&nbsp;&nbsp;&nbsp;(event-&gt;x() &lt;      0 || event-&gt;x() &gt;= this-&gt;geometry().width()
||      <br>
&nbsp;&nbsp;&nbsp;event-&gt;y() &lt; 0 || event-&gt;y() &gt;=      this-&gt;geometry().height()))<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::LeaveEvent,      NULL);<br>
&nbsp;&nbsp;&nbsp;this-&gt;mouseInWindow =      0;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::MouseMoveEvent,      NULL);<br>
&nbsp;&nbsp;<br>
&nbsp;}<br>
&nbsp;else<br>
&nbsp;{<br>
&nbsp;&nbsp;if      (!this-&gt;mouseInWindow &amp;&amp; <br>
&nbsp;&nbsp;&nbsp;(mX &gt;= 0      &amp;&amp; mX &lt; this-&gt;geometry().width() &amp;&amp;
     <br>
&nbsp;&nbsp;&nbsp;mY &gt;= 0 &amp;&amp; mY &lt;      this-&gt;geometry().height()))<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnEnter(0,      0, <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX, this-&gt;geometry().height() - mY -      1);<br>
&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;mouseInWindow =      1;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;if      (this-&gt;mouseInWindow &amp;&amp; <br>
&nbsp;&nbsp;&nbsp;(mX &lt; 0 || mX      &gt;= this-&gt;geometry().width() || <br>
&nbsp;&nbsp;&nbsp;mY &lt; 0 || mY      &gt;=      this-&gt;geometry().height()))<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnLeave(0,      0, <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX, this-&gt;geometry().height() - mY -      1);<br>
&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;mouseInWindow =      0;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnMouseMove(0,      0,
      <br>
&nbsp;&nbsp;&nbsp;mX, this-&gt;geometry().height() - mY - 1)      ;<br>
&nbsp;&nbsp;<br>
&nbsp;}<br>
&nbsp;<br>
&nbsp;<br>
}</font></span></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2"><br>
void      vtkRenderWidget::mousePressEvent( QMouseEvent *event )      {<br>
&nbsp;<br>
&nbsp;//&nbsp;&nbsp; mTimer-&gt;start(10, TRUE) ;<br>
&nbsp;mX      = event-&gt;x() ;<br>
&nbsp;mY = event-&gt;y() ;<br>
&nbsp;<br>
#if      VTK_MAJOR_VERSION &gt;= 4<br>
#if&nbsp;VTK_MINOR_VERSION &gt;= 1<br>
&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4    
 &amp;&amp;<br>
&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;{<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;SetEventInformationFlipY(event-&gt;x(),      <br>
&nbsp;&nbsp;&nbsp;event-&gt;y(),      <br>
&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp;      ShiftButton));<br>
&nbsp;}<br>
#endif<br>
#endif&nbsp;&nbsp;      <br>
&nbsp;switch(event-&gt;button()) {<br>
&nbsp;case      LeftButton:<br>
&nbsp;&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4   
  &amp;&amp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::LeftButtonPressEvent,NULL);<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;else<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnLeftButtonDown(   
  (event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ShiftButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX,&nbsp;this-&gt;geometry().height() - mY - 1 )      ;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;break ;<br>
&nbsp;case      MidButton:<br>
&nbsp;&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4   
  &amp;&amp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::MiddleButtonPressEvent,NULL);<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;else<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnMiddleButtonDown(  
   (event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ShiftButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX,&nbsp;&nbsp; this-&gt;geometry().height() -      mY - 1 ) ;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;break ;<br>
&nbsp;case      RightButton:<br>
&nbsp;&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4   
  &amp;&amp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::RightButtonPressEvent,NULL);<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;else<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnRightButtonDown(  
   (event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ShiftButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX, this-&gt;geometry().height() - mY - 1 )      ;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;break;<br>
&nbsp;default:<br>
&nbsp;&nbsp;break      ;<br>
&nbsp;}<br>
&nbsp;return ;<br>
}</font></span></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2"><br>
void      vtkRenderWidget::mouseReleaseEvent( QMouseEvent *event )      {<br>
&nbsp;//&nbsp;mTimer-&gt;stop() ;&nbsp; <br>
&nbsp;<br>
#if      VTK_MAJOR_VERSION &gt;= 4<br>
#if&nbsp;VTK_MINOR_VERSION &gt;= 1<br>
&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4    
 &amp;&amp;<br>
&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;{<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;SetEventInformationFlipY(event-&gt;x(),      <br>
&nbsp;&nbsp;&nbsp;event-&gt;y(),      <br>
&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp;      ShiftButton));<br>
&nbsp;}<br>
#endif<br>
#endif&nbsp;&nbsp;      <br>
&nbsp;switch(event-&gt;button())      <br>
&nbsp;{<br>
&nbsp;&nbsp;<br>
&nbsp;case LeftButton:<br>
&nbsp;&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4   
  &amp;&amp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::LeftButtonReleaseEvent,NULL);&nbsp;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;else<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnLeftButtonUp(     
(event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ShiftButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX,&nbsp;&nbsp; this-&gt;geometry().height() -      mY - 1 ) ;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;break ;<br>
&nbsp;case      MidButton:<br>
&nbsp;&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4   
  &amp;&amp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::MiddleButtonReleaseEvent,NULL);&nbsp;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;else<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnMiddleButtonUp(   
  (event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ShiftButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX,&nbsp; this-&gt;geometry().height() - mY - 1      ) ;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;break ;<br>
&nbsp;case      RightButton:<br>
&nbsp;&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4   
  &amp;&amp;<br>
&nbsp;&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;=      1)<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::RightButtonReleaseEvent,NULL);&nbsp;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;else<br>
&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnRightButtonUp(    
 (event-&gt;state() &amp; ControlButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;(event-&gt;state() &amp; ShiftButton),      <br>
&nbsp;&nbsp;&nbsp;&nbsp;mX,&nbsp;&nbsp; this-&gt;geometry().height() -      mY - 1 )      ;<br>
&nbsp;&nbsp;}<br>
&nbsp;&nbsp;<br>
&nbsp;&nbsp;break;<br>
&nbsp;default:<br>
&nbsp;&nbsp;break      ;<br>
&nbsp;}<br>
&nbsp;return ;<br>
}</font></span></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2"><br>
void      vtkRenderWidget::keyPressEvent (QKeyEvent * event) {<br>
&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4    
 &amp;&amp;<br>
&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;= 1)<br>
&nbsp;{<br>
#if VTK_MAJOR_VERSION &gt;=      4<br>
#if&nbsp;VTK_MINOR_VERSION &gt;=      1<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;SetKeyEventInformation(event-&gt;state()      &amp;
ControlButton, <br>
&nbsp;&nbsp;&nbsp;event-&gt;state() &amp;      ShiftButton, <br>
&nbsp;&nbsp;&nbsp;*key,      <br>
&nbsp;&nbsp;&nbsp;event-&gt;count(),      <br>
&nbsp;&nbsp;&nbsp;"None");<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::KeyPressEvent,      NULL);<br>
#endif<br>
#endif<br>
&nbsp;}<br>
&nbsp;else<br>
&nbsp;{&nbsp;&nbsp;      <br>
&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnChar(      event-&gt;state()
&amp; ControlButton,      <br>
&nbsp;&nbsp;&nbsp;event-&gt;state() &amp; ShiftButton,      <br>
&nbsp;&nbsp;&nbsp;event-&gt;key(), <br>
&nbsp;&nbsp;&nbsp;1 )      ;<br>
&nbsp;}<br>
&nbsp;<br>
}</font></span></div>
      <div>&nbsp;</div>
      <div><span class="612383618-06092002"><font face="Arial" size="2"><br>
void      vtkRenderWidget::keyReleaseEvent (QKeyEvent * event) {<br>
&nbsp;<br>
&nbsp;if      (this-&gt;vtkVersionNumber-&gt;GetVTKMajorVersion() &gt;= 4    
 &amp;&amp;<br>
&nbsp;&nbsp;this-&gt;vtkVersionNumber-&gt;GetVTKMinorVersion()      &gt;= 1)<br>
&nbsp;{<br>
#if VTK_MAJOR_VERSION &gt;=      4<br>
#if&nbsp;VTK_MINOR_VERSION &gt;=      1<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;SetKeyEventInformation(event-&gt;state()      &amp;
ControlButton, <br>
&nbsp;&nbsp;&nbsp;event-&gt;state() &amp;      ShiftButton, <br>
&nbsp;&nbsp;&nbsp;event-&gt;ascii(),      <br>
&nbsp;&nbsp;&nbsp;event-&gt;count(),      <br>
&nbsp;&nbsp;&nbsp;"None");<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;InvokeEvent(vtkCommand::KeyReleaseEvent,      NULL);<br>
#endif<br>
#endif<br>
&nbsp;}<br>
&nbsp;else<br>
&nbsp;{<br>
&nbsp;&nbsp;this-&gt;interactor-&gt;GetInteractorStyle()-&gt;OnKeyUp(      event-&gt;state()
&amp; ControlButton,      <br>
&nbsp;&nbsp;&nbsp;event-&gt;state() &amp; ShiftButton,      <br>
&nbsp;&nbsp;&nbsp;event-&gt;key(), 1 )      ;<br>
&nbsp;}<br>
}</font></span></div>
      <div>Ron Jerome</div>
      <div>Institute for Chemical Process and </div>
      <div>Environmental Technology</div>
      <div>National Research Council Canada</div>
      <div>613-993-5346</div>
      <div>&nbsp;</div>
      <blockquote dir="Ltr" style="padding-left: 5px; margin-left: 5px; border-left-width: 2px; border-left-style: solid; border-left-color: rgb(0,0,255); margin-right: 0px; ">
        <div class="OutlookMessageHeader"><font size="2">-----Original  
     Message-----<br>
        <b>From:</b> Stefan Bruckner [<a class="moz-txt-link-freetext" href="mailto:stefan.bruckner@chello.at">
mailto:stefan.bruckner@chello.at</a>
]<br>
        <b>Sent:</b>        Friday, September 06, 2002 10:48 AM<br>
        <b>To:</b><a class="moz-txt-link-abbreviated" href="mailto:vtkusers@public.kitware.com">
vtkusers@public.kitware.com</a>
        <br>
        <b>Subject:</b>        Re: [vtkusers] Re: Best vtk / QT package?<br>
        <br>
        </font></div>
        <div><font face="Arial" size="2"><span class="158284514-06092002">
That should        work. I actually just saw the GetDataPointer() Method
after I sent the        last message. </span></font></div>
        <div>&nbsp;</div>
        <div><font face="Arial" size="2"><span class="158284514-06092002">
I have not        tried stereo rendering yet ... you're having troubles with
it,        r&iacute;ght?</span></font></div>
        <div>&nbsp;</div>
        <div><font face="Arial" size="2"><span class="158284514-06092002">
--</span></font></div>
        <div><font face="Arial" size="2"><span class="158284514-06092002">
Stefan        Bruckner</span></font></div>
        <div>&nbsp;</div>
        <blockquote style="margin-right: 0px; ">
          <div class="OutlookMessageHeader" lang="de" dir="Ltr" align="Left"><font face="Tahoma" size="2">
-----Urspr&uuml;ngliche Nachricht-----<br>
          <b>Von:</b>          Steffen Oeltze [<a class="moz-txt-link-freetext" href="mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE">
mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE</a>
]          <br>
          <b>Gesendet:</b> Freitag, 06. September 2002 16:20<br>
          <b>An:</b>          Stefan Bruckner<br>
          <b>Cc:</b><a class="moz-txt-link-abbreviated" href="mailto:vtkusers@public.kitware.com">
vtkusers@public.kitware.com</a>
          <br>
          <b>Betreff:</b>          Re: [vtkusers] Re: Best vtk / QT package?<br>
          <br>
          </font></div>
I have          found a convenient way in the meanwhile. When the user changes
the          rgb-values (the scalar value keeps the same) of a point I simply
use the          function addRGBValue(...). VTK internally replaces the old
point by the          new one. When the user changes the scalar value I use
the          getDataPointer()-function which returns a pointer to the transfer
         function and then, I manipulate the function directly by replacing
the          scalar value each time the user moves a slider. This is actually
what          I'm planing to do. I haven't implemented it yet. <br>
I expect to be at          most 10 points in my functions.<br>
          <br>
Have you tried to enable a          vtkQtRenderWindow for stereo rendering
yet          ?<br>
          <br>
Steffen<br>
          <br>
          <br>
          <br>
          <br>
Stefan Bruckner wrote:<br>
          <blockquote cite="mid:000901c255ae$6c569800$bc9fbad4@SID" type="cite">
            <meta content="MSHTML 6.00.2713.1100" name="GENERATOR">
            <div>
            <div><span class="229565113-06092002"><font face="Arial" size="2"><font face="Arial">
What I did in the Java-Program is to simple store the            function
currently displayed in the edior in an array. When the vtk            window
has to be redrawn and the transfer function has been modified,          
 I just create a new vtkColorTransferFunction from the array. Although  
         this is of course not optimal, the overhead introduced is negligible,
           if node counts&nbsp;don't get to high. How many nodes do you expect
to            be in your functions?</font></font></span></div>
            <div>&nbsp;</div>
            <div>&nbsp;</div>
            <div><font face="Arial" size="2"><font face="Tahoma"><font size="2"><span class="229565113-06092002">
&nbsp;</span>-----Urspr&uuml;ngliche            Nachricht-----<br>
            <b>Von:</b> Steffen Oeltze [<a class="moz-txt-link-freetext" href="mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE"><font color="#000000">
            mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE</font></a>
 ]            <br>
            <b>Gesendet:</b> Freitag, 06. September 2002 09:45<br>
            <b>An:</b>            Stefan Bruckner; VTK users<br>
            <b>Betreff:</b> Re: [vtkusers] Re: Best            vtk / QT package?<br>
            <br>
            </font></font></font></div>
            <blockquote style="margin-right: 0px; "><font face="Arial" size="2">
I have              got a question concerning the package you have mentioned.
I'm using              vtkqt by Matthias Koenig which works fine except for
the fact that              I'm not able to render stereo in his vtkQtRenderWindow.
Calling the              method "StereoCapableOn()" results in an error.
Could you please              test for me if this method works with the package
you are using              ?<br>
              <br>
A week ago I downloaded your java-program to graphically              edit
a transfer function. I'm trying to<br>
implement something              similar using Qt. Unfortunately, I encountered
a problem concerning              the<br>
editing of a vtkColorTransferFunction. You &nbsp;can add a              point
to this function and you can remove<br>
one but I couldn't find              a method to modify an already existing
point. However, this is              necessary<br>
for my application because I want to enable the user to              change
the transfer function interactively.<br>
The problem is that I              don't want a new point to be added each
time the user changes the              color<br>
but I want to modify the recently added point. How did you              manage
this ?<br>
              <br>
Regards,<br>
Steffen<br>
              <br>
Stefan Bruckner              wrote:<br>
              </font>
              <blockquote cite="mid:1031257530.14474.14.camel@NANCY" type="cite">
                <pre wrap=""><font face="Arial" size="2">I've examined nearly all of the packages out there, most of them are<br>pretty outdated. The best and probably most current (VTK 4, QT 3) is<br>VTK_QT by Carsten Kuebler. <br><br>Source is provided in an MS Visual Studio project, but I've managed to<br>compile it under Linux within minutes without problems.<br><br>Download: <a class="moz-txt-link-freetext" href="http://wwwipr.ira.uka.de/%7Ekuebler/vtkqt/index.html"><font color="#000000">http://wwwipr.ira.uka.de/~kuebler/vtkqt/index.html</font></a><br><br>--<br>Stefan Bruckner<br><br><br></font></pre>
                <blockquote type="cite">
                  <pre wrap=""><font face="Arial" size="2">I am trying to get vtk and qt working properly.<br><br>Which is the best vtk/qt package available?<br>Which has the best chance of being supported in the future?<br>Which should I avoid altogether? (maybe too old to work with newer<br>versions?)<br><br>I appreciate all help and opinions!<br><br>Thanks,<br>Alex Lear<br><br>_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at:<br></font></pre>
                  </blockquote>
                  <pre wrap=""><!----><font face="Arial" size="2"><a class="moz-txt-link-rfc2396E" href="http://public.kitware.com/cgi-bin/vtkfaq"><font color="#000000">&lt;http://public.kitware.com/cgi-bin/vtkfaq&gt;</font></a><br></font></pre>
                  <blockquote type="cite">
                    <pre wrap=""><font face="Arial" size="2">Follow this link to subscribe/unsubscribe:<br><a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers"><font color="#000000">http://public.kitware.com/mailman/listinfo/vtkusers</font></a><br></font></pre>
                    </blockquote>
                    <pre wrap=""><!----><font face="Arial" size="2"><br><br><br><br>_______________________________________________<br>This is the private VTK discussion list. <br>Please keep messages on-topic. Check the FAQ at: <a class="moz-txt-link-rfc2396E" href="http://public.kitware.com/cgi-bin/vtkfaq"><font color="#000000">&lt;http://public.kitware.com/cgi-bin/vtkfaq&gt;</font></a><br>Follow this link to subscribe/unsubscribe:<br><a class="moz-txt-link-freetext" href="http://public.kitware.com/mailman/listinfo/vtkusers"><font color="#000000">http://public.kitware.com/mailman/listinfo/vtkusers</font></a><br><br></font></pre>
                    </blockquote>
                    <font face="Arial" size="2"><br>
                    </font></blockquote>
                    </div>
                    </blockquote>
                    <br>
                    </blockquote>
                    </blockquote>
                    </blockquote>
                    <br>
                    </blockquote>
                    <center>
                    <table border="1">
                      <tbody>
                        <tr>
                          <td>
                          <div align="Right" class="headerdisplayname" style="display: inline; ">
vtkrenderwidget.cpp</div>
                          </td>
                          <td>
                          <table border="0">
                            <tbody>
                              <tr>
                                <td>
                                <div align="Right" class="headerdisplayname" style="display: inline; ">
Content-Type:</div>
                                </td>
                                <td>application/octet-stream</td>
                              </tr>
                              <tr>
                                <td>
                                <div align="Right" class="headerdisplayname" style="display: inline; ">
Content-Encoding:</div>
                                </td>
                                <td>quoted-printable</td>
                              </tr>
                            </tbody>
                          </table>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                    </center>
                    <br>
                    <hr width="90%" size="4">
                    <center>
                    <table border="1">
                      <tbody>
                        <tr>
                          <td>
                          <div align="Right" class="headerdisplayname" style="display: inline; ">
vtkrenderwidget.h</div>
                          </td>
                          <td>
                          <table border="0">
                            <tbody>
                              <tr>
                                <td>
                                <div align="Right" class="headerdisplayname" style="display: inline; ">
Content-Type:</div>
                                </td>
                                <td>application/octet-stream</td>
                              </tr>
                            </tbody>
                          </table>
                          </td>
                        </tr>
                      </tbody>
                    </table>
                    </center>
                    <br>
                    </blockquote>
                    <br>
                    </body>
                    </html>