]> Creatis software - FrontAlgorithms.git/commitdiff
...
authorLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Mon, 21 Nov 2016 16:38:24 +0000 (11:38 -0500)
committerLeonardo Flórez-Valencia <florez-l@javeriana.edu.co>
Mon, 21 Nov 2016 16:38:24 +0000 (11:38 -0500)
18 files changed:
CMakeLists.txt
cmake/Functions.cmake
cmake/QtTools.cmake
lib/fpaInstances/CMakeLists.txt [moved from lib/Instances/CMakeLists.txt with 50% similarity]
lib/fpaInstances/DataObjects.i [moved from lib/Instances/fpa_DataObjects.i with 100% similarity]
lib/fpaInstances/Filters.i [moved from lib/Instances/fpa_Filters.i with 100% similarity]
plugins/CMakeLists.txt
plugins/Plugins/BaseImageFilter.cxx
plugins/Plugins/ExtractPathFromMinimumSpanningTree.cxx
plugins/Plugins/GaussianModelCost.cxx
plugins/Plugins/ImageDijkstra.cxx
plugins/Plugins/ImageRegionGrow.cxx
plugins/Plugins/InvertCost.cxx
plugins/Plugins/RegionGrowBinaryThreshold.cxx
plugins/Plugins/RegionGrowBinaryThresholdWithSeeds.cxx
plugins/Plugins/SimpleImageDijkstraCost.cxx
plugins/Plugins/SimpleImageNeighborhood.cxx
plugins/Plugins/SkeletonFilter.cxx

index fec6ee28db555f66b26e333dc251052ae917ed65..3cdfd45fd6997d9b69a12c5d0053cad493da1b48 100644 (file)
@@ -35,20 +35,13 @@ SET(prj_SHORT_VERSION "${prj_MAJOR_VERSION}")
 ## == Functions, packages and options ==
 ## =====================================
 
-INCLUDE(cmake/Restrictions.cmake)
-INCLUDE(cmake/KitwareTools.cmake)
 OPTION(USE_cpPlugins "Build cpPlugins-based code" OFF)
 IF(USE_cpPlugins)
   FIND_PACKAGE(cpPlugins REQUIRED)
-  IF(USE_QT4)
-    INCLUDE(cmake/QtTools.cmake)
-    SET(
-      cpPlugins_Qt4_VTKWidget QVTKWidget
-      CACHE STRING "Base Qt4-based vtkRenderWindow"
-      )
-    MARK_AS_ADVANCED(FORCE cpPlugins_Qt4_VTKWidget)
-  ENDIF(USE_QT4)
 ENDIF(USE_cpPlugins)
+INCLUDE(cmake/Restrictions.cmake)
+INCLUDE(cmake/KitwareTools.cmake)
+INCLUDE(cmake/QtTools.cmake)
 INCLUDE(cmake/Functions.cmake)
 
 ## ===========================
@@ -56,6 +49,6 @@ INCLUDE(cmake/Functions.cmake)
 ## ===========================
 
 ## SUBDIRS(appli cmake lib plugins)
-SUBDIRS(lib)
+SUBDIRS(lib plugins)
 
 ## eof - $RCSfile$
index aebf89fa6749738c57a476d73dee13537aafd92c..91f026a7d5334c5798684ea40fc86d71b1e53b94 100644 (file)
@@ -177,8 +177,7 @@ FOREACH(_i ${_instances})
 
   ## -- Infere source code filenames
   MATH(EXPR _last_range "${cpPlugins_CONFIG_NUMBER_OF_FILES}-1")
-  SET(_out_code "${_i_path}/${_out_name}.h")
-  LIST(APPEND _hdrs ${_i_path}/${_out_name}.h)
+  SET(_out_code)
   FOREACH(_n RANGE 0 ${_last_range})
     LIST(APPEND _out_code ${_i_path}/${_out_name}_${_n}.cxx)
     LIST(APPEND _srcs ${_i_path}/${_out_name}_${_n}.cxx)
index 8e884b046fab187e446b1febfe824311185e6b05..a3b496650a57a84ac88f79ca75b14e0abadd1eef 100644 (file)
@@ -2,7 +2,6 @@
 ## == Find Qt4 and check if it was well configured ==
 ## ==================================================
 
-OPTION(USE_QT4 "Build Qt4-based code" OFF)
 IF(USE_QT4)
   SET(QT4_FOUND "0")
   FIND_PACKAGE(Qt4 REQUIRED)
@@ -23,6 +22,7 @@ IF(USE_QT4)
     QVTKWidget
     CACHE STRING "Base Qt4-based vtkRenderWindow"
     )
+  MARK_AS_ADVANCED(FORCE cpPlugins_Qt4_VTKWidget)
 ENDIF(USE_QT4)
 
 ## eof - $RCSfile$
similarity index 50%
rename from lib/Instances/CMakeLists.txt
rename to lib/fpaInstances/CMakeLists.txt
index a51aa8722e3a92beab440ee5e5eb7624d5021fcb..ed342745f5d4525eeb6711a45161633c6113cff6 100644 (file)
@@ -3,24 +3,25 @@
 ## ===========================
 
 SET(
-  _all_defs
+  _definitions
   DataObjects
   Filters
   )
 
 SET(_all_libs)
-FOREACH(_def ${_all_defs})
-  CreateLib(
-    fpaInstances${_def} SHARED ${CMAKE_CURRENT_SOURCE_DIR}/fpa_${_def}.i
+FOREACH(_d ${_definitions})
+  FILE(GLOB _files ${CMAKE_CURRENT_SOURCE_DIR}/${_d}.*)
+  CreateLib(fpaInstances${_d} SHARED ${_files})
+  TARGET_LINK_LIBRARIES(
+    fpaInstances${_d}
+    ${ITK_LIBRARIES} ${VTK_LIBRARIES}
     )
-  LIST(APPEND _all_libs fpaInstances_${_def})
-ENDFOREACH(_def)
+  LIST(APPEND _all_libs fpaInstances${_d})
+ENDFOREACH(_d)
 
 TARGET_LINK_LIBRARIES(
   fpaInstancesDataObjects
-  ${ITK_LIBRARIES}
-  ${VTK_LIBRARIES}
-  ${cpPlugins_Instances}
+  ${cpPlugins_AllInstances}
   )
 TARGET_LINK_LIBRARIES(
   fpaInstancesFilters
@@ -28,7 +29,7 @@ TARGET_LINK_LIBRARIES(
   )
 
 SET(
-  fpa_Instances ${_all_libs}
+  fpa_AllInstances ${_all_libs}
   CACHE INTERNAL "All valid instances." FORCE
   )
 
index 36271c8b100633f945cdba331b40ac5246fb6059..b03240910f7322e839399d25355ab62e0a853aa7 100644 (file)
@@ -7,13 +7,14 @@ IF(USE_cpPlugins)
     ${PROJECT_SOURCE_DIR}/lib
     ${PROJECT_BINARY_DIR}/lib
     )
-  CreatePlugin(fpaPlugins Plugins ${cpPlugins_CONFIG_NUMBER_OF_FILES})
+  CreatePlugin(fpaPlugins Plugins)
   TARGET_LINK_LIBRARIES(
     fpaPlugins
-    cpPlugins cpExtensions
-    ${cpPlugins_Instances}
-    ${fpa_Instances}
+    cpPlugins
+    ${cpPlugins_AllInstances}
+    ${fpa_AllInstances}
     )
+  MESSAGE(STATUS ${cpPlugins_AllInstances})
 ENDIF(USE_cpPlugins)
 
 ## eof - $RCSfile$
\ No newline at end of file
index 746bd3143621d6c5f937d90dc1109aa2eeeab694..005924606939403d75d69a57c025c598a55a6ae3 100644 (file)
@@ -1,5 +1,5 @@
 #include <Plugins/BaseImageFilter.h>
-#include <cpPlugins/DataObjects/Image.h>
+#include <cpInstances/Image.h>
 
 // -------------------------------------------------------------------------
 fpaPlugins::BaseImageFilter::
@@ -7,7 +7,7 @@ BaseImageFilter( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject _TData;
-  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpInstances::Image _TImage;
 
   this->_ConfigureInput< _TImage >( "Input", true, false );
   this->_ConfigureInput< _TData >( "Seeds", true, false );
index 8d3b9c77688d8c24d133838851bd0ca15e311fdb..80d41115d40f0574244f16ecb58da51b154713b2 100644 (file)
@@ -1,6 +1,6 @@
 #include <Plugins/ExtractPathFromMinimumSpanningTree.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <Extensions/PolyLineParametricPath.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/PolyLineParametricPath.h>
 #include <vtkPolyData.h>
 #include <fpa/Image/MinimumSpanningTree.h>
 
@@ -10,8 +10,8 @@ ExtractPathFromMinimumSpanningTree( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject             _TData;
-  typedef cpPlugins::DataObjects::Image                  _TMST;
-  typedef cpPlugins::DataObjects::PolyLineParametricPath _TPath;
+  typedef cpInstances::Image                  _TMST;
+  typedef cpInstances::PolyLineParametricPath _TPath;
 
   this->_ConfigureInput< _TMST >( "MST", true, false );
   this->_ConfigureInput< _TData >( "Seeds", true, false );
index e817fb6244600ad08098a89a4705fce18d56724c..c84f5e70f46d131d8233eedaac3c6e60144e68af 100644 (file)
@@ -1,5 +1,5 @@
 #include <Plugins/GaussianModelCost.h>
-#include <cpPlugins/DataObjects/Image.h>
+#include <cpInstances/Image.h>
 
 #include <fpa/Base/Functors/GaussianModel.h>
 
index d5ce7df0dac3b5b480422fc6f4050deae5018b03..7c8212ef9f6e80d66ea56afc5a53c72c3602d57d 100644 (file)
@@ -1,6 +1,6 @@
 #include <Plugins/ImageDijkstra.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/Image_Demanglers.h>
 
 #include <fpa/Image/Dijkstra.h>
 #include <vtkPolyData.h>
@@ -11,7 +11,7 @@ ImageDijkstra( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject _TData;
-  typedef cpPlugins::DataObjects::Image      _TMST;
+  typedef cpInstances::Image      _TMST;
 
   this->_ConfigureInput< _TData >( "Cost", false, false );
   this->_ConfigureInput< _TData >( "CostConversion", false, false );
index df1713c9dd1f27f8fc5a8c4bcc376f9b53189fb5..50562123a1caf7cd50163f088aae4a31169aa2f6 100644 (file)
@@ -1,6 +1,6 @@
 #include <Plugins/ImageRegionGrow.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/Image_Demanglers.h>
 
 #include <fpa/Image/RegionGrow.h>
 #include <vtkPolyData.h>
@@ -11,7 +11,7 @@ ImageRegionGrow( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject _TData;
-  typedef cpPlugins::DataObjects::Image      _TMST;
+  typedef cpInstances::Image      _TMST;
 
   this->_ConfigureInput< _TData >( "GrowFunction", true, false );
 
@@ -64,6 +64,8 @@ template< class _TInputImage, class _TOutputPixel >
 void fpaPlugins::ImageRegionGrow::
 _GD1( _TInputImage* image )
 {
+  std::cout << "--------------> again <-----------------" << std::endl;
+
   typedef
     itk::Image< _TOutputPixel, _TInputImage::ImageDimension >
     _TOutputImage;
index d50676a95888fca021da134e7b11ba72509cfa9c..4abfe339c4b80a04c13ae0c39c5baedcc7c51d5c 100644 (file)
@@ -1,5 +1,5 @@
 #include <Plugins/InvertCost.h>
-#include <cpPlugins/DataObjects/Image.h>
+#include <cpInstances/Image.h>
 
 #include <fpa/Base/Functors/Inverse.h>
 
index 8f7c620b63a147d076737f3c78feb7265cad0036..20d5e78517c59ef6a9776dc1b5181c1969ae5f50 100644 (file)
@@ -1,6 +1,6 @@
 #include <Plugins/RegionGrowBinaryThreshold.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/Image_Demanglers.h>
 
 #include <itkImage.h>
 #include <fpa/Image/Functors/RegionGrowBinaryThreshold.h>
@@ -11,7 +11,7 @@ RegionGrowBinaryThreshold( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject _TData;
-  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpInstances::Image _TImage;
 
   this->_ConfigureInput< _TImage >( "Input", true, false );
   this->_ConfigureOutput< _TData >( "Output" );
index 5dceb2c86213958e09f4c7cc5aa6e6c96d941318..e799ae219584e6b7a57f80afae6b8d6c8d9a039f 100644 (file)
@@ -1,6 +1,6 @@
 #include <Plugins/RegionGrowBinaryThresholdWithSeeds.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/Image_Demanglers.h>
 
 #include <fpa/Image/Functors/RegionGrowBinaryThreshold.h>
 #include <itkConstNeighborhoodIterator.h>
@@ -12,7 +12,7 @@ RegionGrowBinaryThresholdWithSeeds( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject _TData;
-  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpInstances::Image _TImage;
 
   this->_ConfigureInput< _TImage >( "Input", true, false );
   this->_ConfigureInput< _TData >( "Seeds", true, false );
index 4662b62807d79785d72fa8310e5af017f729114a..dbd3f7e1e3aa8d9c6c7023e89c318f6d5587999e 100644 (file)
@@ -1,6 +1,6 @@
 #include <Plugins/SimpleImageDijkstraCost.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/Image_Demanglers.h>
 
 #include <itkImage.h>
 #include <fpa/Image/Functors/SimpleDijkstraCost.h>
@@ -11,7 +11,7 @@ SimpleImageDijkstraCost( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject _TData;
-  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpInstances::Image _TImage;
 
   this->_ConfigureInput< _TImage >( "Input", true, false );
   this->_ConfigureOutput< _TData >( "Output" );
index 37382a86325f67e1d958bf3a2f9f1f4d4af08623..3d3e9436873e9785817632190b91f013424c795e 100644 (file)
@@ -1,6 +1,6 @@
 #include <Plugins/SimpleImageNeighborhood.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/Image_Demanglers.h>
 
 #include <itkImage.h>
 #include <fpa/Image/Functors/SimpleNeighborhood.h>
@@ -11,7 +11,7 @@ SimpleImageNeighborhood( )
   : Superclass( )
 {
   typedef cpPlugins::BaseObjects::DataObject _TData;
-  typedef cpPlugins::DataObjects::Image _TImage;
+  typedef cpInstances::Image _TImage;
 
   this->_ConfigureInput< _TImage >( "Input", true, false );
   this->_ConfigureOutput< _TData >( "Output" );
index 31f0f5c6cd3ca8031174016ae7b760a2a8e98c83..6e9102af78ef042b51205586418a471a518e8db1 100644 (file)
@@ -1,7 +1,7 @@
 #include <Plugins/SkeletonFilter.h>
-#include <cpPlugins/DataObjects/Image.h>
-#include <cpPlugins/DataObjects/Image_Demanglers.h>
-#include <cpPlugins/DataObjects/Skeleton.h>
+#include <cpInstances/Image.h>
+#include <cpInstances/Image_Demanglers.h>
+#include <cpInstances/Skeleton.h>
 
 #include <fpa/Image/SkeletonFilter.h>
 #include <itkImage.h>
@@ -12,8 +12,8 @@ fpaPlugins::SkeletonFilter::
 SkeletonFilter( )
   : Superclass( )
 {
-  typedef cpPlugins::DataObjects::Image    _TImage;
-  typedef cpPlugins::DataObjects::Skeleton _TSkeleton;
+  typedef cpInstances::Image    _TImage;
+  typedef cpInstances::Skeleton _TSkeleton;
   typedef cpPlugins::BaseObjects::DataObject _TData;
 
   this->_ConfigureInput< _TImage >( "Input", true, false );