[vtkusers] Use transfer function editors from Python?

Cory Quammen cory.quammen at kitware.com
Fri Apr 15 10:09:00 EDT 2016


Hi Elvis,

Have a look at

http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Cxx/TestScalarsToColors.cxx

for an example of how to set up the transfer function editors used in ParaView.

You can eliminate the check at the end for vtkOpenGL2ContextDevice2D -
make sure to initialize and start the interactor, though.

I don't see anything in this example that won't work in Python - if
there is, please report back any problems you encounter.

HTH,
Cory

On Fri, Apr 15, 2016 at 8:54 AM, Elvis Stansvik
<elvis.stansvik at orexplore.com> wrote:
> Hi all,
>
> I'd like to use the transfer function editors that VTK seems to provide
> (used by e.g. Paraview) from Python. Is it possible?
>
> Looking at
>
>    http://www.vtk.org/pipermail/vtkusers/2013-December/082410.html
>
> I read the slightly worrying:
>
>     "[...] Save/restore state and python interface are not working as
> expected. [...]"
>
> Though that was an old message when the new editors were first introduced in
> 2013. Is it still the case that the Python interface for the editor classes
> is not working as expected?
>
> Does anyone know of a Python application/example that makes use of the
> editors? (I'm using VTK 6.2 and PyQt 5.5.1).
>
> Thanks,
> Elvis
>
> _______________________________________________
> 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:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list