Commit 9b58e3dd authored by Gert Wollny's avatar Gert Wollny
Browse files

New upstream version 0.8.10

parent a10e3689
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -33,4 +33,9 @@
/* Legacy (for backwards compatibility) */
#define DICOM_BUILD_VERSION DICOM_PATCH_VERSION

/* To support 'override' for C++11 compilers */
#define VTK_DICOM_OVERRIDE@DICOM_OVERRIDE@
/* To support '=delete' for C++11 compilers */
#define VTK_DICOM_DELETE@DICOM_DELETE@

#endif
+79 −23
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ include(CTest)
# Project version
set(DICOM_MAJOR_VERSION 0)
set(DICOM_MINOR_VERSION 8)
set(DICOM_PATCH_VERSION 9)
set(DICOM_PATCH_VERSION 10)
set(DICOM_SHORT_VERSION "${DICOM_MAJOR_VERSION}.${DICOM_MINOR_VERSION}")
set(DICOM_VERSION "${DICOM_SHORT_VERSION}.${DICOM_PATCH_VERSION}")

@@ -29,8 +29,24 @@ set(DICOM_INCLUDE_DIRS
  "${DICOM_SOURCE_DIR}/Source"
  "${DICOM_BINARY_DIR}/Source")

if(Module_vtkDICOM) # We are being built as a VTK remote module
if(DEFINED VTK_MODULE_ENABLE_VTK_DICOM)
  # When building as a remote module for VTK 9 (or VTK 8.90+)
  message(STATUS "vtkDICOM: Building vtkDICOM as a Remote VTK Module")

  # Clear VTK_LIBS, linking will be handled by modular build
  set(VTK_LIBS)
  set(VTK_DICOM_LINK_TARGET VTK::DICOM)

  # To set DICOM_USE_VTKZLIB in vtkDICOMConfig.h
  set(DICOM_USE_VTKZLIB ON)

  option(BUILD_DICOM_PROGRAMS "Build the vtkDICOM tools" OFF)
  option(BUILD_DICOM_EXAMPLES "Build the vtkDICOM examples" OFF)
  set(BUILD_PROGRAMS ${BUILD_DICOM_PROGRAMS})
  set(BUILD_EXAMPLES ${BUILD_DICOM_EXAMPLES})

elseif(Module_vtkDICOM)
  # When building as a remote module for older versions of VTK
  message(STATUS "vtkDICOM: Building vtkDICOM as a Remote VTK Module")
  set(vtkDICOM_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Source)
  set(vtkDICOM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/Source)
@@ -38,14 +54,19 @@ if(Module_vtkDICOM) # We are being built as a VTK remote module

  # Clear VTK_LIBS, linking will be handled by modular build
  set(VTK_LIBS)
  set(VTK_DICOM_LINK_TARGET vtkDICOM)

  # To set DICOM_USE_VTKZLIB in vtkDICOMConfig.h
  set(DICOM_USE_VTKZLIB ON)

  option(BUILD_DICOM_PROGRAMS "Build the vtkDICOM tools" ON)
  option(BUILD_DICOM_EXAMPLES "Build the vtkDICOM examples" OFF)
  set(BUILD_PROGRAMS ${BUILD_DICOM_PROGRAMS})
  set(BUILD_EXAMPLES ${BUILD_DICOM_EXAMPLES})

else() # We are being built as a stand-alone package
else()
  # We are being built as a stand-alone package
  set(VTK_DICOM_LINK_TARGET vtkDICOM)

  # When CMake 3.0.0 is required, remove this block (see CMP0042).
  if(NOT DEFINED CMAKE_MACOSX_RPATH)
@@ -61,14 +82,28 @@ else() # We are being built as a stand-alone package

  find_package(VTK REQUIRED)
  message(STATUS "vtkDICOM: Building vtkDICOM stand-alone")
  if(NOT DEFINED VTK_VERSION)
    # backwards compatibility pre VTK 9.x
    set(VTK_VERSION ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION})
  endif()
  if(VTK_VERSION VERSION_LESS 8.90)
    include(${VTK_USE_FILE})
  if("${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}" VERSION_LESS 5.8)
  endif()
  if(VTK_VERSION VERSION_LESS 5.8)
    message(FATAL_ERROR "VTK 5.8 or later is required.")
  endif()

  # Wrap Python option
  if(VTK_WRAP_PYTHON)
    if(VTK_VERSION VERSION_LESS 8.90)
      option(BUILD_PYTHON_WRAPPERS "Build python wrappers" ON)
    else()
      message(WARNING
              "Stand-alone vtkDICOMPython not yet supported for "
              "VTK ${VTK_VERSION}, try building vtk-dicom as a remote "
              "module instead.")
      unset(BUILD_PYTHON_WRAPPERS CACHE)
    endif()
  else()
    unset(BUILD_PYTHON_WRAPPERS CACHE)
  endif()
@@ -82,7 +117,15 @@ else() # We are being built as a stand-alone package

  # Wrap Java option
  if(VTK_WRAP_JAVA)
    option(BUILD_JAVA_WRAPPERS "Build java wrappers" OFF)
    if(VTK_VERSION VERSION_LESS 8.90)
      option(BUILD_PYTHON_WRAPPERS "Build python wrappers" ON)
    else()
      message(WARNING
              "Stand-alone vtkDICOMJava not yet supported for "
              "VTK ${VTK_VERSION}, try building vtk-dicom as a remote "
              "module instead.")
      unset(BUILD_JAVA_WRAPPERS CACHE)
    endif()
  else()
    unset(BUILD_JAVA_WRAPPERS CACHE)
  endif()
@@ -258,14 +301,23 @@ if(NOT Module_vtkDICOM)
  set(DICOM_LIBRARIES vtkDICOM)

  # The library dependencies
  if("${VTK_MAJOR_VERSION}" GREATER 5)
    set(VTK_LIBS vtkCommonCore vtkCommonDataModel vtkImagingCore vtkIOCore
        vtkIOImage)
    # If vtkIOMPIImage is present, it has factories for vtkIOImage
    list(FIND VTK_LIBRARIES vtkIOMPIImage TMP_INDEX)
    if(TMP_INDEX GREATER -1)
      set(VTK_LIBS ${VTK_LIBS} vtkIOMPIImage)
  if(NOT VTK_VERSION VERSION_LESS 6)
    set(VTK_TARGET_PREFIX "VTK::")
    if(VTK_VERSION VERSION_LESS 8.90)
      set(VTK_TARGET_PREFIX "vtk")
    endif()
    set(VTK_LIBS)
    # required libraries
    foreach(_lib CommonCore CommonMisc CommonDataModel ImagingCore IOCore IOImage)
      list(APPEND VTK_LIBS ${VTK_TARGET_PREFIX}${_lib})
    endforeach()
    # factory libraries (only needed if present)
    foreach(_lib IOMPIImage)
      list(FIND VTK_LIBRARIES ${VTK_TARGET_PREFIX}${_lib} _index)
      if(_index GREATER -1)
        list(APPEND VTK_LIBS ${VTK_TARGET_PREFIX}${_lib})
      endif()
    endforeach()
  else()
    set(VTK_LIBS vtkCommon vtkFiltering vtkImaging vtkIO vtkInfovis) # VTK 5.x
  endif()
@@ -335,20 +387,24 @@ if(BUILD_PROGRAMS)
  add_subdirectory(Programs)
endif()

if(BUILD_EXAMPLES)
  add_subdirectory(Examples)
endif()

if(NOT DEFINED VTK_MODULE_ENABLE_VTK_DICOM)

  if(BUILD_TESTING)
    enable_testing()
    add_subdirectory(Testing)
  endif()

if(BUILD_EXAMPLES)
  add_subdirectory(Examples)
endif()

  # Install files
  install(FILES Copyright.txt
    DESTINATION ${DICOM_DATA_INSTALL_DEST})

if(NOT Module_vtkDICOM)
endif()

if(NOT Module_vtkDICOM AND NOT DEFINED VTK_MODULE_ENABLE_VTK_DICOM)
  #---------------------------------------------------
  # Export information for other projects

+5 −1
Original line number Diff line number Diff line
if(POLICY CMP0063)
  cmake_policy(SET CMP0063 NEW)
endif()

include_directories(${DICOM_INCLUDE_DIRS})

set(LIB_NAME dicomcli)
@@ -16,4 +20,4 @@ set(LIB_SRCS
)

add_library(${LIB_NAME} STATIC ${LIB_SRCS})
target_link_libraries(${LIB_NAME} vtkDICOM)
target_link_libraries(${LIB_NAME} ${VTK_DICOM_LINK_TARGET})
+3 −5
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#define progress_h

#include "vtkCommand.h"
#include "vtkDICOMConfig.h"

// Capture progress events
class ProgressObserver : public vtkCommand
@@ -22,12 +23,9 @@ class ProgressObserver : public vtkCommand
public:
  static ProgressObserver *New() { return new ProgressObserver; }
  vtkTypeMacro(ProgressObserver,vtkCommand);
#ifdef VTK_OVERRIDE
  void Execute(
    vtkObject *caller, unsigned long eventId, void *callData) VTK_OVERRIDE;
#else
  void Execute(vtkObject *caller, unsigned long eventId, void *callData);
#endif
    vtkObject *caller, unsigned long eventId, void *callData)
    VTK_DICOM_OVERRIDE;
  void SetText(const char *text) { this->Text = text; }
protected:
  ProgressObserver() : Stage(0), Anim(0), LastTime(0), Text("") {}
+8 −12
Original line number Diff line number Diff line
@@ -22,19 +22,15 @@
#define vtkConsoleOutputWindow_h

#include "vtkOutputWindow.h"
#include "vtkDICOMConfig.h"

class vtkConsoleOutputWindow : public vtkOutputWindow
{
public:
  vtkTypeMacro(vtkConsoleOutputWindow, vtkOutputWindow);
  static vtkConsoleOutputWindow* New();
#ifdef VTK_OVERRIDE
  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
  void DisplayText(const char*) VTK_OVERRIDE;
#else
  void PrintSelf(ostream& os, vtkIndent indent);
  void DisplayText(const char*);
#endif
  void PrintSelf(ostream& os, vtkIndent indent) VTK_DICOM_OVERRIDE;
  void DisplayText(const char*) VTK_DICOM_OVERRIDE;
  static void Install();

protected:
@@ -43,12 +39,12 @@ protected:
  void Initialize();

private:
#ifdef VTK_DELETE_FUNCTION
  vtkConsoleOutputWindow(const vtkConsoleOutputWindow&) VTK_DELETE_FUNCTION;
  void operator=(const vtkConsoleOutputWindow&) VTK_DELETE_FUNCTION;
#ifdef VTK_DICOM_DELETE
  vtkConsoleOutputWindow(const vtkConsoleOutputWindow&) VTK_DICOM_DELETE;
  void operator=(const vtkConsoleOutputWindow&) VTK_DICOM_DELETE;
#else
  vtkConsoleOutputWindow(const vtkConsoleOutputWindow&);
  void operator=(const vtkConsoleOutputWindow&);
  vtkConsoleOutputWindow(const vtkConsoleOutputWindow&) = delete;
  void operator=(const vtkConsoleOutputWindow&) = delete;
#endif
};

Loading