Permalink
Browse files

ENH: Added DWIConvert

git-svn-id: http://svn.slicer.org/Slicer4/trunk@21443 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
1 parent 1ab763f commit 5c76398e59c664fd35e70d96fcc42864edfc34d0 hjohnson committed Nov 19, 2012
Showing with 65 additions and 0 deletions.
  1. +5 −0 CMakeLists.txt
  2. +12 −0 SuperBuild.cmake
  3. +1 −0 SuperBuild/DWIConvert.CMakeLists.txt
  4. +47 −0 SuperBuild/External_DWIConvert.cmake
View
@@ -291,6 +291,11 @@ CMAKE_DEPENDENT_OPTION(
"Slicer_BUILD_QTSCRIPTEDMODULES" OFF)
mark_as_advanced(Slicer_BUILD_SlicerWebGLExport)
+## This does not yet build cleanly in the slicer environment, so turn off by default
+CMAKE_DEPENDENT_OPTION(Slicer_BUILD_DWIConvert "Build DWIConvert." OFF
+ "Slicer_BUILD_DICOM_SUPPORT" OFF)
+mark_as_advanced(Slicer_BUILD_DWIConvert)
+
#-----------------------------------------------------------------------------
# Install no development files by default, but allow the user to get
# them installed by setting Slicer_INSTALL_DEVELOPMENT to true.
View
@@ -159,6 +159,10 @@ if(Slicer_BUILD_SlicerWebGLExport)
list(APPEND Slicer_DEPENDENCIES SlicerWebGLExport)
endif()
+if(Slicer_BUILD_DWIConvert)
+ list(APPEND Slicer_DEPENDENCIES DWIConvert)
+endif()
+
SlicerMacroCheckExternalProjectDependency(Slicer)
#-----------------------------------------------------------------------------
@@ -323,6 +327,12 @@ if(APPLE)
-DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET})
endif()
+if(Slicer_BUILD_DWIConvert)
+ list(APPEND ep_superbuild_extra_args
+ -DDWIConvert_SOURCE_DIR:PATH=${DWIConvert_SOURCE_DIR}
+ )
+endif()
+
#------------------------------------------------------------------------------
# Configure and build Slicer
#------------------------------------------------------------------------------
@@ -374,6 +384,8 @@ ExternalProject_Add(${proj}
-DQT_QMAKE_EXECUTABLE:PATH=${QT_QMAKE_EXECUTABLE}
# CTK
-DCTK_DIR:PATH=${CTK_DIR}
+ # DCMTK
+ -DDCMTK_DIR:PATH=${DCMTK_DIR}
# jqPlot
-DjqPlot_DIR:PATH=${jqPlot_DIR}
# LibArchive
@@ -0,0 +1 @@
+add_subdirectory(DWIConvert)
@@ -0,0 +1,47 @@
+
+set(DWIConvert_DEPENDENCIES ITKv4 DCMTK SlicerExecutionModel)
+
+SlicerMacroCheckExternalProjectDependency(DWIConvert)
+
+set(proj DWIConvert)
+
+set(DWIConvert_REPOSITORY
+ ${git_protocol}://github.com/Chaircrusher/NewDicomToNrrdConverter.git)
+
+set(DWIConvert_GIT_TAG d8f0cbc604051aaabe30e6b32fbd7e8bdc4f1e88 )
+set(DWIConvert_DCMTK_ARGS -DDCMTK_DIR:PATH=${DCMTK_DIR} )
+
+ExternalProject_Add(${proj}
+ GIT_REPOSITORY ${DWIConvert_REPOSITORY}
+ GIT_TAG ${DWIConvert_GIT_TAG}
+ ${slicer_external_update}
+ SOURCE_DIR ${proj}
+ BINARY_DIR ${proj}-build
+ CMAKE_GENERATOR ${gen}
+ CMAKE_ARGS
+ -DCMAKE_CXX_COMPILER:FILEPATH=${CMAKE_CXX_COMPILER}
+ -DCMAKE_CXX_FLAGS:STRING=${ep_common_cxx_flags}
+ -DCMAKE_C_COMPILER:FILEPATH=${CMAKE_C_COMPILER}
+ -DCMAKE_C_FLAGS:STRING=${ep_common_c_flags}
+ -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
+ -DBUILD_SHARED_LIBS:BOOL=ON
+ -DUSE_SYSTEM_DCMTK:BOOL=${Slicer_BUILD_DICOM_SUPPORT}
+ -DITK_DIR=${ITK_DIR}
+ ${DWIConvert_DCMTK_ARGS}
+ CONFIGURE_COMMAND ""
+ BUILD_COMMAND ""
+ INSTALL_COMMAND ""
+ DEPENDS
+ ${DWIConvert_DEPENDENCIES}
+ )
+
+ExternalProject_Add_Step(${proj} InstallSlicerCMakeLists
+ COMMENT "Install simple CMakeList.txt for DWIConvert"
+ DEPENDEES download
+ DEPENDERS configure
+ COMMAND ${CMAKE_COMMAND}
+ -E copy ${CMAKE_CURRENT_LIST_DIR}/DWIConvert.CMakeLists.txt
+ <SOURCE_DIR>/CMakeLists.txt
+ )
+
+set(DWIConvert_SOURCE_DIR ${CMAKE_BINARY_DIR}/${proj})

0 comments on commit 5c76398

Please sign in to comment.