[vtkusers] vtkVolumeTextureMapper3D memory consumption since 5.6

Simon ESNEAULT simon.esneault at gmail.com
Tue Nov 2 05:40:09 EDT 2010


Thanks for the answer.

Here is the bug report :
http://vtk.org/Bug/view.php?id=11391

<http://vtk.org/Bug/view.php?id=11391>I'll try to experiment with the
'manual' image resample to see if we can get some improvment.

-Simon


On Mon, Nov 1, 2010 at 04:55, Karthik Krishnan <karthik.krishnan at kitware.com
> wrote:

> Simon:
>
> Thanks. Please log a bug report at vtk.org/Bug, so we don't forget
> about it. We should be querying the available VRAM (as is done in the
> GPURaycast mapper) and the MAX_3D_TEXTURE_SIZE to compute the
> decimated extents.
>
> On a side note, you may want to experiment with seeing if you can
> perform the "resample" faster using vtkImageResample. The 3D texture
> mapper uses its own resampling, which is smart, but not multi-threaded
> unlike vtkImageReslice. The gradient pre-computation and resampling
> can be done a lot faster than it is now. You can log a feature request
> / (contribute a patch :) ) for the same.
>
> --
> karthik
>
>
> On Fri, Oct 29, 2010 at 8:13 PM, Simon ESNEAULT <sesneault at gmail.com>
> wrote:
> > 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
> >
> > --
> > ------------------------------------------------------------------
> > Simon Esneault - Therenva
> > Centre d'Innovation Technologique
> > Centre Cardio-Pneumologique
> > CHU Pontchaillou
> > Rennes, France
> > Tel : +33 (0)6 64 61 30 94
> > Mail : simon.esneault at therenva.com
> > ------------------------------------------------------------------
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the VTK FAQ at:
> > http://www.vtk.org/Wiki/VTK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>



-- 
------------------------------------------------------------------
Simon Esneault - Therenva
Centre d'Innovation Technologique
Centre Cardio-Pneumologique
CHU Pontchaillou
Rennes, France
Tel : +33 (0)6 64 61 30 94
Mail : simon.esneault at therenva.com
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101102/0ab624bb/attachment.htm>


More information about the vtkusers mailing list