Right David...I will try the two alternatives you mentioned:<div><br></div><div>1) Texture volume rendering</div><div><br></div><div>2) VTKEdge</div><div><br></div><div>One last question: In order to achieve GPU-based ray casting I just have to configure and "embed" VTKEdge into my project or have to re-write my volume rendering application? In orther words, for GPU-based ray casting VTKEdge is saw as a GPU backend interface library, or/and as a new set of abstractions/filters to be deployed by the programmer?</div>
<div><br></div><div>Thank you so much</div><div><br></div><div>My Best Regards</div><div><br></div><div>Fauze<br><br><div class="gmail_quote">On Fri, Jan 22, 2010 at 7:47 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Fauze,<br>
<br>
I've written surgical tracking application with volume rendering, and<br>
I've always used texture volume rendering in preference to ray casting<br>
in order to avoid the issues that you describe, since the LOD approach<br>
doesn't work very well when the tools are in constant motion. For our<br>
next generation of surgical applications, we intend to use VTKEdge for<br>
doing GPU-based ray casting.<br>
<br>
Mixing pure OpenGL with VTK isn't a good idea, since you can't really<br>
know what the OpenGL state will be. Also, if you're instruments ever<br>
intersect the volume (as I'm sure they would) you will get an<br>
incorrect rendering unless you allow VTK to properly intermix the<br>
polygon rendering with the the volume.<br>
<br>
In short: if you really need to use ray casting, try out VTKEdge. I<br>
don't think it's a good idea to try to write your own polydata/volume<br>
intermixing code.<br>
<font color="#888888"><br>
David<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
On Fri, Jan 22, 2010 at 2:32 PM, Fauze Polpeta <<a href="mailto:fauze.polpeta@gmail.com">fauze.polpeta@gmail.com</a>> wrote:<br>
> Thanks for your support David and sorry for the cross-post...I was wondering<br>
> if one could image some core-based solution.<br>
> In our case a medical application is being prototyped and the ray-cast<br>
> volume was preferred for volumetric reconstruction. The point is that our<br>
> application is connected to a device that tracks surgical instruments that<br>
> are represented by polydata. So, theoretically, we can't abdicate of the<br>
> ray-casting while moving these tools during a given surgical procedure. This<br>
> is the reason I mentioned if it is possible to bypass the pipeline<br>
> processing in order to render this polydata using pure OpenGL commands.<br>
> Thanks again<br>
> Regards<br>
> Fauze<br>
><br>
><br>
> On Fri, Jan 22, 2010 at 7:04 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>><br>
>> Hi Fauze,<br>
>><br>
>> Please don't cross-post to the vtk-developers list, since that list is<br>
>> only for developer issues.<br>
>><br>
>> Mixing polygonal objects with software ray-cast volume rendering is an<br>
>> expensive process, it involves reading a partially rendered scene from<br>
>> the video card back to main memory and re-doing the volume rendering<br>
>> using the information in the depth buffer. Every time the object<br>
>> moves, the ray-cast has to be redone.<br>
>><br>
>> If you need fast volume rendering intermixed with polydata, you should<br>
>> use vtkVolumeTextureMapper3D or vtkVolumeTextureMapper2D. These<br>
>> volume mappers do all of the polydata/volume intermixing right on the<br>
>> graphics cards.<br>
>><br>
>> What I often do is use a vtkLODProp3D so that I can use the texture<br>
>> volume rendering when I'm dragging things, but have it automatically<br>
>> switch to ray-casting when I stop dragging the mouse.<br>
>><br>
>> David<br>
>><br>
>><br>
>> On Fri, Jan 22, 2010 at 1:33 PM, Fauze Polpeta <<a href="mailto:fauze.polpeta@gmail.com">fauze.polpeta@gmail.com</a>><br>
>> wrote:<br>
>> > Dear VTK Users;<br>
>> > I have worked on a project that requires a Polygonal Object ( or at<br>
>> > least a<br>
>> > simple Line ) to be moved on the fly on a volume rendered scene built on<br>
>> > top<br>
>> > of a vtkVolumeRayCastMapper abstraction.<br>
>> > This goal was successfully reached but we have faced a drastic<br>
>> > performance<br>
>> > degradation when moving the polygonal object into/across the volume<br>
>> > scene.<br>
>> > We have assumed this is a consequence of the VTK's pipeline processing<br>
>> > model. If anyone confirm that, we would like to ask any help in the<br>
>> > sense of<br>
>> > pointing any strategy for achieving any (minimal) performance<br>
>> > improvement.<br>
>> > Perhaps, getting the OpenGL Context and rendering our polygonal object<br>
>> > using<br>
>> > OpenGL commands; thus skipping the VTK's pipeline processing. Is this<br>
>> > feasible?<br>
>> > Thanks in advance for any help.<br>
>> > Regards,<br>
>> > Fauze<br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>> ><br>
>> ><br>
><br>
><br>
</div></div></blockquote></div><br></div>