[vtk-developers] vtkCutter modification to use vtkCellLocator
Rostislav Khlebnikov
rostislav.khlebnikov at kcl.ac.uk
Mon Sep 15 13:07:18 EDT 2014
Hi,
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:
https://github.com/MITK/MITK/pull/73). 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.
I can clean up the code a bit and post it to the mailing list if you are
interested.
All best,
Rostislav.
On 15/09/2014 15:02, Gerrick Bivins wrote:
>
> Hi Rostislav,
>
> Did anything happen with this?
>
> I would definitely be interested in this capability/feature/improvement.
>
> Gerrick
>
> *From:*vtk-developers [mailto:vtk-developers-bounces at vtk.org] *On
> Behalf Of *Berk Geveci
> *Sent:* Tuesday, August 12, 2014 11:44 AM
> *To:* Rostislav Khlebnikov
> *Cc:* VTK Developers
> *Subject:* Re: [vtk-developers] vtkCutter modification to use
> vtkCellLocator
>
> Hi Rostislav,
>
> This is great. Can you push the code to Gerrit
> (http://review.source.kitware.com/)?
>
> Best,
>
> -berk
>
> On Sat, Aug 9, 2014 at 2:52 PM, Rostislav Khlebnikov
> <rostislav.khlebnikov at kcl.ac.uk
> <mailto:rostislav.khlebnikov at kcl.ac.uk>> wrote:
>
> Hi guys,
>
> just thought that the VTK developers might be interested in the test I
> made recently.
>
> 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.
> 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.
>
> 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.
>
> But anyway, I was wondering if you guys are intersted in this kind of
> functionality? Would you like me to send you the code?
>
> All best,
> Rostislav.
>
> _______________________________________________
> Powered by www.kitware.com <http://www.kitware.com>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> <http://www.kitware.com/opensource/opensource.html>
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
> ------------------------------------------------------------------------
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20140915/fd409545/attachment-0002.html>
More information about the vtk-developers
mailing list