[vtkusers] SafeDownCast in Python wrapper

Sebastien Jourdain sebastien.jourdain at kitware.com
Sat Jun 7 15:20:53 EDT 2014

Hi Markus,

In order to get access to those methods in Python you just need to import
the module that define the classes that you care about.
To figure our the import line look at the file "module.cmake" inside the
directory of your C++ class definition.
Then from the name of the module do something like that before getting a
reference of that class.

from {name}Python import *

That's it!


On Fri, Jun 6, 2014 at 9:46 PM, Markus Fuger <markus.fuger at outlook.com>

> Hello,
> I don't actually want to do that - but because I did not get any answer to
> post here:
> http://www.vtk.org/pipermail/vtkusers/2014-May/084020.html
> I ask another question because I think it might be the solution for my
> initial problem.
> How to properly use the SafeDownCast Method with the Python wrapper to use
> methods that should be inherited from a parent class? According to this
> document (
> https://github.com/Kitware/VTK/blob/master/Wrapping/Python/README_WRAP.txt
> ) it should not be needed - but in the same way I cannot access the
> SetInputString method for vtkXMLStructuredDataReaders.
> Thanks in advance for your help!
> Markus
> _______________________________________________
> 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
> 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/20140607/17058e8a/attachment.html>

More information about the vtkusers mailing list