[vtkusers] vtkPointLocator FindPointsWithinRadius Example

Andy Bauer andy.bauer at kitware.com
Wed Jan 27 13:16:01 EST 2010


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/ddb538c0/attachment.htm>


More information about the vtkusers mailing list