]> Creatis software - gdcm.git/commitdiff
* Fix bug -- sorry
authorregrain <regrain>
Mon, 28 Nov 2005 15:30:03 +0000 (15:30 +0000)
committerregrain <regrain>
Mon, 28 Nov 2005 15:30:03 +0000 (15:30 +0000)
   * Imrpovement by removing the CommandManager from the DicomEntry
   -- BeNours

src/gdcmDebug.h
src/gdcmDicomEntry.h
src/gdcmDictEntry.cxx
src/gdcmPixelReadConvert.cxx

index 8fb72a087c02f03c2b32689dd4a960f2b09681ae..e0fe099281a06dbe85a88c7193721c2435809386 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDebug.h,v $
   Language:  C++
-  Date:      $Date: 2005/11/28 15:20:32 $
-  Version:   $Revision: 1.48 $
+  Date:      $Date: 2005/11/28 15:30:03 $
+  Version:   $Revision: 1.49 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -215,7 +215,7 @@ private:
    }                                                           \
 }
 #define gdcmAssertMacro(msg)                                   \
-   gdcmAssertBodyMacro(this,msg)
+   gdcmAssertBodyMacro(NULL,msg)
 #define gdcmStaticAssertMacro(msg)                             \
    gdcmAssertBodyMacro(NULL,msg)
 
index b11e8c379612ecdfddcf7eac9f42310dc37e4fc7..6f843b5868793acf3cdbab3014b468bab76a3d7e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/11/28 15:20:32 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/11/28 15:30:04 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -20,7 +20,7 @@
 #define GDCMDICOMENTRY_H
 
 #include "gdcmCommon.h"
-#include "gdcmCommandManager.h"
+#include "gdcmRefCounter.h"
 #include "gdcmVRKey.h"
 #include "gdcmTagKey.h"
 
@@ -39,7 +39,7 @@ namespace gdcm
  *  - the VM (Value Multiplicity)
  *  - the corresponding name in english
  */
-class GDCM_EXPORT DicomEntry : public CommandManager
+class GDCM_EXPORT DicomEntry : public RefCounter
 {
    gdcmTypeMacro(DicomEntry);
 
index 5e647cbcf6e9ceea6ff41b52cc787336625222a9..718bb4c1397100dce1cb66b8ef42762cfec62094 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/27 14:12:24 $
-  Version:   $Revision: 1.55 $
+  Date:      $Date: 2005/11/28 15:30:04 $
+  Version:   $Revision: 1.56 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -71,14 +71,8 @@ DictEntry *DictEntry::New(uint16_t group, uint16_t elem,
  */
 void DictEntry::SetVR(VRKey const &vr) 
 {
-   if ( IsVRUnknown() )
-   {
-      DicomEntry::SetVR(vr);
-   }
-   else 
-   {
-      gdcmErrorMacro( "Overwriting VR might compromise a dictionary");
-   }
+   gdcmAssertMacro( IsVRUnknown() );
+   DicomEntry::SetVR(vr);
 }
 
 /**
@@ -88,14 +82,8 @@ void DictEntry::SetVR(VRKey const &vr)
  */
 void DictEntry::SetVM(TagName const &vm) 
 {
-   if ( IsVMUnknown() )
-   {
-      VM = vm;
-   }
-   else 
-   {
-      gdcmErrorMacro( "Overwriting VM might compromise a dictionary");
-   }
+   gdcmAssertMacro( IsVMUnknown() );
+   VM = vm;
 }
 
 //-----------------------------------------------------------------------------
index a06da263d07d8d6af1e2088137008ce30c22a1a8..02ee4dd0d50e675ec21c75f7f80fa78b58954ad4 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmPixelReadConvert.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/28 15:20:34 $
-  Version:   $Revision: 1.103 $
+  Date:      $Date: 2005/11/28 15:30:04 $
+  Version:   $Revision: 1.104 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -831,7 +831,7 @@ void PixelReadConvert::ConvertSwapZone()
    int tempSwapCode = SwapCode;
    if ( IsPrivateGETransferSyntax )
    {
-      gdcmWarningMacro(" IsPrivateGETransferSyntax found; turn the SwapCode"); 
+      gdcmStaticWarningMacro(" IsPrivateGETransferSyntax found; turn the SwapCode"); 
       // PrivateGETransferSyntax only exists for 'true' Dicom images
       // we assume there is no 'exotic' 32 bits endianess!
       if (SwapCode == 1234)