<!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>
<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> ....</tt><tt></tt>
<p><tt> glClearDepth( (GLclampd)( 1.0 ) );</tt><tt></tt>
<p><tt> vtkDebugMacro(<< "glClear\n");</tt>
<br><tt>// glClear((GLbitfield)GL_COLOR_BUFFER_BIT);</tt>
<br><tt> 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> if (!this->reset)</tt>
<br><tt> {</tt>
<br><tt> double data[3];</tt>
<br><tt> this->GetViewUp(data);</tt>
<br><tt> this->SetViewUp(data);</tt>
<br><tt> this->reset = 1;</tt>
<br><tt> }</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> // initialize the size if not set yet</tt>
<br><tt> if (/*this->ImageWindow->GetSize()[0] == 0 && this->ImageMapper->GetInput()*/this->ImageResample->GetInput())</tt>
<br><tt> {</tt>
<br><tt> // get the size from the mappers input</tt>
<br><tt> this->ImageMapper->GetInput()->UpdateInformation();</tt>
<br><tt> int *ext = this->ImageMapper->GetInput()->GetWholeExtent();</tt>
<br><tt> this->ImageWindow->SetSize(ext[1] - ext[0] +
1, ext[3] - ext[2] + 1);</tt>
<br><tt> }</tt>
<br><tt> </tt>
<br><tt> 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>
<p>Carsten</html>