[vtkusers] vtkPointLocator FindPointsWithinRadius Example
Andy Bauer
andy.bauer at kitware.com
Wed Jan 27 15:32:12 EST 2010
You can use vtkDelauney3D to create a volumetric mesh.
On Wed, Jan 27, 2010 at 3:20 PM, KS Jothybasu <jothybasu at gmail.com> wrote:
> Yes, I realized after some google searches on this issue. Is there a way to
> voxelize the mesh like vtkVoxelModeller or so?
>
> Thanks
>
> Jothy
>
>
> On Wed, Jan 27, 2010 at 6:16 PM, Andy Bauer <andy.bauer at kitware.com>wrote:
>
>> I don't think there's anything wrong. The sphere has radius of 50
>> (remember that the sphere is just a surface mesh and not a volumetric mesh)
>> and you're asking to find all points within radius 25 of the center of the
>> sphere which there are none.
>>
>>
>>
>>> Message: 5
>>> Date: Wed, 27 Jan 2010 17:01:23 +0000
>>> From: KS Jothybasu <jothybasu at gmail.com>
>>> Subject: [vtkusers] vtkPointLocator FindPointsWithinRadius Example
>>> To: vtkusers at vtk.org
>>> Message-ID:
>>> <1dd3c8b21001270901j18d69c07ideeb0fe666216fee at mail.gmail.com>
>>> Content-Type: text/plain; charset="iso-8859-1"
>>>
>>> Hi all,
>>>
>>> Does anyone have an example for vtkPointLocator.FindPointsWithinRadius()
>>>
>>> I am having trouble with it, here is my code
>>>
>>> x=vtk.vtkSphereSource()
>>> x.SetRadius(50)
>>> x.SetPhiResolution(50)
>>> x.SetThetaResolution(50)
>>> x.Update()
>>>
>>>
>>>
>>> result=vtk.vtkIdList()
>>> Loc=vtk.vtkPointLocator()
>>> Loc.SetDataSet(x.GetOutput())
>>> Loc.FindPointsWithinRadius(25,[0,0,0],result)
>>>
>>> prints
>>> result None
>>>
>>> Any hint?
>>>
>>> I think using this vtkFindLocator/KDTree there should be some method to
>>> get
>>> the points inside a polygon of any shape?
>>>
>>> Thanks
>>>
>>> Jothy
>>> -------------- next part --------------
>>> An HTML attachment was scrubbed...
>>> URL: <
>>> http://www.vtk.org/pipermail/vtkusers/attachments/20100127/cdc10261/attachment-0001.htm
>>> >
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100127/008e8821/attachment.htm>
More information about the vtkusers
mailing list