<html><body>
<p>"nikolaus heger" <nikolaus.heger@gmail.com><tt> wrote on 08/06/2006 13:20:36:<br>
<br>
> Hi,</tt><br>
<tt>> </tt><br>
<tt>> I have a problem where textures over 2000 pixels show up as white <br>
> rectangles on my computer. </tt><br>
<tt>> </tt><br>
<tt>> It seems to be isolated to ATI cards - I have an X1600 with 256M / 512M RAM.</tt><br>
<tt>> </tt><br>
<tt>> Does anyone know if this affects all ATI cards, or can this be fixed<br>
> with a new driver or with vtk 5.0? </tt><br>
<tt>> </tt><br>
<tt>> Demo code in [1] shows the problem.</tt><br>
<tt>> </tt><br>
<tt>> Thanks for any help or info! </tt><br>
<tt>> </tt><br>
<tt>> Nik</tt><br>
<tt>> [1]</tt><br>
<tt>> import Tkinter<br>
> from Tkinter import *<br>
> import math, os, sys<br>
> from vtkpython import *<br>
> import vtk</tt><br>
<tt>> from vtk.tk.vtkLoadPythonTkWidgets import vtkLoadPythonTkWidgets</tt><br>
<tt>> filename = "demo_lg.jpg" # 2300 pixel high image - displays as white<br>
> rectangle on ATI cards.</tt><br>
<tt>> #filename = "demo.jpg" # 2000 pixel high image - TOTALLY FINE</tt><br>
<br>
<tt>I have experienced the white rectangle problem, on an ATI card too, but it just seems to be a physical limitation on maximum texture size. In C++ I used the following OpenGL call from inside my vtk app to find out the maximum:</tt><br>
<br>
<tt> long maxDimGL;</tt><br>
<tt> glGetIntegerv(GL_MAX_TEXTURE_SIZE,&maxDimGL);</tt><br>
<br>
<tt>I have no idea if you can access this in Tcl/Tk. I think there are OpenGL testbench programs out there that may report this number, perhaps you could look for one.</tt><br>
<tt>The bottom line is this looks to be a hardware limit, you would have to add code to resample images down if they were larger than the reported limit on a given machine.</tt><br>
<br>
<tt> regards</tt><br>
<tt> Dave P</tt><br>
<tt>> <br>
> reader = vtk.vtkImageReader2Factory.CreateImageReader2(filename) <br>
> reader.SetFileName(filename)</tt><br>
<tt>> # set the window/level <br>
> viewer = vtkImageViewer2()<br>
> viewer.SetInput(reader.GetOutput())<br>
> viewer.SetColorWindow(100.0)<br>
> viewer.SetColorLevel(127.5)</tt><br>
<tt>> viewer.Render()</tt><br>
<tt>> #make interface<br>
> viewer.Render()</tt><br>
<tt>> windowToimage = vtkWindowToImageFilter()<br>
> windowToimage.SetInput(viewer.GetRenderWindow())</tt><br>
<tt>> frame = Frame()<br>
> frame.mainloop()</tt><br>
<tt>> _______________________________________________<br>
> This is the private VTK discussion list. <br>
> Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk">http://www.vtk</a>.<br>
> org/Wiki/VTK_FAQ<br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</tt></body></html>