From: Leonardo Florez-Valencia Date: Wed, 16 Sep 2015 17:30:23 +0000 (+0200) Subject: ... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6618a10363a5eb64022011925c86fa60a6c37e42;p=cpMesh.git ... --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1776d43..231d94c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,20 +1,20 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +CMAKE_MINIMUM_REQUIRED(VERSION 2.8) -# for CMake 2.6 corrected behaviour (see "cmake --help-policy CMP0003") -IF( - COMMAND cmake_policy AND - ${CMAKE_MAJOR_VERSION} EQUAL 2 AND - ${CMAKE_MINOR_VERSION} GREATER 4 - ) - CMAKE_POLICY(SET CMP0003 NEW) - CMAKE_POLICY(SET CMP0005 NEW) - CMAKE_POLICY(SET CMP0011 NEW) - CMAKE_POLICY(SET CMP0012 NEW) -ENDIF( - COMMAND cmake_policy AND - ${CMAKE_MAJOR_VERSION} EQUAL 2 AND - ${CMAKE_MINOR_VERSION} GREATER 4 +## ============ +## = Policies = +## ============ + +SET( + policies + CMP0015 + CMP0020 + CMP0042 ) +FOREACH(policy ${policies}) + IF(POLICY ${policy}) + CMAKE_POLICY(SET ${policy} NEW) + ENDIF(POLICY ${policy}) +ENDFOREACH(policy) ## ================ ## = Project name = @@ -39,21 +39,55 @@ ENDIF(BUILD_SHARED_LIBS) ## ============ ## = Packages = ## ============ + +# Prepare header to build shared libs (windows) INCLUDE(GenerateExportHeader) +# Find ITK and VTK FIND_PACKAGE(ITK REQUIRED) -INCLUDE(${ITK_USE_FILE}) - FIND_PACKAGE(VTK REQUIRED) + +INCLUDE(${ITK_USE_FILE}) INCLUDE(${VTK_USE_FILE}) +# Do not use itk-vtk glue --> problems ahead!!! +IF(ITKVtkGlue_LOADED) + MESSAGE(FATAL_ERROR "ITKVtkGlue module is available. Please re-compile your ITK without it. It could lead to nasty compilation problems... Just waiting for Kitware to solve it.") +ENDIF(ITKVtkGlue_LOADED) + +SET(QT4_FOUND "0") IF(BUILD_FINAL_APPLICATION) FIND_PACKAGE(Qt4 REQUIRED) INCLUDE(${QT_USE_FILE}) - FIND_PACKAGE(cpPlugins REQUIRED) + ## Check for required vtk-qt4 modules + SET( + vtk_required_modules + vtkGUISupportQt + vtkGUISupportQtOpenGL + ) + FOREACH(vtk_module ${vtk_required_modules}) + IF(NOT ${vtk_module}_LOADED) + MESSAGE( + FATAL_ERROR + "${vtk_module} module is required but not available." + ) + SET(QT4_FOUND "0") + ENDIF(NOT ${vtk_module}_LOADED) + ENDFOREACH(vtk_module) + SET(QT4_FOUND "1") ENDIF(BUILD_FINAL_APPLICATION) +OPTION(USE_cpPlugins "Build cpPlugins based stuff" OFF) +IF(USE_cpPlugins) + FIND_PACKAGE(cpPlugins REQUIRED) +ENDIF(USE_cpPlugins) + +OPTION(USE_FrontAlgorithms "Build FrontAlgorithms based stuff" OFF) +IF(USE_FrontAlgorithms) + FIND_PACKAGE(FrontAlgorithms REQUIRED) +ENDIF(USE_FrontAlgorithms) + ## ================================================ ## = Do not allow to build inside the source tree = ## ================================================ diff --git a/appli/InteractiveDeformableMeshSegmentation/MainWnd.h b/appli/InteractiveDeformableMeshSegmentation/MainWnd.h index 45860bb..1fe1959 100644 --- a/appli/InteractiveDeformableMeshSegmentation/MainWnd.h +++ b/appli/InteractiveDeformableMeshSegmentation/MainWnd.h @@ -78,8 +78,7 @@ public: typedef cpPlugins::Interface::DataObject TPluginData; typedef cpPlugins::Interface::Image TPluginImage; typedef cpPlugins::Interface::ProcessObject TPlugin; - typedef TPlugin::TParameter TParameter; - typedef TPlugin::TParameters TParameters; + typedef cpPlugins::Interface::Parameters TParameters; typedef cpPlugins::Extensions::Visualization::MPRWithDifferentWindows TMPR; typedef std::map< std::string, std::string > TStringMap; diff --git a/lib/cpm/Plugins/SimpleFillRegion.cxx b/lib/cpm/Plugins/SimpleFillRegion.cxx index 1821ca2..cd8d180 100644 --- a/lib/cpm/Plugins/SimpleFillRegion.cxx +++ b/lib/cpm/Plugins/SimpleFillRegion.cxx @@ -62,17 +62,21 @@ cpm::Plugins::SimpleFillRegion:: std::string cpm::Plugins::SimpleFillRegion:: _GenerateData( ) { - itk::DataObject* i1 = this->_GetInput( 0 ); - itk::DataObject* i2 = this->_GetInput( 1 ); - - std::string r = - "cpm::Plugins::SimpleFillRegion: itk::Image(s) dimensions not supported"; - cpmPlugins_SimpleFillRegion_Dimension( r, 2, i1, i2, _GD0 ); - else cpmPlugins_SimpleFillRegion_Dimension( r, 3, i1, i2, _GD0 ); - return( r ); + /* TODO + itk::DataObject* i1 = this->_GetInput( 0 ); + itk::DataObject* i2 = this->_GetInput( 1 ); + + std::string r = + "cpm::Plugins::SimpleFillRegion: itk::Image(s) dimensions not supported"; + cpmPlugins_SimpleFillRegion_Dimension( r, 2, i1, i2, _GD0 ); + else cpmPlugins_SimpleFillRegion_Dimension( r, 3, i1, i2, _GD0 ); + return( r ); + */ + return( "" ); } // ------------------------------------------------------------------------- +/* template< unsigned int D > std::string cpm::Plugins::SimpleFillRegion:: _GD0( ) @@ -245,5 +249,6 @@ _GD2( ) return( "" ); } +*/ // eof - $RCSfile$ diff --git a/lib/cpm/Plugins/SimpleFillRegion.h b/lib/cpm/Plugins/SimpleFillRegion.h index 8bab400..48a6027 100644 --- a/lib/cpm/Plugins/SimpleFillRegion.h +++ b/lib/cpm/Plugins/SimpleFillRegion.h @@ -30,14 +30,16 @@ namespace cpm virtual std::string _GenerateData( ); - template< unsigned int D > - std::string _GD0( ); + /* TODO + template< unsigned int D > + std::string _GD0( ); - template< class P1, unsigned int D > - std::string _GD1( ); + template< class P1, unsigned int D > + std::string _GD1( ); - template< class P1, class P2, unsigned int D > - std::string _GD2( ); + template< class P1, class P2, unsigned int D > + std::string _GD2( ); + */ protected: itk::ProcessObject::Pointer m_Filter;