[vtk-developers] vtkOBBTree vtkPoints vs vtkPolyData on the input

Burlen Loring burlen.loring at kitware.com
Wed Jul 23 12:03:12 EDT 2008


Hi John,

I was thinking along the same lines, but when I investigated, removing
all duplicates, the results were the same. This probably has to do with
the fact that the duplicates(and there are quite a few comprising ~3/4
of the points) are evenly distributed over the data set. Looking more
closely at the two implementations of ComputeOBB, I think I have a
handle on what is happening. The data set is AMR (
http://quaoar.sr.unh.edu/obb/bigObbAmr.png ) and in the implementation
of ComputeOBB for vtkPoints, the eigen vectors of a covariance matrix
are used for the axes of the OBB. This is bad for AMR data since local
concentrations of points in refined regions will heavily influence/skew
the mean (it's not a very good measure of centrality in that case). In
the implementation of ComputeOBB that uses a dataset's cells, the OBB
axes are obtained via the principal moments of inertia, where the
moments of inertia are computed using mass contributions that are
proportional to the surface area of the cells. So with the AMR data,
although there are many more points/cells in the refined region each
influences the result less than a similar point/cell in a less refined
region.

Thanks for your help
Burlen

John Biddiscombe wrote:
> Is it possible that what you are seeing is the consequence of having a 
> vtkPolyData object with a lot of unused points. When you pass the 
> cells in, only those point that are being used by cells go towards the 
> tree, whereas when you pass the entire point list in with no cells, 
> all are considered.
>
> JB
>> Hi all,
>>
>> I am having some strange results when using the vtkOBBTree. I am 
>> using only the method ComputeOBB. I had been passing polydata through 
>> however had recently switched to passing through only the points, as 
>> sometimes the polydata was too large to fit in the memory of a single 
>> compute node.  I have noticed that when I call ComputeOBB with a 
>> vtkPoints I get a drastically different OBB than when I call it with 
>> a vtkPolyData. For example http://quaoar.sr.unh.edu/obb/bigObb.png 
>> the white surface is the OBB that results from passing the points of 
>> the red dataset through the OBB filter. When I use the polydata I get 
>> an OBB that tightly fits the input data set. I expect in both cases 
>> (vtkPoints/vtkPolyData) to get a tightly fitting OBB since the input 
>> is an axis aligned box itself. Is this expected behavior? Why would 
>> the results differ so drastically?
>>
>> Thanks in advance
>> Burlen
>>
>
>


-- 
Burlen Loring
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x137




More information about the vtk-developers mailing list