[Paraview] Problems with displaying labels floating over data points

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu May 10 08:28:26 EDT 2012


Creating a DataLabelRepresentation should have worked. Here's a Python
script that illustrates the same:

from paraview.simple import *
s = Sphere()
r = Show()
v = Render()
l = servermanager.rendering.DataLabelRepresentation()
l.Input = s
l.PointLabelVisibility = 1
l.PointLabelMode = "IDs"
v.Representations.append(l)
Render()

Utkarsh

On Wed, May 9, 2012 at 5:53 PM, Nenad Vujicic <nenadus at gmail.com> wrote:
> Hello everyone,
>
> I have a set of points over which I would like to have floating labels
> rendered from values defined in per-point attribute array. If I select
> these points and turn on "Point Labels", on Selection Inspector
> docking panel, I get exactly what I need, but, I would like to have
> these labels not bound to currently selected points.
>
> I figured out that these labels are drawn using
> vtkDataLabelRepresentation class, but I was unable to apply this
> representation to points I extracted from plugin. My idea was to
> create a filter, which will extract all points I'm interested in, and
> to catch adding new representation
> object to Server Manager and current view and replace it with
> pqDataRepresentation which points to vtkDataLabelRepresentation.
> Unfortunately, it didn't work. I also tried with patching
> vtkPVCompositeRepresentation to have always turned on these labels,
> but it failed too.
>
> Does anyone have idea how I could add these labels?
>
> Thanks to everyone!
>
> Nenad.
> _______________________________________________
> 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list