]> Creatis software - gdcm.git/commitdiff
Typo + Doxygen
authorjpr <jpr>
Tue, 14 Jun 2005 14:00:03 +0000 (14:00 +0000)
committerjpr <jpr>
Tue, 14 Jun 2005 14:00:03 +0000 (14:00 +0000)
src/gdcmDictEntry.cxx
src/gdcmDictSet.cxx
src/gdcmDictSet.h
src/gdcmDocEntry.cxx

index ad21049b400fd6a77527507b4b09a86ad1ddc7bc..a56a454b93c3111c0d902e2d38eeae6c0c5dcef5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/06/07 14:50:36 $
-  Version:   $Revision: 1.48 $
+  Date:      $Date: 2005/06/14 14:00: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
@@ -22,7 +22,7 @@
 
 #include <iomanip> // for std::ios::left, ...
 #include <fstream>
-#include <stdio.h> // for sprintf, grrrr
+#include <stdio.h> // for sprintf
 
 namespace gdcm 
 {
@@ -33,8 +33,8 @@ namespace gdcm
  * @param   group      DICOM-Group Number
  * @param   elem       DICOM-Element Number
  * @param   vr         Value Representation
- * @param   vm         Value Mutlplicity 
- * @param   name      description of the element
+ * @param   vm         Value Multiplicity 
+ * @param   name       description of the element
 */
 
 DictEntry::DictEntry(uint16_t group, uint16_t elem,
index 8ec72b614d6ede6eefa1534915623f1493f6e9f9..b7c522efd8a795497c370b7b638c46540ddf016b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/04/05 10:56:25 $
-  Version:   $Revision: 1.62 $
+  Date:      $Date: 2005/06/14 14:00:04 $
+  Version:   $Revision: 1.63 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -56,7 +56,7 @@ DictSet::~DictSet()
    Dicts.clear();
 
    // Remove virtual dictionary entries
-   VirtualEntry.clear();
+   VirtualEntries.clear();
 }
 
 //-----------------------------------------------------------------------------
@@ -95,33 +95,44 @@ Dict *DictSet::GetDict(DictKey const &dictName)
 }
 
 /**
- * \brief   Create a DictEntry which will be referenced 
- *          in no dictionary
+ * \brief   Create a DictEntry which will be referenced in no dictionary
+ * @param   group   Group number of the Entry 
+ * @param   elem  Element number of the Entry
+ * @param   vr  Value Representation of the Entry
+ * @param   vm  Value Multiplicity of the Entry
+ * @param   name  English name of the Entry
  * @return  virtual entry
  */
 DictEntry *DictSet::NewVirtualDictEntry( uint16_t group,
-                                         uint16_t element,
+                                         uint16_t elem,
                                          TagName vr,
                                          TagName vm,
                                          TagName name)
 {
    DictEntry *entry;
-   const std::string tag = DictEntry::TranslateToKey(group,element)
-                           + "#" + vr + "#" + vm + "#" + name;
+
+  // Let's follow 'Purify' advice
+  //
+  // const std::string tag = DictEntry::TranslateToKey(group,elem)
+  //                         + "#" + vr + "#" + vm + "#" + name;
+   char res[10];
+   sprintf(res,"%04x|%04x", group, elem);
+   std::string tag = res;
+   tag += "#" + vr + "#" + vm + "#" + name;  
+  
    TagKeyHT::iterator it;
    
-   it = VirtualEntry.find(tag);
-   if(it != VirtualEntry.end())
+   it = VirtualEntries.find(tag);
+   if(it != VirtualEntries.end())
    {
       entry = &(it->second);
    }
    else
    {
-      DictEntry ent(group, element, vr, vm, name);
-      VirtualEntry.insert(
-         std::map<TagKey, DictEntry>::value_type
-            (tag, ent));
-      entry = &(VirtualEntry.find(tag)->second);
+      DictEntry ent(group, elem, vr, vm, name);
+      VirtualEntries.insert(
+         std::map<TagKey, DictEntry>::value_type(tag, ent) );
+      entry = &(VirtualEntries.find(tag)->second);
    }
 
    return entry;
index d92a75c5655a45a60d53b0e3d905378a2518ec0c..9b5f3ab79c34cd7de55c186648b632394993d540 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.h,v $
   Language:  C++
-  Date:      $Date: 2005/02/06 14:43:27 $
-  Version:   $Revision: 1.42 $
+  Date:      $Date: 2005/06/14 14:00:04 $
+  Version:   $Revision: 1.43 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -54,12 +54,12 @@ public:
 
    Dict *GetDict( DictKey const &DictName );
 
-   /// \brief   Retrieve the default reference DICOM V3 public dictionary.
+   /// \brief   Returns the default reference DICOM V3 public dictionary.
    Dict* GetDefaultPubDict() { return GetDict(PUB_DICT_NAME); };
 
-   // \brief   Retrieve the virtual reference DICOM dictionary.
-   // \warning : not end user intended
-   // Dict *GetVirtualDict() { return &VirtualEntry; };
+   // \ brief   Returns the virtual references DICOM dictionary.
+   // \ warning : not end user intended
+   // Dict *GetVirtualDict() { return &VirtualEntries; };
 
    DictEntry *NewVirtualDictEntry(uint16_t group, uint16_t elem,
                                   TagName vr     = GDCM_UNKNOWN,
@@ -83,7 +83,7 @@ private:
    std::string DictPath;
 
    /// H table for the on the fly created DictEntries  
-   TagKeyHT VirtualEntry
+   TagKeyHT VirtualEntries
 };
 } // end namespace gdcm
 
index 172a6a7a09c60d09c2e1ce47ea1fbcc2e6cb62cd..c1ac5508a8fc85373c22a6a4aa5fe82a3e6d6326 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/06/07 13:44:47 $
-  Version:   $Revision: 1.57 $
+  Date:      $Date: 2005/06/14 14:00:04 $
+  Version:   $Revision: 1.58 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -239,7 +239,7 @@ void DocEntry::Print(std::ostream &os, std::string const & )
       }
       else
       {
-         st = Util::Format("x(%x)",lgth);
+         st = Util::Format("x(%x)",lgth); // we may keep it
          s.setf(std::ios::left);
          s << std::setw(10-st.size()) << " ";
          s << st << " ";
@@ -247,7 +247,7 @@ void DocEntry::Print(std::ostream &os, std::string const & )
          s << std::setw(8) << lgth; 
       }
       s << " Off.: ";
-      st = Util::Format("x(%x)",o); 
+      st = Util::Format("x(%x)",o);  // we may keep it
       s << std::setw(10-st.size()) << " ";
       s << st << " ";
       s << std::setw(8) << o;