MantisBT - VTK
View Issue Details
0011391VTK(No Category)public2010-11-02 05:172016-08-12 09:55
Simon ESNEAULT 
Kitware Robot 
normalminoralways
closedmoved 
 
 
0011391: vtkVolumeTextureMapper3D memory consumption since 5.6
Hi All,

Since vtk 5.6 is out, we have some trouble using vtkVolumeTextureMapper3D.

With VTK 5.4 rendering a volume of 512x512x366 consumes around 500 Mo and needs one or two seconds to load. The interactivity is good (20 fps)
With VTK 5.6, rendering the same volume consumes 1700 Mo and needs more than 30 seconds to load. And the interactivity is unusable. (~1 fps)
Test done on an intel i7 870 cpu, with an nvidia gtx 260, Ubuntu Linux 64 bits (same result on windows 7).

After some investigation, it appears that the pb, is the use of MAX_3D_TEXTURE_SIZE in the file vtkOpenGLVolumeTextureMapper3D.cxx instead of an harcoded max texture size (128*256*256) as it used to be in vtk 5.4. In the documentation it is said that all the volume will be resampled to a 128*256*256 volume, but it's no longer true in > 5.4.

As a rough hack, if we changed the code around line 1970 of the file vtkOpenGLVolumeTextureMapper3D.cxx :

int vtkOpenGLVolumeTextureMapper3D::IsTextureSizeSupported(int size[3], components)
{
  GLint maxSize;
  glGetIntegerv(vtkgl::MAX_3D_TEXTURE_SIZE,&maxSize);

  if(size[0]>maxSize || size[1]>maxSize || size[2]>maxSize)
    {
    return 0;
    }

... into ...

int vtkOpenGLVolumeTextureMapper3D::IsTextureSizeSupported(int size[3], components)
{
  GLint maxSize;
  glGetIntegerv(vtkgl::MAX_3D_TEXTURE_SIZE,&maxSize);
  maxSize = 256;

  if(size[0]>maxSize || size[1]>maxSize || size[2]>maxSize)
    {
    return 0;
    }

... we get back the good old behavior of this 3D volume mapper.

Maybe this can be set as an option, something like mapper->Max3DTextureSizeOn(), to prevent that problem.


Thanks for listening, and thanks a lot for VTK.

-Simon
No tags attached.
Issue History
2010-11-02 05:17Simon ESNEAULTNew Issue
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2011-09-13 09:24Julien FinetNote Added: 0027473
2016-08-12 09:55Kitware RobotNote Added: 0037208
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved
2016-08-12 09:55Kitware RobotAssigned To => Kitware Robot

Notes
(0027473)
Julien Finet   
2011-09-13 09:24   
What is the maxSize you get from vtkgl::MAX_3D_TEXTURE_SIZE ?
(0037208)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.