[vtkusers] Help on VTK's Performance: Volume Rendering + Polygonal Object Moving

David Gobbi david.gobbi at gmail.com
Fri Jan 22 16:47:47 EST 2010


Hi Fauze,

I've written surgical tracking application with volume rendering, and
I've always used texture volume rendering in preference to ray casting
in order to avoid the issues that you describe, since the LOD approach
doesn't work very well when the tools are in constant motion.  For our
next generation of surgical applications, we intend to use VTKEdge for
doing GPU-based ray casting.

Mixing pure OpenGL with VTK isn't a good idea, since you can't really
know what the OpenGL state will be.  Also, if you're instruments ever
intersect the volume (as I'm sure they would) you will get an
incorrect rendering unless you allow VTK to properly intermix the
polygon rendering with the the volume.

In short: if you really need to use ray casting, try out VTKEdge.  I
don't think it's a good idea to try to write your own polydata/volume
intermixing code.

    David



On Fri, Jan 22, 2010 at 2:32 PM, Fauze Polpeta <fauze.polpeta at gmail.com> wrote:
> Thanks for your support David and sorry for the cross-post...I was wondering
> if one could image some core-based solution.
> In our case a medical application is being prototyped and the ray-cast
> volume was preferred for volumetric reconstruction. The point is that our
> application is connected to a device that tracks surgical instruments that
> are represented by polydata. So, theoretically, we can't abdicate of the
> ray-casting while moving these tools during a given surgical procedure. This
> is the reason I mentioned if it is possible to bypass the pipeline
> processing in order to render this polydata using pure OpenGL commands.
> Thanks again
> Regards
> Fauze
>
>
> On Fri, Jan 22, 2010 at 7:04 PM, David Gobbi <david.gobbi at gmail.com> wrote:
>>
>> Hi Fauze,
>>
>> Please don't cross-post to the vtk-developers list, since that list is
>> only for developer issues.
>>
>> Mixing polygonal objects with software ray-cast volume rendering is an
>> expensive process, it involves reading a partially rendered scene from
>> the video card back to main memory and re-doing the volume rendering
>> using the information in the depth buffer.  Every time the object
>> moves, the ray-cast has to be redone.
>>
>> If you need fast volume rendering intermixed with polydata, you should
>> use vtkVolumeTextureMapper3D or vtkVolumeTextureMapper2D.  These
>> volume mappers do all of the polydata/volume intermixing right on the
>> graphics cards.
>>
>> What I often do is use a vtkLODProp3D so that I can use the texture
>> volume rendering when I'm dragging things, but have it automatically
>> switch to ray-casting when I stop dragging the mouse.
>>
>>  David
>>
>>
>> On Fri, Jan 22, 2010 at 1:33 PM, Fauze Polpeta <fauze.polpeta at gmail.com>
>> wrote:
>> > Dear VTK Users;
>> > I have worked on a project that requires a Polygonal Object ( or at
>> > least a
>> > simple Line ) to be moved on the fly on a volume rendered scene built on
>> > top
>> > of a vtkVolumeRayCastMapper abstraction.
>> > This goal was successfully reached but we have faced a drastic
>> > performance
>> > degradation when moving the polygonal object into/across the volume
>> > scene.
>> > We have assumed this is a consequence of the VTK's pipeline  processing
>> > model. If anyone confirm that, we would like to ask any help in the
>> > sense of
>> > pointing any strategy for achieving any (minimal) performance
>> > improvement.
>> > Perhaps, getting the OpenGL Context and rendering our polygonal object
>> > using
>> > OpenGL commands; thus skipping the VTK's pipeline processing. Is this
>> > feasible?
>> > Thanks in advance for any help.
>> > Regards,
>> > Fauze
>> > _______________________________________________
>> > 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
>> >
>> >
>
>



More information about the vtkusers mailing list