<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=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
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.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></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 bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This is great! Hopefully someone can look at it and make the
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">modifications to get it checked in.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Gerrick<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Rostislav Khlebnikov [mailto:rostislav.khlebnikov@kcl.ac.uk]
<br>
<b>Sent:</b> Thursday, September 18, 2014 2:14 PM<br>
<b>To:</b> Gerrick Bivins; Berk Geveci<br>
<b>Cc:</b> VTK Developers<br>
<b>Subject:</b> Re: [vtk-developers] vtkCutter modification to use vtkCellLocator<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>
<br>
the code is attached. As I said it's quite messy - just ask me if you can't figure out something. The functions I added start with small letters as opposed to the copy-pasted and modified from VTK which start with a capital letter.
<br>
<br>
Rostislav.<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 15/09/2014 19:28, Gerrick Bivins wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yes. I would definitely be interested in seeing the code.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Gerrick</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Rostislav Khlebnikov [<a href="mailto:rostislav.khlebnikov@kcl.ac.uk">mailto:rostislav.khlebnikov@kcl.ac.uk</a>]
<br>
<b>Sent:</b> Monday, September 15, 2014 12:07 PM<br>
<b>To:</b> Gerrick Bivins; Berk Geveci<br>
<b>Cc:</b> VTK Developers<br>
<b>Subject:</b> Re: [vtk-developers] vtkCutter modification to use vtkCellLocator</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>
<br>
well, basically, I feel that it is necessary to create a proper change to use Gerrit workflow successfully. Unfortunately, I don't quite have the time to do this properly for several reasons. One of them is that I actually don't need this change - for my project
 I integrated the CGAL-based cutting approach with AABB_tree which outperforms my VTK test - for example for the same test with 500k triangles CGAL-based cutting takes only 2ms. This will soon be integrated to MITK (in case anyone is interested, the pull request
 can be found here: <a href="https://github.com/MITK/MITK/pull/73">https://github.com/MITK/MITK/pull/73</a>). Making a proper VTK change would involve quite a lot of effort. Given that vtkCutter is very general and rejecting the octree nodes might be complex
 for arbitrary implicit functions, it seems to require quite a lot of work to avoid incorrect usage.<br>
<br>
I can clean up the code a bit and post it to the mailing list if you are interested.<br>
<br>
All best,<br>
   Rostislav.<br>
<br>
<br>
<o:p></o:p></p>
<div>
<p class="MsoNormal">On 15/09/2014 15:02, Gerrick Bivins wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Rostislav,</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Did anything happen with this?</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I would definitely be interested in this capability/feature/improvement.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Gerrick</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> vtk-developers [<a href="mailto:vtk-developers-bounces@vtk.org">mailto:vtk-developers-bounces@vtk.org</a>]
<b>On Behalf Of </b>Berk Geveci<br>
<b>Sent:</b> Tuesday, August 12, 2014 11:44 AM<br>
<b>To:</b> Rostislav Khlebnikov<br>
<b>Cc:</b> VTK Developers<br>
<b>Subject:</b> Re: [vtk-developers] vtkCutter modification to use vtkCellLocator</span><o:p></o:p></p>
<p class="MsoNormal"> <o:p></o:p></p>
<div>
<p class="MsoNormal">Hi <span style="font-size:10.0pt;font-family:"Arial","sans-serif"">Rostislav,</span><o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif"">This is great. Can you push the code to Gerrit (</span><span style="font-family:"Arial","sans-serif""><a href="http://review.source.kitware.com/">http://review.source.kitware.com/</a>)?</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">Best,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial","sans-serif"">-berk</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal">On Sat, Aug 9, 2014 at 2:52 PM, Rostislav Khlebnikov <<a href="mailto:rostislav.khlebnikov@kcl.ac.uk" target="_blank">rostislav.khlebnikov@kcl.ac.uk</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi guys,<br>
<br>
just thought that the VTK developers might be interested in the test I made recently.<br>
<br>
Bascially what I did is subclass the vtkCellLocator to implement the visitor pattern. It allows to filter the octree nodes (e.g. reject the octree nodes that are of no interest early) and for leafs, to visit the cells of the polydata.<br>
Then, I subclassed the vtkCutter to use this cell locator instead of straight iteration over cells. Likely for very complex implicit cutting functions this wouldnt be of any benefit. However, for those which can test bboxes as being of interest or not, rejecting
 whole subtrees, such as vtkPlane, it is very useful. I tested it on a surface with 500k triangles and the cutter performance went from 88ms per cut to 14ms.<br>
<br>
The code I made is quite ugly due to limited extensibility of vtkCutter, so I had to copy-paste the RequestData method and make my changes instead of, say, overriding IterateCells method which would just provide the cells to cut through.<br>
<br>
But anyway, I was wondering if you guys are intersted in this kind of functionality? Would you like me to send you the code?<br>
<br>
All best,<br>
   Rostislav.<br>
<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 <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">
http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><o:p></o:p></p>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal">This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient. Any review, use, distribution, or disclosure by others is strictly prohibited. If you are not the
 intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.<o:p></o:p></p>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>