<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Nachricht</TITLE>

<META content="MSHTML 6.00.2716.2200" name=GENERATOR></HEAD>
<BODY>
<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/~kuebler"><FONT face="Times New Roman" 
color=#000000>Carsten Kü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><FONT face=Arial size=2></FONT>&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><FONT face=Arial 
size=2></FONT></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><FONT face=Arial size=2></FONT>&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><FONT face=Arial 
size=2></FONT></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><FONT face=Arial 
size=2></FONT></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>}</DIV></FONT></SPAN>
<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><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader><FONT size=2>-----Original 
  Message-----<BR><B>From:</B> Stefan Bruckner 
  [mailto:stefan.bruckner@chello.at]<BR><B>Sent:</B> Friday, September 06, 2002 
  10:48 AM<BR><B>To:</B> vtkusers@public.kitware.com<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><FONT face=Arial size=2><SPAN 
  class=158284514-06092002></SPAN></FONT>&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íght?</SPAN></FONT></DIV>
  <DIV><FONT face=Arial size=2><SPAN 
  class=158284514-06092002></SPAN></FONT>&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><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <BLOCKQUOTE style="MARGIN-RIGHT: 0px">
    <DIV></DIV>
    <DIV class=OutlookMessageHeader lang=de dir=ltr align=left><FONT face=Tahoma 
    size=2>-----Ursprüngliche Nachricht-----<BR><B>Von:</B> Steffen Oeltze 
    [mailto:Steffen.Oeltze@Student.Uni-Magdeburg.DE] <BR><B>Gesendet:</B> 
    Freitag, 06. September 2002 16:20<BR><B>An:</B> Stefan 
    Bruckner<BR><B>Cc:</B> vtkusers@public.kitware.com<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><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2><FONT face=Tahoma><FONT size=2><SPAN 
      class=229565113-06092002>&nbsp;</SPAN>-----Ursprü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></BODY></HTML>