diff --git a/CMake/PackageDepends/MITK_PythonLibs_Config.cmake b/CMake/PackageDepends/MITK_PythonLibs_Config.cmake new file mode 100644 index 0000000000..11fb617c3e --- /dev/null +++ b/CMake/PackageDepends/MITK_PythonLibs_Config.cmake @@ -0,0 +1,5 @@ +FIND_PACKAGE(PythonLibs REQUIRED) +list(APPEND ALL_LIBRARIES ${PYTHON_LIBRARIES}) +#include_directories(${PYTHON_INCLUDE_DIRS}) +list(APPEND ALL_INCLUDE_DIRECTORIES ${PYTHON_INCLUDE_DIRS}) +#link_directories(${PYTHON_LIBRARIES}) diff --git a/CMakeExternals/CTK.cmake b/CMakeExternals/CTK.cmake index 065ac082e9..cc2a6853c7 100644 --- a/CMakeExternals/CTK.cmake +++ b/CMakeExternals/CTK.cmake @@ -1,81 +1,83 @@ #----------------------------------------------------------------------------- # CTK #----------------------------------------------------------------------------- if(MITK_USE_CTK) # Sanity checks if(DEFINED CTK_DIR AND NOT EXISTS ${CTK_DIR}) message(FATAL_ERROR "CTK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj CTK) set(proj_DEPENDENCIES ) set(CTK_DEPENDS ${proj}) if(NOT DEFINED CTK_DIR) set(revision_tag 4e6ac62e) #IF(${proj}_REVISION_TAG) # SET(revision_tag ${${proj}_REVISION_TAG}) #ENDIF() set(ctk_optional_cache_args ) if(MITK_USE_Python) list(APPEND ctk_optional_cache_args -DCTK_LIB_Scripting/Python/Widgets:BOOL=ON + -DCTK_ENABLE_Python_Wrapping:BOOL=ON + -DCTK_APP_ctkSimplePythonShell:BOOL=ON ) endif() if(MITK_USE_DCMTK) list(APPEND ctk_optional_cache_args -DDCMTK_DIR:PATH=${DCMTK_DIR} ) list(APPEND proj_DEPENDENCIES DCMTK) else() list(APPEND ctk_optional_cache_args -DDCMTK_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_DCMTK_085525e6.tar.gz ) endif() FOREACH(type RUNTIME ARCHIVE LIBRARY) IF(DEFINED CTK_PLUGIN_${type}_OUTPUT_DIRECTORY) LIST(APPEND mitk_optional_cache_args -DCTK_PLUGIN_${type}_OUTPUT_DIRECTORY:PATH=${CTK_PLUGIN_${type}_OUTPUT_DIRECTORY}) ENDIF() ENDFOREACH() ExternalProject_Add(${proj} SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src BINARY_DIR ${proj}-build PREFIX ${proj}-cmake URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_${revision_tag}.tar.gz URL_MD5 dc553f3da6591d490b4175fb66892276 UPDATE_COMMAND "" INSTALL_COMMAND "" CMAKE_GENERATOR ${gen} CMAKE_ARGS ${ep_common_args} ${ctk_optional_cache_args} -DDESIRED_QT_VERSION:STRING=4 -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DGit_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE} -DGIT_EXECUTABLE:FILEPATH=${GIT_EXECUTABLE} -DCTK_LIB_CommandLineModules/Backend/LocalProcess:BOOL=ON -DCTK_LIB_CommandLineModules/Frontend/QtGui:BOOL=ON -DCTK_LIB_PluginFramework:BOOL=ON -DCTK_LIB_DICOM/Widgets:BOOL=ON -DCTK_PLUGIN_org.commontk.eventadmin:BOOL=ON -DCTK_PLUGIN_org.commontk.configadmin:BOOL=ON -DCTK_USE_GIT_PROTOCOL:BOOL=OFF -DDCMTK_URL:STRING=${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/CTK_DCMTK_085525e6.tar.gz DEPENDS ${proj_DEPENDENCIES} ) set(CTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif() endif() diff --git a/CMakeExternals/ITK.cmake b/CMakeExternals/ITK.cmake index 3b099de8ab..64d28cc45a 100644 --- a/CMakeExternals/ITK.cmake +++ b/CMakeExternals/ITK.cmake @@ -1,66 +1,82 @@ #----------------------------------------------------------------------------- # ITK #----------------------------------------------------------------------------- # Sanity checks if(DEFINED ITK_DIR AND NOT EXISTS ${ITK_DIR}) message(FATAL_ERROR "ITK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj ITK) set(proj_DEPENDENCIES GDCM) if(MITK_USE_Python) list(APPEND proj_DEPENDENCIES CableSwig) endif() set(ITK_DEPENDS ${proj}) if(NOT DEFINED ITK_DIR) set(additional_cmake_args ) if(MINGW) set(additional_cmake_args -DCMAKE_USE_WIN32_THREADS:BOOL=ON -DCMAKE_USE_PTHREADS:BOOL=OFF) endif() if(MITK_USE_Python) + list(APPEND additional_cmake_args -DUSE_WRAP_ITK:BOOL=ON -DITK_USE_REVIEW:BOOL=ON + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -DPYTHON_DEBUG_LIBRARY=${PYTHON_DEBUG_LIBRARY} + -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} + #-DPYTHON_LIBRARIES=${PYTHON_LIBRARY} + #-DPYTHON_DEBUG_LIBRARIES=${PYTHON_DEBUG_LIBRARIES} -DCableSwig_DIR:PATH=${CableSwig_DIR} -DWRAP_ITK_JAVA:BOOL=OFF -DWRAP_ITK_TCL:BOOL=OFF + -DWRAP_unsigned_char:BOOL=ON + #-DWRAP_double:BOOL=ON + -DWRAP_rgb_unsigned_char:BOOL=ON + #-DWRAP_rgba_unsigned_char:BOOL=ON + -DWRAP_signed_char:BOOL=ON + #-DWRAP_signed_long:BOOL=ON + -DWRAP_signed_short:BOOL=ON + -DWRAP_short:BOOL=ON + -DWRAP_unsigned_long:BOOL=ON ) endif() if(GDCM_IS_2_0_18) set(ITK_PATCH_COMMAND ${CMAKE_COMMAND} -DTEMPLATE_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/EmptyFileForPatching.dummy -P ${MITK_SOURCE_DIR}/CMakeExternals/PatchITK-3.20.cmake) endif() ExternalProject_Add(${proj} SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src BINARY_DIR ${proj}-build PREFIX ${proj}-cmake URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/InsightToolkit-3.20.1.tar.gz URL_MD5 90342ffa78bd88ae48b3f62866fbf050 INSTALL_COMMAND "" PATCH_COMMAND ${ITK_PATCH_COMMAND} CMAKE_GENERATOR ${gen} CMAKE_ARGS ${ep_common_args} ${additional_cmake_args} -DBUILD_TESTING:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DITK_USE_SYSTEM_GDCM:BOOL=ON -DGDCM_DIR:PATH=${GDCM_DIR} DEPENDS ${proj_DEPENDENCIES} ) set(ITK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif() diff --git a/CMakeExternals/OpenCV.cmake b/CMakeExternals/OpenCV.cmake index 82bbfeb82e..8ac74e701c 100644 --- a/CMakeExternals/OpenCV.cmake +++ b/CMakeExternals/OpenCV.cmake @@ -1,65 +1,77 @@ #----------------------------------------------------------------------------- # OpenCV #----------------------------------------------------------------------------- if(MITK_USE_OpenCV) # Sanity checks if(DEFINED OpenCV_DIR AND NOT EXISTS ${OpenCV_DIR}) message(FATAL_ERROR "OpenCV_DIR variable is defined but corresponds to non-existing directory") endif() set(proj OpenCV) set(proj_DEPENDENCIES) set(OpenCV_DEPENDS ${proj}) if(NOT DEFINED OpenCV_DIR) set(additional_cmake_args ) if(MITK_USE_Python) + #message(STATUS "PYTHON_EXECUTABLE: ${PYTHON_EXECUTABLE}") + #message(STATUS "PYTHON_DEBUG_LIBRARY: ${PYTHON_DEBUG_LIBRARY}") + #message(STATUS "PYTHON_INCLUDE_DIR: ${PYTHON_INCLUDE_DIR}") + #message(STATUS "PYTHON_LIBRARY: ${PYTHON_LIBRARY}") + list(APPEND additional_cmake_args - -DBUILD_NEW_PYTHON_SUPPORT:BOOL=ON + -DBUILD_opencv_python:BOOL=ON + -DBUILD_NEW_PYTHON_SUPPORT:BOOL=ON + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + -DPYTHON_DEBUG_LIBRARY=${PYTHON_DEBUG_LIBRARY} + -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} + #-DPYTHON_LIBRARIES=${PYTHON_LIBRARY} + #-DPYTHON_DEBUG_LIBRARIES=${PYTHON_DEBUG_LIBRARIES} ) endif() # 12-05-02, muellerm, added QT usage by OpenCV if QT is used in MITK # 12-09-11, muellerm, removed automatic usage again, since this will struggle with the MITK Qt application object if(MITK_USE_QT) list(APPEND additional_cmake_args -DWITH_QT:BOOL=OFF -DWITH_QT_OPENGL:BOOL=OFF -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} ) endif() set(opencv_url ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/OpenCV-2.4.2.tar.bz2) set(opencv_url_md5 d5d13c4a65dc96cdfaad54767e428215) ExternalProject_Add(${proj} SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src BINARY_DIR ${proj}-build PREFIX ${proj}-cmake URL ${opencv_url} URL_MD5 ${opencv_url_md5} INSTALL_COMMAND "" CMAKE_GENERATOR ${gen} CMAKE_ARGS ${ep_common_args} -DBUILD_DOCS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_DOXYGEN_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=ON ${additional_cmake_args} DEPENDS ${proj_DEPENDENCIES} ) set(OpenCV_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif() endif() diff --git a/CMakeExternals/VTK.cmake b/CMakeExternals/VTK.cmake index cb93fb5c24..33d6170d00 100644 --- a/CMakeExternals/VTK.cmake +++ b/CMakeExternals/VTK.cmake @@ -1,88 +1,94 @@ #----------------------------------------------------------------------------- # VTK #----------------------------------------------------------------------------- if(WIN32) option(VTK_USE_SYSTEM_FREETYPE OFF) else(WIN32) option(VTK_USE_SYSTEM_FREETYPE ON) endif(WIN32) # Sanity checks if(DEFINED VTK_DIR AND NOT EXISTS ${VTK_DIR}) message(FATAL_ERROR "VTK_DIR variable is defined but corresponds to non-existing directory") endif() set(proj VTK) set(proj_DEPENDENCIES ) set(VTK_DEPENDS ${proj}) if(NOT DEFINED VTK_DIR) set(additional_cmake_args ) if(MINGW) set(additional_cmake_args -DCMAKE_USE_WIN32_THREADS:BOOL=ON -DCMAKE_USE_PTHREADS:BOOL=OFF -DVTK_USE_VIDEO4WINDOWS:BOOL=OFF # no header files provided by MinGW ) endif() if(MITK_USE_Python) list(APPEND additional_cmake_args -DVTK_WRAP_PYTHON:BOOL=ON -DVTK_USE_TK:BOOL=OFF -DVTK_WINDOWS_PYTHON_DEBUGGABLE:BOOL=OFF + -DPYTHON_DEBUG_LIBRARY=${PYTHON_DEBUG_LIBRARY} + -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} + -DPYTHON_LIBRARY=${PYTHON_LIBRARY} + -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} + #-DPYTHON_LIBRARIES=${PYTHON_LIBRARY} + #-DPYTHON_DEBUG_LIBRARIES=${PYTHON_DEBUG_LIBRARIES} ) endif() if(MITK_USE_QT) list(APPEND additional_cmake_args -DDESIRED_QT_VERSION:STRING=4 -DVTK_USE_GUISUPPORT:BOOL=ON -DVTK_USE_QVTK_QTOPENGL:BOOL=OFF -DVTK_USE_QT:BOOL=ON -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} ) endif() set(VTK_URL ${MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL}/vtk-5.10.0.tar.gz) set(VTK_URL_MD5 a0363f78910f466ba8f1bd5ab5437cb9) if(APPLE) set(VTK_PATCH_COMMAND ${CMAKE_COMMAND} -DTEMPLATE_FILE:FILEPATH=${MITK_SOURCE_DIR}/CMakeExternals/EmptyFileForPatching.dummy -P ${MITK_SOURCE_DIR}/CMakeExternals/PatchVTK-5.10-Mac.cmake) endif() ExternalProject_Add(${proj} SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj}-src BINARY_DIR ${proj}-build PREFIX ${proj}-cmake URL ${VTK_URL} URL_MD5 ${VTK_URL_MD5} INSTALL_COMMAND "" PATCH_COMMAND ${VTK_PATCH_COMMAND} CMAKE_GENERATOR ${gen} CMAKE_ARGS ${ep_common_args} -DVTK_WRAP_TCL:BOOL=OFF -DVTK_WRAP_PYTHON:BOOL=OFF -DVTK_WRAP_JAVA:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON -DVTK_USE_PARALLEL:BOOL=ON -DVTK_USE_CHARTS:BOOL=OFF -DVTK_USE_QTCHARTS:BOOL=ON -DVTK_USE_GEOVIS:BOOL=OFF -DVTK_USE_SYSTEM_FREETYPE:BOOL=${VTK_USE_SYSTEM_FREETYPE} -DVTK_USE_QVTK_QTOPENGL:BOOL=OFF -DVTK_LEGACY_REMOVE:BOOL=ON ${additional_cmake_args} DEPENDS ${proj_DEPENDENCIES} ) set(VTK_DIR ${CMAKE_CURRENT_BINARY_DIR}/${proj}-build) else() mitkMacroEmptyExternalProject(${proj} "${proj_DEPENDENCIES}") endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index 333f3c1b1f..8f666d3b48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,963 +1,969 @@ if(APPLE) # With XCode 4.3, the SDK location changed. Older CMake # versions are not able to find it. cmake_minimum_required(VERSION 2.8.8) else() cmake_minimum_required(VERSION 2.8.4) endif() #----------------------------------------------------------------------------- # Set a default build type if none was specified #----------------------------------------------------------------------------- if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Debug' as none was specified.") set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") endif() #----------------------------------------------------------------------------- # Superbuild Option - Enabled by default #----------------------------------------------------------------------------- option(MITK_USE_SUPERBUILD "Build MITK and the projects it depends on via SuperBuild.cmake." ON) if(MITK_USE_SUPERBUILD) project(MITK-superbuild) set(MITK_SOURCE_DIR ${PROJECT_SOURCE_DIR}) set(MITK_BINARY_DIR ${PROJECT_BINARY_DIR}) else() project(MITK) endif() #----------------------------------------------------------------------------- # Warn if source or build path is too long #----------------------------------------------------------------------------- if(WIN32) set(_src_dir_length_max 50) set(_bin_dir_length_max 50) if(MITK_USE_SUPERBUILD) set(_src_dir_length_max 43) # _src_dir_length_max - strlen(ITK-src) set(_bin_dir_length_max 40) # _bin_dir_length_max - strlen(MITK-build) endif() string(LENGTH "${MITK_SOURCE_DIR}" _src_n) string(LENGTH "${MITK_BINARY_DIR}" _bin_n) # The warnings should be converted to errors if(_src_n GREATER _src_dir_length_max) message(WARNING "MITK source code directory path length is too long (${_src_n} > ${_src_dir_length_max})." "Please move the MITK source code directory to a directory with a shorter path." ) endif() if(_bin_n GREATER _bin_dir_length_max) message(WARNING "MITK build directory path length is too long (${_bin_n} > ${_bin_dir_length_max})." "Please move the MITK build directory to a directory with a shorter path." ) endif() endif() #----------------------------------------------------------------------------- # See http://cmake.org/cmake/help/cmake-2-8-docs.html#section_Policies for details #----------------------------------------------------------------------------- set(project_policies CMP0001 # NEW: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used. CMP0002 # NEW: Logical target names must be globally unique. CMP0003 # NEW: Libraries linked via full path no longer produce linker search paths. CMP0004 # NEW: Libraries linked may NOT have leading or trailing whitespace. CMP0005 # NEW: Preprocessor definition values are now escaped automatically. CMP0006 # NEW: Installing MACOSX_BUNDLE targets requires a BUNDLE DESTINATION. CMP0007 # NEW: List command no longer ignores empty elements. CMP0008 # NEW: Libraries linked by full-path must have a valid library file name. CMP0009 # NEW: FILE GLOB_RECURSE calls should not follow symlinks by default. CMP0010 # NEW: Bad variable reference syntax is an error. CMP0011 # NEW: Included scripts do automatic cmake_policy PUSH and POP. CMP0012 # NEW: if() recognizes numbers and boolean constants. CMP0013 # NEW: Duplicate binary directories are not allowed. CMP0014 # NEW: Input directories must have CMakeLists.txt ) foreach(policy ${project_policies}) if(POLICY ${policy}) cmake_policy(SET ${policy} NEW) endif() endforeach() #----------------------------------------------------------------------------- # Update CMake module path #------------------------------------------------------------------------------ set(CMAKE_MODULE_PATH ${MITK_SOURCE_DIR}/CMake ${CMAKE_MODULE_PATH} ) #----------------------------------------------------------------------------- # CMake function(s) and macro(s) #----------------------------------------------------------------------------- include(mitkMacroEmptyExternalProject) include(mitkFunctionGenerateProjectXml) include(mitkFunctionSuppressWarnings) SUPPRESS_VC_DEPRECATED_WARNINGS() #----------------------------------------------------------------------------- # Output directories. #----------------------------------------------------------------------------- foreach(type LIBRARY RUNTIME ARCHIVE) # Make sure the directory exists if(DEFINED MITK_CMAKE_${type}_OUTPUT_DIRECTORY AND NOT EXISTS ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}) message("Creating directory MITK_CMAKE_${type}_OUTPUT_DIRECTORY: ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}") file(MAKE_DIRECTORY "${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}") endif() if(MITK_USE_SUPERBUILD) set(output_dir ${MITK_BINARY_DIR}/bin) if(NOT DEFINED MITK_CMAKE_${type}_OUTPUT_DIRECTORY) set(MITK_CMAKE_${type}_OUTPUT_DIRECTORY ${MITK_BINARY_DIR}/MITK-build/bin) endif() else() if(NOT DEFINED MITK_CMAKE_${type}_OUTPUT_DIRECTORY) set(output_dir ${MITK_BINARY_DIR}/bin) else() set(output_dir ${MITK_CMAKE_${type}_OUTPUT_DIRECTORY}) endif() endif() set(CMAKE_${type}_OUTPUT_DIRECTORY ${output_dir} CACHE INTERNAL "Single output directory for building all libraries.") mark_as_advanced(CMAKE_${type}_OUTPUT_DIRECTORY) endforeach() #----------------------------------------------------------------------------- # Additional MITK Options (also shown during superbuild) #----------------------------------------------------------------------------- option(BUILD_SHARED_LIBS "Build MITK with shared libraries" ON) option(WITH_COVERAGE "Enable/Disable coverage" OFF) option(BUILD_TESTING "Test the project" ON) option(MITK_BUILD_ALL_APPS "Build all MITK applications" OFF) set(MITK_BUILD_TUTORIAL OFF CACHE INTERNAL "Deprecated! Use MITK_BUILD_EXAMPLES instead!") option(MITK_BUILD_EXAMPLES "Build the MITK Examples" ${MITK_BUILD_TUTORIAL}) option(MITK_USE_Boost "Use the Boost C++ library" OFF) option(MITK_USE_BLUEBERRY "Build the BlueBerry platform" ON) option(MITK_USE_CTK "Use CTK in MITK" ${MITK_USE_BLUEBERRY}) option(MITK_USE_QT "Use Nokia's Qt library" ${MITK_USE_CTK}) option(MITK_USE_DCMTK "EXPERIMENTAL, superbuild only: Use DCMTK in MITK" ${MITK_USE_CTK}) option(MITK_DCMTK_BUILD_SHARED_LIBS "EXPERIMENTAL, superbuild only: build DCMTK as shared libs" OFF) option(MITK_USE_OpenCV "Use Intel's OpenCV library" OFF) option(MITK_USE_OpenCL "Use OpenCL GPU-Computing library" OFF) option(MITK_USE_SOFA "Use Simulation Open Framework Architecture" OFF) option(MITK_USE_Python "Use Python wrapping in MITK" OFF) set(MITK_USE_CableSwig ${MITK_USE_Python}) +if(MITK_USE_Python) + FIND_PACKAGE(PythonLibs REQUIRED) + FIND_PACKAGE(PythonInterp REQUIRED) +endif() mark_as_advanced(MITK_BUILD_ALL_APPS MITK_USE_CTK MITK_USE_DCMTK ) if(MITK_USE_Boost) option(MITK_USE_SYSTEM_Boost "Use the system Boost" OFF) set(MITK_USE_Boost_LIBRARIES "" CACHE STRING "A semi-colon separated list of required Boost libraries") endif() if(MITK_USE_BLUEBERRY) option(MITK_BUILD_ALL_PLUGINS "Build all MITK plugins" OFF) mark_as_advanced(MITK_BUILD_ALL_PLUGINS) if(NOT MITK_USE_CTK) message("Forcing MITK_USE_CTK to ON because of MITK_USE_BLUEBERRY") set(MITK_USE_CTK ON CACHE BOOL "Use CTK in MITK" FORCE) endif() endif() if(MITK_USE_CTK) if(NOT MITK_USE_QT) message("Forcing MITK_USE_QT to ON because of MITK_USE_CTK") set(MITK_USE_QT ON CACHE BOOL "Use Nokia's Qt library in MITK" FORCE) endif() if(NOT MITK_USE_DCMTK) message("Setting MITK_USE_DCMTK to ON because DCMTK needs to be build for CTK") set(MITK_USE_DCMTK ON CACHE BOOL "Use DCMTK in MITK" FORCE) endif() endif() if(MITK_USE_QT) # find the package at the very beginning, so that QT4_FOUND is available find_package(Qt4 4.6.2 REQUIRED) endif() # Customize the default pixel types for multiplex macros set(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES "int, unsigned int, short, unsigned short, char, unsigned char" CACHE STRING "List of integral pixel types used in AccessByItk and InstantiateAccessFunction macros") set(MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES "double, float" CACHE STRING "List of floating pixel types used in AccessByItk and InstantiateAccessFunction macros") set(MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES "itk::RGBPixel, itk::RGBAPixel" CACHE STRING "List of composite pixel types used in AccessByItk and InstantiateAccessFunction macros") set(MITK_ACCESSBYITK_DIMENSIONS "2,3" CACHE STRING "List of dimensions used in AccessByItk and InstantiateAccessFunction macros") mark_as_advanced(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES MITK_ACCESSBYITK_DIMENSIONS ) # consistency checks if(NOT MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES) set(MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES "int, unsigned int, short, unsigned short, char, unsigned char" CACHE STRING "List of integral pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE) endif() if(NOT MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES) set(MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES "double, float" CACHE STRING "List of floating pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE) endif() if(NOT MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES) set(MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES "itk::RGBPixel, itk::RGBAPixel" CACHE STRING "List of composite pixel types used in AccessByItk and InstantiateAccessFunction macros" FORCE) endif() if(NOT MITK_ACCESSBYITK_DIMENSIONS) set(MITK_ACCESSBYITK_DIMENSIONS "2,3" CACHE STRING "List of dimensions used in AccessByItk and InstantiateAccessFunction macros") endif() #----------------------------------------------------------------------------- # Additional CXX/C Flags #----------------------------------------------------------------------------- set(ADDITIONAL_C_FLAGS "" CACHE STRING "Additional C Flags") mark_as_advanced(ADDITIONAL_C_FLAGS) set(ADDITIONAL_CXX_FLAGS "" CACHE STRING "Additional CXX Flags") mark_as_advanced(ADDITIONAL_CXX_FLAGS) #----------------------------------------------------------------------------- # Project.xml #----------------------------------------------------------------------------- # A list of topologically ordered targets set(CTEST_PROJECT_SUBPROJECTS) if(MITK_USE_BLUEBERRY) list(APPEND CTEST_PROJECT_SUBPROJECTS BlueBerry) endif() list(APPEND CTEST_PROJECT_SUBPROJECTS MITK-Core MITK-CoreUI MITK-IGT MITK-ToF MITK-DTI MITK-Registration MITK-Modules # all modules not contained in a specific subproject MITK-Plugins # all plugins not contained in a specific subproject MITK-Examples Unlabeled # special "subproject" catching all unlabeled targets and tests ) # Configure CTestConfigSubProject.cmake that could be used by CTest scripts configure_file(${MITK_SOURCE_DIR}/CTestConfigSubProject.cmake.in ${MITK_BINARY_DIR}/CTestConfigSubProject.cmake) if(CTEST_PROJECT_ADDITIONAL_TARGETS) # those targets will be executed at the end of the ctest driver script # and they also get their own subproject label set(subproject_list "${CTEST_PROJECT_SUBPROJECTS};${CTEST_PROJECT_ADDITIONAL_TARGETS}") else() set(subproject_list "${CTEST_PROJECT_SUBPROJECTS}") endif() # Generate Project.xml file expected by the CTest driver script mitkFunctionGenerateProjectXml(${MITK_BINARY_DIR} MITK "${subproject_list}" ${MITK_USE_SUPERBUILD}) #----------------------------------------------------------------------------- # Superbuild script #----------------------------------------------------------------------------- if(MITK_USE_SUPERBUILD) include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake") return() endif() #***************************************************************************** #**************************** END OF SUPERBUILD **************************** #***************************************************************************** #----------------------------------------------------------------------------- # CMake function(s) and macro(s) #----------------------------------------------------------------------------- include(CheckCXXSourceCompiles) include(mitkFunctionCheckCompilerFlags) include(mitkFunctionGetGccVersion) include(MacroParseArguments) include(mitkFunctionSuppressWarnings) # includes several functions include(mitkFunctionOrganizeSources) include(mitkFunctionGetVersion) include(mitkFunctionGetVersionDescription) include(mitkFunctionCreateWindowsBatchScript) include(mitkFunctionInstallProvisioningFiles) include(mitkFunctionInstallAutoLoadModules) include(mitkFunctionCompileSnippets) include(mitkMacroCreateModuleConf) include(mitkMacroCreateModule) include(mitkMacroCheckModule) include(mitkMacroCreateModuleTests) include(mitkFunctionAddCustomModuleTest) include(mitkMacroUseModule) include(mitkMacroMultiplexPicType) include(mitkMacroInstall) include(mitkMacroInstallHelperApp) include(mitkMacroInstallTargets) include(mitkMacroGenerateToolsLibrary) include(mitkMacroGetLinuxDistribution) #----------------------------------------------------------------------------- # Prerequesites #----------------------------------------------------------------------------- find_package(ITK REQUIRED) find_package(VTK REQUIRED) if(ITK_USE_SYSTEM_GDCM) find_package(GDCM PATHS ${ITK_GDCM_DIR} REQUIRED) endif() #----------------------------------------------------------------------------- # Set MITK specific options and variables (NOT available during superbuild) #----------------------------------------------------------------------------- # ASK THE USER TO SHOW THE CONSOLE WINDOW FOR CoreApp and mitkWorkbench option(MITK_SHOW_CONSOLE_WINDOW "Use this to enable or disable the console window when starting MITK GUI Applications" ON) mark_as_advanced(MITK_SHOW_CONSOLE_WINDOW) # TODO: check if necessary option(USE_ITKZLIB "Use the ITK zlib for pic compression." ON) mark_as_advanced(USE_ITKZLIB) if(NOT MITK_FAST_TESTING) if(DEFINED MITK_CTEST_SCRIPT_MODE AND (MITK_CTEST_SCRIPT_MODE STREQUAL "continuous" OR MITK_CTEST_SCRIPT_MODE STREQUAL "experimental") ) set(MITK_FAST_TESTING 1) endif() endif() #----------------------------------------------------------------------------- # Get MITK version info #----------------------------------------------------------------------------- mitkFunctionGetVersion(${MITK_SOURCE_DIR} MITK) mitkFunctionGetVersionDescription(${MITK_SOURCE_DIR} MITK) #----------------------------------------------------------------------------- # Installation preparation # # These should be set before any MITK install macros are used #----------------------------------------------------------------------------- # on Mac OSX all BlueBerry plugins get copied into every # application bundle (.app directory) specified here if(MITK_USE_BLUEBERRY AND APPLE) include("${CMAKE_CURRENT_SOURCE_DIR}/Applications/AppList.cmake") foreach(mitk_app ${MITK_APPS}) # extract option_name string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 1 option_name) list(GET target_info_list 0 app_name) # check if the application is enabled if(${option_name} OR MITK_BUILD_ALL_APPS) set(MACOSX_BUNDLE_NAMES ${MACOSX_BUNDLE_NAMES} ${app_name}) endif() endforeach() endif() #----------------------------------------------------------------------------- # Set symbol visibility Flags #----------------------------------------------------------------------------- # MinGW does not export all symbols automatically, so no need to set flags if(CMAKE_COMPILER_IS_GNUCXX AND NOT MINGW) set(VISIBILITY_CXX_FLAGS ) #"-fvisibility=hidden -fvisibility-inlines-hidden") endif() #----------------------------------------------------------------------------- # Set coverage Flags #----------------------------------------------------------------------------- if(WITH_COVERAGE) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(coverage_flags "-g -fprofile-arcs -ftest-coverage -O0 -DNDEBUG") set(COVERAGE_CXX_FLAGS ${coverage_flags}) set(COVERAGE_C_FLAGS ${coverage_flags}) endif() endif() #----------------------------------------------------------------------------- # MITK C/CXX Flags #----------------------------------------------------------------------------- set(MITK_C_FLAGS "${COVERAGE_C_FLAGS} ${ADDITIONAL_C_FLAGS}") set(MITK_CXX_FLAGS "${VISIBILITY_CXX_FLAGS} ${COVERAGE_CXX_FLAGS} ${ADDITIONAL_CXX_FLAGS}") include(mitkSetupC++0xVariables) set(cflags ) if(WIN32) set(cflags "${cflags} -DPOCO_NO_UNWINDOWS -DWIN32_LEAN_AND_MEAN") endif() if(NOT MSVC_VERSION) foreach(_flag -Wall -Wextra -Wpointer-arith -Winvalid-pch -Wcast-align -Wwrite-strings -Wno-gnu -fdiagnostics-show-option ) mitkFunctionCheckCompilerFlags(${_flag} cflags) endforeach() endif() if(CMAKE_COMPILER_IS_GNUCXX) mitkFunctionCheckCompilerFlags("-Wl,--no-undefined" cflags) mitkFunctionCheckCompilerFlags("-Wl,--as-needed" cflags) if(MITK_USE_C++0x) mitkFunctionCheckCompilerFlags("-std=c++0x" MITK_CXX_FLAGS) endif() mitkFunctionGetGccVersion(${CMAKE_CXX_COMPILER} GCC_VERSION) # With older version of gcc supporting the flag -fstack-protector-all, an extra dependency to libssp.so # is introduced. If gcc is smaller than 4.4.0 and the build type is Release let's not include the flag. # Doing so should allow to build package made for distribution using older linux distro. if(${GCC_VERSION} VERSION_GREATER "4.4.0" OR (CMAKE_BUILD_TYPE STREQUAL "Debug" AND ${GCC_VERSION} VERSION_LESS "4.4.0")) mitkFunctionCheckCompilerFlags("-fstack-protector-all" cflags) endif() if(MINGW) # suppress warnings about auto imported symbols set(MITK_CXX_FLAGS "-Wl,--enable-auto-import ${MITK_CXX_FLAGS}") # we need to define a Windows version set(MITK_CXX_FLAGS "-D_WIN32_WINNT=0x0500 ${MITK_CXX_FLAGS}") endif() #set(MITK_CXX_FLAGS "-Woverloaded-virtual -Wold-style-cast -Wstrict-null-sentinel -Wsign-promo ${MITK_CXX_FLAGS}") set(MITK_CXX_FLAGS "-Woverloaded-virtual -Wstrict-null-sentinel ${MITK_CXX_FLAGS}") set(MITK_CXX_FLAGS_RELEASE "-D_FORTIFY_SOURCE=2 ${MITK_CXX_FLAGS_RELEASE}") endif() set(MITK_C_FLAGS "${cflags} ${MITK_C_FLAGS}") set(MITK_CXX_FLAGS "${cflags} ${MITK_CXX_FLAGS}") #----------------------------------------------------------------------------- # MITK Packages #----------------------------------------------------------------------------- set(MITK_MODULES_PACKAGE_DEPENDS_DIR ${MITK_SOURCE_DIR}/CMake/PackageDepends) set(MODULES_PACKAGE_DEPENDS_DIRS ${MITK_MODULES_PACKAGE_DEPENDS_DIR}) #----------------------------------------------------------------------------- # Testing #----------------------------------------------------------------------------- if(BUILD_TESTING) enable_testing() include(CTest) mark_as_advanced(TCL_TCLSH DART_ROOT) option(MITK_ENABLE_GUI_TESTING OFF "Enable the MITK GUI tests") # Setup file for setting custom ctest vars configure_file( CMake/CTestCustom.cmake.in ${MITK_BINARY_DIR}/CTestCustom.cmake @ONLY ) # Configuration for the CMake-generated test driver set(CMAKE_TESTDRIVER_EXTRA_INCLUDES "#include ") set(CMAKE_TESTDRIVER_BEFORE_TESTMAIN " try {") set(CMAKE_TESTDRIVER_AFTER_TESTMAIN " } catch( std::exception & excp ) { fprintf(stderr,\"%s\\n\",excp.what()); return EXIT_FAILURE; } catch( ... ) { printf(\"Exception caught in the test driver\\n\"); return EXIT_FAILURE; } ") set(MITK_TEST_OUTPUT_DIR "${MITK_BINARY_DIR}/test_output") if(NOT EXISTS ${MITK_TEST_OUTPUT_DIR}) file(MAKE_DIRECTORY ${MITK_TEST_OUTPUT_DIR}) endif() # Test the external project template if(MITK_USE_BLUEBERRY) include(mitkTestProjectTemplate) endif() # Test the package target include(mitkPackageTest) endif() configure_file(mitkTestingConfig.h.in ${MITK_BINARY_DIR}/mitkTestingConfig.h) #----------------------------------------------------------------------------- # MITK_SUPERBUILD_BINARY_DIR #----------------------------------------------------------------------------- # If MITK_SUPERBUILD_BINARY_DIR isn't defined, it means MITK is *NOT* build using Superbuild. # In that specific case, MITK_SUPERBUILD_BINARY_DIR should default to MITK_BINARY_DIR if(NOT DEFINED MITK_SUPERBUILD_BINARY_DIR) set(MITK_SUPERBUILD_BINARY_DIR ${MITK_BINARY_DIR}) endif() #----------------------------------------------------------------------------- # Compile Utilities and set-up MITK variables #----------------------------------------------------------------------------- include(mitkSetupVariables) #----------------------------------------------------------------------------- # Cleanup #----------------------------------------------------------------------------- file(GLOB _MODULES_CONF_FILES ${PROJECT_BINARY_DIR}/${MODULES_CONF_DIRNAME}/*.cmake) if(_MODULES_CONF_FILES) file(REMOVE ${_MODULES_CONF_FILES}) endif() add_subdirectory(Utilities) if(MITK_USE_BLUEBERRY) # We need to hack a little bit because MITK applications may need # to enable certain BlueBerry plug-ins. However, these plug-ins # are validated separately from the MITK plug-ins and know nothing # about potential MITK plug-in dependencies of the applications. Hence # we cannot pass the MITK application list to the BlueBerry # ctkMacroSetupPlugins call but need to extract the BlueBerry dependencies # from the applications and set them explicitly. include("${CMAKE_CURRENT_SOURCE_DIR}/Applications/AppList.cmake") foreach(mitk_app ${MITK_APPS}) # extract target_dir and option_name string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 0 target_dir) list(GET target_info_list 1 option_name) # check if the application is enabled and if target_libraries.cmake exists if((${option_name} OR MITK_BUILD_ALL_APPS) AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Applications/${target_dir}/target_libraries.cmake") include("${CMAKE_CURRENT_SOURCE_DIR}/Applications/${target_dir}/target_libraries.cmake") foreach(_target_dep ${target_libraries}) if(_target_dep MATCHES org_blueberry_) string(REPLACE _ . _app_bb_dep ${_target_dep}) # explicitly set the build option for the BlueBerry plug-in set(BLUEBERRY_BUILD_${_app_bb_dep} ON CACHE BOOL "Build the ${_app_bb_dep} plug-in") endif() endforeach() endif() endforeach() set(mbilog_DIR "${mbilog_BINARY_DIR}") if(MITK_BUILD_ALL_PLUGINS) set(BLUEBERRY_BUILD_ALL_PLUGINS ON) endif() set(BLUEBERRY_XPDOC_OUTPUT_DIR ${MITK_DOXYGEN_OUTPUT_DIR}/html/extension-points/html/) add_subdirectory(BlueBerry) set(BlueBerry_DIR ${CMAKE_CURRENT_BINARY_DIR}/BlueBerry CACHE PATH "The directory containing a CMake configuration file for BlueBerry" FORCE) include(mitkMacroCreateCTKPlugin) endif() #----------------------------------------------------------------------------- # Set C/CXX Flags for MITK code #----------------------------------------------------------------------------- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MITK_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${MITK_CXX_FLAGS_RELEASE}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MITK_C_FLAGS}") if(MITK_USE_QT) add_definitions(-DQWT_DLL) endif() #----------------------------------------------------------------------------- # Add custom targets representing CDash subprojects #----------------------------------------------------------------------------- foreach(subproject ${CTEST_PROJECT_SUBPROJECTS}) if(NOT TARGET ${subproject} AND NOT subproject MATCHES "Unlabeled") add_custom_target(${subproject}) endif() endforeach() #----------------------------------------------------------------------------- # Add subdirectories #----------------------------------------------------------------------------- link_directories(${MITK_LINK_DIRECTORIES}) add_subdirectory(Core) include(${CMAKE_CURRENT_BINARY_DIR}/Core/Code/CppMicroServices/CppMicroServicesConfig.cmake) add_subdirectory(Modules) if(MITK_USE_BLUEBERRY) find_package(BlueBerry REQUIRED) set(MITK_DEFAULT_SUBPROJECTS MITK-Plugins) # Plug-in testing (needs some work to be enabled again) if(BUILD_TESTING) include(berryTestingHelpers) set(BLUEBERRY_UI_TEST_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/CoreApp") get_target_property(_is_macosx_bundle CoreApp MACOSX_BUNDLE) if(APPLE AND _is_macosx_bundle) set(BLUEBERRY_UI_TEST_APP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/CoreApp.app/Contents/MacOS/CoreApp") endif() set(BLUEBERRY_TEST_APP_ID "org.mitk.qt.coreapplication") endif() include("${CMAKE_CURRENT_SOURCE_DIR}/Plugins/PluginList.cmake") set(mitk_plugins_fullpath ) foreach(mitk_plugin ${MITK_EXT_PLUGINS}) list(APPEND mitk_plugins_fullpath Plugins/${mitk_plugin}) endforeach() if(EXISTS ${MITK_PRIVATE_MODULES}/PluginList.cmake) include(${MITK_PRIVATE_MODULES}/PluginList.cmake) foreach(mitk_plugin ${MITK_PRIVATE_PLUGINS}) list(APPEND mitk_plugins_fullpath ${MITK_PRIVATE_MODULES}/${mitk_plugin}) endforeach() endif() # Specify which plug-ins belong to this project macro(GetMyTargetLibraries all_target_libraries varname) set(re_ctkplugin_mitk "^org_mitk_[a-zA-Z0-9_]+$") set(re_ctkplugin_bb "^org_blueberry_[a-zA-Z0-9_]+$") set(_tmp_list) list(APPEND _tmp_list ${all_target_libraries}) ctkMacroListFilter(_tmp_list re_ctkplugin_mitk re_ctkplugin_bb OUTPUT_VARIABLE ${varname}) endmacro() # Get infos about application directories and build options include("${CMAKE_CURRENT_SOURCE_DIR}/Applications/AppList.cmake") set(mitk_apps_fullpath ) foreach(mitk_app ${MITK_APPS}) list(APPEND mitk_apps_fullpath "${CMAKE_CURRENT_SOURCE_DIR}/Applications/${mitk_app}") endforeach() ctkMacroSetupPlugins(${mitk_plugins_fullpath} BUILD_OPTION_PREFIX MITK_BUILD_ APPS ${mitk_apps_fullpath} BUILD_ALL ${MITK_BUILD_ALL_PLUGINS} COMPACT_OPTIONS) set(MITK_PLUGIN_USE_FILE "${MITK_BINARY_DIR}/MitkPluginUseFile.cmake") if(${PROJECT_NAME}_PLUGIN_LIBRARIES) ctkFunctionGeneratePluginUseFile(${MITK_PLUGIN_USE_FILE}) else() file(REMOVE ${MITK_PLUGIN_USE_FILE}) set(MITK_PLUGIN_USE_FILE ) endif() + # 11.3.13, change, muellerm: activate python bundle if python and blueberry is active + if( MITK_USE_Python ) + set(MITK_BUILD_org.mitk.gui.qt.python ON) + endif() + endif() # Construct a list of paths containing runtime directories # for MITK applications on Windows set(MITK_RUNTIME_PATH "${VTK_LIBRARY_DIRS}/%VS_BUILD_TYPE%;${ITK_LIBRARY_DIRS}/%VS_BUILD_TYPE%;${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/%VS_BUILD_TYPE%" ) if(QT4_FOUND) set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${QT_LIBRARY_DIR}/../bin") endif() if(MITK_USE_BLUEBERRY) set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${CTK_RUNTIME_LIBRARY_DIRS}/%VS_BUILD_TYPE%") if(DEFINED CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY) if(IS_ABSOLUTE "${CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY}") set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY}/%VS_BUILD_TYPE%") else() set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CTK_PLUGIN_RUNTIME_OUTPUT_DIRECTORY}/%VS_BUILD_TYPE%") endif() else() set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/plugins/%VS_BUILD_TYPE%") endif() endif() if(GDCM_DIR) set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${GDCM_DIR}/bin/%VS_BUILD_TYPE%") endif() if(OpenCV_DIR) set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${OpenCV_DIR}/bin/%VS_BUILD_TYPE%") endif() if(SOFA_DIR) set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${SOFA_DIR}/bin/%VS_BUILD_TYPE%") endif() # DCMTK is statically build #if(DCMTK_DIR) # set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${DCMTK_DIR}/bin/%VS_BUILD_TYPE%") #endif() if(MITK_USE_Boost AND MITK_USE_Boost_LIBRARIES AND NOT MITK_USE_SYSTEM_Boost) set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${Boost_LIBRARY_DIRS}") endif() #----------------------------------------------------------------------------- # Python Wrapping #----------------------------------------------------------------------------- +option(MITK_USE_Python "Build Python integration for MITK (requires CableSwig)." OFF) -set(MITK_WRAPPING_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Wrapping) -set(MITK_WRAPPING_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Wrapping) -option(MITK_USE_Python "Build cswig Python wrapper support (requires CableSwig)." OFF) if(MITK_USE_Python) - add_subdirectory(Wrapping) + set(MITK_RUNTIME_PATH "${MITK_RUNTIME_PATH};${CTK_PYTHONQT_INSTALL_DIR}/bin") endif() - #----------------------------------------------------------------------------- # Documentation #----------------------------------------------------------------------------- add_subdirectory(Documentation) #----------------------------------------------------------------------------- # Installation #----------------------------------------------------------------------------- # set MITK cpack variables # These are the default variables, which can be overwritten ( see below ) include(mitkSetupCPack) set(use_default_config ON) # MITK_APPS is set in Applications/AppList.cmake (included somewhere above # if MITK_USE_BLUEBERRY is set to ON). if(MITK_APPS) set(activated_apps_no 0) list(LENGTH MITK_APPS app_count) # Check how many apps have been enabled # If more than one app has been activated, the we use the # default CPack configuration. Otherwise that apps configuration # will be used, if present. foreach(mitk_app ${MITK_APPS}) # extract option_name string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 1 option_name) # check if the application is enabled if(${option_name} OR MITK_BUILD_ALL_APPS) MATH(EXPR activated_apps_no "${activated_apps_no} + 1") endif() endforeach() if(app_count EQUAL 1 AND (activated_apps_no EQUAL 1 OR MITK_BUILD_ALL_APPS)) # Corner case if there is only one app in total set(use_project_cpack ON) elseif(activated_apps_no EQUAL 1 AND NOT MITK_BUILD_ALL_APPS) # Only one app is enabled (no "build all" flag set) set(use_project_cpack ON) else() # Less or more then one app is enabled set(use_project_cpack OFF) endif() foreach(mitk_app ${MITK_APPS}) # extract target_dir and option_name string(REPLACE "^^" "\\;" target_info ${mitk_app}) set(target_info_list ${target_info}) list(GET target_info_list 0 target_dir) list(GET target_info_list 1 option_name) # check if the application is enabled if(${option_name} OR MITK_BUILD_ALL_APPS) # check whether application specific configuration files will be used if(use_project_cpack) # use files if they exist if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Applications/${target_dir}/CPackOptions.cmake") include("${CMAKE_CURRENT_SOURCE_DIR}/Applications/${target_dir}/CPackOptions.cmake") endif() if(EXISTS "${PROJECT_SOURCE_DIR}/Applications/${target_dir}/CPackConfig.cmake.in") set(CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/Applications/${target_dir}/CPackConfig.cmake") configure_file(${PROJECT_SOURCE_DIR}/Applications/${target_dir}/CPackConfig.cmake.in ${CPACK_PROJECT_CONFIG_FILE} @ONLY) set(use_default_config OFF) endif() endif() # add link to the list list(APPEND CPACK_CREATE_DESKTOP_LINKS "${target_dir}") endif() endforeach() endif() # if no application specific configuration file was used, use default if(use_default_config) configure_file(${MITK_SOURCE_DIR}/MITKCPackOptions.cmake.in ${MITK_BINARY_DIR}/MITKCPackOptions.cmake @ONLY) set(CPACK_PROJECT_CONFIG_FILE "${MITK_BINARY_DIR}/MITKCPackOptions.cmake") endif() # include CPack model once all variables are set include(CPack) # Additional installation rules include(mitkInstallRules) #----------------------------------------------------------------------------- # Last configuration steps #----------------------------------------------------------------------------- # This is for installation support of external projects depending on # MITK plugins and modules. The export file should not be used for linking to MITK # libraries without using LINK_DIRECTORIES, since the exports are incomplete # yet (depending libraries are not exported). set(MITK_EXPORTS_FILE "${MITK_BINARY_DIR}/MitkExports.cmake") file(REMOVE ${MITK_EXPORTS_FILE}) set(targets_to_export) get_property(module_targets GLOBAL PROPERTY MITK_MODULE_TARGETS) if(module_targets) list(APPEND targets_to_export ${module_targets}) endif() if(MITK_USE_BLUEBERRY) if(MITK_PLUGIN_LIBRARIES) list(APPEND targets_to_export ${MITK_PLUGIN_LIBRARIES}) endif() endif() export(TARGETS ${targets_to_export} APPEND FILE ${MITK_EXPORTS_FILE}) set(MITK_EXPORTED_TARGET_PROPERTIES ) foreach(target_to_export ${targets_to_export}) get_target_property(autoload_targets ${target_to_export} MITK_AUTOLOAD_TARGETS) if(autoload_targets) set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES} set_target_properties(${target_to_export} PROPERTIES MITK_AUTOLOAD_TARGETS \"${autoload_targets}\")") endif() get_target_property(autoload_dir ${target_to_export} MITK_AUTOLOAD_DIRECTORY) if(autoload_dir) set(MITK_EXPORTED_TARGET_PROPERTIES "${MITK_EXPORTED_TARGET_PROPERTIES} set_target_properties(${target_to_export} PROPERTIES MITK_AUTOLOAD_DIRECTORY \"${autoload_dir}\")") endif() endforeach() configure_file(${MITK_SOURCE_DIR}/CMake/ToolExtensionITKFactory.cpp.in ${MITK_BINARY_DIR}/ToolExtensionITKFactory.cpp.in COPYONLY) configure_file(${MITK_SOURCE_DIR}/CMake/ToolExtensionITKFactoryLoader.cpp.in ${MITK_BINARY_DIR}/ToolExtensionITKFactoryLoader.cpp.in COPYONLY) configure_file(${MITK_SOURCE_DIR}/CMake/ToolGUIExtensionITKFactory.cpp.in ${MITK_BINARY_DIR}/ToolGUIExtensionITKFactory.cpp.in COPYONLY) set(VISIBILITY_AVAILABLE 0) set(visibility_test_flag "") mitkFunctionCheckCompilerFlags("-fvisibility=hidden" visibility_test_flag) if(visibility_test_flag) # The compiler understands -fvisiblity=hidden (probably gcc >= 4 or Clang) set(VISIBILITY_AVAILABLE 1) endif() configure_file(mitkExportMacros.h.in ${MITK_BINARY_DIR}/mitkExportMacros.h) configure_file(mitkVersion.h.in ${MITK_BINARY_DIR}/mitkVersion.h) configure_file(mitkConfig.h.in ${MITK_BINARY_DIR}/mitkConfig.h) set(VECMATH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/vecmath) set(IPFUNC_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities/ipFunc) set(UTILITIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Utilities) file(GLOB _MODULES_CONF_FILES RELATIVE ${PROJECT_BINARY_DIR}/${MODULES_CONF_DIRNAME} ${PROJECT_BINARY_DIR}/${MODULES_CONF_DIRNAME}/*.cmake) set(MITK_MODULE_NAMES) foreach(_module ${_MODULES_CONF_FILES}) string(REPLACE Config.cmake "" _module_name ${_module}) list(APPEND MITK_MODULE_NAMES ${_module_name}) endforeach() configure_file(mitkConfig.h.in ${MITK_BINARY_DIR}/mitkConfig.h) configure_file(MITKConfig.cmake.in ${MITK_BINARY_DIR}/MITKConfig.cmake @ONLY) # If we are under Windows, create two batch files which correctly # set up the environment for the application and for Visual Studio if(WIN32) include(mitkFunctionCreateWindowsBatchScript) set(VS_SOLUTION_FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME}.sln") foreach(VS_BUILD_TYPE debug release) mitkFunctionCreateWindowsBatchScript("${MITK_SOURCE_DIR}/CMake/StartVS.bat.in" ${PROJECT_BINARY_DIR}/StartVS_${VS_BUILD_TYPE}.bat ${VS_BUILD_TYPE}) endforeach() endif(WIN32) #----------------------------------------------------------------------------- # MITK Applications #----------------------------------------------------------------------------- # This must come after MITKConfig.h was generated, since applications # might do a find_package(MITK REQUIRED). add_subdirectory(Applications) #----------------------------------------------------------------------------- # MITK Examples #----------------------------------------------------------------------------- if(MITK_BUILD_EXAMPLES) # This must come after MITKConfig.h was generated, since applications # might do a find_package(MITK REQUIRED). add_subdirectory(Examples) endif() diff --git a/Core/Code/Controllers/mitkReferenceCountWatcher.h b/Core/Code/Controllers/mitkReferenceCountWatcher.h index d1a0710f96..1734aee3ba 100644 --- a/Core/Code/Controllers/mitkReferenceCountWatcher.h +++ b/Core/Code/Controllers/mitkReferenceCountWatcher.h @@ -1,107 +1,108 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "itkCommand.h" #include +#include namespace mitk { //##Documentation //## @brief Keeps track of the reference count of an object even if //## it is destroyed. //## //## Example usage: //## \code //## SomeFilter* filter = GetSomeFilter(); //## ReferenceCountWatcher::Pointer filterWatcher; //## filterWatcher = new ReferenceCountWatcher(filter, "name of filter"); //## filterWatcher->GetReferenceCount(); //## \endcode //## @ingroup Testing class ReferenceCountWatcher : public itk::Object { public: typedef itk::SimpleMemberCommand CommandType; mitkClassMacro(ReferenceCountWatcher, itk::Object); protected: //##Documentation //## @brief Object to be watched itk::Object* m_Object; //##Documentation //## @brief Optional comment, e.g. for debugging output std::string m_Comment; //##Documentation //## @brief If \a true, \a m_Object is no longer valid //## and the returned reference count will be 0. bool m_Deleted; //##Documentation //## @brief itk::Command to get a notification when the object //## is deleted. CommandType::Pointer m_DeleteCommand; public: //##Documentation //## @brief Constructor requiring object to be watched and allowing //## an optional comment. ReferenceCountWatcher(itk::Object* o, const char *comment="") : m_Object(o), m_Comment(comment), m_Deleted(false), m_ObserverTag(0) { m_DeleteCommand = CommandType::New(); m_DeleteCommand->SetCallbackFunction(this, &ReferenceCountWatcher::DeleteObserver); if(m_Object!=NULL) m_ObserverTag = m_Object->AddObserver(itk::DeleteEvent(), m_DeleteCommand); m_ReferenceCountLock.Lock(); m_ReferenceCount = 0; m_ReferenceCountLock.Unlock(); } //##Documentation //## @brief Destructor: remove observer ~ReferenceCountWatcher() { if((m_Deleted == false) && (m_Object != NULL)) { m_Object->RemoveObserver(m_ObserverTag); } } //##Documentation //## @brief Return the reference count of the watched object or //## 0 if it has been destroyed int GetReferenceCount() const { if(m_Object == NULL) return -1; if(m_Deleted) return 0; return m_Object->GetReferenceCount(); } //##Documentation //## @brief Return the optional string comment itkGetStringMacro(Comment); protected: //##Documentation //## @brief Callback called on itk::DeleteEvent() of wathched object. void DeleteObserver() { m_Deleted = true; } unsigned long m_ObserverTag; }; } diff --git a/Core/Code/DataManagement/mitkTimeSlicedGeometry.h b/Core/Code/DataManagement/mitkTimeSlicedGeometry.h index 76eb5a6e47..1de4988cf4 100644 --- a/Core/Code/DataManagement/mitkTimeSlicedGeometry.h +++ b/Core/Code/DataManagement/mitkTimeSlicedGeometry.h @@ -1,181 +1,182 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef TIMESLICEDGEOMETRY_H_HEADER_INCLUDED_C1EBD0AD #define TIMESLICEDGEOMETRY_H_HEADER_INCLUDED_C1EBD0AD #include "mitkGeometry3D.h" namespace mitk { //##Documentation //## @brief Describes a geometry consisting of several geometries which //## exist at different times. //## //## The geometry contains m_TimeSteps geometries, which can be accessed //## using GetGeometry3D(int t). To convert between world-time in //## milliseconds and the integer timestep-number use MSToTimeStep. //## The hull (in space and time) of the TimeSlicedGeometry contains all //## contained geometries. //## @warning The hull (i.e., transform, bounding-box and //## time-bounds) is only guaranteed to be up-to-date after calling //## UpdateInformation(). //## //## TimeSlicedGeometry and the associated Geometry3Ds have to be //## initialized in the method GenerateOutputInformation() of BaseProcess (or //## CopyInformation/ UpdateOutputInformation of BaseData, if possible, e.g., //## by analyzing pic tags in Image) subclasses. See also //## itk::ProcessObject::GenerateOutputInformation(), //## itk::DataObject::CopyInformation() and //## itk::DataObject::UpdateOutputInformation(). //## //## @ingroup Geometry class MITK_CORE_EXPORT TimeSlicedGeometry : public Geometry3D { public: mitkClassMacro(TimeSlicedGeometry, Geometry3D); itkNewMacro(Self); //##Documentation //## @brief Re-calculate the hull of the contained geometries. //## //## The transforms, bounding-box and time-bounds of this //## geometry (stored in members of the super-class Geometry3D) //## are re-calculated from the contained geometries. void UpdateInformation(); //##Documentation //## @brief Get the number of time-steps itkGetConstMacro(TimeSteps, unsigned int); //##Documentation //## @brief Set/Get whether the TimeSlicedGeometry is evenly-timed (m_EvenlyTimed) //## //## If (a) we don't have a Geometry3D stored for the requested time, //## (b) m_EvenlyTimed is activated and (c) the first geometry (t=0) //## is set, then we clone the geometry and set the m_TimeBounds accordingly. //## \sa GetGeometry3D itkGetConstMacro(EvenlyTimed, bool); virtual void SetEvenlyTimed(bool on = true); //##Documentation //## @brief Set the Geometry3D for time @a t virtual bool SetGeometry3D(mitk::Geometry3D* geometry3D, int t); //##Documentation //## @brief When switching from an Image Geometry to a normal Geometry (and the other way around), you have to change the origin as well (See Geometry Documentation)! This function will change the "isImageGeometry" bool flag and changes the origin respectively. virtual void ChangeImageGeometryConsideringOriginOffset( const bool isAnImageGeometry ); //##Documentation //## @brief Get the Geometry3D at time @a t virtual mitk::Geometry3D* GetGeometry3D(int t) const; //##Documentation //## @brief Test whether @a t is a valid time step virtual bool IsValidTime(int t) const; //##Documentation //## @brief Returns true if TimeSliceGeometry is valid virtual bool IsValid() const; //##Documentation //## @brief Convert time in ms to a time step virtual int MSToTimeStep(mitk::ScalarType time_in_ms) const; //##Documentation //## @brief Convert time step to time in ms virtual mitk::ScalarType TimeStepToMS(int timestep) const; //##Documentation //## @brief Convert time step in the reference TimeSlicedGeometry to time step //## in this TimeSlicedGeometry. virtual int TimeStepToTimeStep(const mitk::TimeSlicedGeometry *referenceGeometry, int t) const; //##Documentation //## @brief Completely initialize this instance as evenly-timed with //## \a timeSteps geometries of type Geometry3D, each initialized by //## Geometry3D::Initialize(). virtual void InitializeEvenlyTimed(unsigned int timeSteps); //##Documentation //## @brief Completely initialize this instance as evenly-timed with //## \a timeSteps geometries identical to the provided Geometry3D //## except for the time bounds virtual void InitializeEvenlyTimed(mitk::Geometry3D* geometry3D, unsigned int timeSteps); //##Documentation //## @brief Initialize this instance to contain \a timeSteps //## geometries, but without setting them yet virtual void InitializeEmpty(unsigned int timeSteps); //##Documentation //## @brief Expand the number of time steps contained //## to \a timeSteps. //## //## New, additional time steps will be initialized empty. //## Only enlargement of the time steps vector is intended and possible. virtual void ExpandToNumberOfTimeSteps( unsigned int timeSteps ); virtual void SetImageGeometry(const bool isAnImageGeometry); //##Documentation //## @brief Copy the m_TimeBounds of the geometries contained //## in timeslicedgeometry into the geometries contained in this //## TimeSlicedGeometry object. //## //## Useful for initialization of the TimeSlicedGeometry of the //## output in GenerateOutputInformation() methods of process objects, //## see for example BoundingObjectCutter::GenerateOutputInformation(). //## @param t start time index //## @param endtimeindex (endtimeindex) is the time index of //## the last geometry whose time-bounds are copied. If //## timeslicedgeometry or this TimeSlicedGeometry object does //## not contain enough geometries, endtimeindex is reduced //## appropriately. void CopyTimes(const mitk::TimeSlicedGeometry* timeslicedgeometry, unsigned int t=0, unsigned int endtimeindex = itk::NumericTraits::max()); //##Documentation //## @brief duplicates the geometry virtual AffineGeometryFrame3D::Pointer Clone() const; - TimeSlicedGeometry::Pointer CloneCopy() const; + // muellerm, 18.1.13, method not implemented + //TimeSlicedGeometry::Pointer CloneCopy() const; virtual void ExecuteOperation(Operation* operation); protected: TimeSlicedGeometry(); TimeSlicedGeometry(const TimeSlicedGeometry& other); virtual ~TimeSlicedGeometry(); virtual void PrintSelf(std::ostream& os, itk::Indent indent) const; mutable std::vector m_Geometry3Ds; //##Documentation //## @brief Number of time steps unsigned int m_TimeSteps; //##Documentation //## @brief \a true in case the time steps have equal length bool m_EvenlyTimed; static const std::string EVENLY_TIMED; static const std::string TIME_STEPS; }; } // namespace mitk #endif /* TIMESLICEDGEOMETRY_H_HEADER_INCLUDED_C1EBD0AD */ diff --git a/Core/Code/IO/mitkIOUtil.cpp b/Core/Code/IO/mitkIOUtil.cpp index 71eef6e604..37dc199f77 100644 --- a/Core/Code/IO/mitkIOUtil.cpp +++ b/Core/Code/IO/mitkIOUtil.cpp @@ -1,317 +1,317 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "mitkIOUtil.h" #include "mitkDataNodeFactory.h" #include "mitkImageWriter.h" #include "mitkPointSetWriter.h" #include "mitkSurfaceVtkWriter.h" #include #include #include #include #include //ITK #include //VTK #include #include #include namespace mitk { const std::string IOUtil::DEFAULTIMAGEEXTENSION = ".nrrd"; const std::string IOUtil::DEFAULTSURFACEEXTENSION = ".stl"; const std::string IOUtil::DEFAULTPOINTSETEXTENSION = ".mps"; int IOUtil::LoadFiles(const std::vector &fileNames, DataStorage &ds) { // Get the set of registered mitk::IDataNodeReader services - ModuleContext* context = GetModuleContext(); + ModuleContext* context = mitk::GetModuleContext(); const std::list refs = context->GetServiceReferences(); std::vector services; services.reserve(refs.size()); for (std::list::const_iterator i = refs.begin(); i != refs.end(); ++i) { IDataNodeReader* s = context->GetService(*i); if (s != 0) { services.push_back(s); } } mitk::ProgressBar::GetInstance()->AddStepsToDo(2*fileNames.size()); // Iterate over all file names and use the IDataNodeReader services // to load them. int nodesRead = 0; for (std::vector::const_iterator i = fileNames.begin(); i != fileNames.end(); ++i) { for (std::vector::const_iterator readerIt = services.begin(); readerIt != services.end(); ++readerIt) { try { int n = (*readerIt)->Read(*i, ds); nodesRead += n; if (n > 0) break; } catch (const std::exception& e) { MITK_WARN << e.what(); } } mitk::ProgressBar::GetInstance()->Progress(2); } for (std::list::const_iterator i = refs.begin(); i != refs.end(); ++i) { context->UngetService(*i); } return nodesRead; } DataStorage::Pointer IOUtil::LoadFiles(const std::vector& fileNames) { mitk::StandaloneDataStorage::Pointer ds = mitk::StandaloneDataStorage::New(); LoadFiles(fileNames, *ds); return ds.GetPointer(); } DataNode::Pointer IOUtil::LoadDataNode(const std::string path) { mitk::DataNodeFactory::Pointer reader = mitk::DataNodeFactory::New(); try { reader->SetFileName( path ); reader->Update(); if((reader->GetNumberOfOutputs()<1)) { MITK_ERROR << "Could not find data '" << path << "'"; mitkThrow() << "An exception occured during loading the file " << path << ". Exception says could not find data."; } mitk::DataNode::Pointer node = reader->GetOutput(0); if(node.IsNull()) { MITK_ERROR << "Could not find path: '" << path << "'" << " datanode is NULL" ; mitkThrow() << "An exception occured during loading the file " << path << ". Exception says datanode is NULL."; } return reader->GetOutput( 0 ); } catch ( itk::ExceptionObject & e ) { MITK_ERROR << "Exception occured during load data of '" << path << "': Exception: " << e.what(); mitkThrow() << "An exception occured during loading the file " << path << ". Exception says: " << e.what(); } } Image::Pointer IOUtil::LoadImage(const std::string path) { mitk::DataNode::Pointer node = LoadDataNode(path); mitk::Image::Pointer image = dynamic_cast(node->GetData()); if(image.IsNull()) { MITK_ERROR << "Image is NULL '" << path << "'"; mitkThrow() << "An exception occured during loading the image " << path << ". Exception says: Image is NULL."; } return image; } Surface::Pointer IOUtil::LoadSurface(const std::string path) { mitk::DataNode::Pointer node = LoadDataNode(path); mitk::Surface::Pointer surface = dynamic_cast(node->GetData()); if(surface.IsNull()) { MITK_ERROR << "Surface is NULL '" << path << "'"; mitkThrow() << "An exception occured during loading the file " << path << ". Exception says: Surface is NULL."; } return surface; } PointSet::Pointer IOUtil::LoadPointSet(const std::string path) { mitk::DataNode::Pointer node = LoadDataNode(path); mitk::PointSet::Pointer pointset = dynamic_cast(node->GetData()); if(pointset.IsNull()) { MITK_ERROR << "PointSet is NULL '" << path << "'"; mitkThrow() << "An exception occured during loading the file " << path << ". Exception says: Pointset is NULL."; } return pointset; } bool IOUtil::SaveImage(mitk::Image::Pointer image, const std::string path) { std::string dir = itksys::SystemTools::GetFilenamePath( path ); std::string baseFilename = itksys::SystemTools::GetFilenameWithoutLastExtension( path ); std::string extension = itksys::SystemTools::GetFilenameLastExtension( path ); std::string finalFileName = dir + "/" + baseFilename; mitk::ImageWriter::Pointer imageWriter = mitk::ImageWriter::New(); //check if an extension is given, else use the defaul extension if( extension == "" ) { MITK_WARN << extension << " extension is not set. Extension set to default: " << finalFileName << DEFAULTIMAGEEXTENSION; extension = DEFAULTIMAGEEXTENSION; } // check if extension is suitable for writing image data if (!imageWriter->IsExtensionValid(extension)) { MITK_WARN << extension << " extension is unknown. Extension set to default: " << finalFileName << DEFAULTIMAGEEXTENSION; extension = DEFAULTIMAGEEXTENSION; } try { //write the data imageWriter->SetInput(image); imageWriter->SetFileName(finalFileName.c_str()); imageWriter->SetExtension(extension.c_str()); imageWriter->Write(); } catch ( std::exception& e ) { MITK_ERROR << " during attempt to write '" << finalFileName + extension << "' Exception says:"; MITK_ERROR << e.what(); mitkThrow() << "An exception occured during writing the file " << finalFileName << ". Exception says " << e.what(); } return true; } bool IOUtil::SaveSurface(Surface::Pointer surface, const std::string path) { std::string dir = itksys::SystemTools::GetFilenamePath( path ); std::string baseFilename = itksys::SystemTools::GetFilenameWithoutLastExtension( path ); std::string extension = itksys::SystemTools::GetFilenameLastExtension( path ); std::string finalFileName = dir + "/" + baseFilename; if (extension == "") // if no extension has been set we use the default extension { MITK_WARN << extension << " extension is not set. Extension set to default: " << finalFileName << DEFAULTSURFACEEXTENSION; extension = DEFAULTSURFACEEXTENSION; } try { finalFileName += extension; if(extension == ".stl" ) { mitk::SurfaceVtkWriter::Pointer surfaceWriter = mitk::SurfaceVtkWriter::New(); // check if surface actually consists of triangles; if not, the writer will not do anything; so, convert to triangles... vtkPolyData* polys = surface->GetVtkPolyData(); if( polys->GetNumberOfStrips() > 0 ) { vtkSmartPointer triangleFilter = vtkSmartPointer::New(); triangleFilter->SetInput(polys); triangleFilter->Update(); polys = triangleFilter->GetOutput(); polys->Register(NULL); surface->SetVtkPolyData(polys); } surfaceWriter->SetInput( surface ); surfaceWriter->SetFileName( finalFileName.c_str() ); surfaceWriter->GetVtkWriter()->SetFileTypeToBinary(); surfaceWriter->Write(); } else if(extension == ".vtp") { mitk::SurfaceVtkWriter::Pointer surfaceWriter = mitk::SurfaceVtkWriter::New(); surfaceWriter->SetInput( surface ); surfaceWriter->SetFileName( finalFileName.c_str() ); surfaceWriter->GetVtkWriter()->SetDataModeToBinary(); surfaceWriter->Write(); } else if(extension == ".vtk") { mitk::SurfaceVtkWriter::Pointer surfaceWriter = mitk::SurfaceVtkWriter::New(); surfaceWriter->SetInput( surface ); surfaceWriter->SetFileName( finalFileName.c_str() ); surfaceWriter->Write(); } else { // file extension not suitable for writing specified data type MITK_ERROR << "File extension is not suitable for writing'" << finalFileName; mitkThrow() << "An exception occured during writing the file " << finalFileName << ". File extension " << extension << " is not suitable for writing."; } } catch(std::exception& e) { MITK_ERROR << " during attempt to write '" << finalFileName << "' Exception says:"; MITK_ERROR << e.what(); mitkThrow() << "An exception occured during writing the file " << finalFileName << ". Exception says " << e.what(); } return true; } bool IOUtil::SavePointSet(PointSet::Pointer pointset, const std::string path) { mitk::PointSetWriter::Pointer pointSetWriter = mitk::PointSetWriter::New(); std::string dir = itksys::SystemTools::GetFilenamePath( path ); std::string baseFilename = itksys::SystemTools::GetFilenameWithoutLastExtension( path ); std::string extension = itksys::SystemTools::GetFilenameLastExtension( path ); std::string finalFileName = dir + "/" + baseFilename; if (extension == "") // if no extension has been entered manually into the filename { MITK_WARN << extension << " extension is not set. Extension set to default: " << finalFileName << DEFAULTPOINTSETEXTENSION; extension = DEFAULTPOINTSETEXTENSION; } // check if extension is valid if (!pointSetWriter->IsExtensionValid(extension)) { MITK_WARN << extension << " extension is unknown. Extension set to default: " << finalFileName << DEFAULTPOINTSETEXTENSION; extension = DEFAULTPOINTSETEXTENSION; } try { pointSetWriter->SetInput( pointset ); finalFileName += extension; pointSetWriter->SetFileName( finalFileName.c_str() ); pointSetWriter->Update(); } catch( std::exception& e ) { MITK_ERROR << " during attempt to write '" << finalFileName << "' Exception says:"; MITK_ERROR << e.what(); mitkThrow() << "An exception occured during writing the file " << finalFileName << ". Exception says " << e.what(); } return true; } } diff --git a/Documentation/Doxygen/DeveloperManual/Toolkit/ModuleManuals/MITKModuleManualsList.dox b/Documentation/Doxygen/DeveloperManual/Toolkit/ModuleManuals/MITKModuleManualsList.dox index 6dfede77e3..f2a4ff42fb 100644 --- a/Documentation/Doxygen/DeveloperManual/Toolkit/ModuleManuals/MITKModuleManualsList.dox +++ b/Documentation/Doxygen/DeveloperManual/Toolkit/ModuleManuals/MITKModuleManualsList.dox @@ -1,21 +1,22 @@ /** \page MITKModuleManualsListPage MITK Module Manuals \section MITKModuleManualsListPageOverview Overview The modules are shared libraries that provide functionality that can be used by developers. \section MITKModuleManualsListPageModuleManualList List of Module Manuals \li \subpage IGTGeneralModulePage \li \subpage MitkOpenCL_Overview \li \subpage SimulationManualPage \li \subpage GeneratingDeviceModulesPage + \li \subpage mitkPython_Overview \section MITKModuleManualsListPageAdditionalInformation Additional Information on Certain Modules \li \ref PlanarPropertiesPage \li \subpage DiffusionImagingPropertiesPage \li \subpage ConnectomicsRenderingPropertiesPage */ diff --git a/Documentation/Doxygen/UserManual/MITKPluginManualsList.dox b/Documentation/Doxygen/UserManual/MITKPluginManualsList.dox index ca31f1bb1b..a47b3ebdf3 100644 --- a/Documentation/Doxygen/UserManual/MITKPluginManualsList.dox +++ b/Documentation/Doxygen/UserManual/MITKPluginManualsList.dox @@ -1,42 +1,43 @@ /** \page PluginListPage MITK Plugin Manuals \section PluginListPageOverview Overview The plugins and bundles provide much of the extended functionality of MITK. Each encapsulates a solution to a problem and associated features. This way one can easily assemble the necessary capabilites for a workflow without adding a lot of bloat, by combining plugins as needed. The distinction between developer and end user use is for convenience only and mainly distinguishes which group a plugin is primarily aimed at. \section PluginListPageEndUserPluginList List of Plugins for End User Use \li \subpage org_blueberry_ui_qt_log \li \subpage org_mitk_views_basicimageprocessing \li \subpage org_mitk_views_cmdlinemodules \li \subpage org_mitk_views_datamanager \li \subpage org_mitk_gui_qt_diffusionimaging \li \subpage org_mitk_views_imagecropper \li \subpage org_mitk_views_imagenavigator \li \subpage org_mitk_gui_qt_measurementtoolbox \li \subpage org_mitk_views_moviemaker \li \subpage org_mitk_views_meshdecimation \li \subpage org_mitk_views_pointsetinteraction \li \subpage org_mitk_gui_qt_registration \li \subpage org_mitk_views_segmentation \li \subpage org_mitk_views_volumevisualization \li \subpage org_mitk_gui_qt_dicom \li \subpage org_mitk_gui_qt_ultrasound \li \subpage org_mitk_views_fiberfoxview + \li \subpage org_mitk_gui_qt_python \section PluginListPageDevPluginList List of Plugins for Developer Use and Examples \li \subpage org_surfacematerialeditor \li \subpage org_toftutorial \li \subpage org_mitk_gui_qt_examples \li \subpage org_mitkexamplesopencv \li \ref org_mitk_gui_qt_igtexample \li \ref org_mitk_gui_qt_igttracking \li \subpage org_blueberry_ui_qt_objectinspector \li \subpage org_mitk_gui_InteractionTests */ diff --git a/Modules/CMakeLists.txt b/Modules/CMakeLists.txt index 632474b83d..9005b35b9d 100644 --- a/Modules/CMakeLists.txt +++ b/Modules/CMakeLists.txt @@ -1,58 +1,59 @@ set(LIBPOSTFIX "Ext") # Modules must be listed according to their dependencies set(module_dirs SceneSerializationBase PlanarFigure ImageExtraction ImageStatistics LegacyAdaptors IpPicSupport MitkExt SceneSerialization Segmentation Qmitk QmitkExt GraphAlgorithms DiffusionImaging GPGPU IGT CameraCalibration IGTUI RigidRegistration RigidRegistrationUI DeformableRegistration DeformableRegistrationUI OpenCL OpenCVVideoSupport Overlays InputDevices ToFHardware ToFProcessing ToFUI US ClippingTools USUI DicomUI Simulation + Python ) set(MITK_DEFAULT_SUBPROJECTS MITK-Modules) foreach(module_dir ${module_dirs}) add_subdirectory(${module_dir}) endforeach() if(MITK_PRIVATE_MODULES) file(GLOB all_subdirs RELATIVE ${MITK_PRIVATE_MODULES} ${MITK_PRIVATE_MODULES}/*) foreach(subdir ${all_subdirs}) string(FIND ${subdir} "." _result) if(_result EQUAL -1) if(EXISTS ${MITK_PRIVATE_MODULES}/${subdir}/CMakeLists.txt) message(STATUS "Found private module ${subdir}") add_subdirectory(${MITK_PRIVATE_MODULES}/${subdir} private_modules/${subdir}) endif() endif() endforeach() endif(MITK_PRIVATE_MODULES) diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonPerspective.h b/Modules/MitkExt/Controllers/mitkIPythonService.cpp similarity index 50% rename from Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonPerspective.h rename to Modules/MitkExt/Controllers/mitkIPythonService.cpp index 97c8e7b1f6..3138baee1a 100644 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonPerspective.h +++ b/Modules/MitkExt/Controllers/mitkIPythonService.cpp @@ -1,39 +1,21 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ +#include "mitkIPythonService.h" -#ifndef QMITKPYTHONPERSPECTIVE_H_ -#define QMITKPYTHONPERSPECTIVE_H_ - -#include -#include - -struct QmitkPythonPerspective : public QObject, public berry::IPerspectiveFactory +mitk::IPythonService::~IPythonService() { - - Q_OBJECT - - void CreateInitialLayout(berry::IPageLayout::Pointer layout); - - QmitkPythonPerspective(const QmitkPythonPerspective& other) - { - Q_UNUSED(other) - throw std::runtime_error("Copy constructor not implemented"); - } - -}; - -#endif /* QMITKEXTDEFAULTPERSPECTIVE_H_ */ +} diff --git a/Modules/MitkExt/Controllers/mitkIPythonService.h b/Modules/MitkExt/Controllers/mitkIPythonService.h new file mode 100644 index 0000000000..5e34bd6abc --- /dev/null +++ b/Modules/MitkExt/Controllers/mitkIPythonService.h @@ -0,0 +1,141 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ +#ifndef mitkIPythonService_h +#define mitkIPythonService_h + +// mitk +#include "MitkExtExports.h" +#include "mitkImage.h" +//for microservices +#include +#include "mitkSurface.h" +#include + +namespace mitk +{ + /// + /// describes a python variable (data container) + /// \see IPythonService::GetVariableStack() + /// + struct PythonVariable + { + std::string m_Name; + std::string m_Type; + std::string m_Value; + }; + + /// + /// a PythonCommandObserver gets informed as soon as a python command was issued + /// \see IPythonService::AddPythonCommandObserver() + /// + class PythonCommandObserver + { + public: + virtual void CommandExecuted(const std::string& pythonCommand) = 0; + }; + + /// + /// The central service for issuing Python Code + /// The class also enables to transfer mitk images to python as itk::Image and vice versa + /// \see IPythonService::GetVariableStack() + /// + class MitkExt_EXPORT IPythonService + { + public: + /// + /// Constant representing a single line command + /// \see IPythonService::Execute() + static const int SINGLE_LINE_COMMAND = 0; + /// + /// Constant representing a command in which the commands are seperated by new lines, i.e. "\\n" + /// \see IPythonService::Execute() + static const int MULTI_LINE_COMMAND = 1; + /// + /// Constant representing a single line command x which is run as "eval(x)" + /// \see IPythonService::Execute() + static const int EVAL_COMMAND = 2; + + /// + /// Executes a python command. + /// \return A variant containing the return value as string of the python code (if any) + virtual std::string Execute( const std::string& pythonCommand, int commandType = SINGLE_LINE_COMMAND ) = 0; + /// + /// Executes a python script. + virtual void ExecuteScript( const std::string& pathToPythonScript ) = 0; + /// + /// \return true if the last call to Execute...() resulted in an error, false otherwise + virtual bool PythonErrorOccured() const = 0; + /// + /// \return The list of variables in the __main__ namespace + virtual std::vector GetVariableStack() const = 0; + /// + /// \return true if a variable with this name is defined in the __main__ namespace, false otherwise + virtual bool DoesVariableExist(const std::string& name) const = 0; + /// + /// adds a command observer which is informed after a command was issued with "Execute" + virtual void AddPythonCommandObserver( PythonCommandObserver* observer ) = 0; + /// + /// removes a specific command observer + virtual void RemovePythonCommandObserver( PythonCommandObserver* observer ) = 0; + /// + /// notify all observer. this should only be used if it can be garantueed that the + /// current python interpreter instance got another command from anywhere else + /// the the Execute() method of this service, e.g. the shell widget uses this function + /// since it does not use Execute() + virtual void NotifyObserver( const std::string& command ) = 0; + + /// + /// \return true, if itk wrapping is available, false otherwise + virtual bool IsItkPythonWrappingAvailable() = 0; + /// + /// copies an mitk image as itk image into the python interpreter process + /// the image will be available as "varName" in python if everythin worked + /// \return true if image was copied, else false + virtual bool CopyToPythonAsItkImage( mitk::Image* image, const std::string& varName ) = 0; + /// + /// copies an itk image from the python process that is named "varName" + /// \return the image or 0 if copying was not possible + virtual mitk::Image::Pointer CopyItkImageFromPython( const std::string& varName ) = 0; + + /// + /// \return true, if OpenCv wrapping is available, false otherwise + virtual bool IsOpenCvPythonWrappingAvailable() = 0; + /// + /// \see CopyToPythonAsItkImage() + virtual bool CopyToPythonAsCvImage( mitk::Image* image, const std::string& varName ) = 0; + /// + /// \see CopyCvImageFromPython() + virtual mitk::Image::Pointer CopyCvImageFromPython( const std::string& varName ) = 0; + + /// + /// \return true, if vtk wrapping is available, false otherwise + virtual bool IsVtkPythonWrappingAvailable() = 0; + /// + /// \see CopyToPythonAsItkImage() + virtual bool CopyToPythonAsVtkPolyData( mitk::Surface* surface, const std::string& varName ) = 0; + /// + /// \see CopyCvImageFromPython() + virtual mitk::Surface::Pointer CopyVtkPolyDataFromPython( const std::string& varName ) = 0; + + /// + /// nothing to do here + virtual ~IPythonService(); // leer in mitkIPythonService.cpp implementieren + }; +} + +US_DECLARE_SERVICE_INTERFACE(mitk::IPythonService, "org.mitk.services.IPythonService") + +#endif diff --git a/Modules/MitkExt/files.cmake b/Modules/MitkExt/files.cmake index 1f2936e157..4061c11ef5 100644 --- a/Modules/MitkExt/files.cmake +++ b/Modules/MitkExt/files.cmake @@ -1,150 +1,151 @@ set(CPP_FILES Algorithms/mitkMaskAndCutRoiImageFilter.cpp Algorithms/mitkBoundingObjectToSegmentationFilter.cpp Algorithms/vtkPointSetSlicer.cxx Algorithms/mitkCoreExtObjectFactory.cpp Algorithms/mitkAngleCorrectByPointFilter.cpp Algorithms/mitkAutoCropImageFilter.cpp Algorithms/mitkBoundingObjectCutter.cpp Algorithms/mitkCylindricToCartesianFilter.cpp Algorithms/mitkDopplerToStrainRateFilter.cpp Algorithms/mitkGeometryClipImageFilter.cpp Algorithms/mitkGeometryDataSource.cpp Algorithms/mitkHeightFieldSurfaceClipImageFilter.cpp Algorithms/mitkImageToLookupTableFilter.cpp Algorithms/mitkImageToSurfaceFilter.cpp Algorithms/mitkInterpolateLinesFilter.cpp Algorithms/mitkLabeledImageToSurfaceFilter.cpp Algorithms/mitkLabeledImageVolumeCalculator.cpp Algorithms/mitkLookupTableSource.cpp Algorithms/mitkMaskImageFilter.cpp Algorithms/mitkMeshSource.cpp Algorithms/mitkNonBlockingAlgorithm.cpp Algorithms/mitkPadImageFilter.cpp Algorithms/mitkPlaneCutFilter.cpp Algorithms/mitkPlaneFit.cpp Algorithms/mitkPlanesPerpendicularToLinesFilter.cpp Algorithms/mitkPointLocator.cpp Algorithms/mitkPointSetToCurvedGeometryFilter.cpp Algorithms/mitkPointSetToGeometryDataFilter.cpp Algorithms/mitkPointSetIndexToWorldTransformFilter.cpp Algorithms/mitkSurfaceIndexToWorldTransformFilter.cpp Algorithms/mitkPolygonToRingFilter.cpp Algorithms/mitkProbeFilter.cpp Algorithms/mitkSimpleHistogram.cpp Algorithms/mitkSimpleUnstructuredGridHistogram.cpp Algorithms/mitkSurfaceToImageFilter.cpp Algorithms/mitkUnstructuredGridHistogram.cpp Algorithms/mitkUnstructuredGridSource.cpp Algorithms/mitkVolumeVisualizationImagePreprocessor.cpp + Controllers/mitkIPythonService.cpp Controllers/mitkMovieGenerator.cpp Controllers/mitkMultiStepper.cpp Controllers/mitkToolManager.cpp DataManagement/mitkAffineTransformationOperation.cpp DataManagement/mitkApplyDiffImageOperation.cpp DataManagement/mitkBoundingObject.cpp DataManagement/mitkBoundingObjectGroup.cpp DataManagement/mitkCellOperation.cpp DataManagement/mitkColorConversions.cpp DataManagement/mitkColorSequence.cpp DataManagement/mitkColorSequenceCycleH.cpp DataManagement/mitkColorSequenceHalfTones.cpp DataManagement/mitkColorSequenceRainbow.cpp DataManagement/mitkCompressedImageContainer.cpp DataManagement/mitkCone.cpp DataManagement/mitkCuboid.cpp DataManagement/mitkCylinder.cpp DataManagement/mitkDataStorageSelection.cpp DataManagement/mitkDelegateManager.cpp DataManagement/mitkDrawOperation.cpp DataManagement/mitkEllipsoid.cpp DataManagement/mitkExternAbstractTransformGeometry.cpp DataManagement/mitkFrameOfReferenceUIDManager.cpp DataManagement/mitkGridRepresentationProperty.cpp DataManagement/mitkGridVolumeMapperProperty.cpp DataManagement/mitkItkBaseDataAdapter.cpp DataManagement/mitkLabeledImageLookupTable.cpp DataManagement/mitkLineOperation.cpp DataManagement/mitkMesh.cpp DataManagement/mitkObjectSet.cpp DataManagement/mitkOrganTypeProperty.cpp DataManagement/mitkPlaneLandmarkProjector.cpp DataManagement/mitkPlane.cpp DataManagement/mitkPropertyManager.cpp DataManagement/mitkPropertyObserver.cpp DataManagement/mitkSeedsImage.cpp DataManagement/mitkSeedsImageLookupTableSource.cpp DataManagement/mitkSphereLandmarkProjector.cpp # DataManagement/mitkUSLookupTableSource.cpp DataManagement/mitkUnstructuredGrid.cpp DataManagement/mitkVideoSource.cpp DataManagement/vtkObjectSet.cpp IO/mitkObjFileIOFactory.cpp IO/mitkObjFileReader.cpp IO/mitkPACSPlugin.cpp IO/mitkParRecFileIOFactory.cpp IO/mitkParRecFileReader.cpp IO/mitkStlVolumeTimeSeriesIOFactory.cpp IO/mitkStlVolumeTimeSeriesReader.cpp IO/mitkUnstructuredGridVtkWriter.cpp IO/mitkUnstructuredGridVtkWriterFactory.cpp IO/mitkVtkUnstructuredGridIOFactory.cpp IO/mitkVtkUnstructuredGridReader.cpp IO/mitkVtkVolumeTimeSeriesIOFactory.cpp IO/mitkVtkVolumeTimeSeriesReader.cpp Interactions/mitkConferenceEventMapper.cpp Interactions/mitkConnectPointsInteractor.cpp #Interactions/mitkCoordinateSupplier.cpp #Interactions/mitkDisplayCoordinateOperation.cpp #Interactions/mitkDisplayInteractor.cpp Interactions/mitkAffineInteractor3D.cpp Interactions/mitkDisplayPointSetInteractor.cpp #Interactions/mitkDisplayVectorInteractor.cpp Interactions/mitkInteractionDebug.cpp Interactions/mitkInteractionDebugger.cpp Interactions/mitkPointInteractor.cpp Interactions/mitkPointSelectorInteractor.cpp #Interactions/mitkPositionTracker.cpp Interactions/mitkSeedsInteractor.cpp Interactions/mitkSocketClient.cpp Interactions/mitkSurfaceDeformationInteractor3D.cpp Interactions/mitkSurfaceInteractor.cpp Interactions/mitkTool.cpp # Interactions/mitkCreateSurfaceTool.cpp Interactions/mitkMorphologicTool.cpp Interactions/mitkErodeTool.cpp Interactions/mitkDilateTool.cpp Interactions/mitkOpeningTool.cpp Interactions/mitkClosingTool.cpp Interactions/mitkPixelManipulationTool.cpp Rendering/mitkEnhancedPointSetVtkMapper3D.cpp Rendering/mitkImageBackground2D.cpp Rendering/mitkLineMapper2D.cpp # Rendering/mitkLineVtkMapper3D.cpp Rendering/mitkMeshMapper2D.cpp Rendering/mitkMeshVtkMapper3D.cpp Rendering/mitkNativeRenderWindowInteractor.cpp Rendering/mitkSplineMapper2D.cpp Rendering/mitkSplineVtkMapper3D.cpp Rendering/mitkUnstructuredGridMapper2D.cpp Rendering/mitkUnstructuredGridVtkMapper3D.cpp Rendering/mitkVectorImageMapper2D.cpp Rendering/vtkUnstructuredGridMapper.cpp Rendering/vtkMaskedGlyph2D.cpp Rendering/vtkMaskedGlyph3D.cpp Rendering/vtkMitkVolumeTextureMapper3D.cpp Rendering/vtkMitkOpenGLVolumeTextureMapper3D.cpp Rendering/mitkGPUVolumeMapper3D.cpp Rendering/vtkMitkGPUVolumeRayCastMapper.cpp ) if(WIN32 AND NOT MINGW) set(CPP_FILES Controllers/mitkMovieGeneratorWin32.cpp ${CPP_FILES} ) endif(WIN32 AND NOT MINGW) diff --git a/Modules/Python/CMakeLists.txt b/Modules/Python/CMakeLists.txt new file mode 100644 index 0000000000..1076f2bde9 --- /dev/null +++ b/Modules/Python/CMakeLists.txt @@ -0,0 +1,13 @@ +if( MITK_USE_Python ) + + MITK_CREATE_MODULE(mitkPython + DEPENDS MitkExt + EXPORT_DEFINE MITK_PYTHON_EXPORT + PACKAGE_DEPENDS QT CTK PythonLibs + QT_MODULE + ) + configure_file(PythonPath.h.in + "${CMAKE_CURRENT_BINARY_DIR}/PythonPath.h" @ONLY) + + add_subdirectory(Testing) +endif() \ No newline at end of file diff --git a/Modules/Python/PythonPath.h.in b/Modules/Python/PythonPath.h.in new file mode 100644 index 0000000000..384811cc81 --- /dev/null +++ b/Modules/Python/PythonPath.h.in @@ -0,0 +1,19 @@ +#ifdef _DEBUG +#define PYTHON_PATH_BUILD_TYPE "/Debug" +#else +#define PYTHON_PATH_BUILD_TYPE "/Release" +#endif + +#define PYTHONPATH_COMMAND "import sys\n"\ +"sys.path.append('@ITK_LIBRARY_DIRS@')\n"\ +"sys.path.append('@ITK_DIR@/Wrapping/WrapITK/Python')\n"\ +"sys.path.append('@ITK_LIBRARY_DIRS@" PYTHON_PATH_BUILD_TYPE "')\n"\ +"sys.path.append('@ITK_DIR@/Wrapping/WrapITK/Python" PYTHON_PATH_BUILD_TYPE "')\n"\ +"sys.path.append('@VTK_LIBRARY_DIRS@')\n"\ +"sys.path.append('@VTK_DIR@/Wrapping/Python')\n"\ +"sys.path.append('@VTK_DIR@/bin" PYTHON_PATH_BUILD_TYPE "')\n"\ +"sys.path.append('@VTK_DIR@/Wrapping/Python')\n"\ +"sys.path.append('@OpenCV_DIR@/lib" PYTHON_PATH_BUILD_TYPE "')\n"\ +"sys.path.append('@OpenCV_DIR@/lib')\n"\ +"sys.path.append('@OpenCV_DIR@/bin')\n"\ +"sys.path.append('@OpenCV_DIR@/bin" PYTHON_PATH_BUILD_TYPE "')" diff --git a/Modules/Python/QmitkCtkPythonShell.cpp b/Modules/Python/QmitkCtkPythonShell.cpp new file mode 100644 index 0000000000..c87c39f85d --- /dev/null +++ b/Modules/Python/QmitkCtkPythonShell.cpp @@ -0,0 +1,91 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "QmitkCtkPythonShell.h" + +#include +#include +#include +#include +#include +#include "mitkPythonService.h" +#include +#include +#include + +struct QmitkCtkPythonShellData +{ + mitk::PythonService* m_PythonService; + mitk::ServiceReference m_PythonServiceRef; +}; + +QmitkCtkPythonShell::QmitkCtkPythonShell(QWidget* parent) + : ctkPythonConsole(parent), d( new QmitkCtkPythonShellData ) +{ + MITK_DEBUG("QmitkCtkPythonShell") << "retrieving IPythonService"; + mitk::ModuleContext* context = mitk::GetModuleContext(); + d->m_PythonServiceRef = context->GetServiceReference(); + d->m_PythonService = dynamic_cast ( context->GetService(d->m_PythonServiceRef) ); + + MITK_DEBUG("QmitkCtkPythonShell") << "checking IPythonService"; + Q_ASSERT( d->m_PythonService ); + + MITK_DEBUG("QmitkCtkPythonShell") << "initialize m_PythonService"; + this->initialize( d->m_PythonService->GetPythonManager() ); + + MITK_DEBUG("QmitkCtkPythonShell") << "m_PythonService initialized"; +} + +QmitkCtkPythonShell::~QmitkCtkPythonShell() +{ + mitk::ModuleContext* context = mitk::GetModuleContext(); + context->UngetService( d->m_PythonServiceRef ); + delete d; +} + +void QmitkCtkPythonShell::dragEnterEvent(QDragEnterEvent *event) +{ + event->accept(); +} +void QmitkCtkPythonShell::dropEvent(QDropEvent *event) +{ + QList urls = event->mimeData()->urls(); + for(int i = 0; i < urls.size(); i++) + { + d->m_PythonService->Execute( urls[i].toString().toStdString(), mitk::IPythonService::SINGLE_LINE_COMMAND ); + } +} + +bool QmitkCtkPythonShell::canInsertFromMimeData( const QMimeData *source ) const +{ + return true; +} + +void QmitkCtkPythonShell::executeCommand(const QString& command) +{ + MITK_DEBUG("QmitkCtkPythonShell") << "executing command " << command.toStdString(); + ctkPythonConsole::executeCommand(command); + d->m_PythonService->NotifyObserver(command.toStdString()); +} + +void QmitkCtkPythonShell::Paste(const QString &command) +{ + if( this->isVisible() ) + { + this->exec( command ); + //this->executeCommand( command ); + } +} diff --git a/Modules/Python/QmitkCtkPythonShell.h b/Modules/Python/QmitkCtkPythonShell.h new file mode 100644 index 0000000000..1e50cf4d2d --- /dev/null +++ b/Modules/Python/QmitkCtkPythonShell.h @@ -0,0 +1,60 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef QmitkCtkPythonShell_h +#define QmitkCtkPythonShell_h + +#include +#include +#include "mitkPythonExports.h" + +/// +/// forward declarations +/// +struct QmitkCtkPythonShellData; +class ctkAbstractPythonManager; +class QDragEnterEvent; +class QDropEvent; +class QMimeData; + +/// +/// Reimplements the ctkPythonConsole with drag and drop functionality for text +/// Furthermore it calls NotifyObserver() on the IPythonService to inform listeners +/// +class MITK_PYTHON_EXPORT QmitkCtkPythonShell : public ctkPythonConsole +{ + Q_OBJECT + +public: + QmitkCtkPythonShell(QWidget* parent = 0); + ~QmitkCtkPythonShell(); +public slots: + void Paste( const QString& command ); +protected: + void dragEnterEvent(QDragEnterEvent *event); + void dropEvent(QDropEvent *event); + bool canInsertFromMimeData( const QMimeData *source ) const; + void executeCommand(const QString& command); + +private: + QmitkCtkPythonShellData* d; +}; + + + + +#endif // QmitkCtkPythonShell_h + diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditorHighlighter.cpp b/Modules/Python/QmitkPythonScriptEditorHighlighter.cpp similarity index 100% rename from Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditorHighlighter.cpp rename to Modules/Python/QmitkPythonScriptEditorHighlighter.cpp diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditorHighlighter.h b/Modules/Python/QmitkPythonScriptEditorHighlighter.h similarity index 63% rename from Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditorHighlighter.h rename to Modules/Python/QmitkPythonScriptEditorHighlighter.h index c97d0da45f..cf97e58248 100644 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditorHighlighter.h +++ b/Modules/Python/QmitkPythonScriptEditorHighlighter.h @@ -1,44 +1,40 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#ifndef QMITKPYTHONSCRIPTEDITORHIGHLIGHTER_H_ -#define QMITKPYTHONSCRIPTEDITORHIGHLIGHTER_H_ +#ifndef QmitkPythonScriptEditorHighlighter_h +#define QmitkPythonScriptEditorHighlighter_h -#include #include +#include "mitkPythonExports.h" -class QmitkPythonScriptEditorHighlighter : public QSyntaxHighlighter +/// +/// A script highlighter for Python Scripts +class MITK_PYTHON_EXPORT QmitkPythonScriptEditorHighlighter : public QSyntaxHighlighter { - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: QmitkPythonScriptEditorHighlighter(QTextDocument *parent); virtual ~QmitkPythonScriptEditorHighlighter(); -signals: - -protected slots: - protected: - virtual void highlightBlock(const QString &text); + void highlightBlock(const QString &text); void highlightComments(const QString &text); private: }; -#endif +#endif // QmitkPythonScriptEditorHighlighter_h diff --git a/Modules/Python/QmitkPythonSnippets.cpp b/Modules/Python/QmitkPythonSnippets.cpp new file mode 100644 index 0000000000..975944557c --- /dev/null +++ b/Modules/Python/QmitkPythonSnippets.cpp @@ -0,0 +1,483 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "QmitkPythonSnippets.h" +#include "QmitkPythonScriptEditorHighlighter.h" +#include +#include +#include + +struct QmitkPythonSnippetsData +{ + QString m_AutoSaveFileName; + QString m_SaveFileName; + + QAction* m_PasteSnippet; + QAction* m_RemoveSnippet; + QAction* m_RenameSnippet; + QAction* m_AddSnippet; + QAction* m_RestoreDefaultSnippets; + QAction* m_LoadSnippets; + QAction* m_SaveSnippets; + + QToolBar* m_Toolbar; + + QComboBox* m_Name; + + QTextEdit* m_Content; + + QGridLayout* m_Layout; + + QmitkPythonSnippets::QStringMap m_Snippets; +}; + +const QString QmitkPythonSnippets::DEFAULT_SNIPPET_FILE( ":/mitkPython/PythonSnippets.xml" ); +const QString QmitkPythonSnippets::SNIPPETS_ROOT_XML_ELEMENT_NAME( "PythonSnippets" ); +const QString QmitkPythonSnippets::SNIPPETS_XML_ELEMENT_NAME( "PythonSnippet" ); + +QmitkPythonSnippets::QmitkPythonSnippets( const QString& _AutoSaveFileName, QWidget* parent ) +: QWidget(parent), d(new QmitkPythonSnippetsData) +{ + d->m_SaveFileName = QDir::currentPath(); + d->m_AutoSaveFileName = _AutoSaveFileName; + + if( !this->LoadStringMap( d->m_AutoSaveFileName, d->m_Snippets ) ) + { + this->LoadStringMap( DEFAULT_SNIPPET_FILE, d->m_Snippets ); + } + + d->m_PasteSnippet = new QAction(this); + d->m_PasteSnippet->setObjectName(QString::fromUtf8("PasteSnippet")); + QIcon icon; + icon.addFile(QString::fromUtf8(":/mitkPython/edit-paste.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_PasteSnippet->setIcon(icon); + d->m_PasteSnippet->setToolTip("Paste snippet!"); + d->m_PasteSnippet->setEnabled(false); + + d->m_RemoveSnippet = new QAction(this); + d->m_RemoveSnippet->setObjectName(QString::fromUtf8("RemoveSnippet")); + QIcon icon1; + icon1.addFile(QString::fromUtf8(":/mitkPython/edit-delete.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_RemoveSnippet->setIcon(icon1); + d->m_RemoveSnippet->setToolTip("Remove snippet."); + d->m_RemoveSnippet->setEnabled(false); + + d->m_RenameSnippet = new QAction(this); + d->m_RenameSnippet->setObjectName(QString::fromUtf8("RenameSnippet")); + QIcon icon2; + icon2.addFile(QString::fromUtf8(":/mitkPython/edit-find-replace.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_RenameSnippet->setIcon(icon2); + d->m_RenameSnippet->setToolTip("Rename snippet."); + d->m_RenameSnippet->setEnabled(false); + + d->m_AddSnippet = new QAction(this); + d->m_AddSnippet->setObjectName(QString::fromUtf8("AddSnippet")); + QIcon icon3; + icon3.addFile(QString::fromUtf8(":/mitkPython/document-new.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_AddSnippet->setIcon(icon3); + d->m_AddSnippet->setToolTip("Add snippet."); + + d->m_RestoreDefaultSnippets = new QAction(this); + d->m_RestoreDefaultSnippets->setObjectName(QString::fromUtf8("RestoreDefaultSnippets")); + QIcon icon4; + icon4.addFile(QString::fromUtf8(":/mitkPython/edit-clear.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_RestoreDefaultSnippets->setIcon(icon4); + d->m_RestoreDefaultSnippets->setToolTip("Restore default snippets"); + + d->m_LoadSnippets = new QAction(this); + d->m_LoadSnippets->setToolTip("Load Snippets from disk."); + d->m_LoadSnippets->setObjectName(QString::fromUtf8("LoadSnippets")); + QIcon icon5; + icon5.addFile(QString::fromUtf8(":/mitkPython/document-open.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_LoadSnippets->setIcon(icon5); + + d->m_SaveSnippets = new QAction(this); + d->m_SaveSnippets->setToolTip("Save Snippets to disk."); + d->m_SaveSnippets->setObjectName(QString::fromUtf8("SaveSnippets")); + QIcon icon6; + icon6.addFile(QString::fromUtf8(":/mitkPython/document-save.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_SaveSnippets->setIcon(icon6); + d->m_SaveSnippets->setEnabled(false); + + d->m_Toolbar = new QToolBar; + d->m_Toolbar->addAction( d->m_PasteSnippet ); + d->m_Toolbar->addAction( d->m_AddSnippet ); + d->m_Toolbar->addAction( d->m_RemoveSnippet ); + d->m_Toolbar->addAction( d->m_RenameSnippet ); + d->m_Toolbar->addAction( d->m_RestoreDefaultSnippets ); + d->m_Toolbar->addAction( d->m_SaveSnippets ); + d->m_Toolbar->addAction( d->m_LoadSnippets ); + + d->m_Name = new QComboBox; + d->m_Name->setObjectName(QString::fromUtf8("Name")); + + d->m_Content = new QTextEdit(this); + d->m_Content->setObjectName(QString::fromUtf8("Content")); + d->m_Content->setEnabled(false); + + QmitkPythonScriptEditorHighlighter* highlighter = + new QmitkPythonScriptEditorHighlighter( d->m_Content->document() ); + + d->m_Layout = new QGridLayout; + d->m_Layout->addWidget( d->m_Toolbar, 0, 0, 1, 1 ); + d->m_Layout->addWidget( d->m_Name, 1, 0, 1, 1 ); + d->m_Layout->addWidget( d->m_Content, 2, 0, 1, 1 ); + d->m_Layout->setContentsMargins(2,2,2,2); + + this->setLayout(d->m_Layout); + QMetaObject::connectSlotsByName(this); + + this->Update(); +} + +QmitkPythonSnippets::~QmitkPythonSnippets() +{ + delete d; +} + +void QmitkPythonSnippets::on_PasteSnippet_triggered( bool ) +{ + emit PasteCommandRequested( d->m_Content->toPlainText() ); +} + +void QmitkPythonSnippets::on_RenameSnippet_triggered(bool) +{ + QString oldname = d->m_Name->currentText(); + QString name = oldname; + bool ok = false; + while( true ) + { + name = QInputDialog::getText(this, + tr("Add new snippet"), + tr("Name of snippet:"), + QLineEdit::Normal, + name, + &ok); + + if (ok) + { + if ( d->m_Snippets.contains(name) ) + { + QMessageBox::warning(this, + tr("Duplicate name."), + tr("The entered name already exists. Enter another one or cancel the operation."), + QMessageBox::Ok, + QMessageBox::Ok ); + } + else + { + QString tmpSnippet = d->m_Snippets[oldname]; + d->m_Snippets.remove(oldname); + d->m_Snippets[name] = tmpSnippet; + this->Update(name); + this->SaveStringMap( d->m_AutoSaveFileName, d->m_Snippets ); + break; + } + } + else + { + break; + } + } +} + +void QmitkPythonSnippets::on_AddSnippet_triggered(bool) +{ + bool ok; + QString name = QInputDialog::getText(this, + tr("Add new snippet"), + tr("Name of snippet:"), + QLineEdit::Normal, + "newSnippet", + &ok); + if (ok && !name.isEmpty()) + { + MITK_DEBUG("QmitkPythonSnippets") << "creating unique name for " << name.toStdString(); + name = this->CreateUniqueName(name); + + MITK_DEBUG("QmitkPythonSnippets") << "creating snippet " << name.toStdString(); + d->m_Snippets[name] = ""; + this->Update(name); + this->SaveStringMap( d->m_AutoSaveFileName, d->m_Snippets ); + } +} + +QString QmitkPythonSnippets::CreateUniqueName( const QString& name ) const +{ + QString newName = name; + size_t i = 2; + while( d->m_Snippets.contains(name) ) + { + newName = name + QString("_%1").arg(i); + ++i; + } + + return newName; +} + +void QmitkPythonSnippets::on_RemoveSnippet_triggered(bool) +{ + QString name = d->m_Name->currentText(); + QString question = QString("Really remove Snippet %1?").arg(name); + int remove = QMessageBox::question( this, + QString("Confirm removal"), + question, + QMessageBox::Yes | QMessageBox::No, + QMessageBox::No ); + + if( remove == QMessageBox::Yes || remove == QMessageBox::Ok ) + { + d->m_Snippets.remove(name); + this->Update(); + this->SaveStringMap( d->m_AutoSaveFileName, d->m_Snippets ); + } +} + +void QmitkPythonSnippets::on_RestoreDefaultSnippets_triggered(bool) +{ + QString question = QString("Really restore default Snippets?"); + int remove = QMessageBox::question( this, + QString("Confirm restoring"), + question, + QMessageBox::Yes | QMessageBox::No, + QMessageBox::No ); + if( remove == QMessageBox::Yes || remove == QMessageBox::Ok ) + { + this->LoadStringMap( DEFAULT_SNIPPET_FILE, d->m_Snippets ); + this->Update(); + this->SaveStringMap( d->m_AutoSaveFileName, d->m_Snippets ); + } +} + +void QmitkPythonSnippets::on_Name_currentIndexChanged(int i) +{ + bool validSelection = i >= 0 ; + + d->m_PasteSnippet->setEnabled(validSelection); + d->m_RemoveSnippet->setEnabled(validSelection); + d->m_RenameSnippet->setEnabled(validSelection); + d->m_Content->setEnabled(validSelection); + d->m_SaveSnippets->setEnabled(validSelection); + + if( validSelection ) + { + QString name = d->m_Name->currentText(); + MITK_DEBUG("QmitkPythonSnippets") << "selected snippet " << name.toStdString(); + d->m_Content->setText( d->m_Snippets[name] ); + MITK_DEBUG("QmitkPythonSnippets") << "selected snippet content " << d->m_Snippets[name].toStdString(); + } +} + +void QmitkPythonSnippets::SaveStringMap(const QString &filename, const QmitkPythonSnippets::QStringMap &map) const +{ + MITK_DEBUG("QmitkPythonSnippets") << "saving to xml file " << filename.toStdString(); + + if( filename.isEmpty() ) + { + MITK_WARN("QmitkPythonSnippets") << "empty auto save file path given. quit."; + return; + } + + QFile file(filename); + file.open(QIODevice::WriteOnly); + if( !file.isOpen() ) + { + MITK_WARN("QmitkPythonSnippets") << "could not open file " << filename.toStdString() << " for writing"; + return; + } + QXmlStreamWriter xmlWriter(&file); + + xmlWriter.setAutoFormatting(true); + xmlWriter.writeStartDocument(); + xmlWriter.writeStartElement(SNIPPETS_ROOT_XML_ELEMENT_NAME); + + QStringMap::const_iterator it = d->m_Snippets.begin(); + while( it != d->m_Snippets.end() ) + { + + { + MITK_DEBUG("QmitkPythonSnippets") << "SNIPPETS_XML_ELEMENT_NAME " << SNIPPETS_XML_ELEMENT_NAME.toStdString(); + MITK_DEBUG("QmitkPythonSnippets") << "writing item " << it.key().toStdString(); + } + + xmlWriter.writeStartElement(SNIPPETS_XML_ELEMENT_NAME); + + xmlWriter.writeAttribute( "key", it.key() ); + xmlWriter.writeAttribute( "value", it.value() ); + + xmlWriter.writeEndElement(); + + ++it; + } + + xmlWriter.writeEndDocument(); + if( file.isOpen() ) + file.close(); + + { + MITK_DEBUG("QmitkPythonSnippets") << "SaveStringMap successful "; + } + +} + +bool QmitkPythonSnippets::LoadStringMap( const QString& filename, QmitkPythonSnippets::QStringMap& oldMap ) const +{ + MITK_DEBUG("QmitkPythonSnippets") << "loading from xml file " << filename.toStdString(); + QStringMap map; + + QXmlStreamReader xmlReader; + QFile file; + QByteArray data; + // resource file + if( filename.startsWith(":") ) + { + QResource res( filename ); + data = QByteArray( reinterpret_cast< const char* >( res.data() ), res.size() ); + xmlReader.addData( data ); + } + else + { + file.setFileName( filename ); + if (!file.open(QFile::ReadOnly | QFile::Text)) + { + MITK_ERROR << "Error: Cannot read file " << qPrintable(filename) + << ": " << qPrintable(file.errorString()); + return false; + } + xmlReader.setDevice(&file); + } + + xmlReader.readNext(); + + while(!xmlReader.atEnd()) + { + xmlReader.readNext(); + + if(xmlReader.name() == SNIPPETS_XML_ELEMENT_NAME) + { + QXmlStreamAttributes attributes = xmlReader.attributes(); + QString key; + QString value; + if(attributes.hasAttribute("key")) + { + key = attributes.value("key").toString(); + } + + if(attributes.hasAttribute("value")) + { + value = attributes.value("value").toString(); + } + + if( !key.isEmpty() ) + { + MITK_DEBUG("QmitkPythonSnippets") << "loaded snippet " << key.toStdString(); + MITK_DEBUG("QmitkPythonSnippets") << "value " << value.toStdString(); + map[key] = value; + } + } + } + + if (xmlReader.hasError()) + { + MITK_ERROR << "Error: Failed to parse file " + << qPrintable(filename) << ": " + << qPrintable(xmlReader.errorString()); + return false; + } + else if (file.error() != QFile::NoError) + { + MITK_ERROR << "Error: Cannot read file " << qPrintable(filename) + << ": " << qPrintable(file.errorString()); + return false; + } + + if( file.isOpen() ) + file.close(); + + oldMap = map; + return true; +} + +void QmitkPythonSnippets::Update(const QString &name) +{ + d->m_Name->clear(); + d->m_Content->clear(); + + MITK_DEBUG("QmitkPythonSnippets") << "size of snippets " << d->m_Snippets.size(); + QStringMap::const_iterator it = d->m_Snippets.begin(); + + while( it != d->m_Snippets.end() ) + { + MITK_DEBUG("QmitkPythonSnippets") << "adding item " << it.key().toStdString(); + d->m_Name->addItem( it.key() ); + ++it; + } + + int index = d->m_Name->findText( name ); + if( index >= 0 ) + { + MITK_DEBUG("QmitkPythonSnippets") << "selecting index " << index; + d->m_Name->setCurrentIndex(index); + } + +} + +void QmitkPythonSnippets::on_Content_textChanged() +{ + if( d->m_Content->isEnabled() ) + { + QString name = d->m_Name->currentText(); + QString snippet = d->m_Content->toPlainText(); + d->m_Snippets[name] = snippet; + + this->SaveStringMap( d->m_AutoSaveFileName, d->m_Snippets ); + MITK_DEBUG("QmitkPythonSnippets") << "SaveStringMap successful"; + } +} + +void QmitkPythonSnippets::on_SaveSnippets_triggered(bool) +{ + QString fileName = QFileDialog::getSaveFileName(this, "Save snippets", d->m_SaveFileName, "XML files (*.xml)"); + if( !fileName.isEmpty() ) + { + d->m_SaveFileName = fileName; + this->SaveStringMap( d->m_SaveFileName, d->m_Snippets ); + } +} + +void QmitkPythonSnippets::on_LoadSnippets_triggered(bool) +{ + QString fileName = QFileDialog::getOpenFileName(this, "Load snippets", d->m_SaveFileName, "XML files (*.xml)"); + + if( !fileName.isEmpty() ) + { + d->m_SaveFileName = fileName; + QString question = QString("Your current snippets will be overwritten. Proceed?"); + int overwrite = QMessageBox::warning(this, + QString("Confirm overwrite"), + question, + QMessageBox::Yes | QMessageBox::No, + QMessageBox::No ); + + if( overwrite == QMessageBox::Yes ) + { + this->LoadStringMap( d->m_SaveFileName, d->m_Snippets ); + this->Update( d->m_Name->currentText() ); + this->SaveStringMap( d->m_AutoSaveFileName, d->m_Snippets ); + } + } + +} diff --git a/Modules/Python/QmitkPythonSnippets.h b/Modules/Python/QmitkPythonSnippets.h new file mode 100644 index 0000000000..6a0b2b97a2 --- /dev/null +++ b/Modules/Python/QmitkPythonSnippets.h @@ -0,0 +1,104 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef _QmitkPythonSnippets_H +#define _QmitkPythonSnippets_H + +#include +#include +#include "mitkPythonExports.h" +struct QmitkPythonSnippetsData; + +/// +/// a widget that holds snippets and serializes the snippets to a certain places +class MITK_PYTHON_EXPORT QmitkPythonSnippets: public QWidget +{ + Q_OBJECT + + public: + static const QString DEFAULT_SNIPPET_FILE; + static const QString SNIPPETS_ROOT_XML_ELEMENT_NAME; + static const QString SNIPPETS_XML_ELEMENT_NAME; + /// + /// typedef for string map + typedef QMap QStringMap; + /// + /// build ui here + /// the snippets will be loaded from _AutoSaveFileName if not empty and readable + /// otherwise the default snippets will be loaded + QmitkPythonSnippets( const QString& _AutoSaveFileName="", QWidget* parent=0 ); + /// + /// delete d pointer + virtual ~QmitkPythonSnippets(); +signals: + /// + /// this class whishes to paste sth command + void PasteCommandRequested(const QString& command); + + protected slots: + /// + /// emits PasteCommandRequested signal + void on_PasteSnippet_triggered( bool checked = false ); + /// + /// ask for name as long as it exists, call update() + void on_RenameSnippet_triggered( bool checked = false ); + /// + /// ask for name, create snippet, call update() + void on_AddSnippet_triggered( bool checked = false ); + /// + /// remove the current snippet, call update() + void on_RemoveSnippet_triggered( bool checked = false ); + /// + /// call LoadStringMap with d->m_DefaultSnippetsAutoSaveFileName + void on_RestoreDefaultSnippets_triggered( bool checked = false ); + /// + /// update action state (enable/disable), update text box + void on_Name_currentIndexChanged( int i ); + /// + /// save changed snippet + void on_Content_textChanged(); + /// + /// ask for file, save snippets + void on_SaveSnippets_triggered( bool checked = false ); + /// + /// ask for file, load snippets (do not replace) + void on_LoadSnippets_triggered( bool checked = false ); + + protected: + /// + /// write string map to xml file + void SaveStringMap( const QString& filename, const QStringMap& map ) const; + /// + /// read string map from xml file + bool LoadStringMap( const QString& filename, QStringMap& oldMap ) const; + /// + /// creates a name which does not exist in the list + QString CreateUniqueName(const QString &name) const; + /// + /// update combo box + /// if name is passed, the according element will be selected + void Update(const QString &name = ""); + private: + /// + /// d pointer declaration (holds members) + QmitkPythonSnippetsData* d; +}; + + + + +#endif // _QmitkPythonSnippets_H_INCLUDED + diff --git a/Modules/Python/QmitkPythonSnippets.ui b/Modules/Python/QmitkPythonSnippets.ui new file mode 100644 index 0000000000..f7bc574d07 --- /dev/null +++ b/Modules/Python/QmitkPythonSnippets.ui @@ -0,0 +1,116 @@ + + + QmitkPythonSnippets + + + + 0 + 0 + 613 + 436 + + + + + 0 + 0 + + + + true + + + QmitkTemplate + + + + + + Name: + + + + + + + true + + + + + + + Content: + + + + + + + + + + + :/mitkPython/edit-paste.png:/mitkPython/edit-paste.png + + + Paste snippet! + + + Push button to paste the snippet into the console or the editor. Or double click on the snippet text window. + + + + + + :/mitkPython/edit-delete.png:/mitkPython/edit-delete.png + + + Remove snippet + + + Remove the selected snippet. + + + + + + :/mitkPython/edit-find-replace.png:/mitkPython/edit-find-replace.png + + + Rename snippet + + + Rename the selected snippet. + + + + + + :/mitkPython/document-new.png:/mitkPython/document-new.png + + + Add snippet + + + Add a new snippet to the list. + + + + + + :/mitkPython/edit-clear.png:/mitkPython/edit-clear.png + + + Restore default snippets + + + Clear and restore the default snippets. + + + + + + + + diff --git a/Modules/Python/QmitkPythonTextEditor.cpp b/Modules/Python/QmitkPythonTextEditor.cpp new file mode 100644 index 0000000000..bc4689a39c --- /dev/null +++ b/Modules/Python/QmitkPythonTextEditor.cpp @@ -0,0 +1,184 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "QmitkPythonTextEditor.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "QmitkPythonScriptEditorHighlighter.h" + +struct QmitkPythonTextEditorData +{ + QString m_FilePath; + + QAction* m_LoadScript; + QAction* m_SaveScript; + QAction* m_RunScript; + QToolBar* m_Toolbar; + + QTextEdit* m_Content; + + QGridLayout* m_Layout; + mitk::IPythonService* m_PythonService; + mitk::ServiceReference m_PythonServiceRef; + + QString m_FileName; +}; + +QmitkPythonTextEditor::QmitkPythonTextEditor(QWidget *parent) + :QWidget(parent), d(new QmitkPythonTextEditorData) +{ + mitk::ModuleContext* context = mitk::GetModuleContext(); + d->m_PythonServiceRef = context->GetServiceReference(); + d->m_PythonService = context->GetService( d->m_PythonServiceRef ); + + d->m_LoadScript = new QAction(this); + d->m_LoadScript->setToolTip("Load script from disk."); + d->m_LoadScript->setObjectName(QString::fromUtf8("LoadScript")); + QIcon icon2; + icon2.addFile(QString::fromUtf8(":/mitkPython/document-open.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_LoadScript->setIcon(icon2); + + d->m_SaveScript = new QAction(this); + d->m_SaveScript->setToolTip("Save script to disk."); + d->m_SaveScript->setObjectName(QString::fromUtf8("SaveScript")); + QIcon icon3; + icon3.addFile(QString::fromUtf8(":/mitkPython/document-save.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_SaveScript->setIcon(icon3); + + d->m_RunScript = new QAction(this); + d->m_RunScript->setToolTip("Run the current script."); + d->m_RunScript->setObjectName(QString::fromUtf8("RunScript")); + QIcon icon4; + icon4.addFile(QString::fromUtf8(":/mitkPython/media-playback-start.png"), QSize(), QIcon::Normal, QIcon::Off); + d->m_RunScript->setIcon(icon4); + + d->m_Toolbar = new QToolBar; + d->m_Toolbar->addAction( d->m_LoadScript ); + d->m_Toolbar->addAction( d->m_SaveScript ); + d->m_Toolbar->addAction( d->m_RunScript ); + + d->m_Content = new QTextEdit(this); + d->m_Content->setObjectName(QString::fromUtf8("Content")); + + QmitkPythonScriptEditorHighlighter* highlighter = + new QmitkPythonScriptEditorHighlighter( d->m_Content->document() ); + + d->m_Layout = new QGridLayout; + d->m_Layout->addWidget( d->m_Toolbar, 0, 0, 1, 1 ); + d->m_Layout->addWidget( d->m_Content, 1, 0, 1, 1 ); + d->m_Layout->setContentsMargins(2,2,2,2); + + this->setLayout(d->m_Layout); + QMetaObject::connectSlotsByName(this); +} + +QmitkPythonTextEditor::~QmitkPythonTextEditor() +{ + mitk::ModuleContext* context = mitk::GetModuleContext(); + context->UngetService( d->m_PythonServiceRef ); + + delete d; +} + +void QmitkPythonTextEditor::dragEnterEvent(QDragEnterEvent *event) +{ + event->accept(); +} + +void QmitkPythonTextEditor::dropEvent(QDropEvent *event) +{ + QList urls = event->mimeData()->urls(); + for(int i = 0; i < urls.size(); i++) + { + this->Paste( urls[i].toString() ); + } +} +/* +bool QmitkPythonTextEditor::canInsertFromMimeData( const QMimeData * ) const +{ + return true; +} +*/ + +void QmitkPythonTextEditor::Paste(const QString &command) +{ + if( this->isVisible() ) + { + d->m_Content->insertPlainText(command + "\n"); + } +} + + +QString QmitkPythonTextEditor::ReadFile(const QString& filename) +{ + QFile file(filename); + if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) + { + MITK_ERROR << "Could not open file " << filename; + return NULL; + } + + QByteArray total; + QByteArray line; + while (!file.atEnd()) + { + line = file.read(1024); + total.append(line); + } + + return QString(total); +} + +void QmitkPythonTextEditor::on_SaveScript_triggered( bool ) +{ + d->m_FileName = QFileDialog::getSaveFileName(this,tr("Save File"), d->m_FileName,tr("*.py")); + if( d->m_FileName.compare("") != 0) + { + ofstream myfile; + myfile.open(d->m_FileName.toLocal8Bit().data()); + myfile << d->m_Content->toPlainText().toLocal8Bit().data(); + myfile.close(); + } +} + +void QmitkPythonTextEditor::on_LoadScript_triggered( bool ) +{ + d->m_FileName = QFileDialog::getOpenFileName( this, "Load Script", d->m_FileName, tr("*.py")); + if( !d->m_FileName.isEmpty() ) + { + QString contents = this->ReadFile( d->m_FileName ); + d->m_Content->setText(contents); + } +} + +void QmitkPythonTextEditor::on_RunScript_triggered( bool ) +{ + if( !d->m_PythonService ) + { + MITK_ERROR << "Python service not available."; + return; + } + + d->m_PythonService->Execute( d->m_Content->toPlainText().toStdString(), mitk::IPythonService::MULTI_LINE_COMMAND ); +} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonTextEditor.h b/Modules/Python/QmitkPythonTextEditor.h old mode 100755 new mode 100644 similarity index 55% rename from Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonTextEditor.h rename to Modules/Python/QmitkPythonTextEditor.h index a129dea467..0e407ee866 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonTextEditor.h +++ b/Modules/Python/QmitkPythonTextEditor.h @@ -1,50 +1,53 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QMITKPYTHONTEXTEDITOR_H_ #define QMITKPYTHONTEXTEDITOR_H_ #include #include #include -#include "QmitkPythonMediator.h" +#include "mitkPythonExports.h" +struct QmitkPythonTextEditorData; -class QmitkPythonTextEditor : public QTextEdit, public QmitkPythonPasteClient +/// +/// this is a python text editor with syntax highlightning +class MITK_PYTHON_EXPORT QmitkPythonTextEditor : public QWidget { - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: QmitkPythonTextEditor(QWidget *parent = 0); virtual ~QmitkPythonTextEditor(); - - virtual void paste(const QString& command); -signals: +public slots: + void Paste(const QString& command); protected slots: + void on_SaveScript_triggered(bool checked=false); + void on_LoadScript_triggered(bool checked=false); + void on_RunScript_triggered(bool checked=false); protected: - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); - - virtual bool canInsertFromMimeData( const QMimeData *source ) const; - //virtual void QmitkPythonTextEditor::insertFromMimeData( const QMimeData *source ); + void dragEnterEvent(QDragEnterEvent *event); + void dropEvent(QDropEvent *event); + //bool canInsertFromMimeData( const QMimeData *source ) const; + QString ReadFile(const QString &filename); private: + QmitkPythonTextEditorData* d; }; #endif diff --git a/Modules/Python/QmitkPythonVariableStackTableModel.cpp b/Modules/Python/QmitkPythonVariableStackTableModel.cpp new file mode 100755 index 0000000000..2ad27d2fd5 --- /dev/null +++ b/Modules/Python/QmitkPythonVariableStackTableModel.cpp @@ -0,0 +1,223 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "QmitkPythonVariableStackTableModel.h" +#include +#include +#include +#include +#include +#include + +const QString QmitkPythonVariableStackTableModel::MITK_IMAGE_VAR_NAME = "mitkImage"; +const QString QmitkPythonVariableStackTableModel::MITK_SURFACE_VAR_NAME = "mitkSurface"; + +QmitkPythonVariableStackTableModel::QmitkPythonVariableStackTableModel(QObject *parent) + :QAbstractTableModel(parent) +{ + mitk::ModuleContext* context = mitk::GetModuleContext(); + m_PythonServiceRef = context->GetServiceReference(); + m_PythonService = context->GetService(m_PythonServiceRef); + m_PythonService->AddPythonCommandObserver( this ); +} + +QmitkPythonVariableStackTableModel::~QmitkPythonVariableStackTableModel() +{ + mitk::ModuleContext* context = mitk::GetModuleContext(); + context->UngetService( m_PythonServiceRef ); + m_PythonService->RemovePythonCommandObserver( this ); +} + +bool QmitkPythonVariableStackTableModel::dropMimeData ( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent ) +{ + // Early exit, returning true, but not actually doing anything (ignoring data). + if (action == Qt::IgnoreAction) + return true; + + // Note, we are returning true if we handled it, and false otherwise + bool returnValue = false; + + if(data->hasFormat("application/x-mitk-datanodes")) + { + MITK_DEBUG("QmitkPythonVariableStackTableModel") << "dropped MITK DataNode"; + returnValue = true; + + QString arg = QString(data->data("application/x-mitk-datanodes").data()); + QStringList listOfDataNodeAddressPointers = arg.split(","); + + QStringList::iterator slIter; + int i = 0; + int j = 0; + for (slIter = listOfDataNodeAddressPointers.begin(); + slIter != listOfDataNodeAddressPointers.end(); + slIter++) + { + long val = (*slIter).toLong(); + mitk::DataNode* node = static_cast((void*)val); + mitk::Image* mitkImage = dynamic_cast(node->GetData()); + MITK_DEBUG("QmitkPythonVariableStackTableModel") << "mitkImage is not null " << (mitkImage != 0? "true": "false"); + + if( mitkImage ) + { + QString varName = MITK_IMAGE_VAR_NAME; + if( i > 0 ) + varName = QString("%1%2").arg(MITK_IMAGE_VAR_NAME).arg(i); + MITK_DEBUG("QmitkPythonVariableStackTableModel") << "varName" << varName.toStdString(); + + bool exportAsCvImage = m_PythonService->IsOpenCvPythonWrappingAvailable(); + + if( mitkImage->GetDimension() == 2 && exportAsCvImage ) + { + int ret = QMessageBox::question(NULL, "Export option", + "2D image detected. Export as OpenCV image to Python instead of an ITK image?", + QMessageBox::Yes | QMessageBox::No, QMessageBox::No); + + exportAsCvImage = ret == QMessageBox::Yes; + if(exportAsCvImage) + { + m_PythonService->CopyToPythonAsCvImage( mitkImage, MITK_IMAGE_VAR_NAME.toStdString() ); + ++i; + } + } + if( !exportAsCvImage ) + { + if( m_PythonService->IsItkPythonWrappingAvailable() ) + { + m_PythonService->CopyToPythonAsItkImage( mitkImage, MITK_IMAGE_VAR_NAME.toStdString() ); + ++i; + } + else + { + MITK_ERROR << "ITK Python wrapping not available. Skipping export for image " << node->GetName(); + } + } + } + else + { + mitk::Surface* surface = dynamic_cast(node->GetData()); + MITK_DEBUG("QmitkPythonVariableStackTableModel") << "found surface"; + + if( surface ) + { + QString varName = MITK_SURFACE_VAR_NAME; + MITK_DEBUG("QmitkPythonVariableStackTableModel") << "varName" << varName.toStdString(); + + if( j > 0 ) + varName = QString("%1%2").arg(MITK_SURFACE_VAR_NAME).arg(j); + MITK_DEBUG("varName") << "varName" << varName.toStdString(); + + if( m_PythonService->IsVtkPythonWrappingAvailable() ) + { + m_PythonService->CopyToPythonAsVtkPolyData( surface, MITK_SURFACE_VAR_NAME.toStdString() ); + ++j; + } + else + { + MITK_ERROR << "VTK Python wrapping not available. Skipping export for surface " << node->GetName(); + } + } + } + } + } + return returnValue; +} + +QVariant QmitkPythonVariableStackTableModel::headerData(int section, Qt::Orientation orientation, + int role) const +{ + QVariant headerData; + + // show only horizontal header + if ( role == Qt::DisplayRole ) + { + if( orientation == Qt::Horizontal ) + { + // first column: "Attribute" + if(section == 0) + headerData = "Attribute"; + else if(section == 1) + headerData = "Type"; + else if(section == 2) + headerData = "Value"; + } + } + + return headerData; +} + +Qt::ItemFlags QmitkPythonVariableStackTableModel::flags(const QModelIndex &index) const +{ + Qt::ItemFlags flags = QAbstractItemModel::flags(index); + + if(index.isValid()) + return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | flags; + else + return Qt::ItemIsDropEnabled | flags; +} + +int QmitkPythonVariableStackTableModel::rowCount(const QModelIndex &) const +{ + return m_VariableStack.size(); +} + +int QmitkPythonVariableStackTableModel::columnCount(const QModelIndex &) const +{ + return 3; +} + +QVariant QmitkPythonVariableStackTableModel::data(const QModelIndex &index, int role) const +{ + if (index.isValid() && !m_VariableStack.empty()) + { + if(role == Qt::DisplayRole) + { + mitk::PythonVariable item = m_VariableStack.at(index.row()); + if(index.column() == 0) + return QString::fromStdString(item.m_Name); + if(index.column() == 1) + return QString::fromStdString(item.m_Type); + if(index.column() == 2) + return QString::fromStdString(item.m_Value); + } + } + return QVariant(); +} + +QStringList QmitkPythonVariableStackTableModel::mimeTypes() const +{ + return QAbstractTableModel::mimeTypes(); + QStringList types; + types << "application/x-mitk-datanodes"; + types << "application/x-qabstractitemmodeldatalist"; + return types; +} + +Qt::DropActions QmitkPythonVariableStackTableModel::supportedDropActions() const +{ + return Qt::CopyAction | Qt::MoveAction; +} + +void QmitkPythonVariableStackTableModel::CommandExecuted(const std::string& pythonCommand) +{ + MITK_DEBUG("QmitkPythonVariableStackTableModel") << "command was executed " << pythonCommand; + m_VariableStack = m_PythonService->GetVariableStack(); + QAbstractTableModel::reset(); +} + +std::vector QmitkPythonVariableStackTableModel::GetVariableStack() const +{ + return m_VariableStack; +} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStackTreeWidget.h b/Modules/Python/QmitkPythonVariableStackTableModel.h similarity index 51% rename from Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStackTreeWidget.h rename to Modules/Python/QmitkPythonVariableStackTableModel.h index e32114723d..ce45819723 100755 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStackTreeWidget.h +++ b/Modules/Python/QmitkPythonVariableStackTableModel.h @@ -1,68 +1,63 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ -#ifndef QMITKPYTHONVARIABLESTACKTREEWIDGET_H_ -#define QMITKPYTHONVARIABLESTACKTREEWIDGET_H_ - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "QmitkPythonMediator.h" - -class QmitkPythonVariableStackTreeWidget : public QAbstractTableModel, public QmitkPythonClient +#ifndef QmitkPythonVariableStackTableModel_h +#define QmitkPythonVariableStackTableModel_h + +#include +#include +#include +#include "mitkIPythonService.h" +#include "mitkPythonExports.h" +#include + +/// +/// implements a table model to show the variables of the Python "__main__" dictionary +/// furthermore implements dragging and dropping of datanodes (conversion from and to python) +/// +class MITK_PYTHON_EXPORT QmitkPythonVariableStackTableModel : public QAbstractTableModel, public mitk::PythonCommandObserver { - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: - QmitkPythonVariableStackTreeWidget(QWidget *parent = 0); - virtual ~QmitkPythonVariableStackTreeWidget(); + static const QString MITK_IMAGE_VAR_NAME; + static const QString MITK_SURFACE_VAR_NAME; + + QmitkPythonVariableStackTableModel(QObject *parent = 0); + virtual ~QmitkPythonVariableStackTableModel(); int rowCount(const QModelIndex &parent = QModelIndex()) const; int columnCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; Qt::ItemFlags flags( const QModelIndex& index ) const; virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const; - QStringList mimeTypes() const; - void clear(); - void setVariableStack(std::vector); - std::vector getVariableStack(); - - QMimeData * mimeData(const QModelIndexList &) const; + QStringList mimeTypes() const; bool dropMimeData ( const QMimeData *, Qt::DropAction, int, int, const QModelIndex & ); Qt::DropActions supportedDropActions() const; Qt::DropActions supportedDragActions() const; - virtual void update(); + void CommandExecuted(const std::string& pythonCommand); -protected: - std::vector m_variableStack; + std::vector GetVariableStack() const; +private: + std::vector m_VariableStack; + mitk::IPythonService* m_PythonService; + mitk::ServiceReference m_PythonServiceRef; }; -#endif +#endif // QmitkPythonVariableStackTableModel_h diff --git a/Modules/Python/QmitkPythonVariableStackTableView.cpp b/Modules/Python/QmitkPythonVariableStackTableView.cpp new file mode 100755 index 0000000000..a062feb62d --- /dev/null +++ b/Modules/Python/QmitkPythonVariableStackTableView.cpp @@ -0,0 +1,107 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "QmitkPythonVariableStackTableView.h" +#include +#include +#include +#include +#include + +QmitkPythonVariableStackTableView::QmitkPythonVariableStackTableView(QWidget *parent) + :QTableView(parent) +{ + m_TableModel = new QmitkPythonVariableStackTableModel(parent); + m_TableModel->CommandExecuted(""); + + this->setSelectionBehavior( QAbstractItemView::SelectRows ); + this->setAlternatingRowColors(true); + this->setDropIndicatorShown(true); + this->setAcceptDrops(true); + this->setModel( m_TableModel ); + + mitk::ModuleContext* context = mitk::GetModuleContext(); + mitk::ServiceReference serviceRef = context->GetServiceReference(); + m_PythonService = context->GetService(serviceRef); + + connect( this, SIGNAL(doubleClicked ( const QModelIndex& )), this, SLOT( OnVariableStackDoubleClicked(const QModelIndex&) ) ); +} + +QmitkPythonVariableStackTableView::~QmitkPythonVariableStackTableView() +{ +} + +void QmitkPythonVariableStackTableView::SetDataStorage(mitk::DataStorage *_DataStorage) +{ + m_DataStorage = _DataStorage; +} + +void QmitkPythonVariableStackTableView::OnVariableStackDoubleClicked(const QModelIndex &index) +{ + if( m_DataStorage.IsNull() || m_PythonService == 0 ) + { + MITK_ERROR << "QmitkPythonVariableStackTableView not configured correctly. Quit"; + return; + } + + int row = index.row(); + std::vector variableStack = m_TableModel->GetVariableStack(); + { + MITK_DEBUG("QmitkPythonVariableStackTableView") << "row " << row; + MITK_DEBUG("QmitkPythonVariableStackTableView") << "variableStack.size(): " << variableStack.size(); + } + + QString varName = QString::fromStdString( variableStack.at(row).m_Name ); + QString type = QString::fromStdString( variableStack.at(row).m_Type ); + QString value = QString::fromStdString( variableStack.at(row).m_Value ); + + { + MITK_DEBUG("QmitkPythonVariableStackTableView") << "varName: " << varName.toStdString(); + MITK_DEBUG("QmitkPythonVariableStackTableView") << "type: " << type.toStdString(); + } + + mitk::Image::Pointer mitkImage; + mitk::Surface::Pointer mitkSurface; + + if( type.startsWith("itkImage") ) + { + mitkImage = m_PythonService->CopyItkImageFromPython(varName.toStdString()); + } + else if( type.startsWith("numpy.ndarray") ) + { + mitkImage = m_PythonService->CopyCvImageFromPython(varName.toStdString()); + } + else if( value.startsWith("(vtkPolyData)") ) + { + mitkSurface = m_PythonService->CopyVtkPolyDataFromPython(varName.toStdString()); + } + + std::string nodeName = varName.toStdString(); + mitk::DataNode::Pointer node = mitk::DataNode::New(); + node->SetName ( nodeName ); + + if( mitkImage.IsNotNull() ) + { + node->SetData( mitkImage ); + } + else if( mitkSurface.IsNotNull() ) + { + node->SetData( mitkSurface ); + } + + m_DataStorage->Add(node); + mitk::RenderingManager::GetInstance()->RequestUpdateAll(); +} diff --git a/Modules/Python/QmitkPythonVariableStackTableView.h b/Modules/Python/QmitkPythonVariableStackTableView.h new file mode 100755 index 0000000000..d486512a44 --- /dev/null +++ b/Modules/Python/QmitkPythonVariableStackTableView.h @@ -0,0 +1,50 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef QmitkPythonVariableStackTableView_h +#define QmitkPythonVariableStackTableView_h + +#include +#include +#include "QmitkPythonVariableStackTableModel.h" +#include +#include "mitkPythonExports.h" + +/// +/// implements the table view for the variable stack +/// purpose of this class: 1. Setup the view correctly, 2. Implement the double click to write back results +/// to the datastorage +/// +class MITK_PYTHON_EXPORT QmitkPythonVariableStackTableView : public QTableView +{ + Q_OBJECT + +public: + QmitkPythonVariableStackTableView(QWidget *parent = 0); + virtual ~QmitkPythonVariableStackTableView(); + + void SetDataStorage(mitk::DataStorage* _DataStorage); + +protected slots: + void OnVariableStackDoubleClicked(const QModelIndex &index); + +private: + QmitkPythonVariableStackTableModel* m_TableModel; + mitk::DataStorage::Pointer m_DataStorage; + mitk::IPythonService* m_PythonService; +}; + +#endif // QmitkPythonVariableStackTableView_h diff --git a/Modules/Python/Testing/CMakeLists.txt b/Modules/Python/Testing/CMakeLists.txt new file mode 100644 index 0000000000..2d5e45bb88 --- /dev/null +++ b/Modules/Python/Testing/CMakeLists.txt @@ -0,0 +1,2 @@ +MITK_CREATE_MODULE_TESTS() + diff --git a/Modules/Python/Testing/files.cmake b/Modules/Python/Testing/files.cmake new file mode 100644 index 0000000000..d4301946da --- /dev/null +++ b/Modules/Python/Testing/files.cmake @@ -0,0 +1,3 @@ +set(MODULE_TESTS + mitkPythonTest.cpp +) diff --git a/Modules/Python/Testing/mitkPythonTest.cpp b/Modules/Python/Testing/mitkPythonTest.cpp new file mode 100644 index 0000000000..9be9f6f6b6 --- /dev/null +++ b/Modules/Python/Testing/mitkPythonTest.cpp @@ -0,0 +1,33 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ +#include +#include +#include +#include +#include +#include + +int mitkPythonTest(int /*argc*/, char* /*argv*/[]) +{ + MITK_TEST_BEGIN("PythonTest") + + itk::SmartPointer _PythonService(new mitk::PythonService()); + + std::string result = _PythonService->Execute( "5+5", mitk::IPythonService::EVAL_COMMAND ); + MITK_TEST_CONDITION( result == "10", "Testing if running python code 5+5 results in 10" ) + + MITK_TEST_END() +} diff --git a/Modules/Python/documentation/mitkPython.dox b/Modules/Python/documentation/mitkPython.dox new file mode 100644 index 0000000000..899290048f --- /dev/null +++ b/Modules/Python/documentation/mitkPython.dox @@ -0,0 +1,17 @@ +/** + +\page mitkPython_Overview The MITK Python Module + +

Brief description

+The MITK Python Module provides a service class for 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 ITK/VTK/OpenCV is correctly initiated and all paths are correctly set within MITK code. + +

Build Instructions

+- Install Python 2.x +- Activate MITK_USE_Python in the superbuild process of MITK +- Provide CMake with the correct Python paths (if not found automatically) +- Build MITK: All wrapping will be setup by the MITK superbuild routine + +

Known problems and workarounds

+ + */ diff --git a/Modules/Python/documentation/slides.tex b/Modules/Python/documentation/slides.tex new file mode 100644 index 0000000000..5be2291ea0 --- /dev/null +++ b/Modules/Python/documentation/slides.tex @@ -0,0 +1,44 @@ +\documentclass{beamer} +\usepackage[utf8]{inputenc} +\usepackage{listings} +\usetheme{Warsaw} +\title[The MITK Python Module]{The MITK Python Module\\A short introduction} +\author{Michael Müller} +\institute{mitk.org} +\date{\today} +\begin{document} + +\begin{frame} +\titlepage +\end{frame} + +\begin{frame}{Problem} +Playing around with ITK/VTK/OpenCV functions in C++ is +\center{\textbf{time consuming}} +\\(setup project, write code, compile, adapt parameters, recompile, execute, do it again, do it again, Visual Studio crashes, do it again...) +\end{frame} + +\begin{frame}{Aims} +\begin{itemize} +\item Use Python as an interpreted language to interactively use and test ITK/VTK/OpenCV functions \pause +\item Provide a one click super-build integration \pause +\item Provide a service class to programatically execute and evaluate Python code \pause +\item Create a GUI to interactively work with Python within the MITK workbench +\end{itemize} +\end{frame} + +\begin{frame}{The Python Module} +\textbf{Central class: IPythonService}\\ +Most important functions:\\ + +\end{frame} + +\begin{frame}{The Python View} +write motivation here +\end{frame} + +\begin{frame}{Installation} +write motivation here +\end{frame} + +\end{document} diff --git a/Modules/Python/files.cmake b/Modules/Python/files.cmake new file mode 100644 index 0000000000..6750579650 --- /dev/null +++ b/Modules/Python/files.cmake @@ -0,0 +1,27 @@ +SET(CPP_FILES + mitkPythonActivator.cpp + mitkPythonService.cpp + QmitkCtkPythonShell.cpp + QmitkPythonVariableStackTableModel.cpp + QmitkPythonVariableStackTableView.cpp + QmitkPythonScriptEditorHighlighter.cpp + QmitkPythonTextEditor.cpp + QmitkPythonSnippets.cpp +) + +#SET(UI_FILES +# QmitkPythonSnippets.ui +#) + +SET(MOC_H_FILES + QmitkCtkPythonShell.h + QmitkPythonVariableStackTableModel.h + QmitkPythonVariableStackTableView.h + QmitkPythonScriptEditorHighlighter.h + QmitkPythonTextEditor.h + QmitkPythonSnippets.h +) + +set(QRC_FILES + resources/mitkPython.qrc +) diff --git a/Modules/Python/mitkPythonActivator.cpp b/Modules/Python/mitkPythonActivator.cpp new file mode 100644 index 0000000000..d6d1e65939 --- /dev/null +++ b/Modules/Python/mitkPythonActivator.cpp @@ -0,0 +1,67 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ +#ifndef mitkPythonActivator_h +#define mitkPythonActivator_h + +// Microservices +#include +#include "mitkModuleContext.h" +#include "mitkPythonService.h" +#include + +namespace mitk +{ + /// + /// installs the PythonService + /// runs all initial commands (setting env paths etc) + /// + class PythonActivator : public mitk::ModuleActivator + { + public: + + void Load(mitk::ModuleContext* context) + { + MITK_DEBUG << "PythonActivator::Load"; + // Registering PythonService as MicroService + m_PythonService = itk::SmartPointer(new PythonService()); + + ServiceProperties _PythonServiceProps; + _PythonServiceProps["Name"] = std::string("PythonService"); + + m_PythonServiceRegistration = context->RegisterService(m_PythonService, _PythonServiceProps); + } + + void Unload(mitk::ModuleContext* context) + { + MITK_DEBUG("PythonActivator") << "PythonActivator::Unload"; + MITK_DEBUG("PythonActivator") << "m_PythonService GetReferenceCount " << m_PythonService->GetReferenceCount(); + m_PythonServiceRegistration.Unregister(); + m_PythonService->Delete(); + MITK_DEBUG("PythonActivator") << "m_PythonService GetReferenceCount " << m_PythonService->GetReferenceCount(); + } + + virtual ~PythonActivator() + { + } + + private: + itk::SmartPointer m_PythonService; + ServiceRegistration m_PythonServiceRegistration; + }; +} + +US_EXPORT_MODULE_ACTIVATOR(mitkPython, mitk::PythonActivator) +#endif diff --git a/Modules/Python/mitkPythonService.cpp b/Modules/Python/mitkPythonService.cpp new file mode 100644 index 0000000000..4068f2f094 --- /dev/null +++ b/Modules/Python/mitkPythonService.cpp @@ -0,0 +1,532 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "mitkPythonService.h" +#include +#include +#include +#include +#include +#include "PythonPath.h" + +const QString mitk::PythonService::m_TmpDataFileName("temp_mitk_data_file"); + +mitk::PythonService::PythonService() + : m_ItkWrappingAvailable( true ), m_OpenCVWrappingAvailable( true ), m_VtkWrappingAvailable( true ), m_ErrorOccured( false ) +{ + { + MITK_DEBUG << "will init python if necessary"; + } + bool pythonInitialized = static_cast( Py_IsInitialized() ); //m_PythonManager.isPythonInitialized() ); + { + MITK_DEBUG << "pythonInitialized " << pythonInitialized; + MITK_DEBUG << "m_PythonManager.isPythonInitialized() " << m_PythonManager.isPythonInitialized(); + } + + // due to strange static var behaviour on windows Py_IsInitialized() returns correct value while + // m_PythonManager.isPythonInitialized() does not because it has been constructed and destructed again + if( !m_PythonManager.isPythonInitialized() ) + { + try + { + if( pythonInitialized ) + m_PythonManager.setInitializationFlags(PythonQt::RedirectStdOut|PythonQt::PythonAlreadyInitialized); + else + m_PythonManager.setInitializationFlags(PythonQt::RedirectStdOut); + + MITK_DEBUG("PythonService") << "initalizing python"; + m_PythonManager.initialize(); + + MITK_DEBUG("PythonService") << "python initalized"; + + QString pythonCommand(PYTHONPATH_COMMAND); + MITK_DEBUG("PythonService") << "registering python paths" << PYTHONPATH_COMMAND; + m_PythonManager.executeString( pythonCommand, ctkAbstractPythonManager::FileInput ); + + /* + //system("export LD_LIBRARY_PATH=/local/muellerm/mitk/bugsquashing/bin-debug/VTK-build/bin:$LD_LIBRARY_PATH"); + //m_PythonManager.executeString( "print sys.path", ctkAbstractPythonManager::SingleInput ); + //MITK_DEBUG("mitk::PythonService") << "result of 'sys.path': " << result.toString().toStdString(); + + //m_PythonManager.executeString( "sys.path.append('/usr/share/pyshared/numpy')", ctkAbstractPythonManager::SingleInput ); + //m_PythonManager.executeString( "import numpy", ctkAbstractPythonManager::SingleInput ); + + MITK_DEBUG("mitk::PythonService") << "Trying to import ITK"; + m_PythonManager.executeString( "import itk", ctkAbstractPythonManager::SingleInput ); + m_ItkWrappingAvailable = !m_PythonManager.pythonErrorOccured(); + MITK_DEBUG("mitk::PythonService") << "m_ItkWrappingAvailable: " << (m_ItkWrappingAvailable? "yes": "no"); + if( !m_ItkWrappingAvailable ) + { + MITK_WARN << "ITK Python wrapping not available. Please check build settings or PYTHONPATH settings."; + } + + { + MITK_DEBUG("mitk::PythonService") << "Trying to import OpenCv"; + PyRun_SimpleString("import cv2\n"); + if (PyErr_Occurred()) + { + PyErr_Print(); + } + else + m_OpenCVWrappingAvailable = true; + + //m_PythonManager.executeString( "import cv2", ctkAbstractPythonManager::SingleInput ); + MITK_DEBUG("mitk::PythonService") << "Investigate if an error occured while importing cv2"; + //m_OpenCVWrappingAvailable = !m_PythonManager.pythonErrorOccured(); + MITK_DEBUG("mitk::PythonService") << "m_OpenCVWrappingAvailable: " << (m_OpenCVWrappingAvailable? "yes": "no"); + if( !m_OpenCVWrappingAvailable ) + { + MITK_WARN << "OpenCV Python wrapping not available. Please check build settings or PYTHONPATH settings."; + } + } + + MITK_DEBUG("mitk::PythonService") << "Trying to import VTK"; + m_PythonManager.executeString( "import vtk", ctkAbstractPythonManager::SingleInput ); + m_VtkWrappingAvailable = !m_PythonManager.pythonErrorOccured(); + MITK_DEBUG("mitk::PythonService") << "m_VtkWrappingAvailable: " << (m_VtkWrappingAvailable? "yes": "no"); + if( !m_VtkWrappingAvailable ) + { + MITK_WARN << "VTK Python wrapping not available. Please check build settings or PYTHONPATH settings."; + } + */ + } + catch (...) + { + MITK_DEBUG("PythonService") << "exception initalizing python"; + } + + } + + //m_PythonManager.executeString( "for path in sys.path:\n print path\n", ctkAbstractPythonManager::SingleInput ); + //m_PythonManager.executeString( "for k, v in os.environ.items():\n print \"%s=%s\" % (k, v)", ctkAbstractPythonManager::SingleInput ); + //m_PythonManager.executeFile("/local/muellerm/Dropbox/13-02-11-python-wrapping/interpreterInfo.py"); + //std::string result = m_PythonManager.executeString( "5+5", ctkAbstractPythonManager::EvalInput ); + //MITK_DEBUG("mitk::PythonService") << "result of '5+5': " << result.toString().toStdString(); +} + +mitk::PythonService::~PythonService() +{ + //QVariant result = m_PythonManager.executeString( "sys.getrefcount(cv2)", ctkAbstractPythonManager::EvalInput ); + //MITK_DEBUG("mitk::PythonService") << "sys.getrefcount(cv2): " << result.toString().toStdString(); + + //m_PythonManager.executeString( "del sys.modules[\"cv2\"]", ctkAbstractPythonManager::SingleInput ); + //m_PythonManager.executeString( "del cv2", ctkAbstractPythonManager::SingleInput ); + MITK_DEBUG("mitk::PythonService") << "destructing PythonService"; +} + +std::string mitk::PythonService::Execute(const std::string &stdpythonCommand, int commandType) +{ + QString pythonCommand = QString::fromStdString(stdpythonCommand); + + { + MITK_DEBUG("mitk::PythonService") << "pythonCommand = " << pythonCommand.toStdString(); + MITK_DEBUG("mitk::PythonService") << "commandType = " << commandType; + } + + QVariant result; + bool commandIssued = true; + + if(commandType == IPythonService::SINGLE_LINE_COMMAND ) + result = m_PythonManager.executeString(pythonCommand, ctkAbstractPythonManager::SingleInput ); + else if(commandType == IPythonService::MULTI_LINE_COMMAND ) + result = m_PythonManager.executeString(pythonCommand, ctkAbstractPythonManager::FileInput ); + else if(commandType == IPythonService::EVAL_COMMAND ) + result = m_PythonManager.executeString(pythonCommand, ctkAbstractPythonManager::EvalInput ); + else + commandIssued = false; + + if(commandIssued) + { + this->NotifyObserver(pythonCommand.toStdString()); + m_ErrorOccured = PythonQt::self()->handleError(); + } + + return result.toString().toStdString(); +} + +void mitk::PythonService::ExecuteScript( const std::string& pythonScript ) +{ + m_PythonManager.executeFile(QString::fromStdString(pythonScript)); +} + +std::vector mitk::PythonService::GetVariableStack() const +{ + std::vector list; + + PyObject* dict = PyImport_GetModuleDict(); + PyObject* object = PyDict_GetItemString(dict, "__main__"); + PyObject* dirMain = PyObject_Dir(object); + PyObject* tempObject = 0; + PyObject* strTempObject = 0; + + if(dirMain) + { + std::string name, attrValue, attrType; + + for(int i = 0; iob_type->tp_name; + + strTempObject = PyObject_Repr(tempObject); + if(strTempObject && ( PyUnicode_Check(strTempObject) || PyString_Check(strTempObject) ) ) + attrValue = PyString_AsString(strTempObject); + else + attrValue = ""; + + mitk::PythonVariable var; + var.m_Name = name; + var.m_Value = attrValue; + var.m_Type = attrType; + list.push_back(var); + } + } + + return list; +} + +bool mitk::PythonService::DoesVariableExist(const std::string& name) const +{ + bool varExists = false; + + std::vector allVars = this->GetVariableStack(); + for(int i = 0; i< allVars.size(); i++) + { + if( allVars.at(i).m_Name == name ) + { + varExists = true; + break; + } + } + + return varExists; +} + +void mitk::PythonService::AddPythonCommandObserver(mitk::PythonCommandObserver *observer) +{ + if(!m_Observer.contains(observer)) + m_Observer.append(observer); +} + +void mitk::PythonService::RemovePythonCommandObserver(mitk::PythonCommandObserver *observer) +{ + m_Observer.removeOne(observer); +} + +void mitk::PythonService::NotifyObserver(const std::string &command) +{ + MITK_DEBUG("mitk::PythonService") << "number of observer " << m_Observer.size(); + for( size_t i=0; i< m_Observer.size(); ++i ) + { + m_Observer.at(i)->CommandExecuted(command); + } +} + +QString mitk::PythonService::GetTempDataFileName(const std::string& ext) const +{ + QString tmpFolder = QDir::tempPath(); + QString fileName = tmpFolder + QDir::separator() + m_TmpDataFileName + QString::fromStdString(ext); + return fileName; +} + +bool mitk::PythonService::CopyToPythonAsItkImage(mitk::Image *image, const std::string &stdvarName) +{ + QString varName = QString::fromStdString( stdvarName ); + // save image + QString fileName = this->GetTempDataFileName( mitk::IOUtil::DEFAULTIMAGEEXTENSION ); + fileName = QDir::fromNativeSeparators( fileName ); + + MITK_DEBUG("PythonService") << "Saving temporary file " << fileName.toStdString(); + if( !mitk::IOUtil::SaveImage(image, fileName.toStdString()) ) + { + MITK_ERROR << "Temporary file could not be created."; + } + else + { + // TODO CORRECT TYPE SETUP, MAKE MITK_DEBUG("PythonService") MITK_DEBUG("PythonService") + int dim = image->GetDimension(); + mitk::PixelType pixelType = image->GetPixelType(); + itk::ImageIOBase::IOPixelType ioPixelType = image->GetPixelType().GetPixelTypeId(); + + // default pixeltype: unsigned short + QString type = "US"; + if( ioPixelType == itk::ImageIOBase::SCALAR ) + { + if( pixelType.GetTypeId() == typeid(double) ) + type = "D"; + else if( pixelType.GetTypeId() == typeid(float) ) + type = "F"; + if( pixelType.GetTypeId() == typeid(long double) ) + type = "LD"; + else if( pixelType.GetTypeId() == typeid(short) ) + type = "SS"; + else if( pixelType.GetTypeId() == typeid(signed char) ) + type = "SC"; + else if( pixelType.GetTypeId() == typeid(signed int) ) + type = "SI"; + else if( pixelType.GetTypeId() == typeid(signed long) ) + type = "SL"; + else if( pixelType.GetTypeId() == typeid(signed short) ) + type = "SS"; + else if( pixelType.GetTypeId() == typeid(unsigned char) ) + type = "UC"; + else if( pixelType.GetTypeId() == typeid(unsigned int) ) + type = "UI"; + else if( pixelType.GetTypeId() == typeid(unsigned long) ) + type = "UL"; + else if( pixelType.GetTypeId() == typeid(unsigned short) ) + type = "US"; + } + + MITK_DEBUG("PythonService") << "Got mitk image with type " << type.toStdString() << " and dim " << dim; + + QString command; + + command.append( QString("imageType = itk.Image[itk.%1, %2]\n") .arg( type ).arg( dim ) ); + + command.append( QString("readerType = itk.ImageFileReader[imageType]\n") ); + command.append( QString("reader = readerType.New()\n") ); + command.append( QString("reader.SetFileName( \"%1\" )\n") .arg(fileName) ); + command.append( QString("reader.Update()\n") ); + command.append( QString("%1 = reader.GetOutput()\n").arg( varName ) ); + + MITK_DEBUG("PythonService") << "Issuing python command " << command.toStdString(); + this->Execute( command.toStdString(), IPythonService::MULTI_LINE_COMMAND ); + + QFile file( fileName ); + MITK_DEBUG("PythonService") << "Removing file " << fileName.toStdString(); + file.remove(); + return true; + } + + return false; +} + +mitk::Image::Pointer mitk::PythonService::CopyItkImageFromPython(const std::string &stdvarName) +{ + QString varName = QString::fromStdString( stdvarName ); + mitk::Image::Pointer mitkImage; + QString command; + QString fileName = GetTempDataFileName( mitk::IOUtil::DEFAULTIMAGEEXTENSION ); + fileName = QDir::fromNativeSeparators( fileName ); + + MITK_DEBUG("PythonService") << "Saving temporary file with python itk code " << fileName.toStdString(); + + command.append( QString( "writer = itk.ImageFileWriter[ %1 ].New()\n").arg( varName ) ); + command.append( QString( "writer.SetFileName( \"%1\" )\n").arg(fileName) ); + command.append( QString( "writer.SetInput( %1 )\n").arg(varName) ); + command.append( QString( "writer.Update()\n" ) ); + + MITK_DEBUG("PythonService") << "Issuing python command " << command.toStdString(); + this->Execute(command.toStdString(), IPythonService::MULTI_LINE_COMMAND ); + + try + { + MITK_DEBUG("PythonService") << "Loading temporary file " << fileName.toStdString() << " as MITK image"; + mitkImage = mitk::IOUtil::LoadImage( fileName.toStdString() ); + } + catch(std::exception& e) + { + MITK_ERROR << e.what(); + } + + QFile file(fileName); + if( file.exists() ) + { + MITK_DEBUG("PythonService") << "Removing temporary file " << fileName.toStdString(); + file.remove(); + } + + return mitkImage; +} + +bool mitk::PythonService::CopyToPythonAsCvImage( mitk::Image* image, const std::string& stdvarName ) +{ + QString varName = QString::fromStdString( stdvarName ); + + bool convert = false; + if(image->GetDimension() != 2) + { + MITK_ERROR << "Only 2D images allowed for OpenCV images"; + return convert; + } + + // try to save mitk image + QString fileName = this->GetTempDataFileName( ".bmp" ); + fileName = QDir::fromNativeSeparators( fileName ); + MITK_DEBUG("PythonService") << "Saving temporary file " << fileName.toStdString(); + if( !mitk::IOUtil::SaveImage(image, fileName.toStdString()) ) + { + MITK_ERROR << "Temporary file " << fileName.toStdString() << " could not be created."; + return convert; + } + + QString command; + + command.append( QString("%1 = cv2.imread(\"%2\")\n") .arg( varName ).arg( fileName ) ); + MITK_DEBUG("PythonService") << "Issuing python command " << command.toStdString(); + this->Execute(command.toStdString(), IPythonService::MULTI_LINE_COMMAND ); + + MITK_DEBUG("PythonService") << "Removing file " << fileName.toStdString(); + QFile file(fileName); + file.remove(); + convert = true; + return convert; +} + +mitk::Image::Pointer mitk::PythonService::CopyCvImageFromPython( const std::string& stdvarName ) +{ + QString varName = QString::fromStdString( stdvarName ); + + mitk::Image::Pointer mitkImage; + QString command; + QString fileName = GetTempDataFileName( ".bmp" ); + fileName = QDir::fromNativeSeparators( fileName ); + + MITK_DEBUG("PythonService") << "run python command to save image with opencv to " << fileName.toStdString(); + + command.append( QString( "cv2.imwrite(\"%1\", %2)\n").arg( fileName ).arg( varName ) ); + + MITK_DEBUG("PythonService") << "Issuing python command " << command.toStdString(); + this->Execute(command.toStdString(), IPythonService::MULTI_LINE_COMMAND ); + + try + { + MITK_DEBUG("PythonService") << "Loading temporary file " << fileName.toStdString() << " as MITK image"; + mitkImage = mitk::IOUtil::LoadImage( fileName.toStdString() ); + } + catch(std::exception& e) + { + MITK_ERROR << e.what(); + } + + QFile file(fileName); + if( file.exists() ) + { + MITK_DEBUG("PythonService") << "Removing temporary file " << fileName.toStdString(); + file.remove(); + } + + return mitkImage; +} + +ctkAbstractPythonManager *mitk::PythonService::GetPythonManager() +{ + return &m_PythonManager; +} + +mitk::Surface::Pointer mitk::PythonService::CopyVtkPolyDataFromPython( const std::string& stdvarName ) +{ + QString varName = QString::fromStdString( stdvarName ); + mitk::Surface::Pointer newSurface; + + QString command; + QString fileName = GetTempDataFileName( ".stl" ); + fileName = QDir::fromNativeSeparators( fileName ); + + MITK_DEBUG("PythonService") << "run python command to save polydata with vtk to " << fileName.toStdString(); + command = QString ( + "vtkStlWriter = vtk.vtkSTLWriter()\n" + "vtkStlWriter.SetInput(%1)\n" + "vtkStlWriter.SetFileName(\"%2\")\n" + "vtkStlWriter.Write()\n").arg(varName).arg(fileName); + + MITK_DEBUG("PythonService") << "Issuing python command " << command.toStdString(); + this->Execute(command.toStdString(), IPythonService::MULTI_LINE_COMMAND ); + + try + { + MITK_DEBUG("PythonService") << "Loading temporary file " << fileName.toStdString() << " as MITK Surface"; + newSurface = mitk::IOUtil::LoadSurface( fileName.toStdString() ); + } + catch(std::exception& e) + { + MITK_ERROR << e.what(); + } + + QFile file(fileName); + if( file.exists() ) + { + MITK_DEBUG("PythonService") << "Removing temporary file " << fileName.toStdString(); + file.remove(); + } + + return newSurface; +} + +bool mitk::PythonService::CopyToPythonAsVtkPolyData( mitk::Surface* surface, const std::string& stdvarName ) +{ + QString varName = QString::fromStdString( stdvarName ); + bool convert = false; + + // try to save mitk image + QString fileName = this->GetTempDataFileName( ".stl" ); + fileName = QDir::fromNativeSeparators( fileName ); + MITK_DEBUG("PythonService") << "Saving temporary file " << fileName.toStdString(); + if( !mitk::IOUtil::SaveSurface( surface, fileName.toStdString() ) ) + { + MITK_ERROR << "Temporary file " << fileName.toStdString() << " could not be created."; + return convert; + } + + QString command; + + command.append( QString("vtkStlReader = vtk.vtkSTLReader()\n") ); + command.append( QString("vtkStlReader.SetFileName(\"%1\")\n").arg( fileName ) ); + command.append( QString("vtkStlReader.Update()\n") ); + command.append( QString("%1 = vtkStlReader.GetOutput()\n").arg( varName ) ); + MITK_DEBUG("PythonService") << "Issuing python command " << command.toStdString(); + this->Execute(command.toStdString(), IPythonService::MULTI_LINE_COMMAND ); + + MITK_DEBUG("PythonService") << "Removing file " << fileName.toStdString(); + QFile file(fileName); + file.remove(); + convert = true; + return convert; +} + +bool mitk::PythonService::IsItkPythonWrappingAvailable() +{ + this->Execute( "import itk\n", IPythonService::SINGLE_LINE_COMMAND ); + + m_ItkWrappingAvailable = !this->PythonErrorOccured(); + + return m_ItkWrappingAvailable; +} + +bool mitk::PythonService::IsOpenCvPythonWrappingAvailable() +{ + this->Execute( "import cv2\n", IPythonService::SINGLE_LINE_COMMAND ); + m_OpenCVWrappingAvailable = !this->PythonErrorOccured(); + + return m_OpenCVWrappingAvailable; +} + +bool mitk::PythonService::IsVtkPythonWrappingAvailable() +{ + this->Execute( "import vtk", IPythonService::SINGLE_LINE_COMMAND ); + m_VtkWrappingAvailable = !this->PythonErrorOccured(); + + return m_VtkWrappingAvailable; +} + +bool mitk::PythonService::PythonErrorOccured() const +{ + return m_ErrorOccured; +} + diff --git a/Modules/Python/mitkPythonService.h b/Modules/Python/mitkPythonService.h new file mode 100644 index 0000000000..9218a19024 --- /dev/null +++ b/Modules/Python/mitkPythonService.h @@ -0,0 +1,105 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ +#ifndef mitkPythonService_h +#define mitkPythonService_h + +#include "mitkIPythonService.h" +#include +#include +#include "mitkSurface.h" +#include "mitkPythonExports.h" + +namespace mitk +{ + /// + /// implementation of the IPythonService using ctkabstractpythonmanager + /// \see IPythonService + class MITK_PYTHON_EXPORT PythonService: public itk::LightObject, public mitk::IPythonService + { + public: + /// + /// instantiate python manager here + PythonService(); + /// + /// empty implementation... + ~PythonService(); + /// + /// \see IPythonService::Execute() + std::string Execute( const std::string& pythonCommand, int commandType = SINGLE_LINE_COMMAND ); + /// + /// \see IPythonService::ExecuteScript() + void ExecuteScript(const std::string &pathToPythonScript); + /// + /// \see IPythonService::PythonErrorOccured() + bool PythonErrorOccured() const; + /// + /// \see IPythonService::GetVariableStack() + std::vector GetVariableStack() const; + /// + /// \see IPythonService::DoesVariableExist() + bool DoesVariableExist(const std::string& name) const; + /// + /// \see IPythonService::AddPythonCommandObserver() + void AddPythonCommandObserver( PythonCommandObserver* observer ); + /// + /// \see IPythonService::RemovePythonCommandObserver() + void RemovePythonCommandObserver( PythonCommandObserver* observer ); + /// + /// \see IPythonService::NotifyObserver() + void NotifyObserver( const std::string& command ); + /// + /// \see IPythonService::IsItkPythonWrappingAvailable() + bool IsItkPythonWrappingAvailable(); + /// + /// \see IPythonService::CopyToPythonAsItkImage() + bool CopyToPythonAsItkImage( mitk::Image* image, const std::string& varName ); + /// + /// \see IPythonService::CopyItkImageFromPython() + mitk::Image::Pointer CopyItkImageFromPython( const std::string& varName ); + /// + /// \see IPythonService::IsOpenCvPythonWrappingAvailable() + bool IsOpenCvPythonWrappingAvailable(); + /// + /// \see IPythonService::CopyToPythonAsCvImage() + bool CopyToPythonAsCvImage( mitk::Image* image, const std::string& varName ); + /// + /// \see IPythonService::CopyCvImageFromPython() + mitk::Image::Pointer CopyCvImageFromPython( const std::string& varName ); + /// + /// \see IPythonService::IsVtkPythonWrappingAvailable() + bool IsVtkPythonWrappingAvailable(); + /// + /// \see IPythonService::CopyToPythonAsVtkPolyData() + bool CopyToPythonAsVtkPolyData( mitk::Surface* surface, const std::string& varName ); + /// + /// \see IPythonService::CopyVtkPolyDataFromPython() + mitk::Surface::Pointer CopyVtkPolyDataFromPython( const std::string& varName ); + /// + /// \return the ctk abstract python manager instance + ctkAbstractPythonManager* GetPythonManager(); + protected: + QString GetTempDataFileName(const std::string &ext) const; + private: + QList m_Observer; + ctkAbstractPythonManager m_PythonManager; + static const QString m_TmpDataFileName; + bool m_ItkWrappingAvailable; + bool m_OpenCVWrappingAvailable; + bool m_VtkWrappingAvailable; + bool m_ErrorOccured; + }; +} +#endif diff --git a/Modules/Python/resources/PythonSnippets.xml b/Modules/Python/resources/PythonSnippets.xml new file mode 100644 index 0000000000..a301307dd3 --- /dev/null +++ b/Modules/Python/resources/PythonSnippets.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Modules/Python/resources/document-new.png b/Modules/Python/resources/document-new.png new file mode 100644 index 0000000000..e6d64bb90b Binary files /dev/null and b/Modules/Python/resources/document-new.png differ diff --git a/Modules/Python/resources/document-open.png b/Modules/Python/resources/document-open.png new file mode 100644 index 0000000000..f35f258354 Binary files /dev/null and b/Modules/Python/resources/document-open.png differ diff --git a/Modules/Python/resources/document-save.png b/Modules/Python/resources/document-save.png new file mode 100644 index 0000000000..db5c52b769 Binary files /dev/null and b/Modules/Python/resources/document-save.png differ diff --git a/Modules/Python/resources/edit-clear.png b/Modules/Python/resources/edit-clear.png new file mode 100644 index 0000000000..5542948bca Binary files /dev/null and b/Modules/Python/resources/edit-clear.png differ diff --git a/Modules/Python/resources/edit-delete.png b/Modules/Python/resources/edit-delete.png new file mode 100644 index 0000000000..9becb3e2f3 Binary files /dev/null and b/Modules/Python/resources/edit-delete.png differ diff --git a/Modules/Python/resources/edit-find-replace.png b/Modules/Python/resources/edit-find-replace.png new file mode 100644 index 0000000000..0f1b117ff7 Binary files /dev/null and b/Modules/Python/resources/edit-find-replace.png differ diff --git a/Modules/Python/resources/edit-paste.png b/Modules/Python/resources/edit-paste.png new file mode 100644 index 0000000000..dd429ced62 Binary files /dev/null and b/Modules/Python/resources/edit-paste.png differ diff --git a/Modules/Python/resources/media-playback-start.png b/Modules/Python/resources/media-playback-start.png new file mode 100644 index 0000000000..66f32d89b5 Binary files /dev/null and b/Modules/Python/resources/media-playback-start.png differ diff --git a/Modules/Python/resources/mitkPython.qrc b/Modules/Python/resources/mitkPython.qrc new file mode 100644 index 0000000000..55d4c94e13 --- /dev/null +++ b/Modules/Python/resources/mitkPython.qrc @@ -0,0 +1,13 @@ + + + document-new.png + document-open.png + document-save.png + edit-delete.png + edit-paste.png + edit-find-replace.png + edit-clear.png + media-playback-start.png + PythonSnippets.xml + + diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 2aaa7a7689..4e4182cfbb 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,46 +1,46 @@ # Plug-ins must be ordered according to their dependencies set(MITK_EXT_PLUGINS org.mitk.core.services:ON org.mitk.gui.common:ON org.mitk.planarfigure:ON org.mitk.core.ext:OFF org.mitk.core.jobs:OFF org.mitk.diffusionimaging:OFF org.mitk.gui.qt.application:ON org.mitk.gui.qt.coreapplication:OFF org.mitk.gui.qt.ext:OFF org.mitk.gui.qt.extapplication:OFF org.mitk.gui.qt.common:ON org.mitk.gui.qt.stdmultiwidgeteditor:ON org.mitk.gui.qt.common.legacy:OFF org.mitk.gui.qt.cmdlinemodules:OFF org.mitk.gui.qt.diffusionimagingapp:OFF org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.datamanagerlight:OFF org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.dicom:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.dtiatlasapp:OFF org.mitk.gui.qt.examples:OFF org.mitk.gui.qt.examplesopencv:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.measurementtoolbox:OFF org.mitk.gui.qt.meshdecimation:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.pointsetinteraction:OFF - org.mitk.gui.qt.python.console:OFF + org.mitk.gui.qt.python:OFF org.mitk.gui.qt.registration:OFF org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.simulation:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.ultrasound:OFF org.mitk.gui.qt.volumevisualization:OFF ) diff --git a/Plugins/org.mitk.gui.qt.dicom/resources/dicom.qrc b/Plugins/org.mitk.gui.qt.dicom/resources/dicom.qrc deleted file mode 100644 index 0cdc545472..0000000000 --- a/Plugins/org.mitk.gui.qt.dicom/resources/dicom.qrc +++ /dev/null @@ -1,11 +0,0 @@ - - - drive-harddisk_32.png - folder_32.png - media-optical_32.png - network-workgroup_32.png - network-idle_16.png - network-offline_16.png - network-error_16.png - - diff --git a/Plugins/org.mitk.gui.qt.python.console/CMakeLists.txt b/Plugins/org.mitk.gui.qt.python.console/CMakeLists.txt deleted file mode 100644 index 59aab2aaa5..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/CMakeLists.txt +++ /dev/null @@ -1,20 +0,0 @@ -# The project name must correspond to the directory name of your plug-in -# and must not contain periods. -if(MITK_USE_Python) - project(org_mitk_gui_qt_python_console) - - set(SWIG_PYTHON_WRAPPER _mitkCorePython SwigRuntimePython) - - MACRO_CREATE_MITK_CTK_PLUGIN( - EXPORT_DIRECTIVE CONSOLE_EXPORT - EXPORTED_INCLUDE_SUFFIXES src - MODULE_DEPENDENCIES QmitkExt CTK - ) - - include_directories("${MITK_WRAPPING_SOURCE_DIR}/CSwig" "${MITK_WRAPPING_BINARY_DIR}/CSwig/Core") - - target_link_libraries(org_mitk_gui_qt_python_console ${SWIG_PYTHON_WRAPPER}) - -else() - message("MITK Python Console needs Python. Enable MITK_USE_PYTHON") -endif() \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.python.console/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.python.console/documentation/doxygen/modules.dox deleted file mode 100644 index d846545dc4..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/documentation/doxygen/modules.dox +++ /dev/null @@ -1,16 +0,0 @@ -/** - \defgroup org_mitk_gui_qt_python_console org.mitk.gui.qt.python.console - \ingroup MITKPlugins - - \brief Describe your plugin here. - -*/ - -/** - \defgroup org_mitk_gui_qt_python_console_internal Internal - \ingroup org_mitk_gui_qt_python_console - - \brief This subcategory includes the internal classes of the org.mitk.gui.qt.python.console plugin. Other - plugins must not rely on these classes. They contain implementation details and their interface - may change at any time. We mean it. -*/ diff --git a/Plugins/org.mitk.gui.qt.python.console/files.cmake b/Plugins/org.mitk.gui.qt.python.console/files.cmake deleted file mode 100644 index 281f9b4b20..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/files.cmake +++ /dev/null @@ -1,61 +0,0 @@ -set(SRC_CPP_FILES - -) - -set(INTERNAL_CPP_FILES - mitkPluginActivator.cpp - QmitkPythonConsoleView.cpp - QmitkPythonEditor.cpp - QmitkPythonScriptEditor.cpp - QmitkPythonVariableStack.cpp - QmitkPythonCommandHistory.cpp - QmitkPythonScriptEditorHighlighter.cpp - QmitkPythonCommandHistoryTreeWidget.cpp - QmitkPythonVariableStackTreeWidget.cpp - QmitkPythonTextEditor.cpp - QmitkCTKPythonShell.cpp - QmitkPythonMediator.cpp - QmitkPythonPerspective.cpp - QmitkPythonSnippets.cpp -) - -set(UI_FILES - src/internal/QmitkPythonConsoleViewControls.ui - src/internal/QmitkPythonEditor.ui - src/internal/QmitkPythonVariableStack.ui - src/internal/QmitkPythonSnippets.ui -) - -set(MOC_H_FILES - src/internal/mitkPluginActivator.h - src/internal/QmitkPythonCommandHistory.h - src/internal/QmitkPythonCommandHistoryTreeWidget.h - src/internal/QmitkPythonConsoleView.h - src/internal/QmitkPythonEditor.h - src/internal/QmitkPythonPerspective.h - src/internal/QmitkPythonScriptEditor.h - src/internal/QmitkPythonScriptEditorHighlighter.h - src/internal/QmitkPythonTextEditor.h - src/internal/QmitkPythonVariableStack.h - src/internal/QmitkPythonSnippets.h - src/internal/QmitkPythonVariableStackTreeWidget.h - src/internal/QmitkCTKPythonShell.h -) - -set(CACHED_RESOURCE_FILES - resources/py.png - plugin.xml -) - -set(QRC_FILES - resources/QmitkPythonConsoleView.qrc -) - -foreach(file ${SRC_CPP_FILES}) - set(CPP_FILES ${CPP_FILES} src/${file}) -endforeach(file ${SRC_CPP_FILES}) - -foreach(file ${INTERNAL_CPP_FILES}) - set(CPP_FILES ${CPP_FILES} src/internal/${file}) -endforeach(file ${INTERNAL_CPP_FILES}) - diff --git a/Plugins/org.mitk.gui.qt.python.console/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.python.console/manifest_headers.cmake deleted file mode 100644 index b03312206e..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/manifest_headers.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(Plugin-Name "MITK Python Console") -set(Plugin-Version "0.9") -set(Plugin-Vendor "DKFZ, Medical and Biological Informatics") -set(Plugin-ContactAddress "http://www.mitk.org") -set(Require-Plugin org.mitk.gui.qt.common.legacy) \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.python.console/mitkPythonPath.h.in b/Plugins/org.mitk.gui.qt.python.console/mitkPythonPath.h.in deleted file mode 100644 index 32f0dc836c..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/mitkPythonPath.h.in +++ /dev/null @@ -1,9 +0,0 @@ -#define MITK_PYTHONPATH_MITK_LIBRARY_DIRS "@CMAKE_RUNTIME_OUTPUT_DIRECTORY@" - -#define MITK_PYTHONPATH_ITK_LIBRARY_DIRS "@ITK_LIBRARY_DIRS@" -#define MITK_PYTHONPATH_WRAP_ITK_DIR "@ITK_LIBRARY_DIRS@" - -#define MITK_PYTHONPATH_VTK_LIBRARY_DIRS "@VTK_LIBRARY_DIRS@" -#define MITK_PYTHONPATH_VTK_PYTHON_WRAPPING_DIR "@VTK_DIR@/Wrapping/Python" - -#define MITK_PYTHONPATH_OPEN_CV_LIBRARY_DIRS "@OpenCV_DIR@/lib" diff --git a/Plugins/org.mitk.gui.qt.python.console/plugin.xml b/Plugins/org.mitk.gui.qt.python.console/plugin.xml deleted file mode 100644 index 4a611a1ba6..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/plugin.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Plugins/org.mitk.gui.qt.python.console/resources/QmitkPythonConsoleView.qrc b/Plugins/org.mitk.gui.qt.python.console/resources/QmitkPythonConsoleView.qrc deleted file mode 100644 index 2d23172ff1..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/resources/QmitkPythonConsoleView.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - py.png - - diff --git a/Plugins/org.mitk.gui.qt.python.console/resources/icon.xpm b/Plugins/org.mitk.gui.qt.python.console/resources/icon.xpm deleted file mode 100644 index 9057c20bc6..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/resources/icon.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static const char * icon_xpm[] = { -"16 16 2 1", -" c #FF0000", -". c #000000", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkCTKPythonShell.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkCTKPythonShell.cpp deleted file mode 100644 index cd4c6b80c8..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkCTKPythonShell.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkCTKPythonShell.h" - -#include "mitkNodePredicateDataType.h" - -#include "QmitkDataStorageComboBox.h" -#include "QmitkStdMultiWidget.h" - -#include "mitkDataStorageEditorInput.h" - -// berry Includes -#include -#include -#include - -#include -#include -#include -#include - -#include - - -QmitkCTKPythonShell::QmitkCTKPythonShell(ctkAbstractPythonManager* pythonManager, QWidget* _parent) -{ - this->initialize( pythonManager ); - m_PythonManager = pythonManager; - - QmitkPythonMediator::getInstance()->registerPasteCommandClient( this ); -} - -QmitkCTKPythonShell::~QmitkCTKPythonShell() -{ - QmitkPythonMediator::getInstance()->unregisterPasteCommandClient( this ); -} - -void QmitkCTKPythonShell::dragEnterEvent(QDragEnterEvent *event) -{ - event->accept(); -} -void QmitkCTKPythonShell::paste(const QString& command) -{ - m_PythonManager->executeString( command ); -} - -void QmitkCTKPythonShell::dropEvent(QDropEvent *event) -{ - QList urls = event->mimeData()->urls(); - for(int i = 0; i < urls.size(); i++) - { - m_PythonManager->executeString(urls[i].toString()); - } -} - -bool QmitkCTKPythonShell::canInsertFromMimeData( const QMimeData *source ) const -{ - return true; -} - -void QmitkCTKPythonShell::executeCommand(const QString& command) -{ - emit this->executeCommandSignal(command); - ctkPythonConsole::executeCommand(command); - QmitkPythonMediator::getInstance()->update(); -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkCTKPythonShell.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkCTKPythonShell.h deleted file mode 100644 index 88a4b12216..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkCTKPythonShell.h +++ /dev/null @@ -1,64 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef _QMITKCTKPYTHONSHELL_H -#define _QMITKCTKPYTHONSHELL_H - -#include -#include -#include "QmitkPythonMediator.h" - -#include -#include -#include - - -/*! - * \ingroup org_mitk_gui_qt_imagenavigator_internal - * - * \brief QmitkPythonVariableStack - * - * Document your class here. - * - * \sa QmitkFunctionality - */ -class QmitkCTKPythonShell : public ctkPythonConsole, public QmitkPythonPasteClient -{ - Q_OBJECT -public: - QmitkCTKPythonShell(ctkAbstractPythonManager* pythonManager, QWidget* _parent = 0); - ~QmitkCTKPythonShell(); - - virtual void paste(const QString& command); - - -protected: - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); - virtual bool canInsertFromMimeData( const QMimeData *source ) const; - virtual void executeCommand(const QString& command); - -signals: - void executeCommandSignal(const QString&); -private: - ctkAbstractPythonManager* m_PythonManager; -}; - - - - -#endif // _QmitkPythonVariableStack_H_INCLUDED - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistory.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistory.cpp deleted file mode 100644 index c2990e7c94..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistory.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -// Blueberry -#include -#include -#include - -// Qmitk -#include "QmitkPythonCommandHistory.h" -#include "QmitkPythonConsoleView.h" -#include "QmitkStdMultiWidget.h" - -// Qt -#include - - - -#include "mitkCoreObjectFactory.h" -#include -#include -#include -#include -#include - -#include "berryFileEditorInput.h" -#include - -const std::string QmitkPythonCommandHistory::VIEW_ID = "org.mitk.views.pythoncommandhistory"; - -QmitkPythonCommandHistory::QmitkPythonCommandHistory() -: QmitkFunctionality() -//, m_Controls( 0 ) -, m_MultiWidget( NULL ) -{ -} - -QmitkPythonCommandHistory::~QmitkPythonCommandHistory() -{ - QmitkPythonMediator::getInstance()->unregisterClient(this); -} - - -void QmitkPythonCommandHistory::CreateQtPartControl( QWidget *parent ) -{ - QGridLayout *gridLayout; - - - if (parent->objectName().isEmpty()) - parent->setObjectName(QString::fromUtf8("parent")); - parent->resize(790, 773); - parent->setMinimumSize(QSize(0, 0)); - gridLayout = new QGridLayout(parent); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - m_treeWidget = new QmitkPythonCommandHistoryTreeWidget(parent); - QTreeWidgetItem *treeWidgetItem = new QTreeWidgetItem(); - treeWidgetItem->setText(0, QString::fromUtf8("Command")); - treeWidgetItem->setFlags(Qt::ItemIsEditable); - m_treeWidget->setHeaderItem(treeWidgetItem); - m_treeWidget->setObjectName(QString::fromUtf8("treeWidget")); - m_treeWidget->setColumnCount(1); - m_treeWidget->setDragEnabled(true); - m_treeWidget->setDragDropMode(QAbstractItemView::DragOnly); - m_treeWidget->setAcceptDrops(false); - m_treeWidget->setSelectionMode(QAbstractItemView::ExtendedSelection); - - gridLayout->addWidget(m_treeWidget, 0, 0, 1, 1); - parent->setWindowTitle(QApplication::translate("QmitkPythonConsoleViewControls", "QmitkTemplate", 0, QApplication::UnicodeUTF8)); - - QMetaObject::connectSlotsByName(parent); - QmitkPythonMediator::getInstance()->setClient(this); -} - - -void QmitkPythonCommandHistory::StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget) -{ - m_MultiWidget = &stdMultiWidget; -} - - -void QmitkPythonCommandHistory::StdMultiWidgetNotAvailable() -{ - m_MultiWidget = NULL; -} - -void QmitkPythonCommandHistory::AddCommand(const QString& command) -{ - m_commandHistory.push_back(QStringList() << command); - m_treeWidget->clear(); - for(int i = 0; i < m_commandHistory.size(); i++) - { - if( m_commandHistory[i].value(0).compare("") != 0 ) - m_treeWidget->addTopLevelItem(new QTreeWidgetItem(m_commandHistory[i])); - } -} - -void QmitkPythonCommandHistory::SetCommandHistory(std::vector history) -{ - m_commandHistory = history; - m_treeWidget->clear(); - for(int i = 0; i < m_commandHistory.size(); i++) - { - if( m_commandHistory[i].value(0).compare("") != 0 ) - m_treeWidget->addTopLevelItem(new QTreeWidgetItem(m_commandHistory[i])); - } -} - -void QmitkPythonCommandHistory::update() -{ - SetCommandHistory(QmitkPythonMediator::getInstance()->GetCommandHistory()); -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistory.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistory.h deleted file mode 100644 index f8c1d7e146..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistory.h +++ /dev/null @@ -1,79 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QmitkPythonCommandHistory_h -#define QmitkPythonCommandHistory_h - -#include - -#include - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "QmitkPythonCommandHistoryTreeWidget.h" -#include "QmitkPythonMediator.h" - - -class QmitkPythonCommandHistory : public QmitkFunctionality, public QmitkPythonClient -{ - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) - Q_OBJECT - - public: - static const std::string VIEW_ID; - - QmitkPythonCommandHistory(); - QmitkPythonCommandHistory(const QmitkPythonCommandHistory& other) - { - Q_UNUSED(other) - throw std::runtime_error("Copy constructor not implemented"); - } - virtual ~QmitkPythonCommandHistory(); - - virtual void CreateQtPartControl(QWidget *parent); - - virtual void StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget); - virtual void StdMultiWidgetNotAvailable(); - void SetCommandHistory(std::vector); - virtual void update(); - - public slots: - void AddCommand(const QString&); - - protected slots: - - - private: - QmitkStdMultiWidget* m_MultiWidget; - std::vector m_commandHistory; - QmitkPythonCommandHistoryTreeWidget *m_treeWidget; - QmitkPythonMediator *m_PythonMediator; -}; - -#endif // _QMITKPYTHONCONSOLEVIEW_H_INCLUDED - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistoryTreeWidget.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistoryTreeWidget.cpp deleted file mode 100755 index 62605360d3..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistoryTreeWidget.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonCommandHistoryTreeWidget.h" - -#include -#include -#include -#include -#include - - -QmitkPythonCommandHistoryTreeWidget::QmitkPythonCommandHistoryTreeWidget(QWidget *parent) -:QTreeWidget(parent) -{ -} - -QmitkPythonCommandHistoryTreeWidget::~QmitkPythonCommandHistoryTreeWidget() -{ -} - -void QmitkPythonCommandHistoryTreeWidget::mouseMoveEvent(QMouseEvent *event) -{ - // if not left button - return - if (!(event->buttons() & Qt::LeftButton)) return; - - // if no item selected, return (else it would crash) - if (selectedItems().isEmpty()) return; - - QDrag *drag = new QDrag(this); - QMimeData *mimeData = new QMimeData; - - //QList list; - QList listItems = selectedItems(); - - for(int i = 0; i < listItems.size(); i++) - { - //list.append(QUrl(listItems[i]->text(0))); - mimeData->setText(listItems[i]->text(0)); - } - //mimeData->setUrls(list); - drag->setMimeData(mimeData); - - // start drag - drag->start(Qt::CopyAction | Qt::MoveAction); -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistoryTreeWidget.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistoryTreeWidget.h deleted file mode 100755 index 4fb45b2c93..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonCommandHistoryTreeWidget.h +++ /dev/null @@ -1,42 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QMITKPYTHONCOMMANDHISTORYTREEWIDGET_H_ -#define QMITKPYTHONCOMMANDHISTORYTREEWIDGET_H_ - -#include - -class QmitkPythonCommandHistoryTreeWidget : public QTreeWidget -{ - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) - Q_OBJECT - -public: - QmitkPythonCommandHistoryTreeWidget(QWidget *parent = 0); - virtual ~QmitkPythonCommandHistoryTreeWidget(); - -signals: - -protected slots: - -protected: - virtual void mouseMoveEvent(QMouseEvent *event); - -private: -}; - -#endif diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleView.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleView.cpp deleted file mode 100644 index 44033d205b..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleView.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -// Blueberry -#include -#include -#include - -// Qmitk -#include "QmitkPythonConsoleView.h" -#include "QmitkStdMultiWidget.h" - -// Qt -#include -#include - -#include "mitkCoreObjectFactory.h" -#include -#include -#include -#include -#include -#include -//#include - -#include "berryFileEditorInput.h" -#include - -#include "QmitkPythonVariableStack.h" -#include "QmitkPythonCommandHistory.h" -#include "mitkPythonPath.h" - - -const std::string QmitkPythonConsoleView::VIEW_ID = "org.mitk.views.pythonconsole"; - -QmitkPythonConsoleView::QmitkPythonConsoleView() -: QmitkFunctionality() -//, m_Controls( 0 ) -, m_MultiWidget( NULL ) -,m_ctkPythonManager( NULL ) -,m_ctkPythonShell( NULL ) -{ - // TODO: take it to the activator -// std::cout << "running PYTHON PATH COMMANDS" << std::endl; - - QmitkPythonMediator::getInstance()->runSimpleString("import sys"); - - std::string cmd ( "sys.path.append('" MITK_PYTHONPATH_MITK_LIBRARY_DIRS "');" ); - QmitkPythonMediator::getInstance()->runSimpleString(cmd.c_str()); - - cmd = "sys.path.append('" MITK_PYTHONPATH_ITK_LIBRARY_DIRS "');"; - QmitkPythonMediator::getInstance()->runSimpleString(cmd.c_str()); - - cmd = "sys.path.append('" MITK_PYTHONPATH_WRAP_ITK_DIR "');"; - QmitkPythonMediator::getInstance()->runSimpleString(cmd.c_str()); - - cmd = "sys.path.append('" MITK_PYTHONPATH_VTK_LIBRARY_DIRS "');"; - QmitkPythonMediator::getInstance()->runSimpleString(cmd.c_str()); - - cmd = "sys.path.append('" MITK_PYTHONPATH_VTK_PYTHON_WRAPPING_DIR "');"; - QmitkPythonMediator::getInstance()->runSimpleString(cmd.c_str()); - - if( strcmp("", MITK_PYTHONPATH_OPEN_CV_LIBRARY_DIRS) != 0 ) - { -// std::cout << "setting opencv PYTHON PATH" << std::endl; - cmd = "sys.path.append('" MITK_PYTHONPATH_OPEN_CV_LIBRARY_DIRS "');"; - QmitkPythonMediator::getInstance()->runSimpleString(cmd.c_str()); - } -} - -QmitkPythonConsoleView::~QmitkPythonConsoleView() -{ - QmitkPythonMediator::getInstance()->unregisterClient(this); -} - - -void QmitkPythonConsoleView::CreateQtPartControl( QWidget *parent ) -{ - QGridLayout *gridLayout; - if (parent->objectName().isEmpty()) - parent->setObjectName(QString::fromUtf8("parent")); - parent->resize(790, 774); - parent->setMinimumSize(QSize(0, 0)); - gridLayout = new QGridLayout(parent); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - m_ctkPythonManager = new ctkAbstractPythonManager(parent); - m_ctkPythonShell = new QmitkCTKPythonShell(m_ctkPythonManager, parent); - m_ctkPythonShell->setObjectName(QString::fromUtf8("m_ctkPythonShell")); - m_ctkPythonShell->setMinimumSize(QSize(120, 100)); - m_ctkPythonShell->setMaximumSize(QSize(2000, 2000)); - gridLayout->addWidget(m_ctkPythonShell, 0, 0, 1, 1); - m_ButtonOpenEditor = new QPushButton(parent); - m_ButtonOpenEditor->setObjectName(QString::fromUtf8("m_ButtonOpenEditor")); - gridLayout->addWidget(m_ButtonOpenEditor, 1, 0, 1, 1); - parent->setWindowTitle(QApplication::translate("parent", "QmitkTemplate", 0, QApplication::UnicodeUTF8)); - m_ButtonOpenEditor->setText(QApplication::translate("parent", "Open Editor", 0, QApplication::UnicodeUTF8)); - QMetaObject::connectSlotsByName(parent); - mitk::DataStorage::Pointer dataStorage = this->GetDefaultDataStorage(); - - m_ctkPythonManager->executeString("import mitk"); - QmitkPythonMediator::getInstance()->setClient(this); - QmitkPythonMediator::getInstance()->update(); - - connect( m_ctkPythonShell, SIGNAL(executeCommandSignal(const QString&)), - this, SLOT(SetCommandHistory(const QString&))); - connect( m_ButtonOpenEditor, SIGNAL(clicked()), this, SLOT(OpenEditor()) ); -} - - -void QmitkPythonConsoleView::StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget) -{ - m_MultiWidget = &stdMultiWidget; -} - - -void QmitkPythonConsoleView::StdMultiWidgetNotAvailable() -{ - m_MultiWidget = NULL; -} - - -void QmitkPythonConsoleView::OnSelectionChanged( std::vector nodes ) -{ - for( std::vector::iterator it = nodes.begin(); - it != nodes.end(); - ++it ) - { - mitk::DataNode::Pointer node = *it; - - if( node.IsNotNull() && dynamic_cast(node->GetData()) ) - { - return; - } - } -} - -void QmitkPythonConsoleView::NodeAdded(const mitk::DataNode* node) -{ -} - -void QmitkPythonConsoleView::OpenEditor() -{ - berry::FileEditorInput::Pointer editorInput; - editorInput = new berry::FileEditorInput(""); - m_PythonEditor = this->GetSite()->GetPage()->OpenEditor(editorInput, QmitkPythonEditor::EDITOR_ID, true, berry::IWorkbenchPage::MATCH_NONE).Cast(); - -} - -void QmitkPythonConsoleView::SetCommandHistory(const QString& command) -{ - QmitkPythonMediator::getInstance()->SetCommandHistory(command); -// QmitkPythonMediator::getInstance()->update(); - mitk::RenderingManager::GetInstance()->RequestUpdateAll(); -} - -void QmitkPythonConsoleView::update() -{ - //QmitkPythonMediator::runSimpleString("\r\n"); -} - -QmitkPythonMediator *QmitkPythonConsoleView::getPythonMediator() -{ - return m_PythonMediator; -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleView.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleView.h deleted file mode 100644 index 59b337c4cb..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleView.h +++ /dev/null @@ -1,97 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QmitkPythonConsoleView_h -#define QmitkPythonConsoleView_h - -#include - -#include -#include "QmitkPythonEditor.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -//#include "ctkPythonShell.h" -#include "QmitkCTKPythonShell.h" -#include "ctkAbstractPythonManager.h" -#include "QmitkPythonMediator.h" - - - -/*! - \brief QmitkPythonConsoleView - - \warning This application module is not yet documented. Use "svn blame/praise/annotate" and ask the author to provide basic documentation. - - \sa QmitkFunctionality - \ingroup Functionalities -*/ - - -class QmitkPythonConsoleView : public QmitkFunctionality, public QmitkPythonClient -{ - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) - Q_OBJECT - - public: - static const std::string VIEW_ID; - - QmitkPythonConsoleView(); - QmitkPythonConsoleView(const QmitkPythonConsoleView& other) - { - Q_UNUSED(other) - throw std::runtime_error("Copy constructor not implemented"); - } - virtual ~QmitkPythonConsoleView(); - - virtual void CreateQtPartControl(QWidget *parent); - - virtual void StdMultiWidgetAvailable (QmitkStdMultiWidget &stdMultiWidget); - virtual void StdMultiWidgetNotAvailable(); - virtual void NodeAdded(const mitk::DataNode* node); - virtual void update(); - QmitkPythonMediator *getPythonMediator(); - - protected slots: - void OpenEditor(); - void SetCommandHistory(const QString&); - - protected: - virtual void OnSelectionChanged( std::vector nodes ); - QmitkStdMultiWidget* m_MultiWidget; - - berry::SmartPointer m_PythonEditor; - private: - FILE * m_scriptFile; - QmitkCTKPythonShell *m_ctkPythonShell; - ctkAbstractPythonManager *m_ctkPythonManager; - QPushButton *m_ButtonOpenEditor; - QmitkPythonMediator *m_PythonMediator; -}; - -#endif // _QMITKPYTHONCONSOLEVIEW_H_INCLUDED - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleViewControls.ui b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleViewControls.ui deleted file mode 100644 index 0bf83d1d3d..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonConsoleViewControls.ui +++ /dev/null @@ -1,58 +0,0 @@ - - - QmitkPythonConsoleViewControls - - - - 0 - 0 - 790 - 774 - - - - - 0 - 0 - - - - QmitkTemplate - - - - - - - 120 - 100 - - - - - 1000 - 1000 - - - - - - - - Open Editor - - - - - - - - ctkPythonShell - QWidget -
ctkPythonShell.h
- 1 -
-
- - -
diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.cpp deleted file mode 100644 index 29f1126980..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonEditor.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include "berryFileEditorInput.h" - -const std::string QmitkPythonEditor::EDITOR_ID = "org.mitk.editors.pythoneditor"; - -QmitkPythonEditor::QmitkPythonEditor() -{ - -} - -QmitkPythonEditor::~QmitkPythonEditor() -{ -} - -void QmitkPythonEditor::CreateQtPartControl(QWidget* parent) -{ - m_PythonScriptEditor = new QmitkPythonScriptEditor(parent); - - if (parent->objectName().isEmpty()) - parent->setObjectName(QString::fromUtf8("parent")); - parent->resize(790, 773); - parent->setMinimumSize(QSize(0, 0)); - QGridLayout *gridLayout = new QGridLayout(parent); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - gridLayout->addWidget(m_PythonScriptEditor, 0, 0, 1, 3); - - QMetaObject::connectSlotsByName(parent); -} - -void QmitkPythonEditor::Init(berry::IEditorSite::Pointer site, berry::IEditorInput::Pointer input) -{ - if (input.Cast().IsNull()) - throw berry::PartInitException("Invalid Input: Must be FileEditorInput"); - - this->SetSite(site); - this->SetInput(input); -} - -void QmitkPythonEditor::SetFocus() -{ -} - -berry::IPartListener::Events::Types QmitkPythonEditor::GetPartEventTypes() const -{ - return Events::CLOSED | Events::HIDDEN | Events::VISIBLE; -} - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.h deleted file mode 100644 index da49644f58..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.h +++ /dev/null @@ -1,69 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QMITKPYTHONEDITOR_H_ -#define QMITKPYTHONEDITOR_H_ - -#include -#include - -#include - -#include "mitkQtCommonDll.h" - -#include -#include -#include -#include "QmitkPythonScriptEditor.h" - -class QmitkPythonEditor : public berry::QtEditorPart, virtual public berry::IPartListener -{ - - Q_OBJECT - -public: - berryObjectMacro(QmitkPythonEditor); - - static const std::string EDITOR_ID; - - QmitkPythonEditor(); - QmitkPythonEditor(const QmitkPythonEditor& other) - { - Q_UNUSED(other) - throw std::runtime_error("Copy constructor not implemented"); - } - ~QmitkPythonEditor(); - - void Init(berry::IEditorSite::Pointer site, berry::IEditorInput::Pointer input); - - void SetFocus(); - - void DoSave() {} - void DoSaveAs() {} - bool IsDirty() const { return false; } - bool IsSaveAsAllowed() const { return false; } - -protected: - - void CreateQtPartControl(QWidget* parent); - - Events::Types GetPartEventTypes() const; - -private: - QmitkPythonScriptEditor *m_PythonScriptEditor; -}; - -#endif diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.ui b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.ui deleted file mode 100644 index bd7aa02b68..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonEditor.ui +++ /dev/null @@ -1,51 +0,0 @@ - - - QmitkPythonConsoleViewControls - - - - 0 - 0 - 790 - 773 - - - - - 0 - 0 - - - - QmitkTemplate - - - - - - - - - Load Script - - - - - - - Save Script - - - - - - - Run Script - - - - - - - - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonMediator.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonMediator.cpp deleted file mode 100755 index be79ea40a2..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonMediator.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonMediator.h" -#include - -QmitkPythonMediator::QmitkPythonMediator() -{ -} - -QmitkPythonMediator::~QmitkPythonMediator() -{ -} - -void QmitkPythonMediator::Initialize() -{ - if(!Py_IsInitialized()) - Py_Initialize(); -} - -void QmitkPythonMediator::Finalize() -{ - if(m_clients.size() == 0) - Py_Finalize(); -} - -QmitkPythonMediator *QmitkPythonMediator::getInstance() -{ - static QmitkPythonMediator m_mediatorInstance; - return &m_mediatorInstance; -} - -void QmitkPythonMediator::paste(const QString& pasteCommand) -{ - std::set::iterator it - = m_PasteClients.begin(); - - while( it!= m_PasteClients.end()) - { - (*it)->paste( pasteCommand ); - ++it; - } -} - -void QmitkPythonMediator::runSimpleString(const char* str) -{ - if(!Py_IsInitialized()){ - Py_Initialize(); - } - PyRun_SimpleString(str); -} - -std::vector QmitkPythonMediator::getAttributeList() -{ - PyObject* dict = PyImport_GetModuleDict(); - PyObject* object = PyDict_GetItemString(dict, "__main__"); - PyObject* dirMain = PyObject_Dir(object); - PyObject* tempObject; - std::vector variableStack; - - if(dirMain){ - QString attr, attrValue, attrType; - variableStack.clear(); - for(int i = 0; iob_type->tp_name; - if(PyUnicode_Check(tempObject) || PyString_Check(tempObject)) - attrValue = PyString_AsString(tempObject); - else - attrValue = ""; - variableStack.push_back(QStringList() << attr << attrValue << attrType); - } - } - return variableStack; -} - -PyObject * QmitkPythonMediator::getPyObject(PyObject * object) -{ - PyObject* dict = PyImport_GetModuleDict(); - PyObject* main = PyDict_GetItemString(dict, "__main__"); - return PyObject_GetAttr(main, object); -} - -PyObject * QmitkPythonMediator::getPyObjectString(QString * objectName) -{ - PyObject* dict = PyImport_GetModuleDict(); - PyObject* main = PyDict_GetItemString(dict, "__main__"); - return PyObject_GetAttrString(main, objectName->toLocal8Bit().data()); -} - -void QmitkPythonMediator::registerPasteCommandClient(QmitkPythonPasteClient * client ) -{ - m_PasteClients.insert( client ); -} - -void QmitkPythonMediator::unregisterPasteCommandClient(QmitkPythonPasteClient * client) -{ - m_PasteClients.erase( client ); -} - -void QmitkPythonMediator::setClient(QmitkPythonClient * client) -{ - m_clients.insert(client); -} - -void QmitkPythonMediator::unregisterClient(QmitkPythonClient * client) -{ - m_clients.erase( client ); -} - -void QmitkPythonMediator::update() -{ - if(Py_IsInitialized) - { - std::set::iterator it - = m_clients.begin(); - - while( it!= m_clients.end()) - { - (*it)->update(); - ++it; - } - } -} - -void QmitkPythonMediator::SetCommandHistory(const QString& command) -{ - m_commandHistory.push_back(QStringList() << command); -} - -std::vector QmitkPythonMediator::GetCommandHistory() -{ - return m_commandHistory; -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonMediator.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonMediator.h deleted file mode 100755 index 845f052245..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonMediator.h +++ /dev/null @@ -1,74 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QmitkPythonMediator_h -#define QmitkPythonMediator_h - -#include -#include -#include -#include -#include -#include "mitkCommon.h" - -class QmitkPythonClient -{ - public: - virtual ~QmitkPythonClient(){}; - virtual void update() = 0; -}; - -class QmitkPythonPasteClient -{ - public: - virtual ~QmitkPythonPasteClient(){}; - virtual void paste(const QString&) = 0; -}; - -class QmitkPythonMediator -{ - public: - void update(); - - static void runSimpleString(const char*); - static std::vector getAttributeList(); - static PyObject * getPyObject(PyObject * object); - static PyObject * getPyObjectString(QString * objectName); - static QmitkPythonMediator *getInstance(); - - void setClient(QmitkPythonClient *); - void unregisterClient(QmitkPythonClient *); - void registerPasteCommandClient(QmitkPythonPasteClient *); - void unregisterPasteCommandClient(QmitkPythonPasteClient *); - void paste(const QString& pasteCommand); - std::vector GetCommandHistory(); - void SetCommandHistory(const QString&); - void Initialize(); - void Finalize(); - - protected: - QmitkPythonMediator(); - virtual ~QmitkPythonMediator(); - - private: - std::set m_clients; - std::set m_PasteClients; - std::vector m_commandHistory; - std::vector m_variableStack; -}; - -#endif // _QMITKPYTHONCONSOLEVIEW_H_INCLUDED - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonPerspective.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonPerspective.cpp deleted file mode 100644 index f4bd8e2867..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonPerspective.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonPerspective.h" -#include "berryIViewLayout.h" - - -void QmitkPythonPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) -{ - std::string editorArea = layout->GetEditorArea(); - - layout->AddView("org.mitk.views.datamanager", - berry::IPageLayout::LEFT, 0.3f, editorArea); - layout->AddView("org.mitk.views.pythoncommandhistory", - berry::IPageLayout::TOP, 0.3f, "org.mitk.views.datamanager"); - - berry::IViewLayout::Pointer lo = layout->GetViewLayout("org.mitk.views.datamanager"); - lo->SetCloseable(false); - - berry::IFolderLayout::Pointer leftbottomFolder = layout->CreateFolder("leftbottom", berry::IPageLayout::BOTTOM, 0.7f, "org.mitk.views.datamanager"); - leftbottomFolder->AddView("org.mitk.views.pythonvariablestack"); - leftbottomFolder->AddView("org.mitk.views.pythonsnippets"); - leftbottomFolder->AddView("org.mitk.views.imagenavigator"); - - berry::IFolderLayout::Pointer bottomFolder = layout->CreateFolder("bottom", berry::IPageLayout::BOTTOM, 0.7f, editorArea); - bottomFolder->AddView("org.mitk.views.pythonconsole"); - bottomFolder->AddView("org.mitk.views.propertylistview"); - bottomFolder->AddView("org.blueberry.views.logview"); -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditor.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditor.cpp deleted file mode 100644 index a208d47db3..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditor.cpp +++ /dev/null @@ -1,156 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonScriptEditor.h" -//#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "berryFileEditorInput.h" -#include -#include - -#include "QmitkPythonConsoleView.h" -#include "QmitkPythonVariableStack.h" -#include "QmitkPythonScriptEditorHighlighter.h" - -#include "QmitkPythonMediator.h" - -const std::string QmitkPythonScriptEditor::EDITOR_ID = "org.mitk.editors.pythonscripteditor"; - -QmitkPythonScriptEditor::QmitkPythonScriptEditor(QWidget *parent) -:QWidget(parent) -{ - QGridLayout *gridLayout; - QPushButton *buttonLoadScript; - QPushButton *buttonSaveScript; - QPushButton *buttonRunScript; - - if (parent->objectName().isEmpty()) - parent->setObjectName(QString::fromUtf8("parent")); - parent->resize(790, 773); - parent->setMinimumSize(QSize(0, 0)); - gridLayout = new QGridLayout(parent); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - m_TextEditor = new QTextEdit(parent); - m_TextEditor->setObjectName(QString::fromUtf8("m_TextEditor")); - m_TextEditor->viewport()->setAcceptDrops(true); - - QmitkPythonScriptEditorHighlighter *highlighter = new QmitkPythonScriptEditorHighlighter(m_TextEditor->document()); - - gridLayout->addWidget(m_TextEditor, 0, 0, 1, 3); - - buttonLoadScript = new QPushButton(parent); - buttonLoadScript->setObjectName(QString::fromUtf8("buttonLoadScript")); - - gridLayout->addWidget(buttonLoadScript, 1, 0, 1, 1); - - buttonSaveScript = new QPushButton(parent); - buttonSaveScript->setObjectName(QString::fromUtf8("buttonSaveScript")); - - gridLayout->addWidget(buttonSaveScript, 1, 1, 1, 1); - - buttonRunScript = new QPushButton(parent); - buttonRunScript->setObjectName(QString::fromUtf8("buttonRunScript")); - - gridLayout->addWidget(buttonRunScript, 1, 2, 1, 1); - parent->setWindowTitle(QApplication::translate("parent", "QmitkTemplate", 0, QApplication::UnicodeUTF8)); - buttonLoadScript->setText(QApplication::translate("parent", "Load Script", 0, QApplication::UnicodeUTF8)); - buttonSaveScript->setText(QApplication::translate("parent", "Save Script", 0, QApplication::UnicodeUTF8)); - buttonRunScript->setText(QApplication::translate("parent", "Run Script", 0, QApplication::UnicodeUTF8)); - - QMetaObject::connectSlotsByName(parent); - - connect(buttonLoadScript, SIGNAL(clicked()), this, SLOT(OpenScript())); - connect(buttonSaveScript, SIGNAL(clicked()), this, SLOT(SaveScript())); - connect(buttonRunScript, SIGNAL(clicked()), this, SLOT(RunScript())); - QmitkPythonMediator::getInstance()->Initialize(); - QmitkPythonMediator::getInstance()->registerPasteCommandClient( this ); -} - -QmitkPythonScriptEditor::~QmitkPythonScriptEditor() -{ - QmitkPythonMediator::getInstance()->unregisterPasteCommandClient( this ); - QmitkPythonMediator::getInstance()->Finalize(); -} - -void QmitkPythonScriptEditor::paste(const QString& command) -{ - if( this->isVisible() ) - m_TextEditor->append(command); -} -void QmitkPythonScriptEditor::LoadScript(const char* filename){ - std::istream* fileStream = new std::ifstream(filename); - char line[255]; - QString qline; - m_TextEditor->setText(""); - m_scriptFile = fopen(filename, "r"); - if(fileStream) - { - while(!fileStream->eof()) - { - fileStream->getline(line,255); - qline = line; - m_TextEditor->append(qline); - } - } - else - { - } -} - -void QmitkPythonScriptEditor::SaveScript(){ - QString fileName = QFileDialog::getSaveFileName(this,tr("Save File"),"",tr("*.py")); - if(fileName.compare("") != 0) - { - ofstream myfile; - myfile.open(fileName.toLocal8Bit().data()); - myfile << m_TextEditor->toPlainText().toLocal8Bit().data(); - myfile.close(); - } -} - -void QmitkPythonScriptEditor::OpenScript(){ - QString fileName = QFileDialog::getOpenFileName(NULL,mitk::CoreObjectFactory::GetInstance()->GetFileExtensions(),"",tr("*.py")); - if(fileName.compare("") != 0) - LoadScript(fileName.toStdString().c_str()); -} - -void QmitkPythonScriptEditor::RunScript(){ - QmitkPythonMediator::runSimpleString(m_TextEditor->toPlainText().toLocal8Bit().data()); - QmitkPythonMediator::getInstance()->update(); -} - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditor.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditor.h deleted file mode 100644 index 7ba84380ab..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonScriptEditor.h +++ /dev/null @@ -1,69 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QMITKPYTHONSCRIPTEDITOR_H_ -#define QMITKPYTHONSCRIPTEDITOR_H_ - -#include -#include - -#include "QmitkPythonTextEditor.h" -//#include - -#include "mitkQtCommonDll.h" - -#include -#include -#include -#include - -#include -#include "QmitkPythonMediator.h" - -class QmitkPythonScriptEditor : public QWidget, public QmitkPythonPasteClient //, berry::QtEditorPart -{ - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) - Q_OBJECT - -public: - berryObjectMacro(QmitkPythonScriptEditor); - - static const std::string EDITOR_ID; - - QmitkPythonScriptEditor(QWidget *parent = 0); - virtual void paste(const QString& command); - ~QmitkPythonScriptEditor(); - -signals: - void RanScript(); - -protected slots: - /// \brief Called when the user clicks the GUI button - void LoadScript(const char *); - void SaveScript(); - void OpenScript(); - void RunScript(); - -protected: - -private: - QTextEdit* m_TextEditor; - FILE *m_scriptFile; - QmitkPythonMediator *m_PythonMediator; -}; - -#endif diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.cpp deleted file mode 100644 index 7ead0eb97c..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonSnippets.h" - -#include "mitkNodePredicateDataType.h" - -#include "QmitkDataStorageComboBox.h" -#include "QmitkStdMultiWidget.h" -#include "QmitkPythonConsoleView.h" - -#include "mitkDataStorageEditorInput.h" - -// berry Includes -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include "QmitkPythonMediator.h" -#include "QmitkPythonScriptEditorHighlighter.h" - -const std::string QmitkPythonSnippets::VIEW_ID = "org.mitk.views.pythonsnippets"; - -std::map QmitkPythonSnippets::CreateDefaultSnippets() -{ - std::map defaultSnippets; - - defaultSnippets["itk image processing"] = - "import itk\n" - "import mitkCast\n\n" - "print 'using ITK ' + itk.Version.GetITKVersion()\n" - "itkImage = mitkCast.node2itk( Pic3D, itk.Image.US3 )\n" - "kernel = itk.strel( 3, 3 )\n" - "filter = itk.GrayscaleDilateImageFilter[itkImage,itkImage,kernel].New( itkImage, Kernel=kernel )\n" - "filter.Update()\n" - "Pic3DFiltered = mitkCast.itk2node( filter.GetOutput(), 'Pic3DFiltered' )\n"; - - defaultSnippets["itk batch image processing"] = - "import itk\n" - "import mitkCast\n\n" - "print 'using ITK ' + itk.Version.GetITKVersion()\n" - "itkImage = mitkcast.node2itk( Pic3D, itk.Image.US3 )\n" - "for s in range(5):\n" - "kernel = itk.strel( 3, s+1 )\n" - "filter = itk.GrayscaleDilateImageFilter[itkImage,itkImage,kernel].New( itkImage, Kernel=kernel )\n" - "filter.Update()\n" - "exec( \"newnode_\" + str(s+1) + \" = mitkcast.itk2node( filter.GetOutput(), 'demo_\" + str(s+1) + \"')\" )\n"; - - defaultSnippets["Import itk and vtk"] = - "import itk, vtk"; - - return defaultSnippets; -} - -const std::map QmitkPythonSnippets::DEFAULT_SNIPPETS - = QmitkPythonSnippets::CreateDefaultSnippets(); - -QmitkPythonSnippets::QmitkPythonSnippets() -: m_MultiWidget(NULL) -, m_Controls(0) -{ -} - -QmitkPythonSnippets::~QmitkPythonSnippets() -{ - berry::IPreferencesService::Pointer _PreferencesService = - berry::Platform::GetServiceRegistry().GetServiceById( - berry::IPreferencesService::ID); - berry::IPreferences::Pointer node = _PreferencesService->GetSystemPreferences()->Node(VIEW_ID); - std::map::iterator it - = m_Snippets.begin(); - - node->Clear(); - while( it != m_Snippets.end() ) - { - QString snippet = QString::fromStdString(it->second); - snippet = snippet.replace("\n", "
"); -// std::cout << "adding " << it->first << ": " << snippet.toStdString() << std::endl; - node->Put( it->first, snippet.toStdString() ); - ++it; - } - node->Flush(); -} - -void QmitkPythonSnippets::CreateQtPartControl(QWidget *parent) -{ - if( !m_Controls ) - { - m_Controls = new Ui::QmitkPythonSnippets; - m_Controls->setupUi( parent ); - QmitkPythonScriptEditorHighlighter *highlighter = - new QmitkPythonScriptEditorHighlighter(m_Controls->Content->document()); - } - - // get all snippets - berry::IPreferencesService::Pointer _PreferencesService = - berry::Platform::GetServiceRegistry().GetServiceById( - berry::IPreferencesService::ID); - - // insert default snippets if there were no prefs before - if( !_PreferencesService->GetSystemPreferences()->NodeExists(VIEW_ID) ) - { - m_Snippets = DEFAULT_SNIPPETS; - } - else - { - berry::IPreferences::Pointer node = _PreferencesService->GetSystemPreferences()->Node(VIEW_ID); - std::vector keys = node->Keys(); - std::string snippet; - for( size_t i = 0; i < keys.size(); ++i) - { -// std::cout << "inserting " << keys.at(i) << std::endl; - snippet = node->Get( keys.at(i), "" ); - QString qsnippet = QString::fromStdString(snippet); - qsnippet = qsnippet.replace("
", "\n"); -// std::cout << "inserting " << keys.at(i) << ": " << qsnippet.toStdString() << std::endl; - m_Snippets[keys.at(i)] = qsnippet.toStdString(); - } - } - - this->Update(); - - connect( m_Controls->Name, SIGNAL(currentIndexChanged(int)), this, SLOT(on_Name_currentIndexChanged(int)) ); - connect( m_Controls->AddNewSnippet, SIGNAL(clicked()), this, SLOT(on_AddNewSnippet_clicked()) ); - connect( m_Controls->RemoveSnippet, SIGNAL(clicked()), this, SLOT(on_RemoveSnippet_clicked()) ); - connect( m_Controls->PasteNow, SIGNAL(clicked()), this, SLOT(on_PasteNow_clicked()) ); - connect( m_Controls->Content, SIGNAL(textChanged()), this, SLOT(on_Content_textChanged()) ); - connect( m_Controls->RenameSnippet, SIGNAL(clicked()), - this, SLOT(on_RenameSnippet_clicked()) ); - connect( m_Controls->RestoreDefaultSnippets, SIGNAL(clicked()), - this, SLOT(on_RestoreDefaultSnippets_clicked()) ); -} - -void QmitkPythonSnippets::SetFocus () -{ - -} - -int QmitkPythonSnippets::GetSizeFlags(bool width) -{ - if(!width) - { - return berry::Constants::MIN | berry::Constants::MAX | berry::Constants::FILL; - } - else - { - return 0; - } -} - -int QmitkPythonSnippets::ComputePreferredSize(bool width, int /*availableParallel*/, int /*availablePerpendicular*/, int preferredResult) -{ - if(width==false) - { - return 160; - } - else - { - return preferredResult; - } -} - -void QmitkPythonSnippets::on_Name_currentIndexChanged(int i) -{ -// std::cout << "on_Name_currentIndexChanged" << std::endl; - if( m_Controls->Name->count() == 0 ) - return; - QString name = m_Controls->Name->currentText(); - m_Controls->Content->setText( QString::fromStdString(m_Snippets[name.toStdString()]) ); -} - -void QmitkPythonSnippets::CreateUniqueName( QString& name ) -{ - QString basename = name; - size_t i = 2; - while( m_Snippets.find(name.toStdString()) != m_Snippets.end() ) - { - name = basename + QString("_%1").arg(i); - ++i; - } -} - -void QmitkPythonSnippets::on_RestoreDefaultSnippets_clicked() -{ - QString question = QString("Really restore default Snippets?"); - int remove = QMessageBox::question( QApplication::topLevelWidgets().at(0), - QString("Confirm restoring"), - question, - QMessageBox::Yes | QMessageBox::No, - QMessageBox::No ); - if( remove == QMessageBox::Yes || remove == QMessageBox::Ok ) - { - std::map::const_iterator it - = DEFAULT_SNIPPETS.begin(); - while( it != DEFAULT_SNIPPETS.end() ) - { - m_Snippets[it->first] = it->second; - ++it; - } - this->Update(); - } - -} - -void QmitkPythonSnippets::on_AddNewSnippet_clicked() -{ - QString name = "newSnippet"; - CreateUniqueName(name); - m_Snippets[name.toStdString()] = ""; - m_NameToSelect = name; - this->Update(); -} - -void QmitkPythonSnippets::on_RemoveSnippet_clicked() -{ - if( m_Controls->Name->count() == 0 ) - return; - QString name = m_Controls->Name->currentText(); - QString question = QString("Really remove Snippet %1?").arg(name); - int remove = QMessageBox::question( QApplication::topLevelWidgets().at(0), - QString("Confirm removal"), - question, - QMessageBox::Yes | QMessageBox::No, - QMessageBox::No ); - if( remove == QMessageBox::Yes || remove == QMessageBox::Ok ) - { - std::map::iterator it - = m_Snippets.find( name.toStdString() ); - if( it!= m_Snippets.end() ) - { -// std::cout << "removing " << it->first << std::endl; - m_Snippets.erase(it); - } - this->Update(); - } -} - -void QmitkPythonSnippets::on_PasteNow_clicked() -{ - if( m_Controls->Name->count() == 0 ) - return; - - QString name = m_Controls->Name->currentText(); - QString snippet = QString::fromStdString(m_Snippets[name.toStdString()]); - QmitkPythonMediator::getInstance()->paste( snippet ); - QmitkPythonMediator::getInstance()->update(); -} - -void QmitkPythonSnippets::on_Content_textChanged() -{ - if( m_Controls->Name->count() == 0 ) - return; - - std::string name = (m_Controls->Name->currentText()).toStdString(); - std::string snippet = m_Controls->Content->toPlainText().toStdString(); - - if( m_Snippets.find(name) != m_Snippets.end() ) - m_Snippets[name] = snippet; -} - -void QmitkPythonSnippets::on_RenameSnippet_clicked() -{ -// std::cout << "on_Name_editTextChanged" << std::endl; - if( m_Controls->Name->count() == 0 ) - return; - - QString newName; - bool repeat = false; - do - { - newName = QInputDialog::getText( QApplication::topLevelWidgets().at(0), - "Name the Snippet", "Name:", QLineEdit::Normal, - m_NameToSelect, &repeat ); - - if( newName != m_Controls->Name->currentText() ) - { - repeat = m_Snippets.find(newName.toStdString()) != m_Snippets.end() - || newName.isEmpty(); - if( repeat ) - QMessageBox::information( QApplication::topLevelWidgets().at(0) - , QString("Invalid Name"), - "Invalid name. Please enter another one"); - } - else - repeat = false; - } - while( repeat ); - - - // name changed - if( newName != m_Controls->Name->currentText() ) - { - std::map::iterator it - = m_Snippets.find( m_NameToSelect.toStdString() ); - std::string snippet = it->second; - m_Snippets.erase(it); - m_Snippets[newName.toStdString()] = snippet; - m_NameToSelect = newName; - this->Update(); - } -} - -void QmitkPythonSnippets::Update() -{ - if( m_NameToSelect.isEmpty() ) - { - QString name = m_Controls->Name->currentText(); - m_NameToSelect = name; - } - - m_Controls->Name->clear(); - std::map::iterator it - = m_Snippets.begin(); - - while( it != m_Snippets.end() ) - { - m_Controls->Name->addItem( QString::fromStdString( it->first ) ); - ++it; - } - - // reselect previous or last one if there are elements or nothing if there are no snippets - std::string current = m_NameToSelect.toStdString(); - int index = -1; - if( m_Snippets.find(current) != m_Snippets.end() ) - { - index = m_Controls->Name->findText( m_NameToSelect ); - } - else if( m_Snippets.size() > 0 ) - { - index = m_Controls->Name->count()-1; - } - - if( index >= 0 ) - { - m_Controls->Name->setCurrentIndex(index); - current = m_Controls->Name->itemText( index ).toStdString(); - m_Controls->Content->setPlainText( QString::fromStdString(m_Snippets[current]) ); - } - - // clear the current name - m_NameToSelect.clear(); -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.h deleted file mode 100644 index ed58674c8a..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.h +++ /dev/null @@ -1,98 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef _QmitkPythonSnippets_H -#define _QmitkPythonSnippets_H - -#include -#include "berryISizeProvider.h" - -#include -#include -#include -#include "QmitkStepperAdapter.h" -#include "ui_QmitkPythonSnippets.h" - -#include - -#include "berryISizeProvider.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/*! - * \ingroup org_mitk_gui_qt_imagenavigator_internal - * - * \brief QmitkPythonSnippets - * - * Document your class here. - * - * \sa QmitkFunctionality - */ -class QmitkPythonSnippets : public QObject, public berry::QtViewPart, public berry::ISizeProvider -{ - - // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) - Q_OBJECT - - public: - - static const std::string VIEW_ID; - static std::map CreateDefaultSnippets(); - static const std::map DEFAULT_SNIPPETS; - - QmitkPythonSnippets(); - virtual ~QmitkPythonSnippets(); - - virtual void CreateQtPartControl(QWidget *parent); - - QmitkStdMultiWidget* GetActiveStdMultiWidget(); - - void SetFocus(); - - virtual int GetSizeFlags(bool width); - virtual int ComputePreferredSize(bool width, int /*availableParallel*/, int /*availablePerpendicular*/, int preferredResult); - -protected slots: - void on_Name_currentIndexChanged(int i); - void on_RenameSnippet_clicked(); - void on_AddNewSnippet_clicked(); - void on_RemoveSnippet_clicked(); - void on_PasteNow_clicked(); - void on_RestoreDefaultSnippets_clicked(); - void on_Content_textChanged(); - -protected: - void Update(); - void CreateUniqueName( QString& name ); - QmitkStdMultiWidget* m_MultiWidget; - QTableWidget *m_tableWidget; - Ui::QmitkPythonSnippets* m_Controls; - std::map m_Snippets; - QString m_NameToSelect; -}; - - - - -#endif // _QmitkPythonSnippets_H_INCLUDED - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.ui b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.ui deleted file mode 100644 index cfd1ee1d46..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonSnippets.ui +++ /dev/null @@ -1,89 +0,0 @@ - - - QmitkPythonSnippets - - - - 0 - 0 - 613 - 436 - - - - - 0 - 0 - - - - true - - - QmitkTemplate - - - - - - Name: - - - - - - - true - - - - - - - Content: - - - - - - - Paste Now! - - - - - - - Add new Snippet - - - - - - - Remove Snippet - - - - - - - Rename Snippet - - - - - - - Restore default Snippets - - - - - - - - - - - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonTextEditor.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonTextEditor.cpp deleted file mode 100755 index 7559841ba1..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonTextEditor.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonTextEditor.h" - -#include -#include -#include - - -QmitkPythonTextEditor::QmitkPythonTextEditor(QWidget *parent) -:QTextEdit(parent) -{ - QmitkPythonMediator::getInstance()->registerPasteCommandClient( this ); -} - -QmitkPythonTextEditor::~QmitkPythonTextEditor() -{ - QmitkPythonMediator::getInstance()->unregisterPasteCommandClient( this ); -} - -void QmitkPythonTextEditor::dragEnterEvent(QDragEnterEvent *event) -{ - event->accept(); -} - -void QmitkPythonTextEditor::paste(const QString& command) -{ - this->insertPlainText(command + "\n"); -} -void QmitkPythonTextEditor::dropEvent(QDropEvent *event) -{ - //QDropEvent drop(event->pos(),Qt::MoveAction, event->mimeData(), event->mouseButtons(), Qt::ShiftModifier, event->type()); - //QTextEdit::dropEvent(&drop); - QList urls = event->mimeData()->urls(); - for(int i = 0; i < urls.size(); i++) - { - this->insertPlainText(urls[i].toString().append("\n")); - } - -} - -bool QmitkPythonTextEditor::canInsertFromMimeData( const QMimeData *source ) const -{ - return true; -} - -/* -void QmitkPythonTextEditor::insertFromMimeData( const QMimeData *source ) -{ - if (source->hasImage()) - { - QImage image = qvariant_cast(source->imageData()); - QTextCursor cursor = this->textCursor(); - QTextDocument *document = this->document(); - document->addResource(QTextDocument::ImageResource, QUrl("image"), image); - cursor.insertImage("image"); - } -}*/ diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.cpp deleted file mode 100644 index 7f60c7a7f1..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.cpp +++ /dev/null @@ -1,127 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonVariableStack.h" - -#include "mitkNodePredicateDataType.h" - -#include "QmitkDataStorageComboBox.h" -#include "QmitkStdMultiWidget.h" -#include "QmitkPythonConsoleView.h" - -#include "mitkDataStorageEditorInput.h" - -// berry Includes -#include -#include -#include -#include - -#include -#include -#include -#include "QmitkPythonMediator.h" - -const std::string QmitkPythonVariableStack::VIEW_ID = "org.mitk.views.pythonvariablestack"; - -QmitkPythonVariableStack::QmitkPythonVariableStack() -: m_MultiWidget(NULL) -, m_Controls(0) -{ -} - -QmitkPythonVariableStack::~QmitkPythonVariableStack() -{ - QmitkPythonMediator::getInstance()->unregisterClient(m_treeModel); -} - -void QmitkPythonVariableStack::CreateQtPartControl(QWidget *parent) -{ - if( !m_Controls ) - { - m_Controls = new Ui::QmitkPythonConsoleViewControls; - m_Controls->setupUi( parent ); - } - m_treeModel = new QmitkPythonVariableStackTreeWidget(); - m_Controls->tableView->setSelectionBehavior( QAbstractItemView::SelectRows ); - m_Controls->tableView->setAlternatingRowColors(true); - m_Controls->tableView->setDragEnabled(true); - m_Controls->tableView->setDropIndicatorShown(true); - m_Controls->tableView->setAcceptDrops(true); - m_Controls->tableView->setModel( m_treeModel); - QmitkPythonMediator::getInstance()->setClient(m_treeModel); - //QmitkPythonMediator::getInstance()->update(); - // add the multiwidget to the dings - mitk::BaseRenderer* renderer = mitk::BaseRenderer::GetInstance( - this->GetActiveStdMultiWidget()->GetRenderWindow4()->GetVtkRenderWindow() ); - mitk::RendererAccess::Set3DRenderer( renderer->GetVtkRenderer() ); - m_treeModel->update(); -} - -QmitkPythonVariableStackTreeWidget* QmitkPythonVariableStack::getModel() -{ - return m_treeModel; -} - -void QmitkPythonVariableStack::SetFocus () -{ - -} - -QmitkStdMultiWidget* QmitkPythonVariableStack::GetActiveStdMultiWidget() -{ - QmitkStdMultiWidget* activeStdMultiWidget = 0; - berry::IEditorPart::Pointer editor = - this->GetSite()->GetPage()->GetActiveEditor(); - - if (editor.Cast().IsNotNull()) - { - activeStdMultiWidget = editor.Cast()->GetStdMultiWidget(); - } - else - { - mitk::DataStorageEditorInput::Pointer editorInput; - editorInput = new mitk::DataStorageEditorInput(); - berry::IEditorPart::Pointer editor = this->GetSite()->GetPage()->OpenEditor(editorInput, QmitkStdMultiWidgetEditor::EDITOR_ID, false); - activeStdMultiWidget = editor.Cast()->GetStdMultiWidget(); - } - - return activeStdMultiWidget; -} - -int QmitkPythonVariableStack::GetSizeFlags(bool width) -{ - if(!width) - { - return berry::Constants::MIN | berry::Constants::MAX | berry::Constants::FILL; - } - else - { - return 0; - } -} - -int QmitkPythonVariableStack::ComputePreferredSize(bool width, int /*availableParallel*/, int /*availablePerpendicular*/, int preferredResult) -{ - if(width==false) - { - return 160; - } - else - { - return preferredResult; - } -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.h b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.h deleted file mode 100644 index 12780f77ec..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.h +++ /dev/null @@ -1,99 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef _QMITKPYTHONVARIABLESTACK_H -#define _QMITKPYTHONVARIABLESTACK_H - -#include -#include "berryISizeProvider.h" - -#include -#include -#include -#include "QmitkStepperAdapter.h" -#include "ui_QmitkPythonVariableStack.h" -#include "QmitkPythonVariableStackTreeWidget.h" - -#include - -#include "berryISizeProvider.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -/*! - * \ingroup org_mitk_gui_qt_imagenavigator_internal - * - * \brief QmitkPythonVariableStack - * - * Document your class here. - * - * \sa QmitkFunctionality - */ -class QmitkPythonVariableStack : public berry::QtViewPart, public berry::ISizeProvider -{ - - // this is needed for all Qt objects that should have a MOC object (everything that derives from QObject) - Q_OBJECT - - public: - - static const std::string VIEW_ID; - - QmitkPythonVariableStack(); - QmitkPythonVariableStack(const QmitkPythonVariableStack& other) - { - Q_UNUSED(other) - throw std::runtime_error("Copy constructor not implemented"); - } - virtual ~QmitkPythonVariableStack(); - - virtual void CreateQtPartControl(QWidget *parent); - - QmitkStdMultiWidget* GetActiveStdMultiWidget(); - - void SetFocus(); - - virtual int GetSizeFlags(bool width); - virtual int ComputePreferredSize(bool width, int /*availableParallel*/, int /*availablePerpendicular*/, int preferredResult); - QmitkPythonVariableStackTreeWidget* getModel(); - - -public slots: - -protected slots: - -protected: - QmitkStdMultiWidget* m_MultiWidget; - QTableWidget *m_tableWidget; - Ui::QmitkPythonConsoleViewControls* m_Controls; - QmitkPythonVariableStackTreeWidget* m_treeModel; - -private: - -}; - - - - -#endif // _QmitkPythonVariableStack_H_INCLUDED - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.ui b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.ui deleted file mode 100644 index ea730be5e8..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStack.ui +++ /dev/null @@ -1,58 +0,0 @@ - - - QmitkPythonConsoleViewControls - - - - 0 - 0 - 790 - 773 - - - - - 0 - 0 - - - - true - - - QmitkTemplate - - - - - - true - - - true - - - QAbstractItemView::DragDrop - - - true - - - false - - - true - - - false - - - false - - - - - - - - diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStackTreeWidget.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStackTreeWidget.cpp deleted file mode 100755 index b5a29eb0a5..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/QmitkPythonVariableStackTreeWidget.cpp +++ /dev/null @@ -1,253 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkPythonVariableStackTreeWidget.h" - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "QmitkPythonMediator.h" -#include "QmitkCustomVariants.h" -#include "QmitkNodeDescriptor.h" -#include "QmitkNodeDescriptorManager.h" -#include "mitkDataStorage.h" -#include "mitkDataNode.h" - -QmitkPythonVariableStackTreeWidget::QmitkPythonVariableStackTreeWidget(QWidget* parent) - :QAbstractTableModel(parent) -{ -} - -QmitkPythonVariableStackTreeWidget::~QmitkPythonVariableStackTreeWidget() -{ -} - -bool QmitkPythonVariableStackTreeWidget::dropMimeData ( const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent ) -{ - // Early exit, returning true, but not actually doing anything (ignoring data). - if (action == Qt::IgnoreAction) - return true; - - // Note, we are returning true if we handled it, and false otherwise - bool returnValue = false; - - if(data->hasFormat("application/x-mitk-datanodes")) - { - returnValue = true; - - QString arg = QString(data->data("application/x-mitk-datanodes").data()); - QStringList listOfDataNodeAddressPointers = arg.split(","); - - QStringList::iterator slIter; - for (slIter = listOfDataNodeAddressPointers.begin(); - slIter != listOfDataNodeAddressPointers.end(); - slIter++) - { - long val = (*slIter).toLong(); - mitk::DataNode* node = static_cast((void*)val); - - itk::SmartPointer * resultptr; - resultptr = new itk::SmartPointer((itk::SmartPointer &)node); - - if(resultptr) - { - int i = 0; - while(swig_types_initial[i] != 0) - { - if(swig_types_initial[i] == _swigt__p_itk__SmartPointerTmitk__DataNode_t) - SWIGTYPE_p_itk__SmartPointerTmitk__DataNode_t = SWIG_TypeRegister(swig_types_initial[i]); - i++; - } - - PyObject * resultObj = SWIG_NewPointerObj((void*)(resultptr), SWIGTYPE_p_itk__SmartPointerTmitk__DataNode_t, 1); - PyObject* dict = PyImport_GetModuleDict(); - PyObject* object = PyDict_GetItemString(dict, "__main__"); - - if(object){ - Py_INCREF(object); - PyModule_AddObject(object, node->GetName().c_str(), resultObj); - } - setVariableStack(QmitkPythonMediator::getAttributeList()); - } - } - - } - return returnValue; -} - -QVariant QmitkPythonVariableStackTreeWidget::headerData(int section, Qt::Orientation orientation, - int role) const -{ - QVariant headerData; - - // show only horizontal header - if ( role == Qt::DisplayRole ) - { - if( orientation == Qt::Horizontal ) - { - // first column: "Attribute" - if(section == 0) - headerData = "Attribute"; - else if(section == 1) - headerData = "Value"; - else if(section == 2) - headerData = "Type"; - } - } - - return headerData; -} - -Qt::ItemFlags QmitkPythonVariableStackTreeWidget::flags(const QModelIndex &index) const -{ - Qt::ItemFlags flags = QAbstractItemModel::flags(index); - - if(index.isValid()) - return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | flags; - else - return Qt::ItemIsDropEnabled | flags; -} - -int QmitkPythonVariableStackTreeWidget::rowCount(const QModelIndex &) const -{ - return m_variableStack.size(); -} - -int QmitkPythonVariableStackTreeWidget::columnCount(const QModelIndex &) const -{ - return 3; -} - -QVariant QmitkPythonVariableStackTreeWidget::data(const QModelIndex &index, int role) const -{ - if (index.isValid() && !m_variableStack.empty()) - { - if(role == Qt::DisplayRole) - { - QStringList item = m_variableStack.at(index.row()); - if(index.column() == 0) - return item[0]; - if(index.column() == 1) - return item[1]; - if(index.column() == 2) - return item[2]; - } - } - return QVariant(); -} - -void QmitkPythonVariableStackTreeWidget::clear() -{ - m_variableStack.clear(); - QAbstractTableModel::reset(); -} - -void QmitkPythonVariableStackTreeWidget::setVariableStack(std::vector varStack) -{ - m_variableStack = varStack; - QAbstractTableModel::reset(); -} - -std::vector QmitkPythonVariableStackTreeWidget::getVariableStack() -{ - return m_variableStack; -} - -QMimeData * QmitkPythonVariableStackTreeWidget::mimeData(const QModelIndexList & indexes) const -{ - - QMimeData * ret = new QMimeData; - - QString dataNodeAddresses(""); - - for (int indexesCounter = 0; indexesCounter < indexes.size(); indexesCounter++) - { - QString name = m_variableStack[indexes.at(indexesCounter).row()][0]; - QString type = m_variableStack[indexes.at(indexesCounter).row()][2]; - - if(type != "DataNode_PointerPtr") - return NULL; - - mitk::DataNode* node; - itk::SmartPointer *arg; - - PyObject * obj = QmitkPythonMediator::getPyObjectString(&name); - int i = 0; - while(swig_types_initial[i] != 0) - { - if(swig_types_initial[i] == _swigt__p_itk__SmartPointerTmitk__DataNode_t) - SWIGTYPE_p_itk__SmartPointerTmitk__DataNode_t = SWIG_TypeRegister(swig_types_initial[i]); - i++; - } - if ((SWIG_ConvertPtr(obj,(void **)(&arg),SWIGTYPE_p_itk__SmartPointerTmitk__DataNode_t, - SWIG_POINTER_EXCEPTION | 0)) == -1) return NULL; - - if(arg == NULL){ - return NULL; - } - try { - node = (mitk::DataNode *)((itk::SmartPointer const *)arg)->GetPointer(); - } - catch(std::exception &_e) { - { - std::cout << "Not a DataNode" << std::endl; - } - } - - long a = reinterpret_cast(node); - - if (dataNodeAddresses.size() != 0) - { - QTextStream(&dataNodeAddresses) << ","; - } - QTextStream(&dataNodeAddresses) << a; - - ret->setData("application/x-mitk-datanodes", QByteArray(dataNodeAddresses.toAscii())); - } - - return ret; -} - -QStringList QmitkPythonVariableStackTreeWidget::mimeTypes() const -{ - QStringList types; - types << "application/x-mitk-datanodes"; - types << "application/x-qabstractitemmodeldatalist"; - return types; -} - -Qt::DropActions QmitkPythonVariableStackTreeWidget::supportedDropActions() const -{ - return Qt::CopyAction | Qt::MoveAction; -} - -Qt::DropActions QmitkPythonVariableStackTreeWidget::supportedDragActions() const -{ - return Qt::CopyAction | Qt::MoveAction; -} - -void QmitkPythonVariableStackTreeWidget::update() -{ -// std::cout << "QmitkPythonVariableStackTreeWidget::update()" << std::endl; - setVariableStack(QmitkPythonMediator::getAttributeList()); -} diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.python.console/src/internal/mitkPluginActivator.cpp deleted file mode 100644 index 9eeb4d6855..0000000000 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/mitkPluginActivator.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ -#include "mitkPluginActivator.h" - -#include "QmitkPythonConsoleView.h" -#include "QmitkPythonVariableStack.h" -#include "QmitkPythonCommandHistory.h" -#include "QmitkPythonEditor.h" -#include "QmitkPythonSnippets.h" -#include "QmitkPythonPerspective.h" - -#include - -namespace mitk { - - void PluginActivator::start(ctkPluginContext* context) - { - BERRY_REGISTER_EXTENSION_CLASS(QmitkPythonConsoleView, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkPythonVariableStack, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkPythonCommandHistory, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkPythonEditor, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkPythonSnippets, context) - BERRY_REGISTER_EXTENSION_CLASS(QmitkPythonPerspective, context) - } - - void PluginActivator::stop(ctkPluginContext* context) - { - Q_UNUSED(context) - } - -} - -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_imagenavigator, mitk::PluginActivator) diff --git a/Plugins/org.mitk.gui.qt.python/CMakeLists.txt b/Plugins/org.mitk.gui.qt.python/CMakeLists.txt new file mode 100644 index 0000000000..352805d7d5 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/CMakeLists.txt @@ -0,0 +1,6 @@ +project(org_mitk_gui_qt_python) + +MACRO_CREATE_MITK_CTK_PLUGIN( + EXPORT_DIRECTIVE org_mitk_gui_qt_python_EXPORT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDENCIES QmitkExt mitkPython) \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.python/documentation/UserManual/org.mitk.gui.qt.python.dox b/Plugins/org.mitk.gui.qt.python/documentation/UserManual/org.mitk.gui.qt.python.dox new file mode 100644 index 0000000000..d1ab3c52fe --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/documentation/UserManual/org.mitk.gui.qt.python.dox @@ -0,0 +1,10 @@ +/** +\page org_mitk_gui_qt_python The Python Plugin + +Available sections: + - \ref org_mitk_gui_qt_pythonOverview + +\section org_mitk_gui_qt_pythonOverview Overview +The Python view provides the graphical front end to run Python code through the mitkPython module. Furthermore the ITK/VTK/OpenCV Python wrapping can be used. + +*/ diff --git a/Plugins/org.mitk.gui.qt.python/files.cmake b/Plugins/org.mitk.gui.qt.python/files.cmake new file mode 100644 index 0000000000..d2d693e932 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/files.cmake @@ -0,0 +1,31 @@ +set(SRC_CPP_FILES +) + +set(INTERNAL_CPP_FILES + mitkPluginActivator.cpp + QmitkPythonView.cpp +) + +set(MOC_H_FILES + src/internal/QmitkPythonView.h + src/internal/mitkPluginActivator.h +) + +set(CPP_FILES ) + +set(CACHED_RESOURCE_FILES + plugin.xml + resources/Python.png +) + +set(QRC_FILES + resources/Python.qrc +) + +foreach(file ${SRC_CPP_FILES}) + set(CPP_FILES ${CPP_FILES} src/${file}) +endforeach(file ${SRC_CPP_FILES}) + +foreach(file ${INTERNAL_CPP_FILES}) + set(CPP_FILES ${CPP_FILES} src/internal/${file}) +endforeach(file ${INTERNAL_CPP_FILES}) diff --git a/Plugins/org.mitk.gui.qt.python/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.python/manifest_headers.cmake new file mode 100644 index 0000000000..a083a5b4a6 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "MITK Python") +set(Plugin-Version "1.0.0") +set(Plugin-Vendor "DKFZ, Medical and Biological Informatics") +set(Plugin-ContactAddress "http://www.mitk.org") +set(Require-Plugin org.mitk.gui.qt.common) diff --git a/Plugins/org.mitk.gui.qt.python/plugin.xml b/Plugins/org.mitk.gui.qt.python/plugin.xml new file mode 100644 index 0000000000..c69d1a6080 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/plugin.xml @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/Plugins/org.mitk.gui.qt.python.console/resources/py.png b/Plugins/org.mitk.gui.qt.python/resources/Python.png similarity index 100% rename from Plugins/org.mitk.gui.qt.python.console/resources/py.png rename to Plugins/org.mitk.gui.qt.python/resources/Python.png diff --git a/Plugins/org.mitk.gui.qt.python/resources/Python.qrc b/Plugins/org.mitk.gui.qt.python/resources/Python.qrc new file mode 100644 index 0000000000..5b36d01dbf --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/resources/Python.qrc @@ -0,0 +1,5 @@ + + + Python.png + + diff --git a/Plugins/org.mitk.gui.qt.python/src/internal/QmitkPythonView.cpp b/Plugins/org.mitk.gui.qt.python/src/internal/QmitkPythonView.cpp new file mode 100644 index 0000000000..32b6a104bc --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/src/internal/QmitkPythonView.cpp @@ -0,0 +1,98 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#include "QmitkPythonView.h" +#include +#include +#include "mitkPluginActivator.h" +#include +#include +#include + +const std::string QmitkPythonView::VIEW_ID = "org.mitk.views.python"; + +struct QmitkPythonViewData +{ + // widget + QmitkPythonVariableStackTableView* m_PythonVariableStackTableView; + QmitkPythonSnippets* m_PythonSnippets; + + QmitkCtkPythonShell* m_PythonShell; + QmitkPythonTextEditor* m_TextEditor; +}; + +QmitkPythonView::QmitkPythonView() + : d( new QmitkPythonViewData ) +{ + d->m_PythonVariableStackTableView = 0; + d->m_PythonShell = 0; +} + +QmitkPythonView::~QmitkPythonView() +{ + delete d; +} + +void QmitkPythonView::CreateQtPartControl(QWidget* parent) +{ + d->m_PythonVariableStackTableView = new QmitkPythonVariableStackTableView; + d->m_PythonVariableStackTableView->SetDataStorage(this->GetDataStorage()); + d->m_PythonVariableStackTableView->horizontalHeader()->setResizeMode(QHeaderView::Interactive); + + QString snippetsFilePath = mitk::PluginActivator::m_XmlFilePath; + MITK_DEBUG("QmitkPythonView") << "got snippetsFilePath " << snippetsFilePath.toStdString(); + + d->m_PythonSnippets = new QmitkPythonSnippets(snippetsFilePath); + + MITK_DEBUG("QmitkPythonView") << "initializing varStackSnippetsTab"; + QTabWidget* varStackSnippetsTab = new QTabWidget; + varStackSnippetsTab->addTab( d->m_PythonVariableStackTableView, "Variable Stack" ); + varStackSnippetsTab->addTab( d->m_PythonSnippets, "Snippets" ); + varStackSnippetsTab->setTabPosition( QTabWidget::South ); + + MITK_DEBUG("QmitkPythonView") << "initializing m_PythonShell"; + d->m_PythonShell = new QmitkCtkPythonShell; + + MITK_DEBUG("QmitkPythonView") << "initializing m_TextEditor"; + d->m_TextEditor = new QmitkPythonTextEditor; + + MITK_DEBUG("QmitkPythonView") << "initializing tabWidgetConsoleEditor"; + QTabWidget* tabWidgetConsoleEditor = new QTabWidget; + tabWidgetConsoleEditor->addTab( d->m_PythonShell, "Console" ); + tabWidgetConsoleEditor->addTab( d->m_TextEditor, "Text Editor" ); + tabWidgetConsoleEditor->setTabPosition( QTabWidget::South ); + + QList sizes; + sizes << 1 << 3; + QSplitter* splitter = new QSplitter; + splitter->addWidget(varStackSnippetsTab); + splitter->addWidget(tabWidgetConsoleEditor); + splitter->setStretchFactor ( 0, 1 ); + splitter->setStretchFactor ( 1, 3 ); + + QGridLayout* layout = new QGridLayout; + layout->addWidget( splitter, 0, 0 ); + parent->setLayout(layout); + + MITK_DEBUG("QmitkPythonView") << "creating connections for m_PythonSnippets"; + connect( d->m_PythonSnippets, SIGNAL(PasteCommandRequested(QString)), d->m_PythonShell, SLOT(Paste(QString)) ); + connect( d->m_PythonSnippets, SIGNAL(PasteCommandRequested(QString)), d->m_TextEditor, SLOT(Paste(QString)) ); +} + +void QmitkPythonView::SetFocus() +{ + d->m_PythonShell->setFocus(); +} diff --git a/Plugins/org.mitk.gui.qt.python/src/internal/QmitkPythonView.h b/Plugins/org.mitk.gui.qt.python/src/internal/QmitkPythonView.h new file mode 100644 index 0000000000..41b4bee47a --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/src/internal/QmitkPythonView.h @@ -0,0 +1,64 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ + +#ifndef QmitkPythonView_H_ +#define QmitkPythonView_H_ + +/// Qmitk +#include + +/// +/// d pointer forward declaration +/// +struct QmitkPythonViewData; + +/// +/// \brief New python view (CONSOLE) +/// +class QmitkPythonView : public QmitkAbstractView +{ + Q_OBJECT + +public: + + static const std::string VIEW_ID; // = "org.mitk.extapp.defaultperspective" + /// + /// \brief Standard ctor. + /// + QmitkPythonView(); + + /// + /// \brief Standard dtor. + /// + virtual ~QmitkPythonView(); + +protected: + + /// + /// \brief Create the view here. + /// + virtual void CreateQtPartControl(QWidget* parent); + + /// + /// focus on load image + /// + void SetFocus(); + +private: + QmitkPythonViewData* d; +}; + +#endif /*QmitkPythonView_H_*/ diff --git a/Plugins/org.mitk.gui.qt.python/src/internal/mitkPluginActivator.cpp b/Plugins/org.mitk.gui.qt.python/src/internal/mitkPluginActivator.cpp new file mode 100644 index 0000000000..e59a8e8108 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.python/src/internal/mitkPluginActivator.cpp @@ -0,0 +1,38 @@ +/*=================================================================== + +The Medical Imaging Interaction Toolkit (MITK) + +Copyright (c) German Cancer Research Center, +Division of Medical and Biological Informatics. +All rights reserved. + +This software is distributed WITHOUT ANY WARRANTY; without +even the implied warranty of MERCHANTABILITY or FITNESS FOR +A PARTICULAR PURPOSE. + +See LICENSE.txt or http://www.mitk.org for details. + +===================================================================*/ +#include "mitkPluginActivator.h" +#include +#include "QmitkPythonView.h" + +namespace mitk +{ + QString PluginActivator::m_XmlFilePath; + + void PluginActivator::start(ctkPluginContext* context) + { + m_XmlFilePath = context->getDataFile("PythonSnippets.xml").absoluteFilePath(); + + BERRY_REGISTER_EXTENSION_CLASS(QmitkPythonView, context) + } + + void PluginActivator::stop(ctkPluginContext* context) + { + Q_UNUSED(context) + } + +} + +Q_EXPORT_PLUGIN2(org_mitk_gui_qt_python, mitk::PluginActivator) diff --git a/Plugins/org.mitk.gui.qt.python.console/src/internal/mitkPluginActivator.h b/Plugins/org.mitk.gui.qt.python/src/internal/mitkPluginActivator.h similarity index 71% rename from Plugins/org.mitk.gui.qt.python.console/src/internal/mitkPluginActivator.h rename to Plugins/org.mitk.gui.qt.python/src/internal/mitkPluginActivator.h index b96fd0fb6e..9a32e11e62 100644 --- a/Plugins/org.mitk.gui.qt.python.console/src/internal/mitkPluginActivator.h +++ b/Plugins/org.mitk.gui.qt.python/src/internal/mitkPluginActivator.h @@ -1,40 +1,39 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef MITKPLUGINACTIVATOR_H #define MITKPLUGINACTIVATOR_H #include #include - namespace mitk { - class MITK_LOCAL PluginActivator : - public QObject, public ctkPluginActivator - { - Q_OBJECT - Q_INTERFACES(ctkPluginActivator) - - public: +class MITK_LOCAL PluginActivator : + public QObject, public ctkPluginActivator +{ + Q_OBJECT + Q_INTERFACES(ctkPluginActivator) - void start(ctkPluginContext* context); - void stop(ctkPluginContext* context); +public: + void start(ctkPluginContext* context); + void stop(ctkPluginContext* context); - }; // PluginActivator + static QString m_XmlFilePath; +}; // PluginActivator } #endif // MITKPLUGINACTIVATOR_H diff --git a/SuperBuild.cmake b/SuperBuild.cmake index a23d2bce16..f537756e64 100644 --- a/SuperBuild.cmake +++ b/SuperBuild.cmake @@ -1,308 +1,307 @@ #----------------------------------------------------------------------------- # Convenient macro allowing to download a file #----------------------------------------------------------------------------- macro(downloadFile url dest) file(DOWNLOAD ${url} ${dest} STATUS status) list(GET status 0 error_code) list(GET status 1 error_msg) if(error_code) message(FATAL_ERROR "error: Failed to download ${url} - ${error_msg}") endif() endmacro() #----------------------------------------------------------------------------- # MITK Prerequisites #----------------------------------------------------------------------------- if(UNIX AND NOT APPLE) include(mitkFunctionCheckPackageHeader) # Check for libxt-dev mitkFunctionCheckPackageHeader(StringDefs.h libxt-dev /usr/include/X11/) # Check for libtiff4-dev mitkFunctionCheckPackageHeader(tiff.h libtiff4-dev) # Check for libwrap0-dev mitkFunctionCheckPackageHeader(tcpd.h libwrap0-dev) endif() #----------------------------------------------------------------------------- # ExternalProjects #----------------------------------------------------------------------------- set(external_projects VTK GDCM CableSwig ITK Boost DCMTK CTK OpenCV SOFA MITKData ) - set(MITK_USE_CableSwig ${MITK_USE_Python}) set(MITK_USE_GDCM 1) set(MITK_USE_ITK 1) set(MITK_USE_VTK 1) foreach(proj VTK GDCM CableSwig ITK DCMTK CTK OpenCV SOFA) if(MITK_USE_${proj}) set(EXTERNAL_${proj}_DIR "${${proj}_DIR}" CACHE PATH "Path to ${proj} build directory") mark_as_advanced(EXTERNAL_${proj}_DIR) if(EXTERNAL_${proj}_DIR) set(${proj}_DIR ${EXTERNAL_${proj}_DIR}) endif() endif() endforeach() if(MITK_USE_Boost) set(EXTERNAL_BOOST_ROOT "${BOOST_ROOT}" CACHE PATH "Path to Boost directory") mark_as_advanced(EXTERNAL_BOOST_ROOT) if(EXTERNAL_BOOST_ROOT) set(BOOST_ROOT ${EXTERNAL_BOOST_ROOT}) endif() endif() if(BUILD_TESTING) set(EXTERNAL_MITK_DATA_DIR "${MITK_DATA_DIR}" CACHE PATH "Path to the MITK data directory") mark_as_advanced(EXTERNAL_MITK_DATA_DIR) if(EXTERNAL_MITK_DATA_DIR) set(MITK_DATA_DIR ${EXTERNAL_MITK_DATA_DIR}) endif() endif() # Look for git early on, if needed if((BUILD_TESTING AND NOT EXTERNAL_MITK_DATA_DIR) OR (MITK_USE_CTK AND NOT EXTERNAL_CTK_DIR)) find_package(Git REQUIRED) endif() #----------------------------------------------------------------------------- # External project settings #----------------------------------------------------------------------------- include(ExternalProject) set(ep_base "${CMAKE_BINARY_DIR}/CMakeExternals") set_property(DIRECTORY PROPERTY EP_BASE ${ep_base}) set(ep_install_dir ${ep_base}/Install) #set(ep_build_dir ${ep_base}/Build) set(ep_source_dir ${ep_base}/Source) #set(ep_parallelism_level) set(ep_build_shared_libs ON) set(ep_build_testing OFF) if(NOT MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL) set(MITK_THIRDPARTY_DOWNLOAD_PREFIX_URL http://mitk.org/download/thirdparty) endif() # Compute -G arg for configuring external projects with the same CMake generator: if(CMAKE_EXTRA_GENERATOR) set(gen "${CMAKE_EXTRA_GENERATOR} - ${CMAKE_GENERATOR}") else() set(gen "${CMAKE_GENERATOR}") endif() # Use this value where semi-colons are needed in ep_add args: set(sep "^^") ## if(MSVC90 OR MSVC10) set(ep_common_C_FLAGS "${CMAKE_C_FLAGS} /bigobj /MP") set(ep_common_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj /MP") else() set(ep_common_C_FLAGS "${CMAKE_C_FLAGS} -DLINUX_EXTRA") set(ep_common_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DLINUX_EXTRA") endif() set(ep_common_args -DBUILD_TESTING:BOOL=${ep_build_testing} -DCMAKE_INSTALL_PREFIX:PATH=${ep_install_dir} -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER} -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER} -DCMAKE_C_FLAGS:STRING=${ep_common_C_FLAGS} -DCMAKE_CXX_FLAGS:STRING=${ep_common_CXX_FLAGS} #debug flags -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG} -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG} #release flags -DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE} -DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE} #relwithdebinfo -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_C_FLAGS_RELWITHDEBINFO} ) # Include external projects foreach(p ${external_projects}) include(CMakeExternals/${p}.cmake) endforeach() #----------------------------------------------------------------------------- # Set superbuild boolean args #----------------------------------------------------------------------------- set(mitk_cmake_boolean_args BUILD_SHARED_LIBS WITH_COVERAGE BUILD_TESTING MITK_USE_QT MITK_BUILD_ALL_PLUGINS MITK_BUILD_ALL_APPS MITK_BUILD_TUTORIAL # Deprecated. Use MITK_BUILD_EXAMPLES instead MITK_BUILD_EXAMPLES MITK_USE_Boost MITK_USE_SYSTEM_Boost MITK_USE_BLUEBERRY MITK_USE_CTK MITK_USE_DCMTK MITK_DCMTK_BUILD_SHARED_LIBS MITK_USE_OpenCV MITK_USE_SOFA MITK_USE_Python MITK_USE_OpenCL ) #----------------------------------------------------------------------------- # Create the final variable containing superbuild boolean args #----------------------------------------------------------------------------- set(mitk_superbuild_boolean_args) foreach(mitk_cmake_arg ${mitk_cmake_boolean_args}) list(APPEND mitk_superbuild_boolean_args -D${mitk_cmake_arg}:BOOL=${${mitk_cmake_arg}}) endforeach() if(MITK_BUILD_ALL_PLUGINS) list(APPEND mitk_superbuild_boolean_args -DBLUEBERRY_BUILD_ALL_PLUGINS:BOOL=ON) endif() #----------------------------------------------------------------------------- # MITK Utilities #----------------------------------------------------------------------------- set(proj MITK-Utilities) ExternalProject_Add(${proj} DOWNLOAD_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" DEPENDS # Mandatory dependencies ${VTK_DEPENDS} ${ITK_DEPENDS} # Optionnal dependencies ${Boost_DEPENDS} ${CTK_DEPENDS} ${DCMTK_DEPENDS} ${OpenCV_DEPENDS} ${SOFA_DEPENDS} ${MITK-Data_DEPENDS} ) #----------------------------------------------------------------------------- # MITK Configure #----------------------------------------------------------------------------- if(MITK_INITIAL_CACHE_FILE) set(mitk_initial_cache_arg -C "${MITK_INITIAL_CACHE_FILE}") endif() set(mitk_optional_cache_args ) foreach(type RUNTIME ARCHIVE LIBRARY) if(DEFINED CTK_PLUGIN_${type}_OUTPUT_DIRECTORY) list(APPEND mitk_optional_cache_args -DCTK_PLUGIN_${type}_OUTPUT_DIRECTORY:PATH=${CTK_PLUGIN_${type}_OUTPUT_DIRECTORY}) endif() endforeach() set(proj MITK-Configure) ExternalProject_Add(${proj} LIST_SEPARATOR ^^ DOWNLOAD_COMMAND "" CMAKE_GENERATOR ${gen} CMAKE_CACHE_ARGS ${ep_common_args} ${mitk_superbuild_boolean_args} ${mitk_optional_cache_args} -DMITK_USE_SUPERBUILD:BOOL=OFF -DMITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_LIBRARY_OUTPUT_DIRECTORY} -DMITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_RUNTIME_OUTPUT_DIRECTORY} -DMITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${MITK_CMAKE_ARCHIVE_OUTPUT_DIRECTORY} -DCTEST_USE_LAUNCHERS:BOOL=${CTEST_USE_LAUNCHERS} -DMITK_CTEST_SCRIPT_MODE:STRING=${MITK_CTEST_SCRIPT_MODE} -DMITK_SUPERBUILD_BINARY_DIR:PATH=${MITK_BINARY_DIR} -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE} -DMITK_KWSTYLE_EXECUTABLE:FILEPATH=${MITK_KWSTYLE_EXECUTABLE} -DMITK_MODULES_TO_BUILD:INTERNAL=${MITK_MODULES_TO_BUILD} -DCTK_DIR:PATH=${CTK_DIR} -DDCMTK_DIR:PATH=${DCMTK_DIR} -DVTK_DIR:PATH=${VTK_DIR} # FindVTK expects VTK_DIR -DITK_DIR:PATH=${ITK_DIR} # FindITK expects ITK_DIR -DOpenCV_DIR:PATH=${OpenCV_DIR} -DSOFA_DIR:PATH=${SOFA_DIR} -DGDCM_DIR:PATH=${GDCM_DIR} -DBOOST_ROOT:PATH=${BOOST_ROOT} -DMITK_USE_Boost_LIBRARIES:STRING=${MITK_USE_Boost_LIBRARIES} -DMITK_DATA_DIR:PATH=${MITK_DATA_DIR} -DMITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES} -DMITK_ACCESSBYITK_FLOATING_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_FLOATING_PIXEL_TYPES} -DMITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES:STRING=${MITK_ACCESSBYITK_COMPOSITE_PIXEL_TYPES} -DMITK_ACCESSBYITK_DIMENSIONS:STRING=${MITK_ACCESSBYITK_DIMENSIONS} CMAKE_ARGS ${mitk_initial_cache_arg} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} BINARY_DIR ${CMAKE_BINARY_DIR}/MITK-build BUILD_COMMAND "" INSTALL_COMMAND "" DEPENDS MITK-Utilities ) #----------------------------------------------------------------------------- # MITK #----------------------------------------------------------------------------- if(CMAKE_GENERATOR MATCHES ".*Makefiles.*") set(mitk_build_cmd "$(MAKE)") else() set(mitk_build_cmd ${CMAKE_COMMAND} --build ${CMAKE_CURRENT_BINARY_DIR}/MITK-build --config ${CMAKE_CFG_INTDIR}) endif() if(NOT DEFINED SUPERBUILD_EXCLUDE_MITKBUILD_TARGET OR NOT SUPERBUILD_EXCLUDE_MITKBUILD_TARGET) set(MITKBUILD_TARGET_ALL_OPTION "ALL") else() set(MITKBUILD_TARGET_ALL_OPTION "") endif() add_custom_target(MITK-build ${MITKBUILD_TARGET_ALL_OPTION} COMMAND ${mitk_build_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/MITK-build DEPENDS MITK-Configure ) #----------------------------------------------------------------------------- # Custom target allowing to drive the build of the MITK project itself #----------------------------------------------------------------------------- add_custom_target(MITK COMMAND ${mitk_build_cmd} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/MITK-build ) diff --git a/Wrapping/CMakeLists.txt b/Wrapping/CMakeLists.txt deleted file mode 100644 index a20ab40a53..0000000000 --- a/Wrapping/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -project(mitkWrap) -cmake_minimum_required(VERSION 2.6) - -include(${CMAKE_CURRENT_SOURCE_DIR}/mitkWrapSetup.cmake) - -# Find wrapping language API libraries. -if(MITK_USE_Python) - include(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake) - find_program(PYTHON_EXECUTABLE - NAMES python python2.3 python2.2 python2.1 python2.0 python1.6 python1.5 - PATHS - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.3\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.2\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.1\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\2.0\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.6\\InstallPath] - [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\1.5\\InstallPath] - ) - mark_as_advanced(PYTHON_EXECUTABLE) -endif(MITK_USE_Python) - -mark_as_advanced(MITK_USE_Python) -mark_as_advanced(CABLE_INDEX) -mark_as_advanced(CSWIG) -mark_as_advanced(GCCXML) - -# set a variable to determine if -# the CSwig directory should be used -set(MITK_CSWIG_DIR 0) -if(MITK_USE_Python) - set(MITK_CSWIG_DIR 1) -endif(MITK_USE_Python) - -if(MITK_CSWIG_DIR) - subdirs(CSwig) -endif(MITK_CSWIG_DIR) diff --git a/Wrapping/CSwig/CMakeLists.txt b/Wrapping/CSwig/CMakeLists.txt deleted file mode 100644 index 19eb58b447..0000000000 --- a/Wrapping/CSwig/CMakeLists.txt +++ /dev/null @@ -1,524 +0,0 @@ -if(CMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w") -endif(CMAKE_COMPILER_IS_GNUCXX) - -if(MITK_USE_Python) - # Python include directory. - set(MITK_INCLUDE_DIRS ${MITK_INCLUDE_DIRS} - ${PYTHON_INCLUDE_PATH}) -endif(MITK_USE_Python) - -# We have found CableSwig. Use the settings. -set(CABLE_INDEX ${CableSwig_cableidx_EXE}) -set(CSWIG ${CableSwig_cswig_EXE}) -set(GCCXML ${CableSwig_gccxml_EXE}) -set(MITK_WRAPPING_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) -set(MITK_WRAPPING_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) - -#set(MITK_WRAP_NEEDS_DEPEND 1) -#if(${CMAKE_MAKE_PROGRAM} MATCHES make) - #set(MITK_WRAP_NEEDS_DEPEND 0) -#endif(${CMAKE_MAKE_PROGRAM} MATCHES make) -set(MITK_TOP ${MITK_SOURCE_DIR}) -set(MITK_SWIG_DEFAULT_LIB ${CableSwig_DIR}/Swig/Lib ) -set(MITK_WRAP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) -set(MITK_WRAP_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) - -set(CSWIG_EXTRA_LINKFLAGS ) -if(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)") - set(CSWIG_EXTRA_LINKFLAGS "/IGNORE:4049") -endif(CMAKE_BUILD_TOOL MATCHES "(msdev|devenv|nmake)") - -if(CMAKE_SYSTEM MATCHES "IRIX.*") - if(CMAKE_CXX_COMPILER MATCHES "CC") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -woff 1552") - endif(CMAKE_CXX_COMPILER MATCHES "CC") -endif(CMAKE_SYSTEM MATCHES "IRIX.*") - -if(CMAKE_COMPILER_IS_GNUCXX) - string(REGEX REPLACE "-Wcast-qual" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -endif(CMAKE_COMPILER_IS_GNUCXX) - -set(IGNORE_WARNINGS -w362 -w389 -w503 -w508 -w509 -w516) -# define macros for wrapping commands -macro(GCCXML_CREATE_XML_FILE Source Bin Input Output Library) -# if the make program is not an IDE then include -# the depend file in a way that will make cmake -# re-run if it changes - set(CABLE_SWIG_DEPEND) - set(CABLE_SWIG_DEPEND_REGENERATE) - if(${CMAKE_MAKE_PROGRAM} MATCHES "make") - if(EXISTS ${Bin}/${Output}.depend) - else(EXISTS ${Bin}/${Output}.depend) - configure_file( - ${MITK_SOURCE_DIR}/Wrapping/CSwig/empty.depend.in - ${Bin}/${Output}.depend @ONLY IMMEDIATE) - endif(EXISTS ${Bin}/${Output}.depend) - include(${Bin}/${Output}.depend) - else(${CMAKE_MAKE_PROGRAM} MATCHES "make") -# for IDE generators like MS dev only include the depend files -# if they exist. This is to prevent ecessive reloading of -# workspaces after each build. This also means -# that the depends will not be correct until cmake -# is run once after the build has completed once. -# the depend files are created in the wrap tcl/python sections -# when the .xml file is parsed. - include(${Bin}/${Output}.depend OPTIONAL) - endif(${CMAKE_MAKE_PROGRAM} MATCHES "make") - - if(CABLE_SWIG_DEPEND) - # There are dependencies. Make sure all the files are present. - # If not, force the rule to re-run to update the dependencies. - foreach(f ${CABLE_SWIG_DEPEND}) - if(EXISTS ${f}) - else(EXISTS ${f}) - set(CABLE_SWIG_DEPEND_REGENERATE 1) - endif(EXISTS ${f}) - endforeach(f) - else(CABLE_SWIG_DEPEND) - # No dependencies, make the output depend on the dependency file - # itself, which should cause the rule to re-run. - set(CABLE_SWIG_DEPEND_REGENERATE 1) - endif(CABLE_SWIG_DEPEND) - if(CABLE_SWIG_DEPEND_REGENERATE) - set(CABLE_SWIG_DEPEND ${Bin}/${Output}.depend) - configure_file( - ${MITK_SOURCE_DIR}/Wrapping/CSwig/empty.depend.in - ${Bin}/${Output}.depend @ONLY IMMEDIATE) - endif(CABLE_SWIG_DEPEND_REGENERATE) - set(OutDir "Debug") - - if(WIN32) - set(OS -DWIN32) - endif(WIN32) - - add_custom_command( - COMMENT "${Output} from " - SOURCE ${Source}/${Input} - COMMAND ${GCCXML} - ARGS -fxml-start=_cable_ - -fxml=${Bin}/${Output} --gccxml-gcc-options ${SWIG_INC_FILE} - ${OS} - -DCSWIG -DCABLE_CONFIGURATION ${Source}/${Input} - TARGET ${Library} - OUTPUTS ${Bin}/${Output} - DEPENDS ${GCCXML} ${CABLE_SWIG_DEPEND}) - -endmacro(GCCXML_CREATE_XML_FILE) - - -macro(CINDEX_CREATE_IDX_FILE Bin Input Output Library) - add_custom_command( - COMMENT "${Output} from " - SOURCE ${Bin}/${Input} - COMMAND ${CABLE_INDEX} - ARGS ${Bin}/${Input} ${Bin}/${Output} - TARGET ${Library} - OUTPUTS ${Bin}/${Output} - DEPENDS ${Bin}/${Input} ${CABLE_INDEX} -) -endmacro(CINDEX_CREATE_IDX_FILE) - -set(MITK_USE_Python_NO_EXCEPTION_REGEX "(ContinuousIndex|Python)\\.xml$") - -macro(CSWIG_CREATE_PYTHON_CXX_FILE Bin MasterIdx InputIdx InputXml OutputPythonCxx Library LibraryIndexFiles) - set(CINDEX) - foreach(MIDX ${MasterIdx}) - set(CINDEX ${CINDEX} -Cindex "${MIDX}") - endforeach(MIDX) - if("${InputXml}" MATCHES "${MITK_USE_Python_NO_EXCEPTION_REGEX}") - set(MITK_SWG_FILE "") - else("${InputXml}" MATCHES "${MITK_USE_Python_NO_EXCEPTION_REGEX}") - set(MITK_SWG_FILE "-l${MITK_CSWIG_SOURCE_DIR}/mitk.swg" "-l${MITK_CSWIG_SOURCE_DIR}/mitkvtk.swg") - endif("${InputXml}" MATCHES "${MITK_USE_Python_NO_EXCEPTION_REGEX}") - string(REPLACE "_" "" LIB_PYTHON_FILES ${Library}) - - #message(STATUS "CMAKE_CFG_INTDIR: ${CMAKE_CFG_INTDIR}") - #message(STATUS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${LIB_PYTHON_FILES}") - #make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${LIB_PYTHON_FILES}) - make_directory(${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${LIB_PYTHON_FILES}) - file(WRITE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${LIB_PYTHON_FILES}/__init__.py "from mitkCorePython import *") - - add_custom_command( - COMMENT "${OutputPythonCxx} from " - SOURCE ${Bin}/${InputIdx} - COMMAND ${CSWIG} - ARGS ${MITK_SWG_FILE} - -I${MITK_SWIG_DEFAULT_LIB} - -I${MITK_SWIG_DEFAULT_LIB}/python - -noruntime - -dirprot - #-keyword - ${CINDEX} ${IGNORE_WARNINGS} -depend ${Bin}/${InputXml}.depend - -outdir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CFG_INTDIR}/${LIB_PYTHON_FILES}" - -o ${Bin}/${OutputPythonCxx} -python -c++ ${Bin}/${InputXml} - TARGET ${Library} - OUTPUTS ${Bin}/${OutputPythonCxx} - DEPENDS ${LibraryIndexFiles} ${MITK_CSWIG_SOURCE_DIR}/mitk.swg ${MITK_CSWIG_SOURCE_DIR}/mitk.swg ${Bin}/${InputXml} ${CSWIG} ) -endmacro(CSWIG_CREATE_PYTHON_CXX_FILE) - -# macro to create .xml, .idx and Python.cxx files -macro(WRAP_PYTHON_SOURCES Source Bin BaseName LibraryName MasterIdx LibraryIndexFiles) - GCCXML_CREATE_XML_FILE(${Source} ${Bin} ${BaseName}.cxx ${BaseName}.xml ${LibraryName}) - CINDEX_CREATE_IDX_FILE(${Bin} ${BaseName}.xml ${BaseName}.idx ${LibraryName}) - CSWIG_CREATE_PYTHON_CXX_FILE(${Bin} "${MasterIdx}" ${BaseName}.idx ${BaseName}.xml - ${BaseName}Python.cxx ${LibraryName} "${LibraryIndexFiles}") -endmacro(WRAP_PYTHON_SOURCES) - -# make sure required stuff is set -if(NOT EXECUTABLE_OUTPUT_PATH) - set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL "Single output directory for building all executables.") -endif(NOT EXECUTABLE_OUTPUT_PATH) - -set(MITK_CSWIG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) -set(MITK_CSWIG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) - -if(MITK_LIBRARY_DIRS) - string(REGEX REPLACE "^/" "" MITK_INSTALL_LIBRARY_DIR "${MITK_LIBRARY_DIRS}") -endif(MITK_LIBRARY_DIRS) -if(MITK_BINARY_DIR) - string(REGEX REPLACE "^/" "" MITK_INSTALL_BIN_DIR "${MITK_BINARY_DIR}") -endif(MITK_BINARY_DIR) -set(CSWIG_MISSING_VALUES) -if(NOT CSWIG) - set(CSWIG_MISSING_VALUES "${CSWIG_MISSING_VALUES} CSWIG ") -endif(NOT CSWIG) -if(NOT CABLE_INDEX) - set(CSWIG_MISSING_VALUES "${CSWIG_MISSING_VALUES} CABLE_INDEX ") -endif(NOT CABLE_INDEX) -if(NOT GCCXML) - set(CSWIG_MISSING_VALUES "${CSWIG_MISSING_VALUES} GCCXML ") -endif(NOT GCCXML) -if(CSWIG_MISSING_VALUES) - message(SEND_ERROR "To use cswig wrapping, CSWIG, CABLE_INDEX, and GCCXML executables must be specified. If they are all in the same directory, only specifiy one of them, and then run cmake configure again and the others should be found.\nCurrently, you are missing the following:\n ${CSWIG_MISSING_VALUES}") -endif(CSWIG_MISSING_VALUES) - - -if(MITK_USE_Python) - include_directories(${PYTHON_INCLUDE_PATH} ) -endif(MITK_USE_Python) - -set(SWIG_INC - ${MITK_INCLUDE_DIRS_BUILD_TREE} - ${MITK_INCLUDE_DIRS_BUILD_TREE_CXX} - ${MITK_INCLUDE_DIRS} - ${MITK_TOP}/Wrapping/CSwig - ${MITK_TOP}/Wrapping/CSwig/Core - ) -add_definitions(-DSWIG_GLOBAL) - -include(PythonMITKModules.cmake) - -add_subdirectory(SwigRuntime) - -if(UNIX) - set(MITK_CSWIG_LIBNAME_PREFIX "lib") -else(UNIX) - set(MITK_CSWIG_LIBNAME_PREFIX "") -endif(UNIX) - -set(MITK_CSWIG_PACKAGE_DIR_BUILD "${MITK_LIBRARY_PATH}") - -#----------------------------------------------------------------------------- -# Configure python packages. -set(MITK_CSWIG_DATA_ROOT "'${MITK_DATA_ROOT}'") -set(MITK_CSWIG_TEST_ROOT "'${MITK_BINARY_DIR}/Testing'") -#if(MITK_CSWIG_CONFIGURATION_TYPES) - #foreach(config ${MITK_CSWIG_CONFIGURATION_TYPES}) - #set(ITK_CSWIG_PACKAGE_DIR "'${MITK_CSWIG_PACKAGE_DIR_BUILD}/${config}'") - #configure_file("${MITK_SOURCE_DIR}/Wrapping/CSwig/Python/mitkbase.py.in" - #"${MITK_BINARY_DIR}/Wrapping/CSwig/Python/${config}/mitkbase.py" - #@ONLY IMMEDIATE) - #endforeach(config) -#else(MITK_CSWIG_CONFIGURATION_TYPES) - #set(MITK_CSWIG_PACKAGE_DIR "'${MITK_CSWIG_PACKAGE_DIR_BUILD}'") - #configure_file("${MITK_SOURCE_DIR}/Wrapping/CSwig/Python/mitkbase.py.in" - #"${MITK_BINARY_DIR}/Wrapping/CSwig/Python/mitkbase.py" - #@ONLY IMMEDIATE) -#endif(MITK_CSWIG_CONFIGURATION_TYPES) - -# Handle out-of-source builds correctly. -# -# 1. Create a list of Python files to be installed/copied. -# 2. Copy them to ITK_BINARY_DIR if it is different from ITK_SOURCE_DIR. -# 3. Use Python's compileall to compile the copied files. -# -# *** Step 1 has to be done carefully to avoid missing out files *** -if(PYTHON_EXECUTABLE AND MITK_USE_Python) - - #file(WRITE ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mitk.py "") - #configure_file(Python/mitk.py.in ${CMAKE_CURRENT_BINARY_DIR}/mitk.py) - file(COPY Python/mitkCast.py DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE) - - - set(CMAKE_MODULE_PATH ${MITK_SOURCE_DIR}/CMake) - add_custom_target(mitkpython_pyc ALL echo "...") - - # Make the necessary directories. - make_directory(${MITK_BINARY_DIR}/Wrapping/CSwig/Python) - - # Now create a list of Python files. - set(MITK_PYTHON_FILES) - - # Wrapping/CSwig/Python/*.py - set(MITK_PYTHON_FILES - ${MITK_PYTHON_FILES} - mitk - ) - # Done listing files. - - # Now copy these files if necessary. - set(MITK_PYTHON_SOURCE_FILES) - set(MITK_PYTHON_OUTPUT_FILES) - #if(MITK_CSWIG_CONFIGURATION_TYPES) - #foreach(file ${MITK_PYTHON_FILES}) - #set(src "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/${CMAKE_CFG_INTDIR}/${file}.py") - #set(MITK_PYTHON_SOURCE_FILES ${MITK_PYTHON_SOURCE_FILES} ${src}) - #endforeach(file) - #else(MITK_CSWIG_CONFIGURATION_TYPES) - #foreach(file ${MITK_PYTHON_FILES}) - #set(src "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/${file}.py") - #set(ITK_PYTHON_SOURCE_FILES ${MITK_PYTHON_SOURCE_FILES} ${src}) - #endforeach(file) - #endif(MITK_CSWIG_CONFIGURATION_TYPES) - #if("${MITK_BINARY_DIR}" MATCHES "^${MITK_SOURCE_DIR}$") - #message("In source build -- no need to copy Python files.") - #else("${MITK_BINARY_DIR}" MATCHES "^${MITK_SOURCE_DIR}$") - #if(MITK_CSWIG_CONFIGURATION_TYPES) - #foreach(file ${MITK_PYTHON_FILES}) - #set(src "${MITK_SOURCE_DIR}/Wrapping/CSwig/Python/${file}.py") - #set(tgt "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${file}.py") - #add_custom_command(SOURCE ${src} - #COMMAND ${CMAKE_COMMAND} - #ARGS -E copy ${src} ${tgt} - #OUTPUTS ${tgt} - #TARGET copy - #COMMENT "source copy") - #endforeach(file) - #else(MITK_CSWIG_CONFIGURATION_TYPES) - #foreach(file ${MITK_PYTHON_FILES}) - #set(src "${MITK_SOURCE_DIR}/Wrapping/CSwig/Python/${file}.py") - #set(tgt "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/${file}.py") - #add_custom_command(SOURCE ${src} - #COMMAND ${CMAKE_COMMAND} - #ARGS -E copy ${src} ${tgt} - #OUTPUTS ${tgt} - #TARGET mitkpython_pyc - #COMMENT "source copy") - #endforeach(file) - #endif(MITK_CSWIG_CONFIGURATION_TYPES) - #endif("${MITK_BINARY_DIR}" MATCHES "^${MITK_SOURCE_DIR}$") - - # Byte compile the Python files. - write_file(${MITK_BINARY_DIR}/Wrapping/CSwig/Python/compile_all_mitk - "import compileall\n" - "compileall.compile_dir('${MITK_BINARY_DIR}/Wrapping/CSwig/Python')\n" - "file = open('${MITK_BINARY_DIR}/Wrapping/CSwig/Python/mitk_compile_complete', 'w')\n" - "file.write('Done')\n") - - add_custom_command( - SOURCE ${MITK_BINARY_DIR}/Wrapping/CSwig/Python/compile_all_mitk - COMMAND ${PYTHON_EXECUTABLE} - ARGS ${MITK_BINARY_DIR}/Wrapping/CSwig/Python/compile_all_mitk - DEPENDS ${MITK_PYTHON_SOURCE_FILES} - OUTPUTS "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/mitk_compile_complete" - TARGET mitkpython_pyc - ) - - add_custom_command( - SOURCE mitkpython_pyc - DEPENDS "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/mitk_compile_complete" - TARGET mitkpython_pyc - ) - -endif(PYTHON_EXECUTABLE AND MITK_USE_Python) - -if(MITK_USE_Python) - # Install the python files created at build time. - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.4") - # Old-style installation. - configure_file( - "${MITK_CSWIG_SOURCE_DIR}/pythonfiles_install.cmake.in" - "${MITK_CSWIG_BINARY_DIR}/pythonfiles_install.cmake" - @ONLY IMMEDIATE) - add_custom_target(python_install) - set_target_properties(python_install PROPERTIES - POST_INSTALL_SCRIPT "${MITK_CSWIG_BINARY_DIR}/pythonfiles_install.cmake") - else("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.4") - # Use CMake 2.6 FILES_MATCHING feature to install correctly. - if(MITK_CSWIG_CONFIGURATION_TYPES) - set(_FROMDIR ${EXECUTABLE_OUTPUT_PATH}/\${CMAKE_INSTALL_CONFIG_NAME}) - else(MITK_CSWIG_CONFIGURATION_TYPES) - set(_FROMDIR ${EXECUTABLE_OUTPUT_PATH}) - endif(MITK_CSWIG_CONFIGURATION_TYPES) - if(MITK_INSTALL_LIBRARY_DIR) - install( - DIRECTORY ${_FROMDIR}/ - DESTINATION ${MITK_INSTALL_LIBRARY_DIR} - COMPONENT "RuntimeLibraries" - FILES_MATCHING PATTERN "*.py" - ) - endif(MITK_INSTALL_LIBRARY_DIR) - endif("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" STREQUAL "2.4") - - # Install the package python files. - #foreach(file ${MITK_PYTHON_FILES}) - #if(MITK_CSWIG_CONFIGURATION_TYPES) - #install(FILES "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/\${CMAKE_INSTALL_CONFIG_NAME}/${file}.py" - #DESTINATION ${MITK_INSTALL_LIBRARY_DIR}/python - #COMPONENT RuntimeLibraries) - #else(MITK_CSWIG_CONFIGURATION_TYPES) - #install(FILES "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/${file}.py" - #DESTINATION ${MITK_INSTALL_LIBRARY_DIR}/python - #COMPONENT RuntimeLibraries) - #endif(MITK_CSWIG_CONFIGURATION_TYPES) - #endforeach(file) - - set(MITK_CSWIG_PACKAGE_DIR "os.path.dirname(selfpath)") - set(MITK_CSWIG_DATA_ROOT "os.path.join(os.path.dirname(selfpath),'Data')") - set(MITK_CSWIG_TEST_ROOT "''") - #configure_file("${MITK_SOURCE_DIR}/Wrapping/CSwig/Python/mitkbase.py.in" - #"${MITK_BINARY_DIR}/Wrapping/CSwig/Python/InstallOnly/mitkbase.py" - #@ONLY IMMEDIATE) - #install(FILES "${MITK_BINARY_DIR}/Wrapping/CSwig/Python/InstallOnly/mitkbase.py" - #DESTINATION ${MITK_INSTALL_LIBRARY_DIR}/python - #COMPONENT RuntimeLibraries) -endif(MITK_USE_Python) - - -macro(MITK_WRAP_LIBRARY WRAP_SOURCES LIBRARY_NAME DIRECTORY DEPEND_LIBRARY EXTRA_SOURCES MITK_LINK_LIBRARIES) - # loop over cable config files creating two lists: - # WRAP_PYTHON_SOURCES: list of generated files - foreach(Source ${WRAP_SOURCES}) - set(WRAP_PYTHON_SOURCES ${WRAP_PYTHON_SOURCES} ${Source}Python.cxx) - set(ALL_IDX_FILES ${ALL_IDX_FILES} ${MITK_WRAP_BINARY_DIR}/${DIRECTORY}/${Source}.idx ) - set(INDEX_FILE_CONTENT "${INDEX_FILE_CONTENT}${MITK_CSWIG_BINARY_DIR}/${DIRECTORY}/${Source}.idx\n") - endforeach(Source) - # add the package wrappers - set(WRAP_PYTHON_SOURCES ${WRAP_PYTHON_SOURCES} wrap_${LIBRARY_NAME}PythonPython.cxx) - if(MITK_EXTRA_PYTHON_WRAP) - foreach( extraPython ${MITK_EXTRA_PYTHON_WRAP}) - set(WRAP_PYTHON_SOURCES ${WRAP_PYTHON_SOURCES} ${extraPython}Python.cxx) - endforeach( extraPython ) - endif(MITK_EXTRA_PYTHON_WRAP) - - # set the generated sources as generated - set_source_files_properties( - ${WRAP_PYTHON_SOURCES} - GENERATED ) - set(EXTRA_LIBS ${MITK_LINK_LIBRARIES}) - if("${MITK_LINK_LIBRARIES}" MATCHES "^$") - #set(EXTRA_LIBS ${LIBRARY_NAME}) - endif("${MITK_LINK_LIBRARIES}" MATCHES "^$") - - file(APPEND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mitk.py - "from ${LIBRARY_NAME}Python import *\n") - - set(DEPENDENCIES mitkIpPic mbilog tinyxml) - set(DEPENDS ${DEPENDENCIES}) - MITK_CHECK_MODULE(_MISSING_DEP ${DEPENDENCIES}) - MITK_USE_MODULE("Mitk") - - set(ALL_INCLUDE_DIRECTORIES ${ALL_INCLUDE_DIRECTORIES} ${MITK_INCLUDE_DIRS} ${MITK_WRAP_SOURCE_DIR} ${GDCM_INCLUDE_DIRS} ) - # "D:/MITK/mitk/CoreUI/Bundles/org.mitk.gui.qt.common/src" "D:/MITK/mitk/BlueBerry/Bundles/org.blueberry.ui.qt/src" "D:/MITK/mitk/BlueBerry/Bundles/org.blueberry.ui/src" "D:/MITK/mitk/BlueBerry/Bundles/org.blueberry.core.runtime/src" "D:/MITK/mitk/CoreUI/Bundles/org.mitk.gui.common/src" "D:/MITK/mitk/BlueBerry/Bundles/org.blueberry.osgi/src" "D:/MITK/mitk/BlueBerry/Bundles/org.blueberry.osgi/src/service" "D:/MITK/mitk/Utilities/Poco/Foundation/include" "D:/binPython/BlueBerry/Bundles/org.blueberry.osgi" "D:/MITK/mitk/Utilities/Poco/Util/include" "V:/windows/x32/QT-4.6.2_VC9.0_Bin/include/QtGui" "V:/windows/x32/QT-4.6.2_VC9.0_Bin/include" - include_directories(${ALL_INCLUDE_DIRECTORIES}) - - - if(MITK_USE_Python) - if(MITK_SWIG_FILE) - set(SWIG_INC ${SWIG_INC} ${PYTHON_INCLUDE_PATH}) - set_source_files_properties(${MITK_SWIG_FILE_CXX}Python.cxx GENERATED) - set(WRAP_FILE ${MITK_SWIG_FILE_CXX}Python.cxx ) - endif(MITK_SWIG_FILE) - - add_library(_${LIBRARY_NAME}Python SHARED - ${WRAP_PYTHON_SOURCES} - ${MITK_EXTRA_PYTHON_SOURCES} - ${WRAP_FILE} - ${EXTRA_SOURCES}) - - #target_link_libraries(_${LIBRARY_NAME}Python ${DEPENDENCIES}) - - if(MITK_WRAP_NEEDS_DEPEND) - foreach(lib ${DEPEND_LIBRARY}) - add_dependencies(_${LIBRARY_NAME}Python _${lib}Python) - endforeach(lib) - endif(MITK_WRAP_NEEDS_DEPEND) - if(MITK_LIBRARY_PROPERTIES) - set_target_properties( _${LIBRARY_NAME}Python PROPERTIES PREFIX "" ${MITK_LIBRARY_PROPERTIES}) - else(MITK_LIBRARY_PROPERTIES) - set_target_properties( _${LIBRARY_NAME}Python PROPERTIES PREFIX "") - endif(MITK_LIBRARY_PROPERTIES) - - # Python extension modules on Windows must have the extension ".pyd" - # instead of ".dll" as of Python 2.5. Older python versions do support - # this suffix. - if(WIN32 AND NOT CYGWIN) - set_target_properties(_${LIBRARY_NAME}Python PROPERTIES DEBUG_POSTFIX "_d" SUFFIX ".pyd") - endif(WIN32 AND NOT CYGWIN) - - if(PYTHON_DEBUG_LIBRARY) - target_link_libraries(_${LIBRARY_NAME}Python ${DEPENDENCIES} ${EXTRA_LIBS} SwigRuntimePython debug ${PYTHON_DEBUG_LIBRARY} optimized ${PYTHON_LIBRARY}) - else(PYTHON_DEBUG_LIBRARY) - target_link_libraries(_${LIBRARY_NAME}Python ${DEPENDENCIES} ${EXTRA_LIBS} SwigRuntimePython ${PYTHON_LIBRARY}) - endif(PYTHON_DEBUG_LIBRARY) - if(MITK_INSTALL_LIBRARY_DIR) - install(TARGETS _${LIBRARY_NAME}Python - RUNTIME DESTINATION ${MITK_INSTALL_BIN_DIR} COMPONENT RuntimeLibraries - LIBRARY DESTINATION ${MITK_INSTALL_LIBRARY_DIR} COMPONENT RuntimeLibraries - ARCHIVE DESTINATION ${MITK_INSTALL_LIBRARY_DIR} COMPONENT Development) - endif(MITK_INSTALL_LIBRARY_DIR) - if(MITK_SWIG_FILE) - add_custom_command( - COMMENT "run native swig on ${MITK_SWIG_FILE}" - SOURCE ${MITK_SWIG_FILE} - COMMAND ${CSWIG} - ARGS -nocable -noruntime ${IGNORE_WARNINGS} -o ${WRAP_FILE} - -outdir "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}" - -python -c++ ${MITK_SWIG_FILE} - TARGET _${LIBRARY_NAME}Python - OUTPUTS ${WRAP_FILE} - DEPENDS ${MITK_SWIG_FILE} ${CSWIG}) - endif(MITK_SWIG_FILE) - endif(MITK_USE_Python) - - configure_file( - ${MITK_CSWIG_SOURCE_DIR}/Master.mdx.in - ${MITK_CSWIG_BINARY_DIR}/${DIRECTORY}/${LIBRARY_NAME}.mdx IMMEDIATE - ) - - set(SWIG_INC_FILE ${MITK_CSWIG_BINARY_DIR}/${DIRECTORY}/SwigInc.txt) - set(SWIG_INC_CONTENTS) - set(SWIG_INC ${ALL_INCLUDE_DIRECTORIES}) - foreach(dir ${SWIG_INC}) - set(SWIG_INC_CONTENTS "${SWIG_INC_CONTENTS}-I${dir}\n") - endforeach(dir) - configure_file(${MITK_CSWIG_SOURCE_DIR}/SwigInc.txt.in ${SWIG_INC_FILE} - @ONLY IMMEDIATE) - - foreach(Source ${WRAP_SOURCES}) - - if(MITK_USE_Python) - # python - WRAP_PYTHON_SOURCES(${MITK_CSWIG_SOURCE_DIR}/${DIRECTORY} ${MITK_CSWIG_BINARY_DIR}/${DIRECTORY} - ${Source} _${LIBRARY_NAME}Python "${MASTER_INDEX_FILES}" "${ALL_IDX_FILES}") - endif(MITK_USE_Python) - - endforeach(Source) - - - # wrap the package files for python - if(MITK_USE_Python) - # python - WRAP_PYTHON_SOURCES(${MITK_CSWIG_SOURCE_DIR}/${DIRECTORY} ${MITK_CSWIG_BINARY_DIR}/${DIRECTORY} - wrap_${LIBRARY_NAME}Python _${LIBRARY_NAME}Python "${MASTER_INDEX_FILES}" "${ALL_IDX_FILES}") - if(MITK_EXTRA_PYTHON_WRAP) - foreach( extraPython ${MITK_EXTRA_PYTHON_WRAP}) - WRAP_PYTHON_SOURCES(${MITK_CSWIG_SOURCE_DIR}/${DIRECTORY} ${MITK_CSWIG_BINARY_DIR}/${DIRECTORY} - ${extraPython} _${LIBRARY_NAME}Python "${MASTER_INDEX_FILES}" "${ALL_IDX_FILES}") - endforeach( extraPython ) - endif(MITK_EXTRA_PYTHON_WRAP) - - endif(MITK_USE_Python) - -endmacro(MITK_WRAP_LIBRARY) diff --git a/Wrapping/CSwig/Core/CMakeLists.txt b/Wrapping/CSwig/Core/CMakeLists.txt deleted file mode 100644 index 5d5225680d..0000000000 --- a/Wrapping/CSwig/Core/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -# create the mitkCorePython libraries -include(wrapSources.cmake) - -set(MASTER_INDEX_FILES "${CMAKE_CURRENT_BINARY_DIR}/Mitk.mdx" -) - -set(mitkCorePythonDependencies Mitk debug vtkCommonPythonD optimized vtkCommonPython) - - -MITK_WRAP_LIBRARY("${WRAP_SOURCES_TEST}" Mitk Core - "" "" "${mitkCorePythonDependencies}") - diff --git a/Wrapping/CSwig/Core/wrapSources.cmake b/Wrapping/CSwig/Core/wrapSources.cmake deleted file mode 100644 index ccd693e9dc..0000000000 --- a/Wrapping/CSwig/Core/wrapSources.cmake +++ /dev/null @@ -1,247 +0,0 @@ -# create the mitkControllers libraries -set(WRAP_SOURCES_TEST - #Algorithms: - #wrap_itkImportMitkImageContainer //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_itkLocalVariationImageFilter //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_itkMITKScalarImageToHistogramGenerator //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_itkTotalVariationDenoisingImageFilter //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_itkTotalVariationSingleIterationImageFilter //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkBaseDataSource - wrap_mitkBaseProcess - wrap_mitkCoreObjectFactory - wrap_mitkCoreObjectFactoryBase - wrap_mitkDataNodeFactory - wrap_mitkDataNodeSource - wrap_mitkGeometry2DDataToSurfaceFilter - wrap_mitkHistogramGenerator - #wrap_mitkImageAccessByItk //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_mitkImageCast //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_mitkImageCastPart1 //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_mitkImageCastPart2 //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_mitkImageCastPart3 //Template: can be wrapped; TODO: instantiate the needed templates - #wrap_mitkImageCastPart4 //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkImageChannelSelector - wrap_mitkImageSliceSelector - wrap_mitkImageSource - wrap_mitkImageTimeSelector - wrap_mitkImageToImageFilter - wrap_mitkImageToItk - #wrap_mitkInstantiateAccessFunctions // Macros - wrap_mitkITKImageImport - wrap_mitkPointSetSource - wrap_mitkRGBToRGBACastImageFilter - wrap_mitkSubImageSelector - wrap_mitkSurfaceSource - wrap_mitkSurfaceToSurfaceFilter - wrap_mitkUIDGenerator - wrap_mitkVolumeCalculator - - #Controllers: - wrap_mitkBaseController - wrap_mitkCallbackFromGUIThread - wrap_mitkCameraController - wrap_mitkCameraRotationController - wrap_mitkFocusManager - wrap_mitkLimitedLinearUndo - wrap_mitkOperationEvent - wrap_mitkProgressBar - wrap_mitkProgressBarImplementation - wrap_mitkReferenceCountWatcher - wrap_mitkRenderingManager - wrap_mitkRenderingManagerFactory - wrap_mitkSliceNavigationController - wrap_mitkSlicesCoordinator - wrap_mitkSlicesRotator - wrap_mitkSlicesSwiveller - wrap_mitkStatusBar - wrap_mitkStatusBarImplementation - wrap_mitkStepper - #wrap_mitkTestingMacros //Macros - wrap_mitkTestManager - wrap_mitkUndoController - wrap_mitkUndoModel - wrap_mitkVerboseLimitedLinearUndo - wrap_mitkVtkInteractorCameraController - wrap_mitkVtkLayerController - - #DataManagement: - #wrap_itkVtkAbstractTransform //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkAbstractTransformGeometry - wrap_mitkAnnotationProperty - wrap_mitkApplicationCursor - wrap_mitkBaseData - wrap_mitkBaseDataTestImplementation - wrap_mitkBaseProperty - wrap_mitkClippingProperty - wrap_mitkColorProperty - #wrap_mitkCommon //Macros - wrap_mitkDataNode - wrap_mitkDataStorage - wrap_mitkDisplayGeometry - wrap_mitkEnumerationProperty - wrap_mitkGenericLookupTable - #wrap_mitkGenericProperty //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkGeometry2D - wrap_mitkGeometry2DData - wrap_mitkGeometry3D - wrap_mitkGeometryData - wrap_mitkGroupTagProperty - wrap_mitkImage - wrap_mitkImageDataItem - #wrap_mitkItkMatrixHack //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkLandmarkBasedCurvedGeometry - wrap_mitkLandmarkProjector - wrap_mitkLandmarkProjectorBasedCurvedGeometry - wrap_mitkLevelWindow - wrap_mitkLevelWindowManager - wrap_mitkLevelWindowPreset - wrap_mitkLevelWindowProperty - #wrap_mitkLine //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkLookupTable - wrap_mitkLookupTables - wrap_mitkMaterial - #wrap_mitkMatrixConvert //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkMemoryUtilities - wrap_mitkModalityProperty - wrap_mitkModeOperation - wrap_mitkNodePredicateAND - wrap_mitkNodePredicateBase - wrap_mitkNodePredicateCompositeBase - wrap_mitkNodePredicateData - wrap_mitkNodePredicateDataType - wrap_mitkNodePredicateDimension - wrap_mitkNodePredicateFirstLevel - wrap_mitkNodePredicateNOT - wrap_mitkNodePredicateOR - wrap_mitkNodePredicateProperty - wrap_mitkNodePredicateSource - wrap_mitkPlaneOrientationProperty - wrap_mitkPlaneGeometry - wrap_mitkPlaneOperation - wrap_mitkPointOperation - wrap_mitkPointSet - wrap_mitkProperties - wrap_mitkPropertyList - wrap_mitkResliceMethodProperty - wrap_mitkRotationOperation - wrap_mitkShaderProperty - wrap_mitkSlicedData - wrap_mitkSlicedGeometry3D - wrap_mitkSmartPointerProperty - wrap_mitkStandaloneDataStorage - wrap_mitkStateTransitionOperation - wrap_mitkStringProperty - wrap_mitkSurface - wrap_mitkSurfaceOperation - wrap_mitkThinPlateSplineCurvedGeometry - wrap_mitkTimeSlicedGeometry - wrap_mitkTransferFunction - wrap_mitkTransferFunctionProperty - #wrap_mitkVector //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkVtkInterpolationProperty - wrap_mitkVtkRepresentationProperty - wrap_mitkVtkResliceInterpolationProperty - wrap_mitkVtkScalarModeProperty - wrap_mitkVtkVolumeRenderingProperty - #wrap_mitkWeakPointer //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkWeakPointerProperty - - #Interactions: - wrap_mitkAction - wrap_mitkAffineInteractor - wrap_mitkCoordinateSupplier - wrap_mitkDisplayCoordinateOperation - wrap_mitkDisplayInteractor - wrap_mitkDisplayPositionEvent - wrap_mitkDisplayVectorInteractor - wrap_mitkEvent - wrap_mitkEventDescription - wrap_mitkEventMapper - wrap_mitkGlobalInteraction - wrap_mitkInteractor - wrap_mitkKeyEvent - #wrap_mitkMessage //Macros;Templates: can be wrapped; TODO: instantiate the needed templates - wrap_mitkMouseMovePointSetInteractor - wrap_mitkPointSetInteractor - wrap_mitkPositionEvent - wrap_mitkPositionTracker - wrap_mitkState - wrap_mitkStateEvent - wrap_mitkStateMachine - wrap_mitkStateMachineFactory - wrap_mitkTransition - wrap_mitkWheelEvent - - #IO: - wrap_mitkBaseDataIOFactory - wrap_mitkDicomSeriesReader - wrap_mitkFileReader - wrap_mitkFileSeriesReader - wrap_mitkFileWriter - wrap_mitkFileWriterWithInformation - wrap_mitkImageWriter - wrap_mitkImageWriterFactory - #wrap_mitkIOAdapter //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkItkImageFileIOFactory - wrap_mitkItkImageFileReader - #wrap_mitkItkPictureWrite //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkLog - wrap_mitkLookupTableProperty - wrap_mitkOperation - wrap_mitkOperationActor - wrap_mitkPicFileIOFactory - wrap_mitkPicFileReader - wrap_mitkPicFileWriter - wrap_mitkPicHelper - wrap_mitkPicVolumeTimeSeriesIOFactory - wrap_mitkPicVolumeTimeSeriesReader - wrap_mitkPixelType - wrap_mitkPointSetIOFactory - wrap_mitkPointSetReader - wrap_mitkPointSetWriter - wrap_mitkPointSetWriterFactory - #wrap_mitkRawImageFileReader // need to be modified; wrapper class tries to convert from 'std::string' to 'char *' - wrap_mitkStandardFileLocations - wrap_mitkSTLFileIOFactory - wrap_mitkSTLFileReader - #wrap_mitkSurfaceVtkWriter //Template: can be wrapped; TODO: instantiate the needed templates - wrap_mitkSurfaceVtkWriterFactory - wrap_mitkVtiFileIOFactory - wrap_mitkVtiFileReader - wrap_mitkVtkImageIOFactory - wrap_mitkVtkImageReader - wrap_mitkVtkSurfaceIOFactory - wrap_mitkVtkSurfaceReader - wrap_vtkPointSetXMLParser - - #Rendering: - #wrap_mitkBaseRenderer //leads to a crash of cswig; after bug fixed in cswig -> circular import error - wrap_mitkVtkMapper2D - wrap_mitkVtkMapper3D - wrap_mitkGeometry2DDataMapper2D - wrap_mitkGeometry2DDataVtkMapper3D - wrap_mitkGLMapper2D - wrap_mitkGradientBackground - wrap_mitkImageMapperGL2D - wrap_mitkMapper - wrap_mitkMapper2D - wrap_mitkMapper3D - wrap_mitkPointSetGLMapper2D - wrap_mitkPointSetVtkMapper3D - wrap_mitkPolyDataGLMapper2D - wrap_mitkShaderRepository - wrap_mitkSurfaceGLMapper2D - wrap_mitkSurfaceVtkMapper3D - wrap_mitkVolumeDataVtkMapper3D - wrap_mitkVtkPropRenderer - wrap_mitkVtkWidgetRendering - wrap_vtkMitkRectangleProp - wrap_vtkMitkRenderProp - wrap_vtkMitkThickSlicesFilter - wrap_mitkManufacturerLogo - - wrap_mitkCommonSuperclasses - wrap_mitkImageCaster - #wrap_qmitkFunctionality -) - diff --git a/Wrapping/CSwig/Core/wrap_MITKControllersPython.cxx b/Wrapping/CSwig/Core/wrap_MITKControllersPython.cxx deleted file mode 100644 index 66f231f1ff..0000000000 --- a/Wrapping/CSwig/Core/wrap_MITKControllersPython.cxx +++ /dev/null @@ -1,59 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkControllersPython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - "BaseController", - "CallbackFromGUIThread", - "CameraController", - "CameraRotationController", - "FocusManager", - "LimitedLinearUndo", - "OperationEvent", - "ProgressBar", - "ProgressBarImplementation", - //"ReferenceCountWatcher", - "RenderingManager", - "RenderingManagerFactory", - "SliceNavigationController", - "SlicesCoordinator", - "SlicesRotator", - "SlicesSwiveller", - "StatusBar", - "StatusBarImplementation", - "Stepper", - //"TestingMacros", - "TestManager", - "UndoController", - "UndoModel", - "VerboseLimitedLinearUndo", - "VtkInteractorCameraController", - "VtkLayerController" - }; -} -#endif diff --git a/Wrapping/CSwig/Core/wrap_itkVtkAbstractTransform.cxx b/Wrapping/CSwig/Core/wrap_itkVtkAbstractTransform.cxx deleted file mode 100644 index 3261b45d90..0000000000 --- a/Wrapping/CSwig/Core/wrap_itkVtkAbstractTransform.cxx +++ /dev/null @@ -1,32 +0,0 @@ -#include "itkVtkAbstractTransform.h" -#include "itkImage.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkAbstractTransform"; - namespace wrappers - { - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformF2; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformF2_Pointer; - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformUC2; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformUC2_Pointer; - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformUS2; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformUS2_Pointer; - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformUL2; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformUL2_Pointer; - - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformF3; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformF3_Pointer; - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformUC3; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformUC3_Pointer; - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformUS3; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformUS3_Pointer; - typedef itk::VtkAbstractTransform::Image> VtkAbstractTransformUL3; - typedef itk::VtkAbstractTransform::Image>::Pointer::SmartPointer VtkAbstractTransformUL3_Pointer; - } -} - -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkAbstractTransformGeometry.cxx b/Wrapping/CSwig/Core/wrap_mitkAbstractTransformGeometry.cxx deleted file mode 100644 index 94ec0736d3..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkAbstractTransformGeometry.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkAbstractTransformGeometry.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="AbstractTransformGeometry"; - namespace wrappers - { - MITK_WRAP_OBJECT(AbstractTransformGeometry) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkAction.cxx b/Wrapping/CSwig/Core/wrap_mitkAction.cxx deleted file mode 100644 index b39ddae757..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkAction.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkAction.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Action"; - namespace wrappers - { - MITK_WRAP_OBJECT(Action) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkAffineInteractor.cxx b/Wrapping/CSwig/Core/wrap_mitkAffineInteractor.cxx deleted file mode 100644 index 54ff69d91f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkAffineInteractor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkAffineInteractor.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="AffineInteractor"; - namespace wrappers - { - MITK_WRAP_OBJECT(AffineInteractor) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkAlgorithmsPython.cxx b/Wrapping/CSwig/Core/wrap_mitkAlgorithmsPython.cxx deleted file mode 100644 index 72dca1eac5..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkAlgorithmsPython.cxx +++ /dev/null @@ -1,55 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkAlgorithmsPython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - //"ProcessObject", - "BaseDataSource", - "BaseProcess", - "CoreObjectFactory", - "CoreObjectFactoryBase", - "DataNodeFactory", - "DataNodeSource", - "Geometry2DDataToSurfaceFilter", - "HistogramGenerator", - "ImageChannelSelector", - "ImageSliceSelector", - "ImageSource", - "ImageTimeSelector", - "ImageToImageFilter", - "ImageToItk", - "ITKImageImport", - "PointSetSource", - "RGBToRGBACastImageFilter", - "SubImageSelector", - "SurfaceSource", - "SurfaceToSurfaceFilter", - "VolumeCalculator" - }; -} -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkAnnotationProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkAnnotationProperty.cxx deleted file mode 100644 index 4a86880aa0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkAnnotationProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkAnnotationProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="AnnotationProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(AnnotationProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkApplicationCursor.cxx b/Wrapping/CSwig/Core/wrap_mitkApplicationCursor.cxx deleted file mode 100644 index f9bb95da18..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkApplicationCursor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkApplicationCursor.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ApplicationCursor"; - namespace wrappers - { - typedef mitk::ApplicationCursor ApplicationCursor; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseController.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseController.cxx deleted file mode 100644 index f8acbf9e2a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseController.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseController.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseController"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseController) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseData.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseData.cxx deleted file mode 100644 index c14fc349b4..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseData.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseData.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseData"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseData) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseDataIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseDataIOFactory.cxx deleted file mode 100644 index a45b4f2d69..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseDataIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseDataIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseDataIO"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseDataIO) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseDataImplementation.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseDataImplementation.cxx deleted file mode 100644 index 61c6f4fd20..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseDataImplementation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseDataImplementation.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseDataImplementation"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseDataImplementation) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseDataSource.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseDataSource.cxx deleted file mode 100644 index 010a465453..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseDataSource.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkBaseDataSource.h" -#include "mitkCSwigMacros.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseDataSource"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseDataSource) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseDataTestImplementation.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseDataTestImplementation.cxx deleted file mode 100644 index bd40939652..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseDataTestImplementation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseDataTestImplementation.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseDataTestImplementation"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseDataTestImplementation) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseProcess.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseProcess.cxx deleted file mode 100644 index 577a438ceb..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseProcess.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseProcess.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseProcess"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseProcess) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseProperty.cxx deleted file mode 100644 index d093cd335c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseRenderer.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseRenderer.cxx deleted file mode 100644 index 044d406d72..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseRenderer.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkBaseRenderer.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseRenderer"; - namespace wrappers - { - typedef mitk::BaseRenderer BaseRenderer; - typedef mitk::BaseRenderer::Pointer::SmartPointer BaseRenderer_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseVtkMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseVtkMapper2D.cxx deleted file mode 100644 index a3013e9c96..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseVtkMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseVtkMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseVtkMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseVtkMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkBaseVtkMapper3D.cxx b/Wrapping/CSwig/Core/wrap_mitkBaseVtkMapper3D.cxx deleted file mode 100644 index 31c489d5a7..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkBaseVtkMapper3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkBaseVtkMapper3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="BaseVtkMapper3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(BaseVtkMapper3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCallbackFromGUIThread.cxx b/Wrapping/CSwig/Core/wrap_mitkCallbackFromGUIThread.cxx deleted file mode 100644 index 3955363721..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCallbackFromGUIThread.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkCallbackFromGUIThread.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="CallbackFromGUIThread"; - namespace wrappers - { - typedef mitk::CallbackFromGUIThread CallbackFromGUIThread; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCameraController.cxx b/Wrapping/CSwig/Core/wrap_mitkCameraController.cxx deleted file mode 100644 index b04913885a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCameraController.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkCameraController.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="CameraController"; - namespace wrappers - { - MITK_WRAP_OBJECT(CameraController) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCameraRotationController.cxx b/Wrapping/CSwig/Core/wrap_mitkCameraRotationController.cxx deleted file mode 100644 index 6d2593cc82..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCameraRotationController.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkCameraRotationController.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="CameraRotationController"; - namespace wrappers - { - MITK_WRAP_OBJECT(CameraRotationController) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkClippingProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkClippingProperty.cxx deleted file mode 100644 index be61560360..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkClippingProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkClippingProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ClippingProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(ClippingProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkColorProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkColorProperty.cxx deleted file mode 100644 index e62e3de003..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkColorProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkColorProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ColorProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(ColorProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkColoredRectangleRendering.cxx b/Wrapping/CSwig/Core/wrap_mitkColoredRectangleRendering.cxx deleted file mode 100644 index 173151d9a0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkColoredRectangleRendering.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkColoredRectangleRendering.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ColoredRectangleRendering"; - namespace wrappers - { - MITK_WRAP_OBJECT(ColoredRectangleRendering) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCommon.cxx b/Wrapping/CSwig/Core/wrap_mitkCommon.cxx deleted file mode 100644 index e066e95f41..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCommon.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkCommon.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Common"; - namespace wrappers - { - typedef mitk::Common Common; - typedef mitk::Common::Pointer::SmartPointer Common_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCommonSuperclasses.cxx b/Wrapping/CSwig/Core/wrap_mitkCommonSuperclasses.cxx deleted file mode 100644 index 6396822453..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCommonSuperclasses.cxx +++ /dev/null @@ -1,39 +0,0 @@ -#include "mitkCommon.h" -#include "mitkBaseProcess.h" -#include "mitkCSwigMacros.h" -#include "mbilog.h" -#include "itkObject.h" -#include "itkDataObject.h" -#include "itkProcessObject.h" -#include "itkLightObject.h" -#include "itkObjectFactoryBase.h" -#pragma GCC visibility push(default) -#include -#pragma GCC visibility pop -#include "itkSmartPointerForwardReference.h" -#include "itkAffineTransform.h" -#include "itkMatrixOffsetTransformBase.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="CommonSuperclasses"; - namespace wrappers - { - ITK_WRAP_OBJECT(Object) - ITK_WRAP_OBJECT(DataObject) - ITK_WRAP_OBJECT(ProcessObject) - ITK_WRAP_OBJECT(LightObject) - ITK_WRAP_OBJECT(ObjectFactoryBase) - typedef itk::EndEvent::EndEvent EndEvent; - typedef mbilog::AbstractBackend::AbstractBackend AbstractBackend; - typedef itk::AffineTransform::AffineTransform AffineTransform_F3U; - typedef itk::AffineTransform::Pointer::SmartPointer AffineTransform_F3U_Pointer; - typedef itk::MatrixOffsetTransformBase::MatrixOffsetTransformBase MatrixOffsetTransformBase_F3U3U; - typedef itk::MatrixOffsetTransformBase::Pointer::SmartPointer MatrixOffsetTransformBase_F3U3U_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCoordinateSupplier.cxx b/Wrapping/CSwig/Core/wrap_mitkCoordinateSupplier.cxx deleted file mode 100644 index b07a48a3a2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCoordinateSupplier.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkCoordinateSupplier.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="CoordinateSupplier"; - namespace wrappers - { - MITK_WRAP_OBJECT(CoordinateSupplier) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCoreObjectFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkCoreObjectFactory.cxx deleted file mode 100644 index 915ff7266f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCoreObjectFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkCoreObjectFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="CoreObjectFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(CoreObjectFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCoreObjectFactoryBase.cxx b/Wrapping/CSwig/Core/wrap_mitkCoreObjectFactoryBase.cxx deleted file mode 100644 index 1cf535efb0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCoreObjectFactoryBase.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkCoreObjectFactoryBase.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="CoreObjectFactoryBase"; - namespace wrappers - { - MITK_WRAP_OBJECT(CoreObjectFactoryBase) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkCorePython.cxx b/Wrapping/CSwig/Core/wrap_mitkCorePython.cxx deleted file mode 100644 index d457d87d17..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkCorePython.cxx +++ /dev/null @@ -1,262 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkCorePython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - //For further information about the classes which were not wrapped, please have a look at the file wrapSources.cmake - //Algorithms: - //"ProcessObject", - "BaseDataSource", - "BaseProcess", - "CoreObjectFactory", - "CoreObjectFactoryBase", - "DataNodeFactory", - "DataNodeSource", - "Geometry2DDataToSurfaceFilter", - "HistogramGenerator", - "ImageChannelSelector", - "ImageSliceSelector", - "ImageSource", - "ImageTimeSelector", - "ImageToImageFilter", - "ImageToItk", - "ITKImageImport", - "PointSetSource", - "RGBToRGBACastImageFilter", - "SubImageSelector", - "SurfaceSource", - "SurfaceToSurfaceFilter", - "VolumeCalculator", - - //Controllers: - "BaseController", - "CallbackFromGUIThread", - "CameraController", - "CameraRotationController", - "FocusManager", - "LimitedLinearUndo", - "OperationEvent", - "ProgressBar", - "ProgressBarImplementation", - //"ReferenceCountWatcher", - "RenderingManager", - "RenderingManagerFactory", - "SliceNavigationController", - "SlicesCoordinator", - "SlicesRotator", - "SlicesSwiveller", - "StatusBar", - "StatusBarImplementation", - "Stepper", - //"TestingMacros", - "TestManager", - "UndoController", - "UndoModel", - "VerboseLimitedLinearUndo", - "VtkInteractorCameraController", - "VtkLayerController", - - - //DataManagement: - //"VtkAbstractTransform", - "AbstractTransformGeometry", - "AnnotationProperty", - "ApplicationCursor", - "BaseData", - "BaseDataTestImplementation", - "BaseProperty", - "ClippingProperty", - "ColorProperty", - //"Common", - "DataNode", - "DataStorage", - "DisplayGeometry", - "EnumerationProperty", - "GenericLookupTable", - //"GenericProperty", - "Geometry2D", - "Geometry2DData", - "Geometry3D", - "GeometryData", - "GroupTagProperty", - "Image", - "ImageDataItem", - //"ItkMatirxHack", - "LandmarkBasedCurvedGeometry", - "LandmarkProjector", - "LandmarkProjectorBasedCurvedGeometry", - "LevelWindow", - "LevelWindowManager", - "LevelWindowPreset", - "LevelWindowProperty", - //Line", - "LookupTable", - "LookupTables", - "Material", - //"MatrixConvert", - "ModalityProperty", - "NodePredicateAnd", - "NodePredicateBase", - "NodePredicateCompositeBase", - "NodePredicateData", - "NodePredicateDataType", - "NodePredicateDimension", - "NodePredicateFirstLevel", - "NodePredicateNot", - "NodePredicateOr", - "NodePredicateProperty", - "NodePredicateSource", - "PlaneOrientationProperty", - "PlaneGeometry", - "PlaneOperation", - "PointOperation", - "PointSet", - "Properties", - "PropertyList", - "ResliceMethodProperty", - "RotationOperation", - "ShaderProperty", - "SlicedData", - "SlicedGeometry3D", - "SmartPointerProperty", - "StandaloneDataStorage", - "StateTransitionOperation", - "StringProperty", - "Surface", - "ThinPlateSplineCurvedGeometry", - "TimeSlicedGeometry", - "TransferFunction", - "TransferFunctionProperty", - //"Vector", - "VtkInterpolationProperty", - "VtkRepresentationProperty", - "VtkResliceInterpolationProperty", - "VtkScalarModeProperty", - "VtkVolumeRenderingProperty", - //"WeakPointer", - "WeakPointerProperty", - - //Interactions: - "Action", - "AffineInteractor", - "CoordinateSupplier", - "DisplayCoordinateOperation", - "DisplayInteractor", - "DisplayPositionEvent", - "DisplayVectorInteractor", - "Event", - "EventDescription", - "EventMapper", - "GlobalInteraction", - "Interactor", - "KeyEvent", - //"Message", - "MouseMovePointSetInteractor", - "PointSetInteractor", - "PositionEvent", - "PositionTracker", - "State", - "StateEvent", - "StateMachine", - "StateMachineFactory", - "Transition", - "WheelEvent", - - //IO: - "BaseDataIO", - "DicomSeriesReader", - "FileReader", - "FileSeriesReader", - "FileWriter", - "FileWriterWithInformation", - "ImageWriter", - "ImageWriterFactory", - //"IOAdapter", - //"IpPicGet", - "ItkImageFileIOFactory", - "ItkImageFileReader", - "Log", - "LookupTableProperty", - "Operation", - "OperationActor", - "PicFileIOFactory", - "PicFileReader", - "PicFileWriter", - "PicHelper", - "PicVolumeTimeSeriesIOFactory", - "PicVolumeTimeSeriesReader", - "PixelType", - "PointSetIOFactory", - "PointSetReader", - "PointSetWriter", - "PointSetWriterFactory", - //"RawImageFileReader", - "StandardFileLocations", - "STLFileIOFactory", - "STLFileReader", - //"SurfaceVtkWriter", - "SurfaceVtkWriterFactory", - "VtiFileIOFactory", - "VtiFileReader", - "VtkImageIOFactory", - "VtkImageReader", - "VtkSurfaceIOFactory", - "VtkSurfaceReader", - "vtkPointSetXMLParser", - - //Rendering: - //"BaseRenderer", - "VtkMapper2D", - "VtkMapper3D", - "Geometry2DDataMapper2D", - "Geometry2DDataVtkMapper3D", - "GLMapper2D", - "GradientBackground", - "ImageMapperGL2D", - "Mapper", - "Mapper2D", - "Mapper3D", - "PointSetGLMapper2D", - "PointSetVtkMapper3D", - "PolyDataGLMapper2D", - "PolyDataGLMapper2D", - "ShaderRepository", - "SurfaceGLMapper2D", - "SurfaceVtkMapper3D", - "VtkPropRenderer", - "VtkWidgetRendering", - "vtkMitkRectangleProp", - "vtkMitkRenderProp", - "vtkMitkThickSlicesFilter", - - "CommonSuperclasses", - "ImageCaster", - //"QmitkFunctionality" - }; -} -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkDataManagementPython.cxx b/Wrapping/CSwig/Core/wrap_mitkDataManagementPython.cxx deleted file mode 100644 index 29113e4699..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDataManagementPython.cxx +++ /dev/null @@ -1,110 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkDataManagementPython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - //"VtkAbstractTransform", - "AbstractTransformGeometry", - "AnnotationProperty", - "ApplicationCursor", - "BaseData", - "BaseDataImplementation", - "BaseProperty", - "ClippingProperty", - "ColorProperty", - //"Common", - "DataNode", - "DataStorage", - "DisplayGeometry", - "EnumerationProperty", - "GenericLookupTable", - //"GenericProperty", - "Geometry2D", - "Geometry2DData", - "Geometry3D", - "GeometryData", - "GroupTagProperty", - "Image", - "ImageDataItem", - //"ItkMatirxHack", - "LandmarkBasedCurvedGeometry", - "LandmarkProjector", - "LandmarkProjectorBasedCurvedGeometry", - "LevelWindow", - "LevelWindowManager", - "LevelWindowPreset", - "LevelWindowProperty", - //Line", - "LookupTable", - //"LookupTables", - "Material", - //"MatrixConvert", - "ModalityProperty", - "NodePredicateAND", - "NodePredicateBase", - "NodePredicateCompositeBase", - "NodePredicateData", - "NodePredicateDataType", - "NodePredicateDimension", - "NodePredicateFirstLevel", - "NodePredicateNOT", - "NodePredicateOR", - "NodePredicateProperty", - "NodePredicateSource", - "PlaneDecorationProperty", - "PlaneGeometry", - "PlaneOperation", - //"PointOperation", - "PointSet", - //"Properties", - "PropertyList", - "ResliceMethodEnumProperty", - "RotationOperation", - "ShaderEnumProperty", - "SlicedData", - //"SlicedGeometry3D", - "SmartPointerProperty", - "StandaloneDataStorage", - "StateTransitionOperation", - "StringProperty", - "Surface", - "ThinPlateSplineCurvedGeometry", - "TimeSlicedGeometry", - "TransferFunction", - "TransferFunctionProperty", - //"Vector", - "VtkInterpolationProperty", - "VtkRepresentationProperty", - "VtkResliceInterpolationProperty", - "VtkScalarModeProperty", - "VtkVolumeRenderingProperty", - //"WeakPointer", - "WeakPointerProperty", - }; -} -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkDataNode.cxx b/Wrapping/CSwig/Core/wrap_mitkDataNode.cxx deleted file mode 100644 index 883747811d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDataNode.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDataNode.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DataNode"; - namespace wrappers - { - MITK_WRAP_OBJECT(DataNode); - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDataNodeFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkDataNodeFactory.cxx deleted file mode 100644 index 38e4bfa30c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDataNodeFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDataNodeFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DataNodeFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(DataNodeFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDataNodeSource.cxx b/Wrapping/CSwig/Core/wrap_mitkDataNodeSource.cxx deleted file mode 100644 index 46fe2e22e2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDataNodeSource.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDataNodeSource.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DataNodeSource"; - namespace wrappers - { - MITK_WRAP_OBJECT(DataNodeSource) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDataStorage.cxx b/Wrapping/CSwig/Core/wrap_mitkDataStorage.cxx deleted file mode 100644 index ea8a1fad62..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDataStorage.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDataStorage.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DataStorage"; - namespace wrappers - { - MITK_WRAP_OBJECT(DataStorage) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDicomSeriesReader.cxx b/Wrapping/CSwig/Core/wrap_mitkDicomSeriesReader.cxx deleted file mode 100644 index 6bcc8151ac..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDicomSeriesReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDicomSeriesReader.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DicomSeriesReader"; - namespace wrappers - { - typedef mitk::DicomSeriesReader DicomSeriesReader; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDisplayCoordinateOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkDisplayCoordinateOperation.cxx deleted file mode 100644 index 03e625d3e5..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDisplayCoordinateOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDisplayCoordinateOperation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DisplayCoordinateOperation"; - namespace wrappers - { - typedef mitk::DisplayCoordinateOperation DisplayCoordinateOperation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDisplayGeometry.cxx b/Wrapping/CSwig/Core/wrap_mitkDisplayGeometry.cxx deleted file mode 100644 index fe3aff5e8d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDisplayGeometry.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDisplayGeometry.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DisplayGeometry"; - namespace wrappers - { - MITK_WRAP_OBJECT(DisplayGeometry) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDisplayInteractor.cxx b/Wrapping/CSwig/Core/wrap_mitkDisplayInteractor.cxx deleted file mode 100644 index ce5140393b..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDisplayInteractor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDisplayInteractor.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DisplayInteractor"; - namespace wrappers - { - typedef mitk::DisplayInteractor DisplayInteractor; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDisplayPositionEvent.cxx b/Wrapping/CSwig/Core/wrap_mitkDisplayPositionEvent.cxx deleted file mode 100644 index d55cc57403..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDisplayPositionEvent.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDisplayPositionEvent.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DisplayPositionEvent"; - namespace wrappers - { - typedef mitk::DisplayPositionEvent DisplayPositionEvent; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkDisplayVectorInteractor.cxx b/Wrapping/CSwig/Core/wrap_mitkDisplayVectorInteractor.cxx deleted file mode 100644 index f9965f483f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkDisplayVectorInteractor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkDisplayVectorInteractor.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DisplayVectorInteractor"; - namespace wrappers - { - MITK_WRAP_OBJECT(DisplayVectorInteractor) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkEnumerationProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkEnumerationProperty.cxx deleted file mode 100644 index 1ccb2058ec..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkEnumerationProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkEnumerationProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="EnumerationProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(EnumerationProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkEvent.cxx b/Wrapping/CSwig/Core/wrap_mitkEvent.cxx deleted file mode 100644 index abe321c19a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkEvent.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkEvent.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Event"; - namespace wrappers - { - typedef mitk::Event Event; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkEventDescription.cxx b/Wrapping/CSwig/Core/wrap_mitkEventDescription.cxx deleted file mode 100644 index b210d863a7..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkEventDescription.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkEventDescription.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="EventDescription"; - namespace wrappers - { - typedef mitk::EventDescription EventDescription; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkEventMapper.cxx b/Wrapping/CSwig/Core/wrap_mitkEventMapper.cxx deleted file mode 100644 index 6fcd71dcd2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkEventMapper.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkEventMapper.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="EventMapper"; - namespace wrappers - { - typedef mitk::EventMapper EventMapper; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkFileReader.cxx b/Wrapping/CSwig/Core/wrap_mitkFileReader.cxx deleted file mode 100644 index e845705d10..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkFileReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkFileReader.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="FileReader"; - namespace wrappers - { - typedef mitk::FileReader FileReader; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkFileSeriesReader.cxx b/Wrapping/CSwig/Core/wrap_mitkFileSeriesReader.cxx deleted file mode 100644 index 8ce257f0f3..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkFileSeriesReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkFileSeriesReader.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="FileSeriesReader"; - namespace wrappers - { - typedef mitk::FileSeriesReader FileSeriesReader; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkFileWriter.cxx b/Wrapping/CSwig/Core/wrap_mitkFileWriter.cxx deleted file mode 100644 index 0378855e76..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkFileWriter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkFileWriter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="FileWriter"; - namespace wrappers - { - MITK_WRAP_OBJECT(FileWriter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkFileWriterWithInformation.cxx b/Wrapping/CSwig/Core/wrap_mitkFileWriterWithInformation.cxx deleted file mode 100644 index b31d5bed5b..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkFileWriterWithInformation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkFileWriterWithInformation.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="FileWriterWithInformation"; - namespace wrappers - { - MITK_WRAP_OBJECT(FileWriterWithInformation) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkFocusManager.cxx b/Wrapping/CSwig/Core/wrap_mitkFocusManager.cxx deleted file mode 100644 index a7ddbb2c51..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkFocusManager.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkFocusManager.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="FocusManager"; - namespace wrappers - { - MITK_WRAP_OBJECT(FocusManager) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGLMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkGLMapper2D.cxx deleted file mode 100644 index c00a9009f2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGLMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGLMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="GLMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(GLMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGenericLookupTable.cxx b/Wrapping/CSwig/Core/wrap_mitkGenericLookupTable.cxx deleted file mode 100644 index 4153d04767..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGenericLookupTable.cxx +++ /dev/null @@ -1,19 +0,0 @@ -#include "mitkGenericLookupTable.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="GenericLookupTable"; - namespace wrappers - { - typedef mitk::GenericLookupTable GenericLookupTableString; - typedef mitk::GenericLookupTable GenericLookupTableFloat; - typedef mitk::GenericLookupTable GenericLookupTableInt; - typedef mitk::GenericLookupTable GenericLookupTableBool; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGenericProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkGenericProperty.cxx deleted file mode 100644 index dde722a097..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGenericProperty.cxx +++ /dev/null @@ -1,29 +0,0 @@ -#include "mitkGenericProperty.h" -#include - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="GenericProperty"; - namespace wrappers - { - typedef mitk::GenericProperty GenericPropertyPoint4D; - typedef mitk::GenericProperty::Pointer::SmartPointer GenericPropertyPoint4D_Pointer; - typedef mitk::GenericProperty GenericPropertyDouble; - typedef mitk::GenericProperty::Pointer::SmartPointer GenericPropertyDouble_Pointer; - typedef mitk::GenericProperty GenericPropertyFloat; - typedef mitk::GenericProperty::Pointer::SmartPointer GenericPropertyFloat_Pointer; - typedef mitk::GenericProperty GenericPropertyStringLookupTable; - typedef mitk::GenericProperty::Pointer::SmartPointer GenericPropertyStringLookupTable_Pointer; - typedef mitk::GenericProperty GenericPropertyPoint3I; - typedef mitk::GenericProperty::Pointer::SmartPointer GenericPropertyPoint3I_Pointer; - typedef mitk::GenericProperty GenericPropertyInt; - typedef mitk::GenericProperty::Pointer::SmartPointer GenericPropertyInt_Pointer; - typedef mitk::GenericProperty GenericPropertyVector3D; - typedef mitk::GenericProperty::Pointer::SmartPointer GenericPropertyVector3D_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGeometry2D.cxx b/Wrapping/CSwig/Core/wrap_mitkGeometry2D.cxx deleted file mode 100644 index 39c13d5ca0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGeometry2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGeometry2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Geometry2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(Geometry2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGeometry2DData.cxx b/Wrapping/CSwig/Core/wrap_mitkGeometry2DData.cxx deleted file mode 100644 index be4998731f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGeometry2DData.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGeometry2DData.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Geometry2DData"; - namespace wrappers - { - MITK_WRAP_OBJECT(Geometry2DData) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataMapper2D.cxx deleted file mode 100644 index e59a63ca89..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGeometry2DDataMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Geometry2DDataMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(Geometry2DDataMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataToSurfaceFilter.cxx b/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataToSurfaceFilter.cxx deleted file mode 100644 index e8a0249401..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataToSurfaceFilter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGeometry2DDataToSurfaceFilter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Geometry2DDataToSurfaceFilter"; - namespace wrappers - { - MITK_WRAP_OBJECT(Geometry2DDataToSurfaceFilter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataVtkMapper3D.cxx b/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataVtkMapper3D.cxx deleted file mode 100644 index 0075c032ec..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGeometry2DDataVtkMapper3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGeometry2DDataVtkMapper3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Geometry2DDataVtkMapper3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(Geometry2DDataVtkMapper3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGeometry3D.cxx b/Wrapping/CSwig/Core/wrap_mitkGeometry3D.cxx deleted file mode 100644 index 1d3b499387..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGeometry3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGeometry3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Geometry3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(Geometry3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGeometryData.cxx b/Wrapping/CSwig/Core/wrap_mitkGeometryData.cxx deleted file mode 100644 index 84bf97d3af..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGeometryData.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGeometryData.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="GeometryData"; - namespace wrappers - { - MITK_WRAP_OBJECT(GeometryData) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGlobalInteraction.cxx b/Wrapping/CSwig/Core/wrap_mitkGlobalInteraction.cxx deleted file mode 100644 index 0786daa99c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGlobalInteraction.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGlobalInteraction.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="GlobalInteraction"; - namespace wrappers - { - MITK_WRAP_OBJECT(GlobalInteraction) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGradientBackground.cxx b/Wrapping/CSwig/Core/wrap_mitkGradientBackground.cxx deleted file mode 100644 index bd58f6c626..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGradientBackground.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGradientBackground.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="GradientBackground"; - namespace wrappers - { - MITK_WRAP_OBJECT(GradientBackground) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkGroupTagProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkGroupTagProperty.cxx deleted file mode 100644 index b34b949b7c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkGroupTagProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkGroupTagProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="GroupTagProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(GroupTagProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkHistogramGenerator.cxx b/Wrapping/CSwig/Core/wrap_mitkHistogramGenerator.cxx deleted file mode 100644 index b2f8669a01..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkHistogramGenerator.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkHistogramGenerator.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="HistogramGenerator"; - namespace wrappers - { - MITK_WRAP_OBJECT(HistogramGenerator) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkIOAdapter.cxx b/Wrapping/CSwig/Core/wrap_mitkIOAdapter.cxx deleted file mode 100644 index 303e21ec4b..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkIOAdapter.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkIOAdapter.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageWriterFactory"; - namespace wrappers - { - typedef mitk::ImageWriterFactory ImageWriterFactory; - typedef mitk::ImageWriterFactory::Pointer::SmartPointer ImageWriterFactory_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkIOPython.cxx b/Wrapping/CSwig/Core/wrap_mitkIOPython.cxx deleted file mode 100644 index 3ad04f3266..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkIOPython.cxx +++ /dev/null @@ -1,73 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkIOPython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - "BaseDataIO", - "DicomSeriesReader", - "FileReader", - "FileSeriesReader", - "FileWriter", - "FileWriterWithInformation", - "ImageWriter", - "ImageWriterFactory", - //"IOAdapter", - //"IpPicGet", - "ItkImageFileIOFactory", - "ItkImageFileReader", - "Log", - "LookupTableProperty", - "Operation", - "OperationActor", - "PicFileIOFactory", - "PicFileReader", - "PicFileWriter", - "PicHelper", - "PicVolumeTimeSeriesIOFactory", - "PicVolumeTimeSeriesReader", - "PixelType", - "PointSetIOFactory", - "PointSetReader", - "PointSetWriter", - "PointSetWriterFactory", - //"RawImageFileReader", - "StandardFileLocations", - "STLFileIOFactory", - "STLFileReader", - //"SurfaceVtkWriter", - "SurfaceVtkWriterFactory", - "VtiFileIOFactory", - "VtiFileReader", - "VtkImageIOFactory", - "VtkImageReader", - "VtkSurfaceIOFactory", - "VtkSurfaceReader", - "vtkPointSetXMLParser" - }; -} -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkITKImageImport.cxx b/Wrapping/CSwig/Core/wrap_mitkITKImageImport.cxx deleted file mode 100644 index db3be577ef..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkITKImageImport.cxx +++ /dev/null @@ -1,50 +0,0 @@ -#include "itkImage.h" -#include "mitkITKImageImport.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ITKImageImport"; - namespace wrappers - { - typedef mitk::ITKImageImport::Image> ITKImageImportD2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportD2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportD3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportD3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportF2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportF2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportF3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportF3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUS2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUS2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUS3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUS3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUC2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUC2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUC3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUC3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUI2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUI2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUI3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUI3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUL2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUL2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportUL3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportUL3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportSC2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportSC2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportSC3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportSC3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportSI2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportSI2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportSI3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportSI3_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportSS2; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportSS2_Pointer; - typedef mitk::ITKImageImport::Image> ITKImageImportSS3; - typedef mitk::ITKImageImport::Image>::Pointer::SmartPointer ITKImageImportSS3_Pointer; - } -} - -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkImage.cxx b/Wrapping/CSwig/Core/wrap_mitkImage.cxx deleted file mode 100644 index 6f9910055e..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImage.cxx +++ /dev/null @@ -1,18 +0,0 @@ -#include "mitkImage.h" -#include "mitkCSwigMacros.h" -#include "vtkPythonUtil.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Image"; - namespace wrappers - { - MITK_WRAP_OBJECT(Image) - - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageAccessByItk.cxx b/Wrapping/CSwig/Core/wrap_mitkImageAccessByItk.cxx deleted file mode 100644 index c5755073f7..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageAccessByItk.cxx +++ /dev/null @@ -1,15 +0,0 @@ -#include "mitkImageAccessByItk.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetSource"; - namespace wrappers - { - typedef AccessByItk AccessByItk; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageCaster.cxx b/Wrapping/CSwig/Core/wrap_mitkImageCaster.cxx deleted file mode 100644 index e4ca38148e..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageCaster.cxx +++ /dev/null @@ -1,18 +0,0 @@ -#include "mitkImageCaster.h" -#include "mitkCSwigMacros.h" -#include "mitkImageAccessByItk.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageCaster"; - namespace wrappers - { - typedef mitk::ImageCaster ImageCaster; - typedef mitk::RendererAccess RendererAccess; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageChannelSelector.cxx b/Wrapping/CSwig/Core/wrap_mitkImageChannelSelector.cxx deleted file mode 100644 index 690b03efd2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageChannelSelector.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageChannelSelector.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageChannelSelector"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageChannelSelector) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageDataItem.cxx b/Wrapping/CSwig/Core/wrap_mitkImageDataItem.cxx deleted file mode 100644 index 86c890d17e..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageDataItem.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageDataItem.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageDataItem"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageDataItem) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkImageMapper2D.cxx deleted file mode 100644 index b255bca7ca..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageMapperGL2D.cxx b/Wrapping/CSwig/Core/wrap_mitkImageMapperGL2D.cxx deleted file mode 100644 index 08eb7dc968..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageMapperGL2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageMapperGL2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageMapperGL2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageMapperGL2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageSliceSelector.cxx b/Wrapping/CSwig/Core/wrap_mitkImageSliceSelector.cxx deleted file mode 100644 index 014371b883..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageSliceSelector.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageSliceSelector.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageSliceSelector"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageSliceSelector) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageSource.cxx b/Wrapping/CSwig/Core/wrap_mitkImageSource.cxx deleted file mode 100644 index 379704d158..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageSource.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageSource.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageSource"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageSource) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageTimeSelector.cxx b/Wrapping/CSwig/Core/wrap_mitkImageTimeSelector.cxx deleted file mode 100644 index 85ecb2bc10..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageTimeSelector.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageTimeSelector.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageTimeSelector"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageTimeSelector) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageToImageFilter.cxx b/Wrapping/CSwig/Core/wrap_mitkImageToImageFilter.cxx deleted file mode 100644 index 25127da49d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageToImageFilter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageToImageFilter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageToImageFilter"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageToImageFilter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageToItk.cxx b/Wrapping/CSwig/Core/wrap_mitkImageToItk.cxx deleted file mode 100644 index f32932ba3c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageToItk.cxx +++ /dev/null @@ -1,50 +0,0 @@ -#include "itkImage.h" -#include "mitkImageToItk.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageToItk"; - namespace wrappers - { - typedef mitk::ImageToItk::Image> ImageToItkD2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkD2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkD3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkD3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkF2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkF2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkF3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkF3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUS2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUS2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUS3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUS3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUC2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUC2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUC3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUC3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUI2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUI2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUI3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUI3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUL2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUL2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkUL3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkUL3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkSC2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkSC2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkSC3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkSC3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkSI2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkSI2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkSI3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkSI3_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkSS2; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkSS2_Pointer; - typedef mitk::ImageToItk::Image> ImageToItkSS3; - typedef mitk::ImageToItk::Image>::Pointer::SmartPointer ImageToItkSS3_Pointer; - } -} - -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkImageWriter.cxx b/Wrapping/CSwig/Core/wrap_mitkImageWriter.cxx deleted file mode 100644 index 44504151a6..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageWriter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageWriter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageWriter"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageWriter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkImageWriterFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkImageWriterFactory.cxx deleted file mode 100644 index f5c70385ff..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkImageWriterFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkImageWriterFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ImageWriterFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(ImageWriterFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkInteractionsPython.cxx b/Wrapping/CSwig/Core/wrap_mitkInteractionsPython.cxx deleted file mode 100644 index b0dad7498d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkInteractionsPython.cxx +++ /dev/null @@ -1,57 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkInteractionsPython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - "Action", - "AffineInteractor", - "CoordinateSupplier", - "DisplayCoordinateOperation", - "DisplayInteractor", - "DisplayPositionEvent", - "DisplayVectorInteractor", - "Event", - "EventDescription", - "EventMapper", - "GlobalInteraction", - "Interactor", - "KeyEvent", - //"Message", - "MouseMovePointSetInteractor", - "PointSetInteractor", - "PositionEvent", - "PositionTracker", - "State", - "StateEvent", - "StateMachine", - "StateMachineFactory", - "Transition", - "WheelEvent" - }; -} -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkInteractor.cxx b/Wrapping/CSwig/Core/wrap_mitkInteractor.cxx deleted file mode 100644 index 04b74191bf..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkInteractor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkInteractor.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Interactor"; - namespace wrappers - { - MITK_WRAP_OBJECT(Interactor) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkItkImageFileIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkItkImageFileIOFactory.cxx deleted file mode 100644 index b3f15d1b02..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkItkImageFileIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkItkImageFileIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ItkImageFileIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(ItkImageFileIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkItkImageFileReader.cxx b/Wrapping/CSwig/Core/wrap_mitkItkImageFileReader.cxx deleted file mode 100644 index fb50e78f6f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkItkImageFileReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkItkImageFileReader.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ItkImageFileReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(ItkImageFileReader) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkItkPictureWrite.cxx b/Wrapping/CSwig/Core/wrap_mitkItkPictureWrite.cxx deleted file mode 100644 index 99ea4b71d0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkItkPictureWrite.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkItkPictureWrite.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ItkPictureWrite"; - namespace wrappers - { - typedef mitk::ItkPictureWrite ItkPictureWrite; - typedef mitk::ItkPictureWrite::Pointer::SmartPointer ItkPictureWrite_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkKeyEvent.cxx b/Wrapping/CSwig/Core/wrap_mitkKeyEvent.cxx deleted file mode 100644 index c7cb8097b0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkKeyEvent.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkKeyEvent.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="KeyEvent"; - namespace wrappers - { - typedef mitk::KeyEvent KeyEvent; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLandmarkBasedCurvedGeometry.cxx b/Wrapping/CSwig/Core/wrap_mitkLandmarkBasedCurvedGeometry.cxx deleted file mode 100644 index 562e6ea28b..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLandmarkBasedCurvedGeometry.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLandmarkBasedCurvedGeometry.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LandmarkBasedCurvedGeometry"; - namespace wrappers - { - MITK_WRAP_OBJECT(LandmarkBasedCurvedGeometry) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLandmarkProjector.cxx b/Wrapping/CSwig/Core/wrap_mitkLandmarkProjector.cxx deleted file mode 100644 index ef5cd11341..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLandmarkProjector.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLandmarkProjector.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LandmarkProjector"; - namespace wrappers - { - MITK_WRAP_OBJECT(LandmarkProjector) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLandmarkProjectorBasedCurvedGeometry.cxx b/Wrapping/CSwig/Core/wrap_mitkLandmarkProjectorBasedCurvedGeometry.cxx deleted file mode 100644 index 35e993b15f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLandmarkProjectorBasedCurvedGeometry.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLandmarkProjectorBasedCurvedGeometry.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LandmarkProjectorBasedCurvedGeometry"; - namespace wrappers - { - MITK_WRAP_OBJECT(LandmarkProjectorBasedCurvedGeometry) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLevelWindow.cxx b/Wrapping/CSwig/Core/wrap_mitkLevelWindow.cxx deleted file mode 100644 index b878152cb9..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLevelWindow.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLevelWindow.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LevelWindow"; - namespace wrappers - { - typedef mitk::LevelWindow LevelWindow; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLevelWindowManager.cxx b/Wrapping/CSwig/Core/wrap_mitkLevelWindowManager.cxx deleted file mode 100644 index 79bf70e8f3..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLevelWindowManager.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLevelWindowManager.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LevelWindowManager"; - namespace wrappers - { - MITK_WRAP_OBJECT(LevelWindowManager) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLevelWindowPreset.cxx b/Wrapping/CSwig/Core/wrap_mitkLevelWindowPreset.cxx deleted file mode 100644 index 01472b8144..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLevelWindowPreset.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLevelWindowPreset.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LevelWindowPreset"; - namespace wrappers - { - typedef mitk::LevelWindowPreset LevelWindowPreset; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLevelWindowProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkLevelWindowProperty.cxx deleted file mode 100644 index 4982d5896e..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLevelWindowProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLevelWindowProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LevelWindowProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(LevelWindowProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLimitedLinearUndo.cxx b/Wrapping/CSwig/Core/wrap_mitkLimitedLinearUndo.cxx deleted file mode 100644 index 4f1e957c1d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLimitedLinearUndo.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLimitedLinearUndo.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LimitedLinearUndo"; - namespace wrappers - { - MITK_WRAP_OBJECT(LimitedLinearUndo) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLog.cxx b/Wrapping/CSwig/Core/wrap_mitkLog.cxx deleted file mode 100644 index d5d945bed0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLog.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLog.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Log"; - namespace wrappers - { - typedef mitk::LoggingBackend Log; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLogoRendering.cxx b/Wrapping/CSwig/Core/wrap_mitkLogoRendering.cxx deleted file mode 100644 index 16646bee81..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLogoRendering.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLogoRendering.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LogoRendering"; - namespace wrappers - { - MITK_WRAP_OBJECT(LogoRendering) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLookupTable.cxx b/Wrapping/CSwig/Core/wrap_mitkLookupTable.cxx deleted file mode 100644 index 0597cca06e..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLookupTable.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLookupTable.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LookupTable"; - namespace wrappers - { - MITK_WRAP_OBJECT(LookupTable) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLookupTableProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkLookupTableProperty.cxx deleted file mode 100644 index ec715a4d23..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLookupTableProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkLookupTableProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LookupTableProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(LookupTableProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkLookupTables.cxx b/Wrapping/CSwig/Core/wrap_mitkLookupTables.cxx deleted file mode 100644 index 3df32f2573..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkLookupTables.cxx +++ /dev/null @@ -1,19 +0,0 @@ -#include "mitkLookupTables.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="LookupTables"; - namespace wrappers - { - //typedef mitk::BoolLookupTable BoolLookupTable; //cswig crashes; D:\CableSwig\CableSwig\SWIG\Source\Modules\lang.cxx line 1717 symname = NULL; no check for this case - typedef mitk::FloatLookupTable FloatLookupTable; - typedef mitk::IntLookupTable IntLookupTable; - typedef mitk::StringLookupTable StringLookupTable; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkManufacturerLogo.cxx b/Wrapping/CSwig/Core/wrap_mitkManufacturerLogo.cxx deleted file mode 100644 index 60b00fde08..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkManufacturerLogo.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkManufacturerLogo.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ManufacturerLogo"; - namespace wrappers - { - MITK_WRAP_OBJECT(ManufacturerLogo) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkMapper.cxx b/Wrapping/CSwig/Core/wrap_mitkMapper.cxx deleted file mode 100644 index 009f730f09..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkMapper.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkMapper.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Mapper"; - namespace wrappers - { - MITK_WRAP_OBJECT(Mapper) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkMapper2D.cxx deleted file mode 100644 index a89d418ba4..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Mapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(Mapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkMapper3D.cxx b/Wrapping/CSwig/Core/wrap_mitkMapper3D.cxx deleted file mode 100644 index 22b9c1070d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkMapper3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkMapper3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Mapper3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(Mapper3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkMaterial.cxx b/Wrapping/CSwig/Core/wrap_mitkMaterial.cxx deleted file mode 100644 index 9b40b56103..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkMaterial.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkMaterial.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Material"; - namespace wrappers - { - MITK_WRAP_OBJECT(Material) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkMemoryUtilities.cxx b/Wrapping/CSwig/Core/wrap_mitkMemoryUtilities.cxx deleted file mode 100644 index 93a81738dd..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkMemoryUtilities.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkMemoryUtilities.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="MemoryUtilities"; - namespace wrappers - { - typedef mitk::MemoryUtilities MemoryUtilities; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkMessage.cxx b/Wrapping/CSwig/Core/wrap_mitkMessage.cxx deleted file mode 100644 index 5981f74c71..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkMessage.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkMessage.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Message"; - namespace wrappers - { - typedef mitk::Message Message; - typedef mitk::Message::Pointer::SmartPointer Message_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkModalityProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkModalityProperty.cxx deleted file mode 100644 index fcd4a61eb8..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkModalityProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkModalityProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ModalityProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(ModalityProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkModeOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkModeOperation.cxx deleted file mode 100644 index b33d5529f9..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkModeOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkModeOperation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ModeOperation"; - namespace wrappers - { - typedef mitk::ModeOperation ModeOperation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkMouseMovePointSetInteractor.cxx b/Wrapping/CSwig/Core/wrap_mitkMouseMovePointSetInteractor.cxx deleted file mode 100644 index 457dd5a213..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkMouseMovePointSetInteractor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkMouseMovePointSetInteractor.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="MouseMovePointSetInteractor"; - namespace wrappers - { - MITK_WRAP_OBJECT(MouseMovePointSetInteractor) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateAND.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateAND.cxx deleted file mode 100644 index c04aefc26d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateAND.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateAnd.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateAnd"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateAnd) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateBase.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateBase.cxx deleted file mode 100644 index 5f0b252323..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateBase.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateBase.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateBase"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateBase) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateCompositeBase.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateCompositeBase.cxx deleted file mode 100644 index bd04b49e5a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateCompositeBase.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateCompositeBase.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateCompositeBase"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateCompositeBase) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateData.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateData.cxx deleted file mode 100644 index 1b24e830c5..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateData.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateData.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateData"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateData) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateDataType.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateDataType.cxx deleted file mode 100644 index 4ae6ff55bb..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateDataType.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateDataType.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateDataType"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateDataType) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateDimension.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateDimension.cxx deleted file mode 100644 index a6ef301b81..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateDimension.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateDimension.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateDimension"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateDimension) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateFirstLevel.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateFirstLevel.cxx deleted file mode 100644 index 86676ccc1c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateFirstLevel.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateFirstLevel.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateFirstLevel"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateFirstLevel) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateNOT.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateNOT.cxx deleted file mode 100644 index ddc58f82f9..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateNOT.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateNot.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateNot"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateNot) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateOR.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateOR.cxx deleted file mode 100644 index 05f7170a3c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateOR.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateOr.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateOr"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateOr) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateProperty.cxx deleted file mode 100644 index f4b8bc4d92..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkNodePredicateSource.cxx b/Wrapping/CSwig/Core/wrap_mitkNodePredicateSource.cxx deleted file mode 100644 index b4284b7a90..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkNodePredicateSource.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkNodePredicateSource.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="NodePredicateSource"; - namespace wrappers - { - MITK_WRAP_OBJECT(NodePredicateSource) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkOperation.cxx deleted file mode 100644 index 834989e05c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkOperation.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Operation"; - namespace wrappers - { - typedef mitk::Operation::Operation Operation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkOperationActor.cxx b/Wrapping/CSwig/Core/wrap_mitkOperationActor.cxx deleted file mode 100644 index 6dd84801a4..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkOperationActor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkOperationActor.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="OperationActor"; - namespace wrappers - { - typedef mitk::OperationActor OperationActor; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkOperationEvent.cxx b/Wrapping/CSwig/Core/wrap_mitkOperationEvent.cxx deleted file mode 100644 index 01ed96d7e1..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkOperationEvent.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkOperationEvent.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="OperationEvent"; - namespace wrappers - { - typedef mitk::OperationEvent OperationEvent; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPicFileIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkPicFileIOFactory.cxx deleted file mode 100644 index 242172f0b5..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPicFileIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPicFileIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PicFileIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(PicFileIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPicFileReader.cxx b/Wrapping/CSwig/Core/wrap_mitkPicFileReader.cxx deleted file mode 100644 index 2d75de398b..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPicFileReader.cxx +++ /dev/null @@ -1,18 +0,0 @@ -#include "mitkPicFileReader.h" -#include "mitkCSwigMacros.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PicFileReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(PicFileReader); - } -} - -#endif - - diff --git a/Wrapping/CSwig/Core/wrap_mitkPicFileWriter.cxx b/Wrapping/CSwig/Core/wrap_mitkPicFileWriter.cxx deleted file mode 100644 index 63a7f1fe8d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPicFileWriter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPicFileWriter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PicFileWriter"; - namespace wrappers - { - MITK_WRAP_OBJECT(PicFileWriter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPicHelper.cxx b/Wrapping/CSwig/Core/wrap_mitkPicHelper.cxx deleted file mode 100644 index 9b8340680d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPicHelper.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPicHelper.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PicHelper"; - namespace wrappers - { - typedef mitk::PicHelper PicHelper; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPicVolumeTimeSeriesIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkPicVolumeTimeSeriesIOFactory.cxx deleted file mode 100644 index e2a2ae8784..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPicVolumeTimeSeriesIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPicVolumeTimeSeriesIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PicVolumeTimeSeriesIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(PicVolumeTimeSeriesIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPicVolumeTimeSeriesReader.cxx b/Wrapping/CSwig/Core/wrap_mitkPicVolumeTimeSeriesReader.cxx deleted file mode 100644 index 99ae71cca8..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPicVolumeTimeSeriesReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPicVolumeTimeSeriesReader.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PicVolumeTimeSeriesReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(PicVolumeTimeSeriesReader) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPixelType.cxx b/Wrapping/CSwig/Core/wrap_mitkPixelType.cxx deleted file mode 100644 index 3a7e41f641..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPixelType.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPixelType.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PixelType"; - namespace wrappers - { - typedef mitk::PixelType PixelType; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPlaneDecorationProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkPlaneDecorationProperty.cxx deleted file mode 100644 index ed013d1f3f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPlaneDecorationProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPlaneDecorationProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PlaneDecorationProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(PlaneDecorationProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPlaneGeometry.cxx b/Wrapping/CSwig/Core/wrap_mitkPlaneGeometry.cxx deleted file mode 100644 index 9720bf9549..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPlaneGeometry.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPlaneGeometry.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PlaneGeometry"; - namespace wrappers - { - MITK_WRAP_OBJECT(PlaneGeometry) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPlaneOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkPlaneOperation.cxx deleted file mode 100644 index daeb7e6232..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPlaneOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPlaneOperation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PlaneOperation"; - namespace wrappers - { - typedef mitk::PlaneOperation PlaneOperation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPlaneOrientationProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkPlaneOrientationProperty.cxx deleted file mode 100644 index ca5e899b35..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPlaneOrientationProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPlaneOrientationProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PlaneOrientationProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(PlaneOrientationProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkPointOperation.cxx deleted file mode 100644 index a5d3324e86..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointOperation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointOperation"; - namespace wrappers - { - typedef mitk::PointOperation PointOperation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSet.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSet.cxx deleted file mode 100644 index 19d70a0a3a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSet.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSet.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSet"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSet) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetGLMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetGLMapper2D.cxx deleted file mode 100644 index f4c552b516..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetGLMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetGLMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetGLMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetGLMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetIOFactory.cxx deleted file mode 100644 index 7081890c45..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetInteractor.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetInteractor.cxx deleted file mode 100644 index 16b9d90fd6..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetInteractor.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetInteractor.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetInteractor"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetInteractor) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetMapper2D.cxx deleted file mode 100644 index d9c3a95b74..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetReader.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetReader.cxx deleted file mode 100644 index 2c8f8a9978..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetReader.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetReader) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetSource.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetSource.cxx deleted file mode 100644 index 38db1ccf99..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetSource.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetSource.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetSource"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetSource) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetVtkMapper3D.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetVtkMapper3D.cxx deleted file mode 100644 index 975960a4de..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetVtkMapper3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetVtkMapper3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetVtkMapper3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetVtkMapper3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetWriter.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetWriter.cxx deleted file mode 100644 index 0aad2ca86f..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetWriter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetWriter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetWriter"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetWriter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPointSetWriterFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkPointSetWriterFactory.cxx deleted file mode 100644 index 2b316e74a2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPointSetWriterFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPointSetWriterFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PointSetWriterFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(PointSetWriterFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPolyDataGLMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkPolyDataGLMapper2D.cxx deleted file mode 100644 index be627e4048..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPolyDataGLMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPolyDataGLMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PolyDataGLMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(PolyDataGLMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPositionEvent.cxx b/Wrapping/CSwig/Core/wrap_mitkPositionEvent.cxx deleted file mode 100644 index f8811b186c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPositionEvent.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPositionEvent.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PositionEvent"; - namespace wrappers - { - typedef mitk::PositionEvent PositionEvent; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPositionTracker.cxx b/Wrapping/CSwig/Core/wrap_mitkPositionTracker.cxx deleted file mode 100644 index 7baa0c6bac..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPositionTracker.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPositionTracker.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PositionTracker"; - namespace wrappers - { - MITK_WRAP_OBJECT(PositionTracker) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkProgressBar.cxx b/Wrapping/CSwig/Core/wrap_mitkProgressBar.cxx deleted file mode 100644 index b1dbd83ad8..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkProgressBar.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkProgressBar.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ProgressBar"; - namespace wrappers - { - MITK_WRAP_OBJECT(ProgressBar) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkProgressBarImplementation.cxx b/Wrapping/CSwig/Core/wrap_mitkProgressBarImplementation.cxx deleted file mode 100644 index e631cd7c14..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkProgressBarImplementation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkProgressBarImplementation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ProgressBarImplementation"; - namespace wrappers - { - typedef mitk::ProgressBarImplementation ProgressBarImplementation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkProperties.cxx b/Wrapping/CSwig/Core/wrap_mitkProperties.cxx deleted file mode 100644 index 31a91ceb1d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkProperties.cxx +++ /dev/null @@ -1,27 +0,0 @@ -#include "mitkProperties.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Properties"; - namespace wrappers - { - MITK_WRAP_OBJECT(BoolProperty) - MITK_WRAP_OBJECT(IntProperty) - MITK_WRAP_OBJECT(FloatProperty) - MITK_WRAP_OBJECT(DoubleProperty) - MITK_WRAP_OBJECT(Vector3DProperty) - MITK_WRAP_OBJECT(Point3dProperty) - MITK_WRAP_OBJECT(Point4dProperty) - MITK_WRAP_OBJECT(Point3iProperty) - MITK_WRAP_OBJECT(FloatLookupTableProperty) - MITK_WRAP_OBJECT(BoolLookupTableProperty) - MITK_WRAP_OBJECT(IntLookupTableProperty) - MITK_WRAP_OBJECT(StringLookupTableProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkPropertyList.cxx b/Wrapping/CSwig/Core/wrap_mitkPropertyList.cxx deleted file mode 100644 index 5dcb331496..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkPropertyList.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkPropertyList.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="PropertyList"; - namespace wrappers - { - MITK_WRAP_OBJECT(PropertyList) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkRGBToRGBACastImageFilter.cxx b/Wrapping/CSwig/Core/wrap_mitkRGBToRGBACastImageFilter.cxx deleted file mode 100644 index bc840721e8..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkRGBToRGBACastImageFilter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkRGBToRGBACastImageFilter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="RGBToRGBACastImageFilter"; - namespace wrappers - { - MITK_WRAP_OBJECT(RGBToRGBACastImageFilter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkRawImageFileReader.cxx b/Wrapping/CSwig/Core/wrap_mitkRawImageFileReader.cxx deleted file mode 100644 index 749112e460..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkRawImageFileReader.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkRawImageFileReader.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="RawImageFileReader"; - namespace wrappers - { - typedef mitk::RawImageFileReader RawImageFileReader; - typedef mitk::RawImageFileReader::Pointer::SmartPointer RawImageFileReader_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkReferenceCountWatcher.cxx b/Wrapping/CSwig/Core/wrap_mitkReferenceCountWatcher.cxx deleted file mode 100644 index f8d4b035cb..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkReferenceCountWatcher.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkReferenceCountWatcher.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ReferenceCountWatcher"; - namespace wrappers - { - typedef mitk::ReferenceCountWatcher ReferenceCountWatcher; - typedef mitk::ReferenceCountWatcher::Pointer::SmartPointer ReferenceCountWatcher_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkRenderingManager.cxx b/Wrapping/CSwig/Core/wrap_mitkRenderingManager.cxx deleted file mode 100644 index dcd09574e9..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkRenderingManager.cxx +++ /dev/null @@ -1,25 +0,0 @@ -#include "mitkRenderingManager.h" -#include "mitkCSwigMacros.h" -#include "vtkRenderWindow.h" -#include "mitkDataStorage.h" -#include "mitkGlobalInteraction.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="RenderingManager"; - namespace wrappers - { - MITK_WRAP_OBJECT(RenderingManager) - typedef std::vector< vtkRenderWindow* > RenderWindowVector; - typedef std::vector< float > FloatVector; - typedef std::vector< bool > BoolVector; - typedef itk::SmartPointer< mitk::DataStorage > DataStoragePointer; - typedef itk::SmartPointer< mitk::GlobalInteraction > GlobalInteractionPointer; - typedef mitk::RenderingManager::RequestType RenderingManager_RequestType; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkRenderingManagerFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkRenderingManagerFactory.cxx deleted file mode 100644 index b21a705974..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkRenderingManagerFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkRenderingManagerFactory.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="RenderingManagerFactory"; - namespace wrappers - { - typedef mitk::RenderingManagerFactory RenderingManagerFactory; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkRenderingPython.cxx b/Wrapping/CSwig/Core/wrap_mitkRenderingPython.cxx deleted file mode 100644 index bcec308f57..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkRenderingPython.cxx +++ /dev/null @@ -1,60 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkRenderingPython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - //"BaseRenderer", - "BaseVtkMapper2D", - "BaseVtkMapper3D", - "ColoredRectangleRendering", - "Geometry2DDataMapper2D", - "Geometry2DDataVtkMapper3D", - "GLMapper2D", - "GradientBackground", - "ImageMapper2D", - "LogoRendering", - "ManufacturerLogo", - "Mapper", - "Mapper2D", - "Mapper3D", - "PointSetMapper2D", - "PointSetVtkMapper3D", - "PolyDataGLMapper2D", - "PolyDataGLMapper2D", - "ShaderRepository", - "SurfaceMapper2D", - "SurfaceVtkMapper3D", - //"VolumeDataVtkMapper3D", - "VtkPropRenderer", - "VtkWidgetRendering", - "vtkMitkRectangleProp", - //"vtkMitkRenderProp", - "vtkMitkThickSlicesFilter" - }; -} -#endif diff --git a/Wrapping/CSwig/Core/wrap_mitkResliceMethodEnumProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkResliceMethodEnumProperty.cxx deleted file mode 100644 index f6cbf37699..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkResliceMethodEnumProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkResliceMethodEnumProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ResliceMethodEnumProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(ResliceMethodEnumProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkResliceMethodProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkResliceMethodProperty.cxx deleted file mode 100644 index fa520b303d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkResliceMethodProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkResliceMethodProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ResliceMethodProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(ResliceMethodProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkRotationOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkRotationOperation.cxx deleted file mode 100644 index c384d41202..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkRotationOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkRotationOperation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="RotationOperation"; - namespace wrappers - { - typedef mitk::RotationOperation RotationOperation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSTLFileIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkSTLFileIOFactory.cxx deleted file mode 100644 index bfa1b515fd..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSTLFileIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSTLFileIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="STLFileIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(STLFileIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSTLFileReader.cxx b/Wrapping/CSwig/Core/wrap_mitkSTLFileReader.cxx deleted file mode 100644 index f5b4e3a939..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSTLFileReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSTLFileReader.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="STLFileReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(STLFileReader) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkShaderEnumProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkShaderEnumProperty.cxx deleted file mode 100644 index f0a5c5d7f0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkShaderEnumProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkShaderEnumProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ShaderEnumProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(ShaderEnumProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkShaderProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkShaderProperty.cxx deleted file mode 100644 index 34a674e9f0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkShaderProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkShaderProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ShaderProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(ShaderProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkShaderRepository.cxx b/Wrapping/CSwig/Core/wrap_mitkShaderRepository.cxx deleted file mode 100644 index 27a8452f2b..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkShaderRepository.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkShaderRepository.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ShaderRepository"; - namespace wrappers - { - MITK_WRAP_OBJECT(ShaderRepository) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSliceNavigationController.cxx b/Wrapping/CSwig/Core/wrap_mitkSliceNavigationController.cxx deleted file mode 100644 index 1146d59fe6..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSliceNavigationController.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSliceNavigationController.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SliceNavigationController"; - namespace wrappers - { - MITK_WRAP_OBJECT(SliceNavigationController) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSlicedData.cxx b/Wrapping/CSwig/Core/wrap_mitkSlicedData.cxx deleted file mode 100644 index d11f5ce5ac..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSlicedData.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSlicedData.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SlicedData"; - namespace wrappers - { - MITK_WRAP_OBJECT(SlicedData) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSlicedGeometry3D.cxx b/Wrapping/CSwig/Core/wrap_mitkSlicedGeometry3D.cxx deleted file mode 100644 index fc849f0ee1..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSlicedGeometry3D.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkSlicedGeometry3D.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SlicedGeometry3D"; - namespace wrappers - { - typedef mitk::SlicedGeometry3D SlicedGeometry3D; - typedef mitk::SlicedGeometry3D::Pointer::SmartPointer SlicedGeometry3D_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSlicesCoordinator.cxx b/Wrapping/CSwig/Core/wrap_mitkSlicesCoordinator.cxx deleted file mode 100644 index 9451f4bae7..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSlicesCoordinator.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSlicesCoordinator.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SlicesCoordinator"; - namespace wrappers - { - MITK_WRAP_OBJECT(SlicesCoordinator) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSlicesRotator.cxx b/Wrapping/CSwig/Core/wrap_mitkSlicesRotator.cxx deleted file mode 100644 index fd330cf4b0..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSlicesRotator.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSlicesRotator.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SlicesRotator"; - namespace wrappers - { - MITK_WRAP_OBJECT(SlicesRotator) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSlicesSwiveller.cxx b/Wrapping/CSwig/Core/wrap_mitkSlicesSwiveller.cxx deleted file mode 100644 index 283b850873..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSlicesSwiveller.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSlicesSwiveller.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SlicesSwiveller"; - namespace wrappers - { - MITK_WRAP_OBJECT(SlicesSwiveller) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSmartPointerProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkSmartPointerProperty.cxx deleted file mode 100644 index d0926f4dcd..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSmartPointerProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSmartPointerProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SmartPointerProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(SmartPointerProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStandaloneDataStorage.cxx b/Wrapping/CSwig/Core/wrap_mitkStandaloneDataStorage.cxx deleted file mode 100644 index fbc1dfe01c..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStandaloneDataStorage.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStandaloneDataStorage.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StandaloneDataStorage"; - namespace wrappers - { - MITK_WRAP_OBJECT(StandaloneDataStorage) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStandardFileLocations.cxx b/Wrapping/CSwig/Core/wrap_mitkStandardFileLocations.cxx deleted file mode 100644 index 12404b561a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStandardFileLocations.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStandardFileLocations.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StandardFileLocations"; - namespace wrappers - { - MITK_WRAP_OBJECT(StandardFileLocations) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkState.cxx b/Wrapping/CSwig/Core/wrap_mitkState.cxx deleted file mode 100644 index 830a6c9f54..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkState.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkState.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="State"; - namespace wrappers - { - MITK_WRAP_OBJECT(State) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStateEvent.cxx b/Wrapping/CSwig/Core/wrap_mitkStateEvent.cxx deleted file mode 100644 index fce28229aa..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStateEvent.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStateEvent.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StateEvent"; - namespace wrappers - { - typedef mitk::StateEvent StateEvent; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStateMachine.cxx b/Wrapping/CSwig/Core/wrap_mitkStateMachine.cxx deleted file mode 100644 index 4f7f9483e4..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStateMachine.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStateMachine.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StateMachine"; - namespace wrappers - { - MITK_WRAP_OBJECT(StateMachine) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStateMachineFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkStateMachineFactory.cxx deleted file mode 100644 index baa60aadcc..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStateMachineFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStateMachineFactory.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StateMachineFactory"; - namespace wrappers - { - typedef mitk::StateMachineFactory StateMachineFactory; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStateTransitionOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkStateTransitionOperation.cxx deleted file mode 100644 index d2515df27a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStateTransitionOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStateTransitionOperation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StateTransitionOperation"; - namespace wrappers - { - typedef mitk::StateTransitionOperation StateTransitionOperation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStatusBar.cxx b/Wrapping/CSwig/Core/wrap_mitkStatusBar.cxx deleted file mode 100644 index 0e0c4f31b4..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStatusBar.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStatusBar.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StatusBar"; - namespace wrappers - { - MITK_WRAP_OBJECT(StatusBar) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStatusBarImplementation.cxx b/Wrapping/CSwig/Core/wrap_mitkStatusBarImplementation.cxx deleted file mode 100644 index d976d0fdd7..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStatusBarImplementation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStatusBarImplementation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StatusBarImplementation"; - namespace wrappers - { - typedef mitk::StatusBarImplementation StatusBarImplementation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStepper.cxx b/Wrapping/CSwig/Core/wrap_mitkStepper.cxx deleted file mode 100644 index 3c0de709de..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStepper.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStepper.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Stepper"; - namespace wrappers - { - MITK_WRAP_OBJECT(Stepper) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkStringProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkStringProperty.cxx deleted file mode 100644 index 613296cd5a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkStringProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkStringProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="StringProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(StringProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSubImageSelector.cxx b/Wrapping/CSwig/Core/wrap_mitkSubImageSelector.cxx deleted file mode 100644 index a6a9b6e0cd..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSubImageSelector.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSubImageSelector.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SubImageSelector"; - namespace wrappers - { - MITK_WRAP_OBJECT(SubImageSelector) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurface.cxx b/Wrapping/CSwig/Core/wrap_mitkSurface.cxx deleted file mode 100644 index 0483a8df34..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurface.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurface.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Surface"; - namespace wrappers - { - MITK_WRAP_OBJECT(Surface) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceGLMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceGLMapper2D.cxx deleted file mode 100644 index 3e466d84f4..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceGLMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurfaceGLMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceGLMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(SurfaceGLMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceMapper2D.cxx deleted file mode 100644 index 16584ab194..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurfaceMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(SurfaceMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceOperation.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceOperation.cxx deleted file mode 100644 index 3f84d51eb7..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceOperation.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurfaceOperation.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceOperation"; - namespace wrappers - { - typedef mitk::SurfaceOperation SurfaceOperation; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceSource.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceSource.cxx deleted file mode 100644 index bb2c0e052a..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceSource.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurfaceSource.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceSource"; - namespace wrappers - { - MITK_WRAP_OBJECT(SurfaceSource) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceToSurfaceFilter.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceToSurfaceFilter.cxx deleted file mode 100644 index 32b469d301..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceToSurfaceFilter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurfaceToSurfaceFilter.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceToSurfaceFilter"; - namespace wrappers - { - MITK_WRAP_OBJECT(SurfaceToSurfaceFilter) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkMapper3D.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkMapper3D.cxx deleted file mode 100644 index 58db2f671d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkMapper3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurfaceVtkMapper3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceVtkMapper3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(SurfaceVtkMapper3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkWriter.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkWriter.cxx deleted file mode 100644 index 3846dce3c2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkWriter.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkSurfaceVtkWriter.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceVtkWriter"; - namespace wrappers - { - typedef mitk::SurfaceVtkWriter SurfaceVtkWriter; - typedef mitk::SurfaceVtkWriter::Pointer::SmartPointer SurfaceVtkWriter_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkWriterFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkWriterFactory.cxx deleted file mode 100644 index 1412c16269..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkSurfaceVtkWriterFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkSurfaceVtkWriterFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="SurfaceVtkWriterFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(SurfaceVtkWriterFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkTestManager.cxx b/Wrapping/CSwig/Core/wrap_mitkTestManager.cxx deleted file mode 100644 index 55ccc98ad5..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkTestManager.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkTestManager.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="TestManager"; - namespace wrappers - { - typedef mitk::TestManager TestManager; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkThinPlateSplineCurvedGeometry.cxx b/Wrapping/CSwig/Core/wrap_mitkThinPlateSplineCurvedGeometry.cxx deleted file mode 100644 index 2871cf1542..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkThinPlateSplineCurvedGeometry.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkThinPlateSplineCurvedGeometry.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="ThinPlateSplineCurvedGeometry"; - namespace wrappers - { - MITK_WRAP_OBJECT(ThinPlateSplineCurvedGeometry) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkTimeSlicedGeometry.cxx b/Wrapping/CSwig/Core/wrap_mitkTimeSlicedGeometry.cxx deleted file mode 100644 index 363080e359..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkTimeSlicedGeometry.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkTimeSlicedGeometry.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="TimeSlicedGeometry"; - namespace wrappers - { - MITK_WRAP_OBJECT(TimeSlicedGeometry) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkTransferFunction.cxx b/Wrapping/CSwig/Core/wrap_mitkTransferFunction.cxx deleted file mode 100644 index 2f7bdb4895..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkTransferFunction.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkTransferFunction.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="TransferFunction"; - namespace wrappers - { - MITK_WRAP_OBJECT(TransferFunction) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkTransferFunctionProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkTransferFunctionProperty.cxx deleted file mode 100644 index 311c4d38db..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkTransferFunctionProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkTransferFunctionProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="TransferFunctionProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(TransferFunctionProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkTransition.cxx b/Wrapping/CSwig/Core/wrap_mitkTransition.cxx deleted file mode 100644 index f4f72e4bc8..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkTransition.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkTransition.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Transition"; - namespace wrappers - { - typedef mitk::Transition Transition; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkUIDGenerator.cxx b/Wrapping/CSwig/Core/wrap_mitkUIDGenerator.cxx deleted file mode 100644 index 5d9d8a5593..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkUIDGenerator.cxx +++ /dev/null @@ -1,15 +0,0 @@ -#include "mitkUIDGenerator.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="UIDGenerator"; - namespace wrappers - { - typedef mitk::UIDGenerator::UIDGenerator UIDGenerator; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkUndoController.cxx b/Wrapping/CSwig/Core/wrap_mitkUndoController.cxx deleted file mode 100644 index adfef27eb1..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkUndoController.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkUndoController.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="UndoController"; - namespace wrappers - { - typedef mitk::UndoController UndoController; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkUndoModel.cxx b/Wrapping/CSwig/Core/wrap_mitkUndoModel.cxx deleted file mode 100644 index 700cf160cf..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkUndoModel.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkUndoModel.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="UndoModel"; - namespace wrappers - { - MITK_WRAP_OBJECT(UndoModel) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVector.cxx b/Wrapping/CSwig/Core/wrap_mitkVector.cxx deleted file mode 100644 index 4d3ce47f10..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVector.cxx +++ /dev/null @@ -1,59 +0,0 @@ -#include "mitkVector.h" -#include -#include -#include -#include -#include -#include -#include -#include "mitkCommon.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="Vector"; - namespace wrappers - { - typedef float ScalarType; - typedef itk::Matrix Matrix3D; - typedef itk::Matrix Matrix4D; - typedef vnl_matrix_fixed VnlMatrix3D; - typedef itk::Transform Transform3D; - typedef vnl_vector VnlVector; - typedef vnl_vector_ref VnlVectorRef; - - typedef itk::Point Point2D; - typedef itk::Point Point3D; - typedef itk::Point Point4D; - typedef itk::Point Point2I; - typedef itk::Point Point3I; - typedef itk::Point Point4I; - typedef itk::Vector Vector2D; - typedef itk::Vector Vector3D; - typedef vnl_quaternion Quaternion; - - typedef mitk::VectorTraits VectorTraitsVnl; - typedef mitk::VectorTraits VectorTraitsD4; - typedef mitk::VectorTraits> VectorTraitsIndex5; - typedef mitk::VectorTraits> VectorTraitsIndex3; - typedef mitk::VectorTraits VectorTraitsLI3; - typedef mitk::VectorTraits VectorTraitsF3; - typedef mitk::VectorTraits VectorTraitsD3; - typedef mitk::VectorTraits> VectorTraitsVnlFixed; - typedef mitk::VectorTraits VectorTraitsLUI3; - typedef mitk::VectorTraits VectorTraitsUI; - typedef mitk::VectorTraits VectorTraitsScalarType4; - typedef mitk::VectorTraits> VectorTraitsVectorTraitsF3; - typedef mitk::VectorTraits> VectorTraitsPointF3; - typedef mitk::VectorTraits> VectorTraitsPointF4; - typedef mitk::VectorTraits> VectorTraitsVectorTraitsD3; - typedef mitk::VectorTraits> VectorTraitsPointD3; - typedef mitk::VectorTraits> VectorTraitsVectorTraitsI3; - typedef mitk::VectorTraits> VectorTraitsPointI3; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVerboseLimitedLinearUndo.cxx b/Wrapping/CSwig/Core/wrap_mitkVerboseLimitedLinearUndo.cxx deleted file mode 100644 index 0531231f7d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVerboseLimitedLinearUndo.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVerboseLimitedLinearUndo.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VerboseLimitedLinearUndo"; - namespace wrappers - { - MITK_WRAP_OBJECT(VerboseLimitedLinearUndo) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVolumeCalculator.cxx b/Wrapping/CSwig/Core/wrap_mitkVolumeCalculator.cxx deleted file mode 100644 index 036055bd51..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVolumeCalculator.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVolumeCalculator.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VolumeCalculator"; - namespace wrappers - { - MITK_WRAP_OBJECT(VolumeCalculator) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVolumeDataVtkMapper3D.cxx b/Wrapping/CSwig/Core/wrap_mitkVolumeDataVtkMapper3D.cxx deleted file mode 100644 index 68eb298cfa..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVolumeDataVtkMapper3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVolumeDataVtkMapper3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VolumeDataVtkMapper3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(VolumeDataVtkMapper3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtiFileIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkVtiFileIOFactory.cxx deleted file mode 100644 index f8121253f8..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtiFileIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtiFileIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtiFileIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtiFileIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtiFileReader.cxx b/Wrapping/CSwig/Core/wrap_mitkVtiFileReader.cxx deleted file mode 100644 index 9f50bbf4ec..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtiFileReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtiFileReader.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtiFileReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtiFileReader) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkImageIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkImageIOFactory.cxx deleted file mode 100644 index 49819787f2..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkImageIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkImageIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkImageIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkImageIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkImageReader.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkImageReader.cxx deleted file mode 100644 index 1c950de009..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkImageReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkImageReader.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkImageReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkImageReader) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkInteractorCameraController.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkInteractorCameraController.cxx deleted file mode 100644 index 16c683fffb..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkInteractorCameraController.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkInteractorCameraController.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkInteractorCameraController"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkInteractorCameraController) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkInterpolationProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkInterpolationProperty.cxx deleted file mode 100644 index a1b3e79961..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkInterpolationProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkInterpolationProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkInterpolationProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkInterpolationProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkLayerController.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkLayerController.cxx deleted file mode 100644 index 1bda029d22..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkLayerController.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkLayerController.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkLayerController"; - namespace wrappers - { - typedef mitk::VtkLayerController VtkLayerController; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkMapper2D.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkMapper2D.cxx deleted file mode 100644 index f7757e0af1..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkMapper2D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkMapper2D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkMapper2D"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkMapper2D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkMapper3D.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkMapper3D.cxx deleted file mode 100644 index 9ea89f2e72..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkMapper3D.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkMapper3D.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkMapper3D"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkMapper3D) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkPropRenderer.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkPropRenderer.cxx deleted file mode 100644 index ae301463ea..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkPropRenderer.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkPropRenderer.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkPropRenderer"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkPropRenderer) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkRepresentationProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkRepresentationProperty.cxx deleted file mode 100644 index 16559fe311..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkRepresentationProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkRepresentationProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkRepresentationProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkRepresentationProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkResliceInterpolationProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkResliceInterpolationProperty.cxx deleted file mode 100644 index f005b144d9..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkResliceInterpolationProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkResliceInterpolationProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkResliceInterpolationProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkResliceInterpolationProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkScalarModeProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkScalarModeProperty.cxx deleted file mode 100644 index c7eb7986cc..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkScalarModeProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkScalarModeProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkScalarModeProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkScalarModeProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkSurfaceIOFactory.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkSurfaceIOFactory.cxx deleted file mode 100644 index bfd8103816..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkSurfaceIOFactory.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkSurfaceIOFactory.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkSurfaceIOFactory"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkSurfaceIOFactory) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkSurfaceReader.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkSurfaceReader.cxx deleted file mode 100644 index a95611d70e..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkSurfaceReader.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkSurfaceReader.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkSurfaceReader"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkSurfaceReader) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkVolumeRenderingProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkVolumeRenderingProperty.cxx deleted file mode 100644 index cccc812154..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkVolumeRenderingProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkVolumeRenderingProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkVolumeRenderingProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkVolumeRenderingProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkVtkWidgetRendering.cxx b/Wrapping/CSwig/Core/wrap_mitkVtkWidgetRendering.cxx deleted file mode 100644 index a423516360..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkVtkWidgetRendering.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkVtkWidgetRendering.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="VtkWidgetRendering"; - namespace wrappers - { - MITK_WRAP_OBJECT(VtkWidgetRendering) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkWeakPointer.cxx b/Wrapping/CSwig/Core/wrap_mitkWeakPointer.cxx deleted file mode 100644 index 70556a147d..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkWeakPointer.cxx +++ /dev/null @@ -1,17 +0,0 @@ -#include "mitkWeakPointer.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="WeakPointer"; - namespace wrappers - { - typedef mitk::WeakPointer WeakPointer; - typedef mitk::WeakPointer::Pointer::SmartPointer WeakPointer_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkWeakPointerProperty.cxx b/Wrapping/CSwig/Core/wrap_mitkWeakPointerProperty.cxx deleted file mode 100644 index b682b9ea44..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkWeakPointerProperty.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkWeakPointerProperty.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="WeakPointerProperty"; - namespace wrappers - { - MITK_WRAP_OBJECT(WeakPointerProperty) - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_mitkWheelEvent.cxx b/Wrapping/CSwig/Core/wrap_mitkWheelEvent.cxx deleted file mode 100644 index 45b4db2962..0000000000 --- a/Wrapping/CSwig/Core/wrap_mitkWheelEvent.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "mitkWheelEvent.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="WheelEvent"; - namespace wrappers - { - typedef mitk::WheelEvent WheelEvent; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_qmitkFunctionality.cxx b/Wrapping/CSwig/Core/wrap_qmitkFunctionality.cxx deleted file mode 100644 index e3a9af06dd..0000000000 --- a/Wrapping/CSwig/Core/wrap_qmitkFunctionality.cxx +++ /dev/null @@ -1,21 +0,0 @@ -//#define _MT - -//#include "QmitkFunctionality.h" -#include "mitkDataStorageReference.h" -#include "mitkCSwigMacros.h" - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="DataStorageReference"; - namespace wrappers - { - //MITK_WRAP_OBJECT(Test) - typedef mitk::DataStorageReference DataStorageReference; - //typedef berry::SmartPointer QmitkFunctionality_Pointer; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_vtkMitkRectangleProp.cxx b/Wrapping/CSwig/Core/wrap_vtkMitkRectangleProp.cxx deleted file mode 100644 index 6a8a774afe..0000000000 --- a/Wrapping/CSwig/Core/wrap_vtkMitkRectangleProp.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "vtkMitkRectangleProp.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="vtkMitkRectangleProp"; - namespace wrappers - { - typedef vtkMitkRectangleProp vtkMitkRectangleProp; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_vtkMitkRenderProp.cxx b/Wrapping/CSwig/Core/wrap_vtkMitkRenderProp.cxx deleted file mode 100644 index ccc1508f81..0000000000 --- a/Wrapping/CSwig/Core/wrap_vtkMitkRenderProp.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "vtkMitkRenderProp.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="vtkMitkRenderProp"; - namespace wrappers - { - typedef vtkMitkRenderProp vtkMitkRenderProp; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_vtkMitkThickSlicesFilter.cxx b/Wrapping/CSwig/Core/wrap_vtkMitkThickSlicesFilter.cxx deleted file mode 100644 index 16e079083b..0000000000 --- a/Wrapping/CSwig/Core/wrap_vtkMitkThickSlicesFilter.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "vtkMitkThickSlicesFilter.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="vtkMitkThickSlicesFilter"; - namespace wrappers - { - typedef vtkMitkThickSlicesFilter vtkMitkThickSlicesFilter; - } -} - -#endif - diff --git a/Wrapping/CSwig/Core/wrap_vtkPointSetXMLParser.cxx b/Wrapping/CSwig/Core/wrap_vtkPointSetXMLParser.cxx deleted file mode 100644 index f96ba58c50..0000000000 --- a/Wrapping/CSwig/Core/wrap_vtkPointSetXMLParser.cxx +++ /dev/null @@ -1,16 +0,0 @@ -#include "vtkPointSetXMLParser.h" - - -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="vtkPointSetXMLParser"; - namespace wrappers - { - typedef mitk::vtkPointSetXMLParser vtkPointSetXMLParser; - } -} - -#endif - diff --git a/Wrapping/CSwig/Master.mdx.in b/Wrapping/CSwig/Master.mdx.in deleted file mode 100644 index 4dd4f5e4c1..0000000000 --- a/Wrapping/CSwig/Master.mdx.in +++ /dev/null @@ -1 +0,0 @@ -${INDEX_FILE_CONTENT} diff --git a/Wrapping/CSwig/Python/CMakeLists.txt b/Wrapping/CSwig/Python/CMakeLists.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Wrapping/CSwig/Python/mitk.OpenCV.py.in b/Wrapping/CSwig/Python/mitk.OpenCV.py.in deleted file mode 100644 index 63a56fde54..0000000000 --- a/Wrapping/CSwig/Python/mitk.OpenCV.py.in +++ /dev/null @@ -1,6 +0,0 @@ -import sys -sys.path.append('@ITK_LIBRARY_DIRS@') -sys.path.append('@ITK_DIR@/Wrapping/WrapITK/Python') -sys.path.append('@VTK_LIBRARY_DIRS@') -sys.path.append('@VTK_DIR@/Wrapping/Python') -sys.path.append('@OpenCV_LIBRARY_DIRS@') diff --git a/Wrapping/CSwig/Python/mitk.py.in b/Wrapping/CSwig/Python/mitk.py.in deleted file mode 100644 index 95b5c4a4e6..0000000000 --- a/Wrapping/CSwig/Python/mitk.py.in +++ /dev/null @@ -1,5 +0,0 @@ -import sys -sys.path.append('@ITK_LIBRARY_DIRS@') -sys.path.append('@ITK_DIR@/Wrapping/WrapITK/Python') -sys.path.append('@VTK_LIBRARY_DIRS@') -sys.path.append('@VTK_DIR@/Wrapping/Python') diff --git a/Wrapping/CSwig/Python/mitkCast.py b/Wrapping/CSwig/Python/mitkCast.py deleted file mode 100755 index b4929d1271..0000000000 --- a/Wrapping/CSwig/Python/mitkCast.py +++ /dev/null @@ -1,45 +0,0 @@ -import mitk -import itk - -def base2mitk(baseData): - mitkImage = mitk.Image_New() - mitk.ImageCaster.CastBaseData(baseData, mitkImage) - return mitkImage - -def mitk2itk(mitkImage,itkType): - itkImage = itkType.New() - mitk.ImageCaster.CastToItkImage(mitkImage.GetPointer(),itkImage) - return itkImage - -def base2itk(baseData,itkType): - mitkImage = base2mitk(baseData) - itkImage = mitk2itk(mitkImage,itkType) - return itkImage - -def node2itk(node,itkType): - itkImage = base2itk(node.GetData(),itkType) - return itkImage - -def itk2mitk(itkImage): - mitkImage = mitk.Image_New() - mitk.ImageCaster.CastToMitkImage( itkImage.GetPointer(), mitkImage ) - return mitkImage - -def mitk2node(mitkImage, name): - newNode = mitk.DataNode_New() - newNode.SetData( mitkImage.GetPointer() ) - newNode.SetName(name) - return newNode - -def itk2node(itkImage,name): - mitkImage = itk2mitk(itkImage) - newNode = mitk2node(mitkImage, name) - return newNode - -def threshold(node,min,max): - itkImage = node2itk(node,itk.Image.F3) - filter = itk.BinaryThresholdImageFilter[itkImage,itkImage].New(itkImage,LowerThreshold=min,UpperThreshold=max) - filter.Update() - itkImage = filter.GetOutput() - node = itk2node(itkImage) - return node diff --git a/Wrapping/CSwig/Python/mitkbase.py.in b/Wrapping/CSwig/Python/mitkbase.py.in deleted file mode 100644 index 33bbbaa7db..0000000000 --- a/Wrapping/CSwig/Python/mitkbase.py.in +++ /dev/null @@ -1,76 +0,0 @@ -"""InsightToolkit support module to help load its packages.""" -import sys,os - -# Get the path to the directory containing this script. It may be -# used to set pkgdir below, depending on how this script is -# configured. -if __name__ == '__main__': - selfpath = os.path.abspath(sys.path[0] or os.curdir) -else: - selfpath = os.path.abspath(os.path.dirname(__file__)) - -# The directory containing the binary ITK python wrapper libraries. -pkgdir = @MITK_CSWIG_PACKAGE_DIR@ - -# Python "help(sys.setdlopenflags)" states: -# -# setdlopenflags(...) -# setdlopenflags(n) -> None -# -# Set the flags that will be used for dlopen() calls. Among other -# things, this will enable a lazy resolving of symbols when -# importing a module, if called as sys.setdlopenflags(0) To share -# symbols across extension modules, call as -# -# sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) -# -# GCC 3.x depends on proper merging of symbols for RTTI: -# http://gcc.gnu.org/faq.html#dso -# -# The Python setup.py states that the "dl" module -# requires "sizeof(int) == sizeof(long) == sizeof(char*)". -# Therefore the dl module is missing on 64-bit platforms. -# Since RTLD_NOW==0x002 and RTLD_GLOBAL==0x100 very commonly -# we will just guess that the proper flags are 0x102 when there -# is no dl module. - -def preimport(): - """Called by InsightToolkit packages before loading a C module.""" - # Save the current dlopen flags and set the ones we need. - try: - import dl - newflags = dl.RTLD_NOW|dl.RTLD_GLOBAL - except: - newflags = 0x102 # No dl module, so guess (see above). - try: - oldflags = sys.getdlopenflags() - sys.setdlopenflags(newflags) - except: - oldflags = None - # Save the current working directory and change to that containing - # the python wrapper libraries. They have '.' in their rpaths, so - # they will find the libraries on which they depend. - cwd = os.getcwd() - os.chdir(pkgdir) - # Add the binary package directory to the python module search path. - sys.path.insert(1, pkgdir) - return [cwd, oldflags] - -def postimport(data): - """Called by InsightToolkit packages after loading a C module.""" - # Remove the binary package directory to the python module search path. - sys.path.remove(pkgdir) - # Restore the original working directory. - os.chdir(data[0]) - # Restore the original dlopen flags. - try: - sys.setdlopenflags(data[1]) - except: - pass - -# Default location for test output -defaultTestRoot = @MITK_CSWIG_TEST_ROOT@ - -# Default location for test input -defaultDataRoot = @MITK_CSWIG_DATA_ROOT@ - diff --git a/Wrapping/CSwig/PythonMITKModules.cmake b/Wrapping/CSwig/PythonMITKModules.cmake deleted file mode 100644 index a4f3e34cd5..0000000000 --- a/Wrapping/CSwig/PythonMITKModules.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(MITK_PYTHON_MODULES_DIRS Core) - -subdirs(${MITK_PYTHON_MODULES_DIRS}) \ No newline at end of file diff --git a/Wrapping/CSwig/SwigInc.txt.in b/Wrapping/CSwig/SwigInc.txt.in deleted file mode 100644 index 3fc1a405f9..0000000000 --- a/Wrapping/CSwig/SwigInc.txt.in +++ /dev/null @@ -1 +0,0 @@ -@SWIG_INC_CONTENTS@ diff --git a/Wrapping/CSwig/SwigRuntime/CMakeLists.txt b/Wrapping/CSwig/SwigRuntime/CMakeLists.txt deleted file mode 100644 index 20bff587db..0000000000 --- a/Wrapping/CSwig/SwigRuntime/CMakeLists.txt +++ /dev/null @@ -1,46 +0,0 @@ -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) - -macro(CREATE_SWIG_RUNTIME lang_option lang_postfix lang_link_libs) - set(source_file "${CMAKE_CURRENT_BINARY_DIR}/swigrun${lang_postfix}.cxx") - set(lib_name "SwigRuntime${lang_postfix}") - - add_library(${lib_name} SHARED "${source_file}") - target_link_libraries(${lib_name} ${lang_link_libs}) - - # work around linkage problem on some solaris systems - if(CMAKE_SYSTEM MATCHES "SunOS-." AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_COMPILER_IS_GNUCC) - target_link_libraries(${lib_name} stdc++) - endif(CMAKE_SYSTEM MATCHES "SunOS-." AND CMAKE_COMPILER_IS_GNUCXX AND CMAKE_COMPILER_IS_GNUCC) - - install_targets("${WRAP_ITK_INSTALL_PREFIX}/lib" ${lib_name}) - set_target_properties(${lib_name} PROPERTIES LINK_FLAGS "${CSWIG_EXTRA_LINKFLAGS}") - - add_custom_command( - SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/swigrun.h - COMMAND ${GCCXML} - ARGS -fxml-start=_cable_ -DCABLE_CONFIGURATION ${CMAKE_CURRENT_SOURCE_DIR}/swigrun.h - -fxml=${CMAKE_CURRENT_BINARY_DIR}/swigrun.xml - TARGET ${lib_name} - OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/swigrun.xml - DEPENDS ${GCCXML}) - - add_custom_command( - SOURCE ${CMAKE_CURRENT_BINARY_DIR}/swigrun.xml - COMMAND ${CSWIG} - ARGS -o "${source_file}" - ${lang_option} - -c++ ${CMAKE_CURRENT_BINARY_DIR}/swigrun.xml - TARGET ${lib_name} - OUTPUTS "${source_file}" - DEPENDS ${CSWIG}) -endmacro(CREATE_SWIG_RUNTIME) - -if(MITK_USE_Python) - set(PYLIBS ${PYTHON_LIBRARY}) - if(PYTHON_DEBUG_LIBRARY) - set(PYLIBS debug ${PYTHON_DEBUG_LIBRARY} optimized ${PYTHON_LIBRARY}) - endif() - #message(warning "PYLIBS: ${PYLIBS}") - CREATE_SWIG_RUNTIME(-python Python "${PYLIBS}") -endif(MITK_USE_Python) - diff --git a/Wrapping/CSwig/SwigRuntime/swigrun.h b/Wrapping/CSwig/SwigRuntime/swigrun.h deleted file mode 100644 index 64bea55378..0000000000 --- a/Wrapping/CSwig/SwigRuntime/swigrun.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef CABLE_CONFIGURATION -namespace _cable_ -{ - const char* const group="SwigRunTime"; -} -#endif diff --git a/Wrapping/CSwig/empty.depend.in b/Wrapping/CSwig/empty.depend.in deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/Wrapping/CSwig/mitk.swg b/Wrapping/CSwig/mitk.swg deleted file mode 100644 index c80ee68d15..0000000000 --- a/Wrapping/CSwig/mitk.swg +++ /dev/null @@ -1,58 +0,0 @@ -/* This is an itk-specific typemap used by CableSwig. Also see comments - * and "throws" code in CableSwig.cxx. - * -- Charl P. Botha - */ - -#ifdef SWIGPYTHON - -/* ------------------------------------------------------------ - * PyObject * - Just pass straight through unmodified - * This is default behaviour for python.swg, but Cable passes - * a PyObject * through as a "p._object", so we redo the typemap - * ------------------------------------------------------------ */ - -%typemap(in) p._object "$1 = $input;"; -%typemap(out) p._object "$result = $1;"; - -#define %runtime %insert("runtime") - -%insert(runtime) %{ -#if defined(MITK_WINDOWS_PYTHON_DEBUGGABLE) -# include "Python.h" -#else -# ifdef _DEBUG -# undef _DEBUG -# if defined(_MSC_VER) && _MSC_VER >= 1400 -# define _CRT_NOFORCE_MANIFEST 1 -# endif -# include "Python.h" -# define _DEBUG -# else -# include "Python.h" -# endif -#endif -%} - -#endif - -%include exception.i - -/* A "throws" attribute with the "std::exception" type is added synthetically - * to each method node by CableSwig.cxx. When gcc_xml starts passing through - * correct throws types, this typemap could be optionally extended to - * account for more different types. For now this is sufficient though. - */ - -%typemap(throws) std::exception { - SWIG_exception(SWIG_RuntimeError, const_cast(_e.what())); -} - -%include std_string.i - -/* disable this c linkage warning on windows */ -%{ -#ifdef _WIN32 -#pragma warning ( disable : 4190 ) -#pragma warning ( disable : 4049 ) -#endif -%} diff --git a/Wrapping/CSwig/mitkCSwigMacros.h b/Wrapping/CSwig/mitkCSwigMacros.h deleted file mode 100644 index ff7fe3193b..0000000000 --- a/Wrapping/CSwig/mitkCSwigMacros.h +++ /dev/null @@ -1,26 +0,0 @@ -#define MITK_WRAP_OBJECT(name) \ -typedef mitk::name::name name; \ -typedef mitk::name::Pointer::SmartPointer name##_Pointer; - -#define MITK_WRAP_OBJECT_WITH_SUPERCLASS(name) \ -MITK_WRAP_OBJECT(name); \ -typedef mitk::name::Superclass::Self name##_Superclass; \ -typedef mitk::name::Superclass::Pointer::SmartPointer name##_Superclass_Pointer; - -#define MITK_WRAP_OBJECT1(name, wrapname) \ -typedef mitk::name::name wrapname; \ -typedef mitk::name::Pointer::SmartPointer wrapname##_Pointer; - -#define MITK_WRAP_OBJECT_WITH_SUPERCLASS1(name, wrapname) \ -MITK_WRAP_OBJECT1(name, wrapname); \ -typedef mitk::name::Superclass::Self wrapname##_Superclass; \ -typedef mitk::name::Superclass::Pointer::SmartPointer wrapname##_Superclass_Pointer; - - -#define ITK_WRAP_OBJECT(name) \ -typedef itk::name::name name; \ -typedef itk::name::Pointer::SmartPointer name##_Pointer; - -#define ITK_WRAP_OBJECT1(name, arg1, wrapname) \ -typedef itk::name::name wrapname; \ -typedef itk::name::Pointer::SmartPointer wrapname##_Pointer diff --git a/Wrapping/CSwig/mitkvtk.swg b/Wrapping/CSwig/mitkvtk.swg deleted file mode 100644 index 52ab3c003b..0000000000 --- a/Wrapping/CSwig/mitkvtk.swg +++ /dev/null @@ -1,59 +0,0 @@ -%include exception.i - -%{ -#include "vtkImageImport.h" -#include "vtkImageExport.h" -#include "vtkImageData.h" -#include "vtkRenderWindow.h" -#include "vtkRenderer.h" -%} - -#ifdef SWIGPYTHON -%{ -#include "vtkPythonUtil.h" -%} - -%typemap(out) vtkImageExport* { - PyImport_ImportModule("vtk"); - $result = vtkPythonGetObjectFromPointer ( (vtkImageExport*)$1 ); -} - -%typemap(out) vtkImageImport* { - PyImport_ImportModule("vtk"); - $result = vtkPythonGetObjectFromPointer ( (vtkImageImport*)$1 ); -} - -%typemap(out) vtkImageData* { - PyImport_ImportModule("vtk"); - $result = vtkPythonGetObjectFromPointer ( (vtkImageData*)$1 ); -} - -%typemap(in) vtkImageData* { - $1 = NULL; - $1 = (vtkImageData*) vtkPythonGetPointerFromObject ( $input, "vtkImageData" ); - if ( $1 == NULL ) { SWIG_fail; } -} - -%typemap(out) vtkRenderWindow* { - PyImport_ImportModule("vtk"); - $result = vtkPythonGetObjectFromPointer ( (vtkRenderWindow*)$1 ); -} - -%typemap(in) vtkRenderWindow* { - $1 = NULL; - $1 = (vtkRenderWindow*) vtkPythonGetPointerFromObject ( $input, "vtkRenderWindow" ); - if ( $1 == NULL ) { SWIG_fail; } -} - -%typemap(out) vtkRenderer* { - PyImport_ImportModule("vtk"); - $result = vtkPythonGetObjectFromPointer ( (vtkRenderer*)$1 ); -} - -%typemap(in) vtkRenderer* { - $1 = NULL; - $1 = (vtkRenderer*) vtkPythonGetPointerFromObject ( $input, "vtkRenderer" ); - if ( $1 == NULL ) { SWIG_fail; } -} - -#endif diff --git a/Wrapping/CSwig/wrapCore.cmake b/Wrapping/CSwig/wrapCore.cmake deleted file mode 100644 index 5d55ee2868..0000000000 --- a/Wrapping/CSwig/wrapCore.cmake +++ /dev/null @@ -1,15 +0,0 @@ -# create the mitkCorePython libraries -include(Controllers/wrapSources.cmake) -set(WRAP_SOURCES_TEST - ${WRAP_SOURCES_TEST} - wrap_mitkCorePython) - -set(MASTER_INDEX_FILES "${CMAKE_CURRENT_BINARY_DIR}/Mitk.mdx" -) -foreach(source ${WRAP_SOURCES_TEST}) - message("${source}") -endforeach(source) - -MITK_WRAP_LIBRARY("${WRAP_SOURCES_TEST}" Mitk Core - "" "" Mitk) - diff --git a/Wrapping/CSwig/wrap_mitkCorePython.cxx b/Wrapping/CSwig/wrap_mitkCorePython.cxx deleted file mode 100644 index f4328bca44..0000000000 --- a/Wrapping/CSwig/wrap_mitkCorePython.cxx +++ /dev/null @@ -1,59 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkCorePython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - "BaseController", - "CallbackFromGUIThread", - "CameraController", - "CameraRotationController", - "FocusManager", - "LimitedLinearUndo", - "OperationEvent", - "ProgressBar", - "ProgressBarImplementation", - //"ReferenceCountWatcher", - "RenderingManager", - "RenderingManagerFactory", - "SliceNavigationController", - "SlicesCoordinator", - "SlicesRotator", - "SlicesSwiveller", - "StatusBar", - "StatusBarImplementation", - "Stepper", - //"TestingMacros", - "TestManager", - "UndoController", - "UndoModel", - "VerboseLimitedLinearUndo", - "VtkInteractorCameraController", - "VtkLayerController" - }; -} -#endif diff --git a/Wrapping/mitkWrapMacros.cmake b/Wrapping/mitkWrapMacros.cmake deleted file mode 100644 index 300b3c22dc..0000000000 --- a/Wrapping/mitkWrapMacros.cmake +++ /dev/null @@ -1,18 +0,0 @@ -macro(MITK_WRAP_OBJECT HEADERFILES CLASSNAME WRAPPERNAME DIRECTORY) -file(WRITE ${DIRECTORY}/wrap_${CLASSNAME}.cxx "#include "mitkCSwigMacros.h"\n") -foreach(f ${HEADERFILES}) - file(APPEND ${DIRECTORY}/wrap_${CLASSNAME}.cxx "#include "${f}"\n") -endforeach() -file(APPEND ${DIRECTORY}/wrap_${CLASSNAME}.cxx "#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const group="${CLASSNAME}"; - namespace wrappers - { - MITK_WRAP_OBJECT(${CLASSNAME}) - } -} - -#endif") -endmacro() diff --git a/Wrapping/mitkWrapSetup.cmake b/Wrapping/mitkWrapSetup.cmake deleted file mode 100644 index 8638932021..0000000000 --- a/Wrapping/mitkWrapSetup.cmake +++ /dev/null @@ -1,44 +0,0 @@ -#----------------------------------------------------------------------------- -# wrapper config -option(MITK_USE_Python "Build cswig Python wrapper support (requires CableSwig)." OFF) - -#----------------------------------------------------------------------------- -# Do we need CableSwig? -set(MITK_NEED_CableSwig 0) - -if(MITK_USE_Python) - set(MITK_NEED_CableSwig 1) -endif(MITK_USE_Python) - -if(MITK_NEED_CableSwig) - - if(NOT BUILD_SHARED_LIBS) - message(FATAL_ERROR "Wrapping requires a shared build, change BUILD_SHARED_LIBS to ON") - endif(NOT BUILD_SHARED_LIBS) - - # Search first if CableSwig is in the MITK source tree - if(EXISTS ${MITK_SOURCE_DIR}/Utilities/CableSwig) - set(CMAKE_MODULE_PATH ${MITK_SOURCE_DIR}/Utilities/CableSwig/SWIG/CMake) - - # CableSwig is included in the source distribution. - set(MITK_BUILD_CABLESWIG 1) - set(CableSwig_DIR ${MITK_BINARY_DIR}/Utilities/CableSwig CACHE PATH "CableSwig_DIR: The directory containing CableSwigConfig.cmake.") - set(CableSwig_FOUND 1) - set(CableSwig_INSTALL_ROOT ${MITK_INSTALL_LIB_DIR}/CSwig) - include(${CableSwig_DIR}/CableSwigConfig.cmake OPTIONAL) - subdirs(Utilities/CableSwig) - else(EXISTS ${MITK_SOURCE_DIR}/Utilities/CableSwig) - # If CableSwig is not in the source tree, - # then try to find a binary build of CableSwig - find_package(CableSwig) - set(CMAKE_MODULE_PATH ${CableSwig_DIR}/SWIG/CMake) - endif(EXISTS ${MITK_SOURCE_DIR}/Utilities/CableSwig) - - if(NOT CableSwig_FOUND) - # We have not found CableSwig. Complain. - message(FATAL_ERROR "CableSwig is required for CSwig Wrapping.") - endif(NOT CableSwig_FOUND) - -endif(MITK_NEED_CableSwig) - - diff --git a/Wrapping/wrap_mitkCorePython.cxx b/Wrapping/wrap_mitkCorePython.cxx deleted file mode 100644 index f4328bca44..0000000000 --- a/Wrapping/wrap_mitkCorePython.cxx +++ /dev/null @@ -1,59 +0,0 @@ -#define MITK_WRAP_PACKAGE "mitkCorePython" -//#include "wrap_MITKAlgorithms.cxx" -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -/*=================================================================== - -This file is based heavily on a corresponding ITK filter. - -===================================================================*/ -#ifdef CABLE_CONFIGURATION - -namespace _cable_ -{ - const char* const package = MITK_WRAP_PACKAGE; - const char* const groups[] = - { - "BaseController", - "CallbackFromGUIThread", - "CameraController", - "CameraRotationController", - "FocusManager", - "LimitedLinearUndo", - "OperationEvent", - "ProgressBar", - "ProgressBarImplementation", - //"ReferenceCountWatcher", - "RenderingManager", - "RenderingManagerFactory", - "SliceNavigationController", - "SlicesCoordinator", - "SlicesRotator", - "SlicesSwiveller", - "StatusBar", - "StatusBarImplementation", - "Stepper", - //"TestingMacros", - "TestManager", - "UndoController", - "UndoModel", - "VerboseLimitedLinearUndo", - "VtkInteractorCameraController", - "VtkLayerController" - }; -} -#endif