[vtk-developers] vtkVolumeTextureMapper3D: (BUG in nVidia drivers) Suggestion for a workaround

Fangerau Markus m.fangerau at Dkfz-Heidelberg.de
Mon Dec 21 05:50:05 EST 2009


Hi all,

We are currently using a modified volume-rendering mapper based on the "vtkVolumeTextureMapper3D" and "vtkOpenGLVolumeTextureMapper3D".
During our development we encountered a bug on some nvidia drivers (at least on windows vista 64, driver ver. 190.38):

Even though this drivers support non-power-of-two textures,
They will crash the application, when allocating the texture with a "uneven" size in the first dimension.
As an example: our CT data with a resolution of 391x290x226 results in display artifacts and strange crashs later.

If u modify following section (line 1044 in vtkVolumeTextureMapper3D.cxx)

  if(this->SupportsNonPowerOfTwoTextures)
    {
     for ( int i = 0; i < 3; i++ )
       {
       powerOfTwoDim[i]=dim[i];
       }
    }

with following section:

  if(this->SupportsNonPowerOfTwoTextures)
    {
     for ( int i = 0; i < 3; i++ )
       {
       powerOfTwoDim[i]=(dim[i]+1)&~1;
       }
    }

the internal texture resolution will be rounded up to the next even number in all dimensions.

Hope this helps people having problems with using the vtkVolumeTextureMapper3D and some nvidia drivers.
However we can't provide a detection algorithm for the bug in the drivers, since its seems many are affected (32bit/64bit, Windows XP/Vista/7, and different versions).
We always enable this workaround, since its resource impact is very small.


Greetings,

Markus Fangerau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20091221/7ea3fbb0/attachment.html>


More information about the vtk-developers mailing list