[vtkusers] How do I label points in 3d space with arbitrary strings?

Aron Helser aron.helser at kitware.com
Thu Jul 5 09:53:26 EDT 2018

FieldData is what you want. Essentially, you add a 'field' to your dataset,
with an entry for each point, that contains the string you want to display.

This example
shows one way to add scalar data to a polydata, but I'm not sure it's what
you want - I'm sure there's an appropriate example somewhere :)


On Thu, Jul 5, 2018 at 6:11 AM J. <babybishops at gmail.com> wrote:

> I have some particles moving around in 3d space, and I want to draw labels
> next to them that can display arbitrary data. The behavior in this example
> seems like what I need:
> https://github.com/Kitware/VTK/blob/master/Examples/Annotation/Python/labeledMesh.py
> I tried having a look at vtkLabeledDataMapper, but I don't see any way to
> tell it what to display. It just seems to automatically display...
> coordinates? Or "field data", whatever that is? In any case I couldn't see
> any way to just directly assign strings to point IDs or something like
> that. Is this not the right class for the job? How can I get the behavior
> I'm looking for?
> _______________________________________________
> Powered by www.kitware.com
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Search the list archives at: http://markmail.org/search/?q=vtkusers
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20180705/3b6f6697/attachment.html>

More information about the vtkusers mailing list