[vtkusers] how to create a python wrapper for vtkPartialVolumeModeller

Roman Grothausmann roman.grothausmann at helmholtz-berlin.de
Tue Jul 17 10:48:09 EDT 2012


Dear mailing list members,


How can I create a python wrapper for vtkPartialVolumeModeller? It is 
not part of VTK yet 
(http://www.insight-journal.org/browse/publication/792). Cory Quammen 
gave me the hint to copy vtkPartialVolumeModeller.h and 
vtkPartialVolumeModeller.cxx into e.g. VTK/Graphics/ and to add in 
VTK/Graphics/CMakeLists.txt under Kit_SRCS:

.
.
.
SET( Kit_SRCS
vtkPartialVolumeModeller.cxx
.
.
.

Rebuilding everything works without problems but when I import vtk in 
python, I get a loading error:

PYTHONPATH=/opt/vtk-5.10.0/lib/python2.7/site-packages/
LD_LIBRARY_PATH=/opt/vtk-5.10.0/lib/vtk-5.10/ python2.7
Python 2.7.3rc2 (default, Apr 22 2012, 22:30:17)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import vtk
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/opt/vtk-5.10.0/lib/python2.7/site-packages/vtk/__init__.py", line
45, in<module>
from vtkGraphicsPython import *
ImportError: /opt/vtk-5.10.0/lib/vtk-5.10/libvtkGraphicsPythonD.so.5.10:
undefined symbol: _ZN24vtkPartialVolumeModeller19SetSampleDimensionsEiii

What is missing to get this working?
If I also enable wrapping for TCL I get a link error during the build:

[ 99%] Built target vtkChartsTCL
Linking CXX executable ../../bin/vtk
../../bin/libvtkGraphicsTCL.so.5.10.0: undefined reference to
`vtkPartialVolumeModeller::SetSampleDimensions(int, int, int)'
../../bin/libvtkGraphicsTCL.so.5.10.0: undefined reference to
`vtkPartialVolumeModeller::SetModelBounds(double, double, double,
double, double, double)'
../../bin/libvtkGraphicsTCL.so.5.10.0: undefined reference to
`vtkPartialVolumeModeller::New()'
../../bin/libvtkGraphicsTCL.so.5.10.0: undefined reference to
`vtkPartialVolumeModeller::SetModelBounds(double*)'
../../bin/libvtkGraphicsTCL.so.5.10.0: undefined reference to
`vtkPartialVolumeModeller::SetSampleDimensions(int*)'
collect2: ld returned 1 exit status
make[2]: *** [bin/vtk] Fehler 1
make[1]: *** [Wrapping/Tcl/CMakeFiles/vtk.dir/all] Fehler 2
make: *** [all] Fehler 2

Many thanks for any help or hints.
Roman

-- 
Roman Grothausmann

Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Bereich Funktionale Materialien
Institut für angewandte Materialforschung
Hahn-Meitner-Platz 1
D-14109 Berlin	

(früher Hahn-Meitner-Institut und BESSY)


Tel.: +49-(0)30-8062-42816
Fax.: +49-(0)30-8062-43059

Vorsitzender des Aufsichtsrats: Prof. Dr. Dr. h.c. mult. Joachim Treusch
Stellvertretende Vorsitzende: Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Dr. Ulrich Breuer
Sitz der Gesellschaft: Berlin
Handelsregister: AG Charlottenburg, 89 HRB 5583





More information about the vtkusers mailing list