[Paraview] python programmable filter

Berk Geveci berk.geveci at kitware.com
Mon May 26 10:05:50 EDT 2008


Only a subset of VTK classes are accessible through ParaView's
programmable filter. These are mostly classes in Common and Filtering.
We have plans to change this. Having said that, you will never be able
to create rendering object from the programmable filter. It is for
filtering only. You have to use the python interface to the server
manager (through the Python shell under the Tools menu) to create
rendering objects. There is an introduction to this interface here:
http://paraview.org/Wiki/images/f/f9/Servermanager2.pdf
I am afraid this API is different than pure VTK API and more limited
because of the client/server support (i.e. you don't have direct
access to VTK objects, only to proxies). You'll probably end up
creating a vtkSMDataLabelRepresentationProxy in some way.
By the way, ParaView already supports labels but limits them to
selections. Once you select a set of cells/points, you go to the
selection inspector and turn on labels. The reason labels are limited
to selections is due to poor rendering performance when a large number
of labels are displayed. We have in the works a new labeling scheme
that changes the number of labels based on the zoom level to give
interactive performance.

-berk

On Mon, May 26, 2008 at 2:39 AM, Bryn Lloyd <blloyd at vision.ee.ethz.ch> wrote:
> Hi users
>
>
> I wanted to a vtkIdFilter and a vtkLabeledDataMapper in the python
> programmable filter (in order to visualize point ids in pv3.3).
>
> Unfortunately, neither of these classes were located by the programmable
> filter. I get following error message:
>
> AttributeError: 'module' object has no attribute vtkLabeledDataMapper'
>
>
>
> This simple python code fails:
>
> ------------
>
> from paraview import vtk
> ldm = vtk.vtkLabeledDataMapper()
>
> ------------
>
>
> Does anybody know what I am doing wrong, or why this does not work? I
> checked if the vtk filters are in the paraview source directory: They are!
>
>
> Thanks for any hints/help
>
>
> Cheers, Bryn
>
>
>
>
>
>
>
>
> --
> -------------------------------------------------
> Bryn Lloyd
> Computer Vision Laboratory
> ETH Zürich, Sternwartstrasse 7
> CH - 8092 Zürich, Switzerland
> Tel: +41 44 63 27690
> Fax: +41 44 63 21199
> -------------------------------------------------
>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list