[vtk-developers] vtkPointCloud remote module
Will Schroeder
will.schroeder at kitware.com
Tue Feb 23 16:09:02 EST 2016
Geoff-
vtkVoxelGrid (in VTK/Remote/vtkPointCloud) is now interpolating point data
attributes. Besides updating Remotes/vtkPointCloud, you'll need to update
VTK as I just pushed a bunch of stuff (in VTK/Filters/Points) that
implements a kernel interpolation framework. To change the interpolation of
attributes on vtkVoxelGrid, you have to specify a new interpolation kernel
(vtkLinearKernel is default - averages data).
Please test this and report problems. I recommend that you build optimized
with VTK_SMP_IMPLEMENTATION_TYPE=TBB you'll run much faster.
Best,
W
On Fri, Jan 29, 2016 at 10:26 AM, Geoff Wright <gpwright at gmail.com> wrote:
> Hi Will,
>
> That sounds good. For my use case I do have a couple of scalar quantities
> associated with each point, in PCL terminology I use pcl::PointXYZHSV.
> For interpolation of scalar values I think the ideal would be a parameter
> on voxel grid that can accept either VTK_NEAREST_INTERPOLATION,
> VTK_LINEAR_INTERPOLATION or VTK_CUBIC_INTERPOLATION a la
> vtkVolumeProperty.h. However, if this is too much work I think a linear
> interpolation implementation would be fine for most use cases.
>
> Let me know when you push the changes, I'll try it out. Just checked your
> gitlab repo and didn't seem them there yet.
>
> G
>
>
>
>
> On Fri, Jan 29, 2016 at 10:07 AM Will Schroeder <
> will.schroeder at kitware.com> wrote:
>
>> Geoff-
>>
>> I knocked out a vtkVoxelGrid last night, it seems to work great. It's
>> threaded and seems to be fast.
>>
>> Question for you before I push the work to the repository: averaging
>> points in each bin provides a nice subsampled point position. But what do
>> you think we should do for attributes (e.g., scalars, vector, etc.)? These
>> could be averaged too. There are however other options like finding the
>> closest point to the subsampled point and using those attribute values, or
>> if you want to get really fancy, using an interpolation kernel to
>> interpolate to the subsampled point.
>>
>> Thoughts?
>> W
>>
>> On Thu, Jan 28, 2016 at 10:03 AM, Will Schroeder <
>> will.schroeder at kitware.com> wrote:
>>
>>> Thanks for the feedback. I have some downsampling filters in the works
>>> now, I'll let you know when I have something ready.
>>>
>>> BTW we are on a similar path. PCL is awesome, but we have some common
>>> workflows that would be better served with more compact software
>>> environments, and with minimal IO and/or data transfer. So we're trying to
>>> knock of a small kernel of capability to achieve this.
>>>
>>> Best,
>>> W
>>>
>>> On Thu, Jan 28, 2016 at 9:56 AM, Geoff Wright <gpwright at gmail.com>
>>> wrote:
>>>
>>>> Hi Will,
>>>>
>>>> This is good to see. I'm currently using VTK to generate surfaces from
>>>> some point cloud data. I have some initial pre processing steps that I use
>>>> PCL (point cloud library) for, and then a vtk stage that converts PCL point
>>>> cloud into vtkPolyData/vtkPoints. It would be great to eliminate the
>>>> PCL dependency and use exclusively vtk. My point cloud data grows
>>>> very large over time with a lot of redundant points so its very important
>>>> to downsample them onto uniform spacing (
>>>> http://docs.pointclouds.org/trunk/classpcl_1_1_voxel_grid.html )
>>>> before processing them in vtk. Would it make sense to add something like
>>>> this to your library?
>>>>
>>>> Geoff
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jan 28, 2016 at 9:12 AM Will Schroeder <
>>>> will.schroeder at kitware.com> wrote:
>>>>
>>>>> FYI- I have committed an initial set of filters for performing point
>>>>> cloud processing. Any feedback or suggestions are welcome as this is an
>>>>> initial prototype. The work is currently available as a remote module to
>>>>> VTK (vtkPointCloud) via this repository:
>>>>> https://gitlab.kitware.com/vtk/point-cloud.git
>>>>>
>>>>> A couple of notes:
>>>>> + Right now I am using vtkPolyData to represent the point cloud via a
>>>>> vtkPoints instance. There are no vtkVertex, vtkPolyVertex cells created to
>>>>> save on memory.
>>>>> + The classes will process as input any vtkPointSet dataset
>>>>> + There is a general framework for filtering point clouds via the
>>>>> class vtkPointCloudFilter. Besides their filtered cloud output, these
>>>>> filters also have an optional, second output which contains any points
>>>>> removed from the input.
>>>>> + Current filters include vtkRadiusOutlierRemoval,
>>>>> vtkStatisticalOutlierRemoval, vtkExtractPoints (extract points using an
>>>>> implicit function). Some of these names are inspired by PCL
>>>>> <http://pointclouds.org/> names.
>>>>> + All filters are threaded using vtkSMPTools using a threaded locator
>>>>> (vtkStaticPointLocator) so I believe that this is relatively fast, although
>>>>> I have not done much testing.
>>>>> + I'm using vtkPointGaussianMapper in the tests, a class that Ken
>>>>> wrote that is very fast.
>>>>>
>>>>> As usual comments and suggestions are requested. In particular any
>>>>> suggestions for other filters to write are welcome (to round out some of
>>>>> the core functionality). The repository is in flux as I try crazy ideas and
>>>>> try to educate myself, so be forewarned.
>>>>>
>>>>> Best,
>>>>> W
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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:
>>>>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>>>>
>>>>>
>>>
>>>
>>> --
>>> William J. Schroeder, PhD
>>> Kitware, Inc. - Building the World's Technical Computing Software
>>> 28 Corporate Drive
>>> Clifton Park, NY 12065
>>> will.schroeder at kitware.com
>>> http://www.kitware.com
>>> (518) 881-4902
>>>
>>
>>
>>
>> --
>> William J. Schroeder, PhD
>> Kitware, Inc. - Building the World's Technical Computing Software
>> 28 Corporate Drive
>> Clifton Park, NY 12065
>> will.schroeder at kitware.com
>> http://www.kitware.com
>> (518) 881-4902
>>
>
--
William J. Schroeder, PhD
Kitware, Inc. - Building the World's Technical Computing Software
28 Corporate Drive
Clifton Park, NY 12065
will.schroeder at kitware.com
http://www.kitware.com
(518) 881-4902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160223/0fa21ff8/attachment.html>
More information about the vtk-developers
mailing list