]> Creatis software - gdcm.git/commitdiff
ENH: Apply patch from ITK back to main CVS. Fix problem with gcc2.95, we may need...
authormalaterre <malaterre>
Tue, 30 Nov 2004 16:24:30 +0000 (16:24 +0000)
committermalaterre <malaterre>
Tue, 30 Nov 2004 16:24:30 +0000 (16:24 +0000)
gdcmConfigure.h.in
src/CMakeLists.txt
src/gdcmBinEntry.cxx
src/gdcmCommon.h
src/gdcmDocEntry.h
src/gdcmDocEntrySet.h
src/gdcmDocument.cxx
src/gdcmElementSet.h
src/gdcmHeader.cxx
src/gdcmSQItem.h

index 84f1969969cb23d4f7da4fb395974771914fa9a4..473e5bd10b59a7a4b12dd09767feccfb1c5b91bb 100644 (file)
@@ -22,7 +22,7 @@
 #cmakedefine GDCM_NO_ANSI_STRING_STREAM
 
 /* I guess something important */
-#cmakedefine HAVE_NO_STDINT_H 
+#cmakedefine GDCM_HAVE_STDINT_H
 
 /* This variable allows you to have helpful debug statement */
 /* That are in between #ifdef / endif in the gdcm code */
index bbdd6693db7995aed7d1660f6c7cf3a75552484d..999a933eeba640ee824b247ca8ce26b22a5b4d62 100644 (file)
@@ -1,4 +1,7 @@
 #-----------------------------------------------------------------------------
+# Rebuild gdcm whenever a file starting with gdcm* is modified
+INCLUDE_REGULAR_EXPRESSION("^gdcm.*$")
+
 # Build jpeg lib first:
 SUBDIRS(gdcmjpeg)
 
index d92bf991fad9f2e0a5af7755654300d52928e147..2b0bc0ef81ea11ff059df9114b94a6e4babe4eb7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBinEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/25 15:46:10 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.40 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,6 +19,7 @@
 #include "gdcmBinEntry.h"
 #include "gdcmDebug.h"
 #include <fstream>
+#include <iostream> // for std::ios_base, since <ios> does not exist on gcc/Solaris
 
 namespace gdcm 
 {
index 62a71b7238ca4ad32c78d97557eb7a55a79c102f..771a9e29fa40ed0f6f532a4ff7ac0f9514a428d1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmCommon.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/09 21:55:55 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.40 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #endif //_MSC_VER
 
 //-----------------------------------------------------------------------------
-#ifdef __GNUC__
-#ifndef HAVE_NO_STDINT_H
+// ifdef for old gcc compiler
+#ifdef GDCM_NO_ANSI_STRING_STREAM
+#  include <strstream>
+#  define  ostringstream ostrstream
+# else
+#  include <sstream>
+#endif
+
+#include <string>
+#include <assert.h>
+
+#ifdef GDCM_HAVE_STDINT_H
 #include <stdint.h>   // For uint8_t uint16_t and uint32_t
-#else
-typedef    signed char   int8_t;
-typedef  unsigned char  uint8_t;
-typedef  unsigned short uint16_t;
-typedef  unsigned int   uint32_t;
-#define UINT32_MAX    (4294967295U)
-#endif //HAVE_NO_STDINT_H
 #endif
 
-#if defined( _MSC_VER) || defined(__BORLANDC__)
+namespace gdcm
+{
+
+#ifndef GDCM_HAVE_STDINT_H
 typedef    signed char   int8_t;
 typedef  unsigned char  uint8_t;
 typedef  unsigned short uint16_t;
@@ -75,19 +81,6 @@ typedef  unsigned int   uint32_t;
 #define getcwd _getcwd
 #endif
 
-// ifdef for old gcc / broken compiler
-#ifdef GDCM_NO_ANSI_STRING_STREAM
-#  include <strstream>
-#  define  ostringstream ostrstream
-# else
-#  include <sstream>
-#endif
-
-#include <string>
-#include <cassert>
-
-namespace gdcm
-{
 
 // Centralize information about the gdcm dictionary in only one file:
 #ifndef PUB_DICT_PATH
index d6d3a5b6d8ca8bd9546edf052e85bad70bb8a6a2..7373c7287ece0122cf4c673995af4ce2aa3dbe36 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/25 15:46:11 $
-  Version:   $Revision: 1.30 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.31 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -21,6 +21,7 @@
 
 #include "gdcmDictEntry.h"
 #include <iostream>
+#include <fstream>
 
 class Header;
 class ValEntry;
index 32bf2ef4e492fa6575ffba045b02520fb808e018..5431412c0a9bc4a42959e9b688b8a5c549b4a1d2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/25 15:46:11 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.25 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,6 +20,7 @@
 #define GDCMDOCENTRYSET_H
 
 #include "gdcmException.h"
+#include <fstream>
 
 namespace gdcm 
 {
index a26f291edc4ebf3b1392c682f2330db799bb2809..92ee5d3c76bc438716d4692399421c788b36380f 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/26 10:55:04 $
-  Version:   $Revision: 1.142 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.143 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -74,7 +74,7 @@ static const char *TransferSyntaxStrings[] =  {
                                                                                 
 //-----------------------------------------------------------------------------
 // Refer to Document::CheckSwap()
-const unsigned int Document::HEADER_LENGTH_TO_READ = 256;
+//const unsigned int Document::HEADER_LENGTH_TO_READ = 256;
 
 // Refer to Document::SetMaxSizeLoadEntry()
 const unsigned int Document::MAX_SIZE_LOAD_ELEMENT_VALUE = 0xfff; // 4096
@@ -2419,7 +2419,7 @@ bool Document::CheckSwap()
    uint32_t  s32;
    uint16_t  s16;
        
-   char deb[256]; //HEADER_LENGTH_TO_READ];
+   char deb[256];
     
    // First, compare HostByteOrder and NetworkByteOrder in order to
    // determine if we shall need to swap bytes (i.e. the Endian type).
@@ -2434,7 +2434,7 @@ bool Document::CheckSwap()
          
    // The easiest case is the one of a DICOM header, since it possesses a
    // file preamble where it suffice to look for the string "DICM".
-   Fp->read(deb, HEADER_LENGTH_TO_READ);
+   Fp->read(deb, 256);
    
    char *entCur = deb + 128;
    if( memcmp(entCur, "DICM", (size_t)4) == 0 )
index 6e96cb77d16e5fc3d4220e8e38e462755a4b5558..2d1529cb5135f908b134e59006df57bcee55fb93 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmElementSet.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/25 15:46:11 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.25 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -23,6 +23,7 @@
 #include "gdcmDocEntrySet.h"
 #include <map>
 #include <iostream>
+#include <fstream>
 
 class ValEntry;
 class BinEntry;
index 2ccd0ac183d4a798164a298af7bf0be47e76c2ed..c46ddb0f91c78decda2c1e17121b5c7d911625d7 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmHeader.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/26 10:55:04 $
-  Version:   $Revision: 1.208 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.209 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -22,7 +22,7 @@
 #include "gdcmDebug.h"
 #include "gdcmTS.h"
 #include "gdcmValEntry.h"
-#include <stdio.h>
+#include <stdio.h> //sscanf
 
 #include <vector>
 
index 96ec2d3d42afa4c3b5b7ecfdeba06ecb9b6530f7..be8594980047fcd3a6bc0a3bfca7a584ce92508b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.h,v $
   Language:  C++
-  Date:      $Date: 2004/11/25 15:46:11 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2004/11/30 16:24:31 $
+  Version:   $Revision: 1.24 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -22,6 +22,7 @@
 #include "gdcmElementSet.h"
 
 #include <list>
+#include <fstream>
 
 namespace gdcm 
 {