diff --git a/Modules/Python/documentation/mitkPython.dox b/Modules/Python/documentation/mitkPython.dox index 0375cea65c..8084fab6c6 100644 --- a/Modules/Python/documentation/mitkPython.dox +++ b/Modules/Python/documentation/mitkPython.dox @@ -1,80 +1,80 @@ /** \page mitkPython_Overview The MITK Python Module \section python_sec1 Brief description The MITK Python Module provides a service class to interactively run python code (passed as C++ strings) and evaluate the results. Furthermore the service class offers means to convert an MITK Image to an ITK/OpenCV image in their wrapped python environment. Thus, one can process MITK images with Python Code from the OpenCV and ITK wrapping system. Furthermore one can convert an mitk::Surface to a vtkPolyData in its Python environment.
Under the hood, the MITK build system takes care that the wrapping build process for SimpleITK/VTK/OpenCV is correctly initiated and all paths are correctly set within MITK code. To use the features of the different toolkits make sure they are enabled during the superbuild process. \section python_sec2 Build Instructions Currently MITK-Python is only supported with Qt4. Qt5 support is in an experimental stage. Have a look at \ref python_ssec3 on how to build MITK-Python with Qt5. The following CMake build options are available: \subsection python_ssec1 MITK_USE_Python MITK_USE_Python enables the python wrapping in MITK. When the option is activated the build of the additional dependency SimpleITK is also enabled. The default behaviour is to download and build Python 2.7.3 with numpy and embed it into MITK. To use an own custom runtime see MITK_USE_SYSTEM_PYTHON. \subsection python_ssec2 MITK_USE_SYSTEM_PYTHON This option is deactivated by default. If MITK_USE_SYSTEM_PYTHON is activated the python runtime from the system is used. Only Python 2.7.x is supported. The user can also specify it's own runtime by modifying the variables added by the FindPythonLib.cmake script. Note: A Python runtime with numpy is needed to use the MITK Python wrapping. When using this options all additional libraries installed in the python runtime will be available within the MITK-Python console. \subsection python_ssec3 Qt5 Support In order to build MITK-Python with Qt5 support an external build of CTK and PythonQt 3.0 is necessary. -The actual CTK superbuild only supports PythonQt 2.0 that has no Qt 5 support. This will most likely +The current MITK CTK superbuild only supports PythonQt 2.0 that has no Qt 5 support. This will most likely only work with the MITK_USE_SYSTEM_PYTHON option due to dependencies of each external project. It can be build with the following steps: \subsubsection python_Step1 Step1 - Build PythonQt PythonQt 3 has no CMake build system and has to be build by hand with qmake. Download and build PythonQt 3 from sourceforge. \subsubsection python_Step2 Step2 - Build CTK -Build the actual CTK with the external PythonQt 3 binaries. +Build the current CTK master with the external PythonQt 3 binaries. The external PythonQt 3 binaries can be added in CTK by adding the following CMake variable that points to the PythonQt build directory: \code -DPYTHONQT_INSTALL_DIR:PATH=/your/PythonQt3Build \endcode More information about the changes added in CTK for PythonQt are available on Github. \subsubsection python_Step3 Step3 - Build MITK In the last step MITK has to be build with the CTK from the previous step \ref python_Step2. This is done by setting the CTK_Dir to the CTK build directory: \code -DCTK_DIR:PATH=/some_path \endcode \section python_sec3 Suported Data Types The following data types in MITK are supported in the MITK Python Wrapping: \subsection python_ssec4 Image Mitk Images can be transferred to python. The images are copied in-memory and transferred as a numpy array to Python and vice versa. The MITK python wrapping creates a SimpleITK image using the numpy array with the properties of the MITK Image. Two dimensional images can also be transferred as an OpenCV image to python. \subsection python_ssec5 Surface Surfaces within mitk can be transferred as a vtkPolyData Object to Python. The surfaces are fully memory mapped. When changing a python wrapped surface the original object is also modified on the C++ side of MITK. */