[vtkusers] Re: Checking whether a coordinate is already in vtkPoints

Wesley Brooks wesbrooks at gmail.com
Sat Sep 30 16:35:01 EDT 2006


Thanks for your help Anja,

Store a map? I'm working on python at the moment and my current bodge is to
store an additional python list with the points in it and check against this
list, this seems a little wasteful on memory. I guess this isn't what you
mean?

Cheers,

Wesley Brooks.

On 29/09/06, Anja Ende <anja.ende at googlemail.com> wrote:
>
> Completely missed what you were asking. I guess you could store a map of
> your point coordinates and then do a look up...
>
> Anja
>
> On 29/09/06, Anja Ende <anja.ende at googlemail.com> wrote:
> >
> > Hi,
> >
> > Use vtkPoints::GetNumberOfPoints() to check this.
> >
> > so,
> >
> > if (myPointCollection->GetNumberOfPoints() == 0)
> >     myPointCollection->InsertPoint(.....)
> >
> > Cheers,
> > Anja
> >
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060930/c811cc52/attachment.htm>


More information about the vtkusers mailing list