[vtkusers] Start-up performance of hardware renderers

Ian Lindsay ilindsay at insigniamedical.co.uk
Tue Sep 13 05:18:23 EDT 2011


Hi, thanks for the info.

I found the post that you linked to when I was looking at this and 
attempted to re-sample the data first using vtkImageReslice which gave 
me quite a bit of improvement, but there still seemed to be some 
re-sampling going on in the mapper. I am reluctant to do too much 
hard-coding of maximum texture sizes as this means that on newer cards 
we are not making maximum use of the hardware, so I didn't pursue 
modifying the source code.

I have since come back to this and discovered the vtkSmartVolumeMapper 
class in VTK 5.8 which seems to do quite a lot of the work of selecting 
the appropriate mapper for the hardware and was obviously written by 
someone with much more experience of the volume mappers than me! Also, 
the performance of the volume mappers (and presumably the 
vtkVolumeTextureMapper3D used by the smart mapper internally) seems much 
improved in 5.8.

Thanks for all the hard work.

Ian

On 13/09/2011 09:44, Simon ESNEAULT wrote:
> Hi Ian,
>
> See this mail :
> http://public.kitware.com/pipermail/vtkusers/2010-November/112994.html
>
> and this bug report
> http://vtk.org/Bug/view.php?id=11391
>
> I bet it's the same "bug" that affect's you.
> With an ATI card, the only solution you've got in VTK for a GPU volume 
> rendering is the vtkVolumeTextureMapper3D class, but you will need to 
> hack a little bit to make it work properly (fast). See instruction in 
> the link above.
>
> Good luck, do not hesitate if you need some help.
>
> Simon
>
>
>
>
> On Mon, Jun 6, 2011 at 11:38, Ian Lindsay 
> <ilindsay at insigniamedical.co.uk 
> <mailto:ilindsay at insigniamedical.co.uk>> wrote:
>
>     Hi, I hope someone with a bit of experience with the hardware
>     renderers
>     in vtk can help me. Apologies in advance for the long post, but I want
>     to give as much detail as possible.
>
>     We are developing a medical imaging application which will visualise
>     CT/MR data using various techniques - MIP, MPR, volume rendering
>     etc. I
>     am currently experimenting with the vtkVolumeTextureMapper3D
>     class, and
>     while its performance is great on an ATI Radeon 3870 once it has
>     started, and even better on newer cards, it seems to take a long
>     time to
>     initialise. I am seeing ~20-25 seconds for a 250 slice CT set, each
>     image being 512X512 pixels at 2 bytes per pixel. We are seeing
>     100% CPU
>     usage on one CPU of a dual core Intel Core-2 duo, which would seem to
>     suggest that the algorithm is not multi-threaded in this case if
>     that is
>     of any help. Doing a break while debugging seems to generally end
>     up in
>     the vtkVolumeTextureMapper3DComputeScalars function in
>     vtkVolumeTextureMapper3D.cxx, in a loop that looks like it is
>     doing some
>     sort of re-sampling.
>
>     The pipeline is a fairly standard one as far as I can see:
>      vtkImageData
>     -> vtkImageChangeInformation
>     -> vtkVolumeTextureMapper3D
>     -> vtkVolume
>     -> vtkRenderer
>     -> vtkRenderWindow
>
>     We also introduce a vtkImageFlip for flipped data sets (e.g. CT heads)
>     to get them back to DICOM orientation before the volume mapper,
>     but this
>     seems to make very little difference.
>
>     One point that may make a difference is that we are doing offscreen
>     rendering due to our application architecture requirements, but we get
>     very good performance with MPR implemented with vtkImageReslice, so I
>     suspect this is not the issue.
>
>     I have tried experienting with the SetUseCompressedTexture(true)
>     setting, which seemed to make things a little more stable, I sometimes
>     ended up with blank images, or strange lighting on occasions
>     before, but
>     this does not seem to help the initialisation time. I have also tried
>     the vtkGPUVolumeRayCastMapper, but this seems to use features only
>     supported by NVIDIA cards (correct me if this is wrong), whereas
>     we have
>     found our medical imaging displays work best with ATI cards, so we
>     tend
>     to use these in preference.
>
>     Does anyone have any helpful advice on settings/pipeline layout or
>     alternative ray casters that I could try?
>
>     Thanks,
>     Ian Lindsay
>
>
>
>     CONFIDENTIALITY NOTICE
>     This message is only for the use of the intended individual or
>     entity and may contain information that is confidential, or
>     subject to copyright.
>     If you are not the intended recipient, you are hereby notified
>     that any dissemination, copying or distribution of this message,
>     or any associated files, is strictly prohibited.
>     If you have received this message in error, please notify us
>     immediately by replying to the message, and delete it from your
>     computer.
>     Messages sent to and from Insignia Medical Systems Limited may be
>     monitored.
>     Any views or opinions presented are solely those of the author and
>     do not necessarily represent those of the company.
>
>     _______________________________________________
>     Powered by www.kitware.com <http://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
> 13 rue Vasselot
> 35000 Rennes, France
> Tel : 06 64 61 30 94
> Mail : simon.esneault at gmail.com <mailto:simon.esneault at gmail.com>
> ------------------------------------------------------------------
>


CONFIDENTIALITY NOTICE
This message is only for the use of the intended individual or entity and may contain information that is confidential, or subject to copyright. 
If you are not the intended recipient, you are hereby notified that any dissemination, copying or distribution of this message, or any associated files, is strictly prohibited. 
If you have received this message in error, please notify us immediately by replying to the message, and delete it from your computer. 
Messages sent to and from Insignia Medical Systems Limited may be monitored. 
Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110913/d74ec560/attachment.htm>


More information about the vtkusers mailing list