]> Creatis software - gdcm.git/commitdiff
ENH: A TagKey is a TagKey and not a string or TagName...
authormalaterre <malaterre>
Mon, 11 Jul 2005 14:40:40 +0000 (14:40 +0000)
committermalaterre <malaterre>
Mon, 11 Jul 2005 14:40:40 +0000 (14:40 +0000)
src/gdcmDicomDirElement.cxx
src/gdcmDictEntry.h
src/gdcmDocEntry.h
src/gdcmDocEntryArchive.cxx
src/gdcmDocEntrySet.h

index 0545ddf3a6054f7d0ac492ae908cdba9151ff9e8..1757284f4494594566d236ee07bb30fd6796f8ff 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirElement.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/06/24 10:55:58 $
-  Version:   $Revision: 1.38 $
+  Date:      $Date: 2005/07/11 14:40:40 $
+  Version:   $Revision: 1.39 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -173,7 +173,7 @@ void DicomDirElement::Print(std::ostream &os)
    std::ostringstream s;
    std::list<Element>::iterator it;
    //char greltag[10];  //group element tag
-   std::string greltag;
+   TagKey greltag;
 
    s << "Meta Elements :"<<std::endl;
    for (it = DicomDirMetaList.begin(); it != DicomDirMetaList.end(); ++it)
index a9129754b38380fc46df9f6b7a2dbcae250aba83..780c7afd6b2f64977cc800df6124f4b53f176fbe 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/02 15:07:41 $
-  Version:   $Revision: 1.34 $
+  Date:      $Date: 2005/07/11 14:40:40 $
+  Version:   $Revision: 1.35 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -75,7 +75,7 @@ public:
  
    /// \brief   sets the key of the current DictEntry
    /// @param k New key to be set.
-   void SetKey(TagName const &k)  { Key = k; }
+   void SetKey(TagKey const &k)  { Key = k; }
  
    /// \brief   returns the VM field of the current DictEntry
    /// @return  The 'Value Multiplicity' field
@@ -88,7 +88,7 @@ public:
  
    /// \brief  Gets the key of the current DictEntry
    /// @return the key.
-   const TagName &GetKey() const { return Key; }
+   const TagKey &GetKey() const { return Key; }
 
 // Key creation
    static TagKey TranslateToKey(uint16_t group, uint16_t elem);
index 7571fd72260b497136e8a3ec4ea14b56dd9f58ef..724c9b83465b4adb3531656df504ae3dd631be11 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/04 14:49:01 $
-  Version:   $Revision: 1.46 $
+  Date:      $Date: 2005/07/11 14:40:40 $
+  Version:   $Revision: 1.47 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -59,8 +59,9 @@ public:
 
    /// Set the 'key' of the current Dicom entry
    void  SetKey( TagKey const &key ) { Key = key; }
+
    /// Returns the 'key' of the current Dicom entry
-   std::string const &GetKey() const { return Key; }
+   TagKey const &GetKey() const { return Key; }
 
    /// \brief Returns the 'Name' '(e.g. "Patient's Name") found in the Dicom
    /// Dictionnary of the current Dicom Header Entry
index 913c31008f6a3ebfc85e1155165ef78a2e80cf63..0e9b2d5366c51b29dcfb816edc2581f824ed8bb3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntryArchive.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/06/24 10:55:59 $
-  Version:   $Revision: 1.15 $
+  Date:      $Date: 2005/07/11 14:40:40 $
+  Version:   $Revision: 1.16 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -58,9 +58,9 @@ bool DocEntryArchive::Push(DocEntry *newEntry)
 
    uint16_t group = newEntry->GetDictEntry()->GetGroup();
    uint16_t elem  = newEntry->GetDictEntry()->GetElement();
-   std::string key = DictEntry::TranslateToKey(group,elem);
+   TagKey key = DictEntry::TranslateToKey(group,elem);
 
-   if ( Archive.find(key)==Archive.end() )
+   if ( Archive.find(key) == Archive.end() )
    {
       // Save the old DocEntry if any
       DocEntry *old = ArchFile->GetDocEntry(group, elem);
@@ -86,7 +86,7 @@ bool DocEntryArchive::Push(DocEntry *newEntry)
  */
 bool DocEntryArchive::Push(uint16_t group, uint16_t elem)
 {
-   std::string key = DictEntry::TranslateToKey(group, elem);
+   TagKey key = DictEntry::TranslateToKey(group, elem);
 
    if ( Archive.find(key)==Archive.end() )
    {
@@ -111,7 +111,7 @@ bool DocEntryArchive::Push(uint16_t group, uint16_t elem)
  */
 bool DocEntryArchive::Restore(uint16_t group, uint16_t elem)
 {
-   std::string key=DictEntry::TranslateToKey(group, elem);
+   TagKey key=DictEntry::TranslateToKey(group, elem);
 
    TagDocEntryHT::iterator restoreIt=Archive.find(key);
    if ( restoreIt!=Archive.end() )
index 4a498133ad1261a1d3d958fbbb006f90a5f1c215..a9a5b0c565588407d7d06445e6a823b683508fdc 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/07/11 12:52:51 $
-  Version:   $Revision: 1.52 $
+  Date:      $Date: 2005/07/11 14:40:40 $
+  Version:   $Revision: 1.53 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -31,7 +31,7 @@ class BinEntry;
 class SeqEntry;
 class DictEntry;
 
-typedef std::string BaseTagKey;
+typedef TagKey BaseTagKey;
 
 //-----------------------------------------------------------------------------
 /**