<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.E-MailFormatvorlage18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=DE link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Cory,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks for the help!<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Sounds good, however there’s a problem. As I will
have to check the occlusion from every border-voxel of the tumor, <o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>this is going to take ages because I’ll have to render
everything first and then start the excessive ray-casting.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I had hoped that there is a way to get the renderer to tell me
whether he drew the triangle or not, respectively if he drew it completely.<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Greets Markus <o:p></o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span
lang=EN-US style='color:black'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>Von:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> cquammen@gmail.com
[mailto:cquammen@gmail.com] <b>Im Auftrag von </b>Cory Quammen<br>
<b>Gesendet:</b> Dienstag, 2. Dezember </span><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>2008 20:04<br>
<b>An:</b> Engel Markus<br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Betreff:</b> Re: [vtkusers] Occlusion<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Markus,<br>
<br>
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.<br>
<br>
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.<br>
<br>
Good luck with your project,<br>
Cory<o:p></o:p></p>
<div>
<p class=MsoNormal>On Tue, Dec 2, 2008 at 12:02 PM, Engel Markus <<a
href="mailto:m.engel@dkfz-heidelberg.de">m.engel@dkfz-heidelberg.de</a>>
wrote:<o:p></o:p></p>
<div>
<div>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Hi Cory!</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>I'm sorry. I should
have described the goal in more detail. </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>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.</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>When the needle has
hit the center of the tumor its tip is heated and thus burns the tumor.</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>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.</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>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".</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>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.</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>I hope this helps
understanding my problem.</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Greets </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'>Markus</span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<p><span lang=EN-US style='font-size:11.0pt;color:#1F497D'> </span><o:p></o:p></p>
<div style='border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;
border-color:-moz-use-text-color -moz-use-text-color'>
<p><b><span style='font-size:10.0pt'>Von:</span></b><span style='font-size:
10.0pt'> <a href="mailto:cquammen@gmail.com" target="_blank">cquammen@gmail.com</a>
[mailto:<a href="mailto:cquammen@gmail.com" target="_blank">cquammen@gmail.com</a>]
<b>Im Auftrag von </b>Cory Quammen<br>
<b>Gesendet:</b> Dienstag, 2. Dezember 2008 14:28<br>
<b>An:</b> Engel Markus<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Betreff:</b> Re: [vtkusers] Occlusion</span><o:p></o:p></p>
</div>
<div>
<div>
<p> <o:p></o:p></p>
<p style='margin-bottom:12.0pt'>Hi Markus,<br>
<br>
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.<br>
<br>
Just curious,<br>
Cory<o:p></o:p></p>
<div>
<p>On Tue, Dec 2, 2008 at 7:37 AM, Engel Markus <<a
href="mailto:m.engel@dkfz-heidelberg.de" target="_blank">m.engel@dkfz-heidelberg.de</a>>
wrote:<o:p></o:p></p>
<div>
<div>
<p><span lang=EN-US>Hi!</span><o:p></o:p></p>
<p><span lang=EN-US> </span><o:p></o:p></p>
<p><span lang=EN-US>I'm currently looking for a possibility to check whether a
certain triangle of my vtkPolyData is visible or occluded by another PolyData.</span><o:p></o:p></p>
<p><span lang=EN-US> </span><o:p></o:p></p>
<p><span lang=EN-US>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, </span><o:p></o:p></p>
<p><span lang=EN-US>because they are occluded by other organs. All organs, the
tumor and the skin are vtkPolyDatas.</span><o:p></o:p></p>
<p><span lang=EN-US>So I basically need to check if there is an Object, in this
case a PolyData, between a point and a tringle.</span><o:p></o:p></p>
<p><span lang=EN-US> </span><o:p></o:p></p>
<p><span lang=EN-US>As the program is going to be based on VTK, I'm searching
for a native VTK solution. </span><o:p></o:p></p>
<p><span lang=EN-US>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.</span><o:p></o:p></p>
<p><span lang=EN-US> </span><o:p></o:p></p>
<p><span lang=EN-US>Thanks a lot!</span><o:p></o:p></p>
<p><span lang=EN-US> </span><o:p></o:p></p>
<p><span lang=EN-US>Markus</span><o:p></o:p></p>
<p><span lang=EN-US> </span><o:p></o:p></p>
<p><span lang=EN-US style='color:black'> </span><o:p></o:p></p>
<p> <o:p></o:p></p>
</div>
</div>
<p style='margin-bottom:12.0pt'><br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a
href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><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><o:p></o:p></p>
</div>
<p><br>
<br clear=all>
<br>
-- <br>
Cory Quammen<br>
Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)<br>
Department of Computer Science<br>
University of North Carolina at Chapel Hill<br>
<a href="http://www.cs.unc.edu/%7Ecquammen" target="_blank">http://www.cs.unc.edu/~cquammen</a><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
<p class=MsoNormal><br>
<br clear=all>
<br>
-- <br>
Cory Quammen<br>
Center for Computer Integrated Systems for Microscopy and Manipulation (CISMM)<br>
Department of Computer Science<br>
University of North Carolina at Chapel Hill<br>
<a href="http://www.cs.unc.edu/~cquammen">http://www.cs.unc.edu/~cquammen</a><o:p></o:p></p>
</div>
</body>
</html>