[vtkusers] Re: Re: vtkVolumeTextureMapper2D

Julien BARNEOUD j_barneoud at trophy.fr
Mon Dec 20 11:58:48 EST 2004

Hello Lisa,

Thanks a lot for your advises, so, I willl keep an open eye on coming
releases of VTK!

I have just tried with a TargetTextureSize set to 1024*1024, but
unfortunatelly, that did not improve a lot my application (i.e. it is still
not interactive). So, I have tried reducing the MaximumNumberOfPlanes to get
something more interactive. To have something which is suitable, I must set
a value of 20! You gess that the image quality is not very nice ...

FYI, I do not use shading, I just have opacity and color functions. I think
that my problem is only due to the size of my data.

I have noticed one thing: when I am making a 360° rotation of the volume
(with a MaximumNumberOfPlanes set to 20), this one seems to be faster for
some positions ... Is there a "prefered" axis of the dataset when dealing
with texture mapping ? I think that I have missed someting in the books.

Another point that I seem to have missed, is that the required size in
texture memory is not Width*Height*Depth*NumberOfBytes but would be
Width*Height*Depth*4 (for RGBA) and in fact is about  Width*Height*Depth*4*3
due to waste space in texture memory, isn'it ?

Thanks a lot again Lisa for your advises.

I will try to get two mappers (one used when moving/rotating/zooming) the
volume and the other one for still images. For the first one, I will use a
volume resampled with less voxels, maybe that can help?



"Lisa Avila" <lisa.avila at kitware.com> a écrit dans le message de
news: at pop.biz.rr.com...

Hello Julien,

The texture mapper will render your whole data set from the appropriate
viewing direction, packing images into a larger texture for rendering.
Since TargetTextureSize is 512x512 by default you will have a fair amount
of waste. Also, note that the opacity/color transfer functions and shading
are applied during every render (as the data is moved into textures) and
the texture are created every render (not stored in display lists - at the
time this class was written video cards did not have that much memory, and
if you have shading turned on the textures change with every move of the
camera or light). I would recommend trying to use 1024x1024 as a target
texture size - that should fit either 6 or 9 slices into 1 texture (rather
than the 4 that fit in 4 half size textures with a target size of 512x512).
Also, you can reduce the number of planes rendered to provide interactive
performance (at a loss of image quality) by using the MaximumNumberOfPlanes

Over the next few months there will be a fair amount of development
occurring in the volume rendering functionality of VTK - you may wish to
keep an eye on this and try out some of the newer classes as they become


At 07:45 AM 12/20/2004, Julien BARNEOUD wrote:
>Hi All,
>Is there anybody who could help me, or should I add some missing
>to my first email?
>"Julien BARNEOUD" <j_barneoud at trophy.fr> a écrit dans le message de
>news:cps3us$omr$1 at sea.gmane.org...
> > Hi all,
> >
> > I am comparing quality and performance of the the different volume
> > (ray casting and texture ones) and I have slower result with the texture
> > mapper.
> >
> > My configuration is a PIV 2.66 Mhz, with 1 GO RAM and an NVIDIA Geforce
> > GT graphic board.
> >
> > The dataset I am trying to render is made of 289 * 289 * 399 grayscale
> > voxels with 12 bits depht.
> >
> > I am surprized because the texture render is very slow (i.e. it is
> > to interact with the volume), and the graphic board has 256 Mo of Vdieo
> > so my entire dataset should be loaded and handled by the GeForce...
> >
> > I have tried to reduce the volume size using vtkExtractROI, I get
> > faster, but not really usable.
> >
> > Is there any attention to pay to the volume size: a 256*256*512 volume
> > be easier to fit  texture memory as it is aligned on a power of 2?
> > shift the data to be on 8 bits ? Anything else ?
> >
> > Thanks in advance for your help,
> >
> > Regards,
> >
> > Julien BARNEOUD
> >
> >
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
>Follow this link to subscribe/unsubscribe:

This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at:
Follow this link to subscribe/unsubscribe:

More information about the vtkusers mailing list