[vtk-developers] RFC: STL algos and C++11 for-range syntax with vtkDataArrays

David E DeMarle dave.demarle at kitware.com
Fri Nov 9 08:45:44 EST 2018


+1 for the idea of converting vtk collections into stl conventions.

On Fri, Nov 9, 2018, 6:49 AM Todd via vtk-developers <
vtk-developers at public.kitware.com> wrote:

> Nice blog.
>
> On 10 Nov 2018 12:00 a.m., Allie Vacanti <allison.vacanti at kitware.com>
> wrote:
>
> On Fri, Nov 9, 2018, 2:07 AM Elvis Stansvik <elvis.stansvik at orexplore.com
> wrote:
>
> Any plans for something similar for vtkCollection*?
>
>
> Not currently, but that would be a very useful feature indeed. I think
> it'd be more than worthwhile to add a template that just translates the VTK
> iteration convention (InitTraversal, GoToNextItem, IsDoneWithTraversal) to
> a set of STL iterators/range objects. This would allow it to work with
> quite a few different iterables in VTK.
>
> It'd have a similarly usage as the array iterators:
>
> vtk[...]Collection *myCollection = ...;
> for (auto item : vtk::Range(myCollection)) { ... }
>
> I'll put this on my list to look at in my spare cycles.  Good suggestion!
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtk-developers/attachments/20181109/0727bcc0/attachment.html>


More information about the vtk-developers mailing list