Page MenuHomePhabricator

Support Python wrapping via SuperBuild
Closed, DuplicatePublic

Related Objects

Event Timeline

hm some issues that i discovered during the superbuild im my VM:

  • CableSwig is still not downloaded from mitk.org (is it available now?)
  • There is yet no patch step for Windows Debug builds nor is the superbuild tested on windows (i will do that)
  • Strangely, i activated MITK_USE_Python but the VTK was built without Python support
  • I will push some bugfixes concerning the previously used MITK_USE_PYTHON flag which caused the MITK Python wrapping not to be built in my first try. furthermore with use of an external gdcm, the gdcm include directories must be added to mitkCorePython lib
  • python-numpy is mandatory and libgtk2.0-dev is very useful for the OpenCV Python Wrapping, maybe we can somehow enforce this by the superbuild
  • lastly, most critical: in the current CTK HEAD there is no PythonShell anymore. i will try to find an alternative. for the MITK workshop i used an old fork of Danial Saruji (which also contains a bugfix for the old python shell): https://github.com/saruji/CTK.git

aja and the several that must be added to PYTHONPATH to work correctly:
in the end, this was the shell script used to start the ExtApp with Python support (i already started to create a CMake Template for this):

export PYTHONPATH=/home/mbi/MITK/bin-MITK/MITK-build/bin:/home/mbi/MITK/bin-MITK/VTK-build/Wrapping/Python:/home/mbi/MITK/bin-MITK/VTK-build/bin:/home/mbi/MITK/bin-MITK/ITK-build/bin:/home/mbi/MITK/bin-MITK/ITK-build/Wrapping/WrapITK/Python:/home/mbi/MITK/bin-MITK/OpenCV-build/lib:/home/mbi/11-05-28_29-MITK-Schulung/python-scripts:$PYTHONPATH
export LD_LIBRARY_PATH=/home/mbi/MITK/bin-MITK/MITK-build/bin/BlueBerry/org.blueberry.osgi/bin:/home/mbi/MITK/bin-MITK/VTK-build/bin:$LD_LIBRARY_PATH
./ExtApp

i pushed my changes into the topic branch ...

maybe my startExtApp.sh template can be replaced by the Applauncher

Resetting all bugs without active assignee flag to "CONFIRMED". Change status to IN_PROGRESS if you are working on it.

just some notes to not forget important todos:
cableswig is found and build by mitk but the path is not set automatically. furthermore the cableswig source must be uploaded to mitk.org

further todo: remove duplicated cmake files, remove unnecessary cmake code, still an error with vtkCommonPythonD

add itk,vtk,opencv paths to the pythonpath env variable when loading mitk python wrappers

resetting to confirmed. no time to work on it this wednesday

nearly finished, gui working again, OpenCV integration untested, untested on windows. generation of mitk.py which sets the PYTHONPATH for itk and vtk works, but the initial setting of PYTHONPATH to mitk.py is still not done yet

ok works fine now. in the snippets there is one more bug (removing does not work). test opencv integration, merge and push next time

also todo: add useful default snippets (image conversion etc)

nice-to-have:

  • add more conversion methods, especially wrap mitkOpenCVVideoSupport
  • make wrapping nicer, e.g. default arguments for methods must be solved in some way

[8f55ed]: Merge branch 'bug-8208-python-superbuild-support'

Conflicts:
CMakeEx

Merged commits:

2011-12-07 16:12:09 Michael Mueller [59c2fe]
updating variable stack after pasting!


2011-12-07 16:09:25 Michael Mueller [2ae36a]
added final bugfixes for snippets, integrated mitkCast module


2011-11-23 18:20:40 Michael Mueller [5252e1]
last bug fixes, setting of paths works fine, added Snippets view for python perspective


2011-11-16 16:57:30 Michael Mueller [3dbb40]
reworked mitk.py generation. still todo add runtime directory at startup to python path


2011-11-16 16:19:34 Michael Mueller [baa5ca]
gui working again, suppressed TCL wrapper generation


2011-06-01 15:12:31 mbi [1d427f]
added startExpApp.sh.in template for starting the ExtApp with the correct paths. besides that, renamed the previously used MITK_USE_PYTHON to MITK_USE_Python


2011-05-25 15:52:48 Sascha Zelzer [8af4d2]
Python wrapping is now supported via SuperBuild.

[40dbeb]: Merge branch 'bug-8208-python-superbuild-support'

Merged commits:

2011-12-07 16:53:23 Michael Mueller [3b37e7]
added new view to python support

setting to confirmed while working on similar T10825

the two bugs are about the same issue