[vtkusers] vtkPoissonReconstruction problem in Release mode
David Gobbi
david.gobbi at gmail.com
Fri May 25 12:11:29 EDT 2012
Set the WRAP_EXCLUDE property for all files that don't start with "vtk".
SET_SOURCE_FILES_PROPERTIES(
Factor.cpp Geometry.cpp MarchingCubes.cpp
MultiGridOctest.cpp MultiGridOctreeData.cpp
WRAP_EXCLUDE)
The vtkPoissonReconstructionFilter is the only class you need to see
from python, so all the rest can be excluded from the wrapping (but
they still need to be in the SRCS because they need to be linked into
the library).
On Fri, May 25, 2012 at 10:03 AM, João Domingos
<joao.sousa.domingos at gmail.com> wrote:
> Sorry again David,
>
> compiling stops with an error on the Geometry.h file:
>
> [ 25%] Built target PoissonReconstruction
> [ 48%] Built target vtkPoissonReconstruction
> [ 51%] Python Wrapping - generating vtkPoissonReconstructionPython.cxx
> [ 55%] Python Wrapping - generating FactorPython.cxx
> [ 59%] Python Wrapping - generating GeometryPython.cxx
> syntax error
> *** SYNTAX ERROR found in parsing the header file
> /local/wolf3519/Desktop/Documents/Blood_Pool_Tracker/ExtraFilters/vtkPoissonReconstruction/Geometry.h
> before line 168 ***
> make[2]: *** [GeometryPython.cxx] Error 1
> make[1]: *** [CMakeFiles/vtkPoissonReconstructionPython.dir/all] Error 2
> make: *** [all] Error 2
>
> Do you know what it might be?
>
> Big thanks for the last hint!
> Joao
>
>
> On 22 May 2012 14:04, David Gobbi <david.gobbi at gmail.com> wrote:
>> The undefined symbol is _ZN13MarchingCubes9cornerMapE.
>> Use c++filt to get more information about this symbol:
>>
>> c++filt _ZN13MarchingCubes9cornerMapE
>> MarchingCubes::cornerMap
>>
>> The missing symbol is from the MarchingCubes class.
>>
>> Your LIB_SRCS should have all of these source files:
>> Factor.cpp Geometry.cpp MarchingCubes.cpp MultiGridOctest.cpp
>> MultiGridOctreeData.cpp
>>
>> - David
>>
>>
>> On Tue, May 22, 2012 at 2:49 AM, João Domingos
>> <joao.sousa.domingos at gmail.com> wrote:
>>> Hey David (and all),
>>>
>>> Sorry to abuse your patience.., but can you just tell me if the
>>> python-wrapping code I attached in the previous CMakeLists file is the
>>> same to wrap every filter? Also, do the c++ files need to be prepared
>>> in some way for the python-wrapping as well? I cannot get rid of that
>>> undefined symbol error..
>>>
>>> Big thanks for your help!
>>> Joao
>>>
>>>
>>> On 19 May 2012 19:11, João Domingos <joao.sousa.domingos at gmail.com> wrote:
>>>> So I tried in another ubuntu system (11.04), successfully rebuild
>>>> vtkPoissonReconstruction with the python wrapping and I got the same
>>>> error but in a different symbol, I guess:
>>>>
>>>> from vtkPoissonReconstructionPython import *
>>>> ImportError: /local/wolf3519/Documents/LV_Defor_Model_KalmanF/ExtraFilters/vtkPoissonReconstruction/build/vtkPoissonReconstructionPython.so:
>>>> undefined symbol: _ZN13MarchingCubes9cornerMapE
>>>>
>>>> I guess the code I added to the CMakeLists file to wrap the
>>>> PoissonReconstruction (http://hdl.handle.net/10380/3155) filter to
>>>> python is not working properly..
>>>>
>>>> David, do you mind checking if the CMakeLists file I attached is
>>>> expected to correctly wrap the vtkPoissonReconstruction, for example?
>>>>
>>>> Thank you,
>>>> Joao
>>>>
>>>>
>>>>
>>>>
>>>> On 19 May 2012 05:04, João Domingos <joao.sousa.domingos at gmail.com> wrote:
>>>>> Ok. Almost there..
>>>>>
>>>>> So I did try both:
>>>>>
>>>>> - adding this on my script where I use the filter
>>>>> import sys
>>>>> sys.path.append('/opt/VTK/vtkPoissonReconstruction/build')
>>>>> from vtkPoissonReconstructionPython import *
>>>>>
>>>>> - and adding this at the end of sudo nano ~/.bashrc:
>>>>> export PYTHONPATH=$PYTHONPATH:/opt/VTK/vtkPoissonReconstruction/build
>>>>>
>>>>> With both I got the following error:
>>>>> ImportError: /opt/VTK/vtkPoissonReconstruction/build/vtkPoissonReconstructionPython.so:
>>>>> undefined symbol: _ZN13CoredMeshData12IN_CORE_FLAGE
>>>>>
>>>>> google couldn't help me on this.. What can it be?
>>>>>
>>>>> Many thanks again,
>>>>> Joao
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On 18 May 2012 20:27, David Gobbi <david.gobbi at gmail.com> wrote:
>>>>>> You need to tell Python where the module is:
>>>>>> http://docs.python.org/tutorial/modules.html#the-module-search-path
>>>>>>
>>>>>> On Fri, May 18, 2012 at 1:16 PM, João Domingos
>>>>>> <joao.sousa.domingos at gmail.com> wrote:
>>>>>>> Ok. Thank you. I will try to have a look into the filter.
>>>>>>>
>>>>>>> Regarding the import:
>>>>>>>
>>>>>>> from vtkPoissonReconstructionPython import *
>>>>>>> ImportError: No module named vtkPoissonReconstructionPython
>>>>>>>
>>>>>>> It is the same thing.. I must need to tell vtk where the folder with
>>>>>>> the filter is.. What do you think?
>>>>>>>
>>>>>>> Joao
More information about the vtkusers
mailing list