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 &quot;embed&quot; 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">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</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&#39;ve written surgical tracking application with volume rendering, and<br>
I&#39;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&#39;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&#39;t a good idea, since you can&#39;t really<br>
know what the OpenGL state will be.  Also, if you&#39;re instruments ever<br>
intersect the volume (as I&#39;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&#39;t think it&#39;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 &lt;<a href="mailto:fauze.polpeta@gmail.com">fauze.polpeta@gmail.com</a>&gt; wrote:<br>
&gt; Thanks for your support David and sorry for the cross-post...I was wondering<br>
&gt; if one could image some core-based solution.<br>
&gt; In our case a medical application is being prototyped and the ray-cast<br>
&gt; volume was preferred for volumetric reconstruction. The point is that our<br>
&gt; application is connected to a device that tracks surgical instruments that<br>
&gt; are represented by polydata. So, theoretically, we can&#39;t abdicate of the<br>
&gt; ray-casting while moving these tools during a given surgical procedure. This<br>
&gt; is the reason I mentioned if it is possible to bypass the pipeline<br>
&gt; processing in order to render this polydata using pure OpenGL commands.<br>
&gt; Thanks again<br>
&gt; Regards<br>
&gt; Fauze<br>
&gt;<br>
&gt;<br>
&gt; On Fri, Jan 22, 2010 at 7:04 PM, David Gobbi &lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Fauze,<br>
&gt;&gt;<br>
&gt;&gt; Please don&#39;t cross-post to the vtk-developers list, since that list is<br>
&gt;&gt; only for developer issues.<br>
&gt;&gt;<br>
&gt;&gt; Mixing polygonal objects with software ray-cast volume rendering is an<br>
&gt;&gt; expensive process, it involves reading a partially rendered scene from<br>
&gt;&gt; the video card back to main memory and re-doing the volume rendering<br>
&gt;&gt; using the information in the depth buffer.  Every time the object<br>
&gt;&gt; moves, the ray-cast has to be redone.<br>
&gt;&gt;<br>
&gt;&gt; If you need fast volume rendering intermixed with polydata, you should<br>
&gt;&gt; use vtkVolumeTextureMapper3D or vtkVolumeTextureMapper2D.  These<br>
&gt;&gt; volume mappers do all of the polydata/volume intermixing right on the<br>
&gt;&gt; graphics cards.<br>
&gt;&gt;<br>
&gt;&gt; What I often do is use a vtkLODProp3D so that I can use the texture<br>
&gt;&gt; volume rendering when I&#39;m dragging things, but have it automatically<br>
&gt;&gt; switch to ray-casting when I stop dragging the mouse.<br>
&gt;&gt;<br>
&gt;&gt;  David<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Fri, Jan 22, 2010 at 1:33 PM, Fauze Polpeta &lt;<a href="mailto:fauze.polpeta@gmail.com">fauze.polpeta@gmail.com</a>&gt;<br>
&gt;&gt; wrote:<br>
&gt;&gt; &gt; Dear VTK Users;<br>
&gt;&gt; &gt; I have worked on a project that requires a Polygonal Object ( or at<br>
&gt;&gt; &gt; least a<br>
&gt;&gt; &gt; simple Line ) to be moved on the fly on a volume rendered scene built on<br>
&gt;&gt; &gt; top<br>
&gt;&gt; &gt; of a vtkVolumeRayCastMapper abstraction.<br>
&gt;&gt; &gt; This goal was successfully reached but we have faced a drastic<br>
&gt;&gt; &gt; performance<br>
&gt;&gt; &gt; degradation when moving the polygonal object into/across the volume<br>
&gt;&gt; &gt; scene.<br>
&gt;&gt; &gt; We have assumed this is a consequence of the VTK&#39;s pipeline  processing<br>
&gt;&gt; &gt; model. If anyone confirm that, we would like to ask any help in the<br>
&gt;&gt; &gt; sense of<br>
&gt;&gt; &gt; pointing any strategy for achieving any (minimal) performance<br>
&gt;&gt; &gt; improvement.<br>
&gt;&gt; &gt; Perhaps, getting the OpenGL Context and rendering our polygonal object<br>
&gt;&gt; &gt; using<br>
&gt;&gt; &gt; OpenGL commands; thus skipping the VTK&#39;s pipeline processing. Is this<br>
&gt;&gt; &gt; feasible?<br>
&gt;&gt; &gt; Thanks in advance for any help.<br>
&gt;&gt; &gt; Regards,<br>
&gt;&gt; &gt; Fauze<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Visit other Kitware open-source projects at<br>
&gt;&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>