[vtkusers] Occlusion

Dominik Szczerba dominik at itis.ethz.ch
Tue Dec 2 14:38:20 EST 2008


You can use VTK OBB tree and shoot a ray through a composite dataset 
inspecting intersected elements.

But I dont find VTK very robust for such operations. You might want to 
use GTS or wrap it into VTK.

Dominik

Cory Quammen wrote:
> Markus,
> 
> It sounds like an application for a ray tracing program, but not one 
> with a standard camera model. Instead, you would cast rays from the 
> tumor center out into the organs and skin using some uniform sampling of 
> the unit sphere. You can mark the rays that intersect the organs and 
> then check which of the skin triangles intersect one or more "organ" rays.
> 
> Alas, I don't know of any class in VTK that does this for you, but you 
> should be able to code something up manually quite easily. The 
> vtkTriangle class has a method IntersectWithLine() that should prove 
> useful if you decide to iterate over all triangles for all the rays you 
> cast. For better performance, you could use vtkCellLocator or 
> vtkOBBTree. It also has an IntersectsWithLine() method that gives you a 
> list of triangles (vtkCells, really) that the line intersects. You could 
> have two vtkOBBTrees, one for the organs and one for the skin. If 
> IntersectsWithLine() called on the vtkOBBTree with the organ data 
> returns a non-empty list of triangles, then all the skin triangles the 
> ray intersects are occluded, and you can mark them as such.
> 
> Good luck with your project,
> Cory
> 
> On Tue, Dec 2, 2008 at 12:02 PM, Engel Markus 
> <m.engel at dkfz-heidelberg.de <mailto:m.engel at dkfz-heidelberg.de>> wrote:
> 
>     Hi Cory!
> 
>      
> 
>     I'm sorry. I should have described the goal in more detail.
> 
>      
> 
>     The program I'm writing is supposed to compute the optimal
>     trajectory  to insert a needle to a  tumor. This is going to be part
>     of the planning for an operation using percutaneous  radiofrequency
>     ablation.
> 
>     When the needle has hit the center of the tumor its tip is heated
>     and thus burns the tumor.
> 
>      
> 
>     The first step of the program is to determine the so called
>     100%zones. Only in these zones I can insert the needle safely,
>     because otherwise I could hit a bone, vessel or another organ.
> 
>     That's why, as a first step, I have to find all triangles of the
>     skin that are totally visible, respectively  not occluded , when
>     looking from the tumors "point of view".
> 
>     After this step I'd like to have two  lists of triangles. One
>     containing all visible triangles and the other containing all the
>     occluded triangles.
> 
>      
> 
>     I hope this helps understanding my problem.
> 
>      
> 
>     Greets
> 
>      
> 
>     Markus
> 
>      
> 
>      
> 
>     *Von:* cquammen at gmail.com <mailto:cquammen at gmail.com>
>     [mailto:cquammen at gmail.com <mailto:cquammen at gmail.com>] *Im Auftrag
>     von *Cory Quammen
>     *Gesendet:* Dienstag, 2. Dezember 2008 14:28
>     *An:* Engel Markus
>     *Cc:* vtkusers at vtk.org <mailto:vtkusers at vtk.org>
>     *Betreff:* Re: [vtkusers] Occlusion
> 
>      
> 
>     Hi Markus,
> 
>     I don't have a VTK-based solution for you based on your problem
>     description, but I am curious why you want to eliminate triangles of
>     the vtkPolyData representing the skin. What is the ultimate goal you
>     are trying to accomplish? Are you worried about performance? If so,
>     you probably shouldn't. Modern GPUs can render triangles very
>     quickly, especially with features like early z culling. Are you
>     trying to eliminate them from the scene? If they are occluded from
>     your view point, you won't see them.
> 
>     Just curious,
>     Cory
> 
>     On Tue, Dec 2, 2008 at 7:37 AM, Engel Markus
>     <m.engel at dkfz-heidelberg.de <mailto:m.engel at dkfz-heidelberg.de>> wrote:
> 
>     Hi!
> 
>      
> 
>     I'm currently looking for a possibility to check whether a certain
>     triangle of my vtkPolyData is visible or occluded by another PolyData.
> 
>      
> 
>     I'm writing a program that eliminates triangles of the PolyData,
>     representing the patients skin, that are not visible from the
>     barycenter of a tumor,
> 
>     because they are occluded by other organs. All organs, the tumor and
>     the skin are vtkPolyDatas.
> 
>     So I basically need to check if there is an Object, in this case a
>     PolyData, between a point and a tringle.
> 
>      
> 
>     As the program is going to be based on VTK, I'm searching for a
>     native VTK solution.
> 
>     I already stumbled upon  the OpenGL  occlusion_query, however I
>     afraid it won't be easy to integrate this into the existing
>     rendering-pipeline. That's another reason for looking for some
>     VTK-stuff.
> 
>      
> 
>     Thanks a lot!
> 
>      
> 
>     Markus
> 
>      
> 
>      
> 
>      
> 
> 
>     _______________________________________________
>     This is the private VTK discussion list.
>     Please keep messages on-topic. Check the FAQ at:
>     http://www.vtk.org/Wiki/VTK_FAQ
>     Follow this link to subscribe/unsubscribe:
>     http://www.vtk.org/mailman/listinfo/vtkusers
> 
> 
> 
> 
>     -- 
>     Cory Quammen
>     Center for Computer Integrated Systems for Microscopy and
>     Manipulation (CISMM)
>     Department of Computer Science
>     University of North Carolina at Chapel Hill
>     http://www.cs.unc.edu/~cquammen <http://www.cs.unc.edu/%7Ecquammen>
> 
> 
> 
> 
> -- 
> Cory Quammen
> Center for Computer Integrated Systems for Microscopy and Manipulation 
> (CISMM)
> Department of Computer Science
> University of North Carolina at Chapel Hill
> http://www.cs.unc.edu/~cquammen
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
Dominik Szczerba, PhD
Computational Physics Group
IT'IS Foundation
http://www.itis.ethz.ch



More information about the vtkusers mailing list