<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello,
<p>here are some comments and suggestions during my work with vtk 3.2 beta
and qt 2.2.
<br>&nbsp;
<p>1. The imager doesn't erase the whole contents (Use in combination of
vtk and qt). (same as 3.1 and 3.2)
<blockquote><tt>void vtkOpenGLImager::Erase()</tt>
<br><tt>{</tt>
<br><tt>&nbsp;&nbsp; ....</tt><tt></tt>
<p><tt>&nbsp;glClearDepth( (GLclampd)( 1.0 ) );</tt><tt></tt>
<p><tt>&nbsp; vtkDebugMacro(&lt;&lt; "glClear\n");</tt>
<br><tt>//&nbsp; glClear((GLbitfield)GL_COLOR_BUFFER_BIT);</tt>
<br><tt>&nbsp; glClear((GLbitfield)GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);</tt>
<br><tt>}</tt></blockquote>

<p><br>2. I had to set the viewUp of the camera when I render the first
time (Use in combination of vtk and qt). Maybe a problem of my implementation?!
(new in 3.2)
<blockquote><tt>void vtkOpenGLCamera::Render(vtkRenderer *ren)</tt>
<br><tt>{</tt>
<br><tt>&nbsp; if (!this->reset)</tt>
<br><tt>&nbsp; {</tt>
<br><tt>&nbsp;&nbsp; double data[3];</tt>
<br><tt>&nbsp;&nbsp; this->GetViewUp(data);</tt>
<br><tt>&nbsp;&nbsp; this->SetViewUp(data);</tt>
<br><tt>&nbsp;&nbsp; this->reset = 1;</tt>
<br><tt>&nbsp; }</tt>
<br><tt>...</tt>
<br><tt>}</tt></blockquote>
3. Please declare the <tt>vtkImageViewer::Render() </tt>method as virtual.
(same as 3.1 and 3.2) Otherwise it is not possible to handle changes of
the inputdata. (I add a resample object to the pipe to improve the flexibility
of the imageviewer)
<blockquote><tt>void vtkImageViewer::Render()</tt>
<br><tt>{</tt>
<br><tt>&nbsp; // initialize the size if not set yet</tt>
<br><tt>&nbsp; if (/*this->ImageWindow->GetSize()[0] == 0 &amp;&amp; this->ImageMapper->GetInput()*/this->ImageResample->GetInput())</tt>
<br><tt>&nbsp;&nbsp;&nbsp; {</tt>
<br><tt>&nbsp;&nbsp;&nbsp; // get the size from the mappers input</tt>
<br><tt>&nbsp;&nbsp;&nbsp; this->ImageMapper->GetInput()->UpdateInformation();</tt>
<br><tt>&nbsp;&nbsp;&nbsp; int *ext = this->ImageMapper->GetInput()->GetWholeExtent();</tt>
<br><tt>&nbsp;&nbsp;&nbsp; this->ImageWindow->SetSize(ext[1] - ext[0] +
1, ext[3] - ext[2] + 1);</tt>
<br><tt>&nbsp;&nbsp;&nbsp; }</tt>
<br><tt>&nbsp;</tt>
<br><tt>&nbsp; this->ImageWindow->Render();</tt>
<br><tt>}</tt></blockquote>

<p><br>4. Try to splitt the OpenGL extension from the Window implementations.
So it would be easier to write a package to combine a GUI and vtk. (same
in 3.1 and 3.2)
<br>&nbsp;
<p>Carsten</html>