]> Creatis software - gdcm.git/commitdiff
* src/gdcmDebug.h : remove the Debug test in the gdcmErrorMacro
authorregrain <regrain>
Thu, 20 Jan 2005 11:07:06 +0000 (11:07 +0000)
committerregrain <regrain>
Thu, 20 Jan 2005 11:07:06 +0000 (11:07 +0000)
   * src/gdcmDocument.[h|cxx] : rename the Initialise method to Initialize, to
     be complient with all the gdcm source code
   -- BeNours

ChangeLog
src/gdcmDebug.h
src/gdcmDocument.cxx
src/gdcmDocument.h

index 738e5e68aab339f9e29e2c3be8a47c3f5481b42d..a0ac327ecb4ffd32510e8fbe463de0ed492493be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
+2005-01-20 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+   * src/gdcmDebug.h : remove the Debug test in the gdcmErrorMacro
+   * src/gdcmDocument.[h|cxx] : rename the Initialise method to Initialize, to
+     be complient with all the gdcm source code
+
 2005-01-19 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
-   * src/gdcmDocEntry.h : DocEntry is now secure. User can't change the 
+   * src/gdcmDocEntry.h : DocEntry is now secure. User can't change the
      DictEntry or the VR.
 
 2005-01-19 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
index c135290d7f4bb347717b4b30e7f3b6b7abf3fd0d..422f0789cb11d939c6aa0517060a6c48222473cf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/13 22:39:15 $
-  Version:   $Revision: 1.23 $
+  Date:      $Date: 2005/01/20 11:07:07 $
+  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
@@ -121,7 +121,9 @@ public:
  * @param msg message part
  */
 #ifdef NDEBUG
-#define gdcmVerboseMacro(msg)
+#define gdcmVerboseMacro(msg)                               \
+{                                                           \
+}
 #else
 #define gdcmVerboseMacro(msg)                               \
 {                                                           \
@@ -148,8 +150,6 @@ public:
 #else
 #define gdcmErrorMacro(msg)                                 \
 {                                                           \
-   if( Debug::GetDebugFlag() )                              \
-   {                                                        \
    std::ostringstream osmacro;                              \
    osmacro << "Error: In " __FILE__ ", line " << __LINE__   \
            << ", function " << GDCM_FUNCTION << '\n'        \
@@ -158,8 +158,6 @@ public:
       Debug::GetDebugFile() << osmacro.str() << std::endl;  \
    else                                                     \
       std::cerr << osmacro.str() << std::endl;              \
-   exit(1);                                                 \
-   }                                                        \
 }
 #endif //NDEBUG
 
index 6715afc1c8ccce8c45c0053e6cc8a5170b7334df..6e3d862b03ade9e44e2ea34db24dc338eaeedaea 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/19 15:58:00 $
-  Version:   $Revision: 1.200 $
+  Date:      $Date: 2005/01/20 11:07:07 $
+  Version:   $Revision: 1.201 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -63,9 +63,12 @@ const unsigned int Document::MAX_SIZE_PRINT_ELEMENT_VALUE = 0x7fffffff;
  */
 Document::Document( std::string const &filename ) : ElementSet(-1)
 {
+   RLEInfo = NULL;
+   JPEGInfo = NULL;
+
    SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE); 
    Filename = filename;
-   Initialise();
+   Initialize();
 
    Fp = 0;
    if ( !OpenFile() )
@@ -159,10 +162,13 @@ Document::Document( std::string const &filename ) : ElementSet(-1)
  */
 Document::Document() : ElementSet(-1)
 {
+   RLEInfo = NULL;
+   JPEGInfo = NULL;
+
    Fp = 0;
 
    SetMaxSizeLoadEntry(MAX_SIZE_LOAD_ELEMENT_VALUE);
-   Initialise();
+   Initialize();
    SwapCode = 1234;
    Filetype = ExplicitVR;
    Group0002Parsed = false;
@@ -176,8 +182,10 @@ Document::~Document ()
    RefPubDict = NULL;
    RefShaDict = NULL;
 
-   delete RLEInfo;
-   delete JPEGInfo;
+   if( RLEInfo )
+      delete RLEInfo;
+   if( JPEGInfo )
+      delete JPEGInfo;
 }
 
 //-----------------------------------------------------------------------------
@@ -2119,7 +2127,7 @@ void Document::SkipBytes(uint32_t nBytes)
  * \brief Loads all the needed Dictionaries
  * \warning NOT end user intended method !   
  */
-void Document::Initialise() 
+void Document::Initialize() 
 {
    RefPubDict = Global::GetDicts()->GetDefaultPubDict();
    RefShaDict = NULL;
index dc6ff34ce5caa9ce38296ece7e80e97cee0055bc..d5ae4e04e80efc54e2521ed2737c21f17a831d1e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/19 08:57:14 $
-  Version:   $Revision: 1.92 $
+  Date:      $Date: 2005/01/20 11:07:07 $
+  Version:   $Revision: 1.93 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -219,7 +219,7 @@ private:
    bool     ReadTag(uint16_t, uint16_t);
    uint32_t ReadTagLength(uint16_t, uint16_t);
 
-   void Initialise();
+   void Initialize();
    bool CheckSwap();
    void SwitchByteSwapCode();
    void SetMaxSizeLoadEntry(long);