Skip to content

Commit

Permalink
Use vtk-dicom module in vtk9
Browse files Browse the repository at this point in the history
  • Loading branch information
eidelen committed Aug 5, 2023
1 parent 73e1e71 commit 7b589ff
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,27 @@ set(DICOM_TO_MESH_INC_DIRS inc)
# This library can be downloaded at https://github.com/dgobbi/vtk-dicom and
# enables the user to load more types of DICOM images.
option(USE_VTK_DICOM "Use VTK-DICOM Lib (extended DICOM support)" OFF)
if( USE_VTK_DICOM )
message(STATUS "The external library vtk-dicom, written by David Gobbi, is activated. The project is located under https://github.com/dgobbi/vtk-dicom and relaeased under BSD 3.")
find_package( DICOM REQUIRED )
include_directories( ${DICOM_INCLUDE_DIRS} )
link_directories( ${DICOM_LIBRARY_DIRS} )
set(DICOM_TO_MESH_LIB_LIBS ${DICOM_TO_MESH_LIB_LIBS} vtkDICOM)
add_definitions(-DUSEVTKDICOM)
set(DICOM_TO_MESH_LIB_INC ${DICOM_TO_MESH_LIB_INC} inc/vtkdicom/dicomRoutinesExtended.h)
set(DICOM_TO_MESH_LIB_SRC ${DICOM_TO_MESH_LIB_SRC} src/vtkdicom/dicomRoutinesExtended.cpp)
set(DICOM_TO_MESH_INC_DIRS ${DICOM_TO_MESH_INC_DIRS} inc/vtkdicom)
endif( USE_VTK_DICOM )
IF("${VTK_MAJOR_VERSION}" LESS 9)
if( USE_VTK_DICOM )
message(STATUS "The external library vtk-dicom, written by David Gobbi, is activated. The project is located under https://github.com/dgobbi/vtk-dicom and relaeased under BSD 3.")
find_package( DICOM REQUIRED )
include_directories( ${DICOM_INCLUDE_DIRS} )
link_directories( ${DICOM_LIBRARY_DIRS} )
set(DICOM_TO_MESH_LIB_LIBS ${DICOM_TO_MESH_LIB_LIBS} vtkDICOM)
add_definitions(-DUSEVTKDICOM)
set(DICOM_TO_MESH_LIB_INC ${DICOM_TO_MESH_LIB_INC} inc/vtkdicom/dicomRoutinesExtended.h)
set(DICOM_TO_MESH_LIB_SRC ${DICOM_TO_MESH_LIB_SRC} src/vtkdicom/dicomRoutinesExtended.cpp)
set(DICOM_TO_MESH_INC_DIRS ${DICOM_TO_MESH_INC_DIRS} inc/vtkdicom)
endif( USE_VTK_DICOM )
ELSE("${VTK_MAJOR_VERSION}" LESS 9)
if( USE_VTK_DICOM )
message(STATUS "vtk-dicom is a module in VTK 9. Build VTK 9 with enabled vtk-dicom.")
add_definitions(-DUSEVTKDICOM)
set(DICOM_TO_MESH_LIB_INC ${DICOM_TO_MESH_LIB_INC} inc/vtkdicom/dicomRoutinesExtended.h)
set(DICOM_TO_MESH_LIB_SRC ${DICOM_TO_MESH_LIB_SRC} src/vtkdicom/dicomRoutinesExtended.cpp)
set(DICOM_TO_MESH_INC_DIRS ${DICOM_TO_MESH_INC_DIRS} inc/vtkdicom)
endif( USE_VTK_DICOM )
ENDIF("${VTK_MAJOR_VERSION}" LESS 9)

include_directories( ${DICOM_TO_MESH_INC_DIRS} )

Expand Down

0 comments on commit 7b589ff

Please sign in to comment.