]> Creatis software - gdcm.git/commitdiff
* Bugs fix for the Windows build with VC6
authorregrain <regrain>
Tue, 9 Nov 2004 11:21:31 +0000 (11:21 +0000)
committerregrain <regrain>
Tue, 9 Nov 2004 11:21:31 +0000 (11:21 +0000)
  * CMakeLists.txt : bug fix - The include of the VTK lib is made only when it's
    needed (only for projects required VTK). If the VTK is included in all
    projects, there is conflicts with the jpeg lib of vtk when compiling the
    gdcmjpeg[8,12,16] projects. The first conflict is on the jmorecfg.h file.
  * src/gdcmUtil.h : export binary_write methods. Otherwise, there's problems
    when compiling the gdcm_wrap.cxx file (created by the compilation of the
    gdcm.i file)
  * vtk/vtkGdcmDemo.cxx : remove the use of std namespace for the cerr use
    (like it's already made for the cout use). Otherwise, conflict with the
    std::cerr of vtk.
   -- BeNours

CMakeLists.txt
ChangeLog
Testing/CMakeLists.txt
gdcmPython/CMakeLists.txt
src/gdcmUtil.h
vtk/CMakeLists.txt
vtk/vtkGdcmDemo.cxx

index 7438ca392ad5193f0759b427c5bd462fb4513cc5..7d4de8923a68f2a37bf9078befd21d8e28046183 100644 (file)
@@ -88,7 +88,7 @@ IF(GDCM_VTK)
   FIND_PACKAGE(VTK)
   # If vtk found
   IF(VTK_FOUND)
-    INCLUDE(${VTK_USE_FILE})
+    #INCLUDE(${VTK_USE_FILE})
     SUBDIRS(vtk)
   ENDIF(VTK_FOUND)
 ENDIF(GDCM_VTK)
index 0dbb37d0d44023d869fce6e0ec04bdcf08163782..db27f533d54fab7aa98cc14ad0e1cbcf65c3504d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2004-11-09 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+  * Bugs fix for the Windows build with VC6
+  * CMakeLists.txt : bug fix - The include of the VTK lib is made only when it's
+    needed (only for projects required VTK). If the VTK is included in all
+    projects, there is conflicts with the jpeg lib of vtk when compiling the
+    gdcmjpeg[8,12,16] projects. The first conflict is on the jmorecfg.h file.
+  * src/gdcmUtil.h : export binary_write methods. Otherwise, there's problems
+    when compiling the gdcm_wrap.cxx file (created by the compilation of the
+    gdcm.i file)
+  * vtk/vtkGdcmDemo.cxx : remove the use of std namespace for the cerr use
+    (like it's already made for the cout use). Otherwise, conflict with the
+    std::cerr of vtk.
+
 2004-11-09 Eric Boix <Eric.Boix@creatis.insa-lyon.fr>
   * src/gdcmDicomDit.h the Method typedef is now local to DicomDir class.
   * gdcmPython/gdcm.i:
index 76814532f15fe7107499dfa0930c1fc56d8132a8..37e5ccd92f97d7e76fd75246dd77bbc349a515a4 100644 (file)
@@ -31,11 +31,14 @@ IF (GDCM_DATA_ROOT)
   )
   # add test that require VTK:
   IF(GDCM_VTK)
+    # Include the VTK library
+    INCLUDE(${VTK_USE_FILE})
+
     INCLUDE_DIRECTORIES(
       ${GDCM_SOURCE_DIR}/vtk/
       )
     SET(TEST_SOURCES ${TEST_SOURCES}
-      ShowDicom.cxx    
+      ShowDicom.cxx
       )
   ENDIF(GDCM_VTK)
 ENDIF (GDCM_DATA_ROOT)
index c1cb3cafe455dfcdaa0143dc0525cdfcd41589cf..9622d80eb6dfbc670e1142dd5e05e8e195747937 100644 (file)
@@ -152,6 +152,9 @@ ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.9)
 # VTK Wrapping
 # 
 IF(GDCM_VTK)
+  # Include the VTK library
+  INCLUDE(${VTK_USE_FILE})
+
   INCLUDE_DIRECTORIES(
     ${GDCM_SOURCE_DIR}/vtk
   )
index a32b5f2c4bff926aecd4c26edce227abfe8b535d..110a7fadd46e23ce10ff935892e5c38449217525 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/05 20:23:14 $
-  Version:   $Revision: 1.40 $
+  Date:      $Date: 2004/11/09 11:21:32 $
+  Version:   $Revision: 1.41 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -53,12 +53,12 @@ public:
    static std::string DicomString(const char* s);
 };
 
-   template <class T>
-   std::ostream& binary_write(std::ostream& os, const T& val);
-   std::ostream& binary_write(std::ostream& os, const uint16_t& val);
-   std::ostream& binary_write(std::ostream& os, const uint32_t& val);
-   std::ostream& binary_write(std::ostream& os, const char* val);
-   std::ostream& binary_write(std::ostream& os, std::string const & val);
+   template <class T> 
+   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const T& val);
+   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const uint16_t& val);
+   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const uint32_t& val);
+   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, const char* val);
+   GDCM_EXPORT std::ostream& binary_write(std::ostream& os, std::string const & val);
 } // end namespace gdcm
 //-----------------------------------------------------------------------------
 #endif
index 6b2fa6b57ac78452de006db2d321a1f07a1f9a91..a7f2b73dd17fd9bd025f89d1c08ee7548b179697 100644 (file)
@@ -1,49 +1,53 @@
-#-----------------------------------------------------------------------------\r
-# VTK GDCM Reader subdir\r
-\r
-#-----------------------------------------------------------------------------\r
-# Need gdcm header files\r
-INCLUDE_DIRECTORIES(\r
-  ${GDCM_SOURCE_DIR}/src/\r
-  ${GDCM_BINARY_DIR}/\r
-)\r
-\r
-SET(VTKGDCM_LIB_SRCS\r
-  vtkGdcmReader.cxx\r
-)\r
-\r
-#-----------------------------------------------------------------------------\r
-# Create vtkgdcm library\r
-ADD_LIBRARY(vtkgdcm ${VTKGDCM_LIB_SRCS})\r
-TARGET_LINK_LIBRARIES(vtkgdcm \r
-  gdcm\r
-  vtkCommon\r
-  vtkIO\r
-  vtkFiltering\r
-)\r
-\r
-#-----------------------------------------------------------------------------\r
-SET(vtkgdcmdemo_SOURCES\r
-  vtkGdcmDemo.cxx\r
-)\r
-ADD_EXECUTABLE(vtkgdcmdemo ${vtkgdcmdemo_SOURCES})\r
-TARGET_LINK_LIBRARIES(vtkgdcmdemo \r
-  vtkgdcm\r
-  vtkGraphics\r
-  vtkRendering\r
-)\r
-\r
-#-----------------------------------------------------------------------------\r
-SET(vtkgdcmViewer_SOURCES\r
-  vtkgdcmViewer.cxx\r
-)\r
-ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES})\r
-TARGET_LINK_LIBRARIES(vtkgdcmViewer \r
-  vtkgdcm\r
-  vtkRendering\r
-)\r
-\r
-# Install vtk header\r
-INSTALL_FILES(/include FILES vtkGdcmReader.h)\r
-\r
-INSTALL_TARGETS(/lib/ vtkgdcm)\r
+#-----------------------------------------------------------------------------
+# VTK GDCM Reader subdir
+
+#-----------------------------------------------------------------------------
+# Include the VTK library
+INCLUDE(${VTK_USE_FILE})
+
+# Need gdcm header files
+INCLUDE_DIRECTORIES(
+  ${GDCM_SOURCE_DIR}/src/
+  ${GDCM_BINARY_DIR}/
+)
+
+SET(VTKGDCM_LIB_SRCS
+  vtkGdcmReader.cxx
+)
+
+#-----------------------------------------------------------------------------
+# Create vtkgdcm library
+ADD_LIBRARY(vtkgdcm ${VTKGDCM_LIB_SRCS})
+TARGET_LINK_LIBRARIES(vtkgdcm
+  gdcm
+  vtkCommon
+  vtkIO
+  vtkFiltering
+)
+
+#-----------------------------------------------------------------------------
+SET(vtkgdcmdemo_SOURCES
+  vtkGdcmDemo.cxx
+)
+ADD_EXECUTABLE(vtkgdcmdemo ${vtkgdcmdemo_SOURCES})
+TARGET_LINK_LIBRARIES(vtkgdcmdemo
+  vtkgdcm
+  vtkGraphics
+  vtkRendering
+)
+
+#-----------------------------------------------------------------------------
+SET(vtkgdcmViewer_SOURCES
+  vtkgdcmViewer.cxx
+)
+ADD_EXECUTABLE(vtkgdcmViewer ${vtkgdcmViewer_SOURCES})
+TARGET_LINK_LIBRARIES(vtkgdcmViewer
+  vtkgdcm
+  vtkRendering
+)
+
+# Install vtk header
+INSTALL_FILES(/include FILES vtkGdcmReader.h)
+
+INSTALL_TARGETS(/lib/ vtkgdcm)
+
index d94763cb9fa3744843356265b52be8e1f36013da..3dff229e3825ee621519a34ff78daeb7c879e462 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /cvs/public/gdcm/vtk/vtkGdcmDemo.cxx,v 1.1 2004/10/01 12:40:58 frog Exp $
+// $Header: /cvs/public/gdcm/vtk/vtkGdcmDemo.cxx,v 1.2 2004/11/09 11:21:33 regrain Exp $
 
 //----------------------------------------------------------------------------
 // A simple straightfoward example of vtkGdcmReader vtk class usage.
@@ -43,7 +43,7 @@ int main( int argc, char *argv[] )
 
    if (argc < 2)
    {
-      std::cerr << "Usage: " << argv[0] << " image.dcm\n";
+      cerr << "Usage: " << argv[0] << " image.dcm\n";
       return 0;
    }