[vtkusers] vtkPoissonReconstruction problem in Release mode

David Gobbi david.gobbi at gmail.com
Fri May 18 14:40:53 EDT 2012


Hi Joao,

The easiest way to import the class into python is like this:

from vtkPoissonReconstructionPython import *
poisson = vtkPoissonReconstruction()

As for vtkPowerCrustSurfaceReconstruction.cxx, there is definitely an
error in the source code for this filter.  Some compilers are more
sensitive than others.  From you email:

/opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11430:32:
error: declaration of ‘double erand48(short unsigned int*)’ has a
different exception specifier
/opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11404:15:
error: from previous declaration ‘double erand48(short unsigned int*) throw ()’

The compiler is saying exactly what is wrong with the code.  Functions
are being declared with throw() in one place in the file, but without
throw() in another.

 - David


On Fri, May 18, 2012 at 12:16 PM, João Domingos
<joao.sousa.domingos at gmail.com> wrote:
> Thanks for the hint David!
>
> I was now able to build the vtkPoissonReconstruction
> (http://hdl.handle.net/10380/3155) and wrap it to python:
>
> [ 75%] Python Wrapping - generating vtkPoissonReconstructionPythonInit.cxx
> (...)
> [ 75%] Python Wrapping - generating vtkPoissonReconstructionPython.cxx
> (..)
> Linking CXX shared module vtkPoissonReconstructionPython.so
> [100%] Built target vtkPoissonReconstructionPython
>
> My problem here is, this was built in its own folder, inside the VTK
> folder. Calling vtk.vtkPoissonReconstructionPython in a python script
> does not find/recognise it. Do I need now to tell VTK where to find
> it? How can I do that?
>
> Also, I was trying to build the vtkPowerCrustSurfaceReconstruction
> (http://www.sq3.org.uk/powercrust/) but there is no CMakeLists.txt.
> Therefore I made the following one attached. It configures, but when
> making an error occurs:
>
> [ 16%] [ 33%] Building CXX object
> CMakeFiles/vtkPowerCrustSurfaceReconstruction.dir/vtkPowerCrustSurfaceReconstruction.cxx.o
> Building CXX object
> CMakeFiles/PowerCrustSurfaceReconstruction.dir/vtkPowerCrustSurfaceReconstruction.cxx.o
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: In
> function ‘void adapted_main()’:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1554:66:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1341:55:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: In
> function ‘void adapted_main()’:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:1554:66:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: In
> function ‘simplex* build_convex_hull(Coord* (*)(), long int (*)(site),
> short int, short int)’:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:4099:25:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: In
> function ‘simplex* build_convex_hull(Coord* (*)(), long int (*)(site),
> short int, short int)’:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:4099:25:
> warning: deprecated conversion from string constant to ‘char*’
> [-Wwrite-strings]
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: At global scope:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11404:46:
> error: declaration of ‘double erand48(short unsigned int*)’ has a
> different exception specifier
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11328:8:
> error: from previous declaration ‘double erand48(short unsigned int*)
> throw ()’
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: In
> function ‘double erand48(short unsigned int*)’:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11430:32:
> error: declaration of ‘double erand48(short unsigned int*)’ has a
> different exception specifier
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11404:15:
> error: from previous declaration ‘double erand48(short unsigned int*)
> throw ()’
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: At global scope:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11404:46:
> error: declaration of ‘double erand48(short unsigned int*)’ has a
> different exception specifier
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11328:8:
> error: from previous declaration ‘double erand48(short unsigned int*)
> throw ()’
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx: In
> function ‘double erand48(short unsigned int*)’:
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11430:32:
> error: declaration of ‘double erand48(short unsigned int*)’ has a
> different exception specifier
> /opt/VTK/PowerCrust/vtkPowerCrustSurfaceReconstruction.cxx:11404:15:
> error: from previous declaration ‘double erand48(short unsigned int*)
> throw ()’
> make[2]: *** [CMakeFiles/PowerCrustSurfaceReconstruction.dir/vtkPowerCrustSurfaceReconstruction.cxx.o]
> Error 1
> make[1]: *** [CMakeFiles/PowerCrustSurfaceReconstruction.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make[2]: *** [CMakeFiles/vtkPowerCrustSurfaceReconstruction.dir/vtkPowerCrustSurfaceReconstruction.cxx.o]
> Error 1
> make[1]: *** [CMakeFiles/vtkPowerCrustSurfaceReconstruction.dir/all] Error 2
> make: *** [all] Error 2
>
> I would say this would be a problem with the filter.cxx itself, but
> user Bayliss, Chris (Chicago) was able to build it in here
> http://vtk.1045678.n5.nabble.com/medial-line-extraction-td5702424.html.
>
> What do you think it might be?
>
> Big thanks for everything!!
>
> Best,
> Joao
>
>
>
>
> Many thanks,
> Joao Domingos
>
>
>
> On 18 May 2012 16:08, David Gobbi <david.gobbi at gmail.com> wrote:
>> Hi Joao,
>>
>> To wrap external filters, you need to have have all the necessary
>> wrapping calls in the CMakeLists.txt files for those filters.  I use
>> wrapping in all my VTK journal submissions, so you can use one of
>> those as an example, e.g. http://hdl.handle.net/10380/3252
>>
>>  - David
>>
>>
>>
>> On Fri, May 18, 2012 at 8:55 AM, Domingos <joao.sousa.domingos at gmail.com> wrote:
>>> Heyy again vtkusers,
>>>
>>> Please does someone know how to rebuild VTK in ubuntu so that you can get
>>> external custom filters (by these filters I mean vtkPoissonReconstruction or
>>> vtkPowerCrustSurfaceReconstruction) wrapped to python?
>>>
>>> IT would be really helpful..
>>>
>>> Many thanks,
>>> Joao



More information about the vtkusers mailing list