]> Creatis software - cpMesh.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Wed, 16 Sep 2015 17:30:23 +0000 (19:30 +0200)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Wed, 16 Sep 2015 17:30:23 +0000 (19:30 +0200)
CMakeLists.txt
appli/InteractiveDeformableMeshSegmentation/MainWnd.h
lib/cpm/Plugins/SimpleFillRegion.cxx
lib/cpm/Plugins/SimpleFillRegion.h

index 1776d43bd59730c90d76b6adf7be006d8f0e5ff7..231d94c2dc2ef02625034a8933bcde43fba442d9 100644 (file)
@@ -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 =
 ## ================================================
index 45860bb3e171118fd1f5ae1f4987b444f6fe00ce..1fe195996954b07c30002aed7486e824c09b209a 100644 (file)
@@ -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;
index 1821ca2ad8f79f9668dba417150490b64a35215d..cd8d180af78e42c769f7a4f9ca612a67c907daa0 100644 (file)
@@ -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$
index 8bab40061a2829e0c6f2979fdae91bf88cd70b1c..48a6027ceb9c7a4c3d1723e4d841506a5d93567d 100644 (file)
@@ -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;