Commit 30f6edc1 authored by finetjul's avatar finetjul
Browse files

ENH: Separate the logic of the module "Fiber Bundles"

git-svn-id: http://svn.slicer.org/Slicer4/trunk@14071 3bd1e089-480b-0410-8dfb-8563597acbee
parent defb81d3
......@@ -614,12 +614,21 @@ slicer3_get_persistent_property(Slicer3_Base_INCLUDE_DIRS Slicer3_Base_INCLUDE_D
INCLUDE("${Slicer3_CMAKE_DIR}/Slicer3ModuleLogicMacros.cmake")
IF (NOT Slicer3_USE_KWWIDGETS)
# KWWidgets and Qt modules share the same logics typically located in the
# kwwdigets modules. When KWWidgets is not build, the logic are missing for Qt
# we need to manually add them:
# Loop through Modules subdirectory and try to include Logic subdirectory if it exists
FILE(GLOB modules_subdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} Modules/*)
FOREACH(subdir ${modules_subdirs})
IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/Logic)
ADD_SUBDIRECTORY(${subdir}/Logic)
ENDIF()
FILE(GLOB subsubdirs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} Modules/${subdir}/*)
FOREACH(subsubdir ${subsubdirs})
IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}/${subsubdir}/Logic)
ADD_SUBDIRECTORY(${subdir}/${subsubdir}/Logic)
ENDIF()
ENDFOREACH()
ENDFOREACH()
ENDIF()
......
......@@ -17,13 +17,19 @@ if(NOT Slicer3_SOURCE_DIR)
endif(NOT Slicer3_SOURCE_DIR)
# --------------------------------------------------------------------------
# Include dirs
# Add logic first
ADD_SUBDIRECTORY(Logic)
# --------------------------------------------------------------------------
# Include dirs
MESSAGE("tototot: ${vtkSlicerTractographyDisplayModuleLogic_SOURCE_DIR}")
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${Slicer3_Libs_INCLUDE_DIRS}
${Slicer3_Base_INCLUDE_DIRS}
${vtkSlicerTractographyDisplayModuleLogic_SOURCE_DIR}
${vtkSlicerTractographyDisplayModuleLogic_BINARY_DIR}
)
configure_file(
......@@ -51,8 +57,8 @@ set(SlicerTractographyDisplay_SRCS
vtkSlicerTractographyDisplayGUI.cxx
vtkSlicerAllFiberBundlesDisplayWidget.cxx
vtkSlicerFiberBundleDisplayWidget.cxx
vtkSlicerFiberBundleDisplayLogic.cxx
vtkSlicerFiberBundleLogic.cxx
#vtkSlicerFiberBundleDisplayLogic.cxx
#vtkSlicerFiberBundleLogic.cxx
vtkSlicerDiffusionTensorIcons.cxx
vtkSlicerTractographyDisplayLogic.cxx
)
......@@ -85,6 +91,7 @@ target_link_libraries(${lib_name}
${Slicer3_Base_LIBRARIES}
${KWWidgets_LIBRARIES}
${ITK_LIBRARIES}
vtkSlicerTractographyDisplayModuleLogic
)
slicer3_install_modules(${lib_name})
project(vtkSlicerTractographyDisplayModuleLogic)
#
# See CMake/Slicer3ModuleLogicMacros.cmake for details
#
SET(module_logic_name "${PROJECT_NAME}")
# The header '${PROJECT_NAME}Export.h' will be automatically configured.
SET(module_logic_export_directive "VTK_SLICER_TRACTOGRAPHY_DISPLAY_MODULE_LOGIC_EXPORT")
# Additional directories to include
SET(module_logic_include_directories
)
# Source files
SET(module_logic_SRCS
vtkSlicerFiberBundleLogic.cxx
vtkSlicerFiberBundleLogic.h
vtkSlicerFiberBundleDisplayLogic.cxx
vtkSlicerFiberBundleDisplayLogic.h
)
# Additional Target libraries
SET(module_logic_target_libraries
${ITK_LIBRARIES}
)
Slicer3_build_module_logic(
NAME ${module_logic_name}
EXPORT_DIRECTIVE ${module_logic_export_directive}
INCLUDE_DIRECTORIES ${module_logic_include_directories}
SRCS ${module_logic_SRCS}
TARGET_LIBRARIES ${module_logic_target_libraries}
)
......@@ -25,11 +25,11 @@
#include "vtkMRMLFiberBundleTubeDisplayNode.h"
#include "vtkMRMLFiberBundleGlyphDisplayNode.h"
#include "vtkDiffusionTensorGlyph.h"
#include "vtkTubeFilter.h"
//#include "vtkPointData.h"
#include <sstream>
vtkCxxRevisionMacro(vtkSlicerFiberBundleDisplayLogic, "$Revision: 1.9.12.1 $");
......
......@@ -26,16 +26,14 @@
#include <stdlib.h>
#include "vtkSlicerModuleLogic.h"
#include "vtkSlicerTractographyDisplay.h"
#include "vtkSlicerTractographyDisplayModuleLogicExport.h"
#include "vtkMRMLFiberBundleNode.h"
#include "vtkMRMLFiberBundleDisplayNode.h"
#include "vtkDiffusionTensorGlyph.h"
class vtkSlicerTractographyDisplay;
class VTK_SLICERTRACTOGRAPHYDISPLAY_EXPORT vtkSlicerFiberBundleDisplayLogic : public vtkSlicerModuleLogic
class VTK_SLICER_TRACTOGRAPHY_DISPLAY_MODULE_LOGIC_EXPORT vtkSlicerFiberBundleDisplayLogic
: public vtkSlicerModuleLogic
{
public:
......
......@@ -14,8 +14,6 @@
#include "vtkObjectFactory.h"
#include "vtkCallbackCommand.h"
#include <itksys/SystemTools.hxx>
#include <itksys/Directory.hxx>
#include "vtkSlicerFiberBundleLogic.h"
#include "vtkSlicerFiberBundleDisplayLogic.h"
......@@ -24,6 +22,9 @@
#include "vtkMRMLFiberBundleStorageNode.h"
#include "vtkMRMLFiberBundleLineDisplayNode.h"
#include <itksys/SystemTools.hxx>
#include <itksys/Directory.hxx>
vtkCxxRevisionMacro(vtkSlicerFiberBundleLogic, "$Revision: 1.9.12.1 $");
vtkStandardNewMacro(vtkSlicerFiberBundleLogic);
......
......@@ -21,16 +21,16 @@
#ifndef __vtkSlicerFiberBundleLogic_h
#define __vtkSlicerFiberBundleLogic_h
#include <stdlib.h>
#include "vtkSlicerTractographyDisplay.h"
#include "vtkSlicerModuleLogic.h"
#include "vtkSlicerTractographyDisplayModuleLogicExport.h"
#include "vtkMRMLFiberBundleNode.h"
// STD includes
#include <stdlib.h>
class vtkMRMLFiberBundleNode;
class VTK_SLICERTRACTOGRAPHYDISPLAY_EXPORT vtkSlicerFiberBundleLogic : public vtkSlicerModuleLogic
class VTK_SLICER_TRACTOGRAPHY_DISPLAY_MODULE_LOGIC_EXPORT vtkSlicerFiberBundleLogic
: public vtkSlicerModuleLogic
{
public:
......
......@@ -21,8 +21,10 @@
#define __vtkSlicerTractographyDisplayLogic_h
#include "vtkSlicerFiberBundleLogic.h"
#include "vtkSlicerTractographyDisplayWin32Header.h"
class VTK_SLICERTRACTOGRAPHYDISPLAY_EXPORT vtkSlicerTractographyDisplayLogic : public vtkSlicerFiberBundleLogic
class VTK_SLICERTRACTOGRAPHYDISPLAY_EXPORT vtkSlicerTractographyDisplayLogic
: public vtkSlicerFiberBundleLogic
{
public:
......
......@@ -33,6 +33,8 @@ include_directories(
${vtkSlicerVolumesModuleLogic_BINARY_DIR}
${vtkSlicerTractographyModuleLogic_SOURCE_DIR}
${vtkSlicerTractographyModuleLogic_BINARY_DIR}
${vtkSlicerTractographyDisplayModuleLogic_SOURCE_DIR}
${vtkSlicerTractographyDisplayModuleLogic_BINARY_DIR}
${SlicerTractographyFiducialSeeding_SOURCE_DIR}
${SlicerTractographyFiducialSeeding_BINARY_DIR}
${SlicerTractographyDisplay_SOURCE_DIR}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment