]> Creatis software - gdcm.git/commitdiff
Removal out of the Dicom Dictionary of non dicom 'fourth' field
authorjpr <jpr>
Fri, 7 Jan 2005 12:29:17 +0000 (12:29 +0000)
committerjpr <jpr>
Fri, 7 Jan 2005 12:29:17 +0000 (12:29 +0000)
Add         to the Dicom Dictionaty of Dicom 'Value Multiplicity' field

Commenting out of probabely useless methods :
  Dict::GetDictEntryNames()
  Dict::GetDictEntryNamesByCategory()
  DictSet::GetPubDictEntryNames()
  DictSet::GetPubDictEntryNamesByCategory()

src/gdcmDefaultDicts.cxx.in
src/gdcmDict.cxx
src/gdcmDictEntry.cxx
src/gdcmDictEntry.h
src/gdcmDictSet.cxx
src/gdcmDictSet.h
src/gdcmDocEntrySet.cxx
src/gdcmDocEntrySet.h

index fb0aab066747e103e1ec84efa67cdc5969d20846..6c3c53d571ca025a73f463d5630771decb7e5164 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDefaultDicts.cxx.in,v $
   Language:  C++
-  Date:      $Date: 2004/11/04 15:20:35 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -33,7 +33,7 @@ typedef struct
   uint16_t group;
   uint16_t element;
   const char *vr;
-  const char *fourth;
+  const char *vm;
   const char *name;
 } DICT_ENTRY;
 
@@ -47,7 +47,7 @@ void FillDefaultDataDict(Dict *d)
   DICT_ENTRY n = datadir[i];
   while( n.name != 0 )
     {
-    const DictEntry e( n.group, n.element, n.vr, n.fourth, n.name);
+    const DictEntry e( n.group, n.element, n.vr, n.vm, n.name);
     d->AddNewEntry( e );
     n = datadir[++i];
     }
index 722de05473ca4279e7d6344af2fe8892881ebba0..d45b0b26ae313da8efac544b4f80e79006c54326 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/07 09:03:52 $
-  Version:   $Revision: 1.55 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  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
@@ -38,7 +38,7 @@ Dict::Dict(std::string const &filename)
    uint16_t group;
    uint16_t element;
    TagName vr;
-   TagName fourth;
+   TagName vm;
    TagName name;
 
    std::ifstream from( filename.c_str() );
@@ -56,11 +56,11 @@ Dict::Dict(std::string const &filename)
          from >> group;
          from >> element;
          from >> vr;
-         from >> fourth;
+         from >> vm;
          from >> std::ws;  //remove white space
          std::getline(from, name);
    
-         const DictEntry newEntry(group, element, vr, fourth, name);
+         const DictEntry newEntry(group, element, vr, vm, name);
          AddNewEntry(newEntry);
       }
 
@@ -108,7 +108,7 @@ void Dict::PrintByKey(std::ostream &os)
       s << std::hex << std::setw(4) << tag->second.GetElement() << ") = "
         << std::dec;
       s << tag->second.GetVR() << ", ";
-      s << tag->second.GetFourth() << ", ";
+      s << tag->second.GetVM() << ", ";
       s << tag->second.GetName() << "."  << std::endl;
    }
    os << s.str();
@@ -193,12 +193,12 @@ bool Dict::RemoveEntry (uint16_t group, uint16_t elem)
 /**
  * \brief   Get the dictionnary entry identified by a given tag (group,element)
  * @param   group   group of the entry to be found
- * @param   element element of the entry to be found
+ * @param   elem element of the entry to be found
  * @return  the corresponding dictionnary entry when existing, NULL otherwise
  */
-DictEntry *Dict::GetDictEntryByNumber(uint16_t group, uint16_t element)
+DictEntry *Dict::GetDictEntryByNumber(uint16_t group, uint16_t elem)
 {
-   TagKey key = DictEntry::TranslateToKey(group, element);
+   TagKey key = DictEntry::TranslateToKey(group, elem);
    TagKeyHT::iterator it = KeyHt.find(key);
    if ( it == KeyHt.end() )
    {
@@ -213,15 +213,20 @@ DictEntry *Dict::GetDictEntryByNumber(uint16_t group, uint16_t element)
  * \sa      DictSet::GetPubDictTagNamesByCategory
  * @return  A list of all entries of the public dicom dictionnary.
  */
-EntryNamesList *Dict::GetDictEntryNames() 
-{
-   EntryNamesList *result = new EntryNamesList;
-   for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag)
-   {
-      result->push_back( tag->second.GetName() );
-   }
-   return result;
-}
+
+ // Probabely useless
+  
+//EntryNamesList *Dict::GetDictEntryNames() 
+//{
+//   EntryNamesList *result = new EntryNamesList;
+//   for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag)
+//   {
+//      result->push_back( tag->second.GetName() );
+//   }
+//   return result;
+//}
 
 /** 
  * \ingroup Dict
@@ -247,17 +252,20 @@ EntryNamesList *Dict::GetDictEntryNames()
  *          corresponding values are lists of all the dictionnary entries
  *          among that group.
  */
-EntryNamesByCatMap *Dict::GetDictEntryNamesByCategory() 
-{
-   EntryNamesByCatMap *result = new EntryNamesByCatMap;
-
-   for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag)
-   {
-      (*result)[tag->second.GetFourth()].push_back(tag->second.GetName());
-   }
-
-   return result;
-}
+ // Probabely useless
+//EntryNamesByCatMap *Dict::GetDictEntryNamesByCategory() 
+//{
+//   EntryNamesByCatMap *result = new EntryNamesByCatMap;
+//
+//   for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag)
+//   {
+//      (*result)[tag->second.GetFourth()].push_back(tag->second.GetName());
+//   }
+//
+//   return result;
+//}
 
 //-----------------------------------------------------------------------------
 // Protected
index f56e73ac86e10df893bce62a92bfe4cf9b164c4d..457c76c4fd7933fa7ed283148cb1e5ec4fcc17cf 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:27 $
-  Version:   $Revision: 1.30 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  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
@@ -29,20 +29,20 @@ namespace gdcm
  * \brief   Constructor
  * @param   group      DICOM-Group Number
  * @param   element    DICOM-Element Number
- * @param   vr         Value Representatiion
- * @param   fourth    // DO NOT use any longer; 
- *                       NOT part of the Dicom Standard
+ * @param   vr         Value Representation
+ * @param   vm         Value Mutlplicity 
  * @param   name      description of the element
 */
 
 DictEntry::DictEntry(uint16_t group, uint16_t element,
-                     TagName const &vr, TagName const &fourth,
+                     TagName const &vr, 
+                     TagName const &vm,
                      TagName const &name)
 {
    Group   = group;
    Element = element;
    VR      = vr;
-   Fourth  = fourth;
+   VM      = vm;
    Name    = name;
    Key     = TranslateToKey(group, element);
 }
index ab4b95f4827b8d96ea011eedc97e245e3e3d84e0..1d8c8a8da13f20c7809e94690adb73da46be4887 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictEntry.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:27 $
-  Version:   $Revision: 1.24 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  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
@@ -41,7 +41,7 @@ public:
    DictEntry(uint16_t group, 
              uint16_t element,
              TagName const &vr     = GDCM_UNKNOWN,
-             TagName const &fourth = GDCM_UNKNOWN,
+             TagName const &vm     = GDCM_UNKNOWN,
              TagName const &name   = GDCM_UNKNOWN);
 
    static TagKey TranslateToKey(uint16_t group, uint16_t element);
@@ -69,11 +69,9 @@ public:
    /// @param k New key to be set.
    void SetKey(TagName const &k)  { Key = k; }
  
-   /// \brief   returns the Fourth field of the current DictEntry
-   /// \warning NOT part of the Dicom Standard.
-   ///          May be REMOVED an any time. NEVER use it.
-   /// @return  The Fourth field
-   const TagName &GetFourth() const { return Fourth; } 
+   /// \brief   returns the VM field of the current DictEntry
+   /// @return  The 'Value Multiplicity' field
+   const TagName &GetVM() const { return VM; } 
 
    /// \brief  Returns the Dicom Name of the current DictEntry
    ///         e.g. "Patient Name" for Dicom Tag (0x0010, 0x0010) 
@@ -104,18 +102,9 @@ private:
    ///        "Floating Point Double" (see \ref VR)
    TagName VR;
 
-   /**
-    * \brief AVOID using the following fourth field at all costs.
-    * 
-    *  They are at least two good reasons for NOT using fourth:
-    *  - the main reason is that it is NOT part of the 'official'
-    *    Dicom Dictionnary.
-    *  - a second reason is that it is not defined for all the groups.
+   /*
     *  .
-    *  Still it provides some semantics as group name abbreviation that
-    *  can prove of some help when organizing things in an interface.
-    *  For the time being we keep it in gdcm but it migth be removed in
-    *  future releases it proves to be source of confusion.
+    *  Formerly 'Group name abbreviations'
     *  Here is a small dictionary we encountered in "nature":
     *  - CMD      Command        
     *  - META     Meta Information 
@@ -161,7 +150,8 @@ private:
     *  - LLO = Left  Lateral Oblique  
     *  .
     */
-   TagName Fourth; 
+  /// \brief Value Multiplicity (e.g. "1", "1-n", "6")
+   TagName VM; 
 
    /// e.g. "Patient's Name"                    
    TagName Name;      
index 25a848e98e14e396bd57b1fd512f83f98971091d..2e18040c03e36356c1b439421c2701ad40cd2b15 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:27 $
-  Version:   $Revision: 1.45 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  Version:   $Revision: 1.46 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -87,10 +87,13 @@ void DictSet::Print(std::ostream &os)
  * \sa DictSet::GetPubDictTagNamesByCategory
  * @return  A list of all entries of the public dicom dictionnary.
  */
-EntryNamesList *DictSet::GetPubDictEntryNames() 
-{
-   return GetDefaultPubDict()->GetDictEntryNames();
-}
+
+// Probabely useless!
+//EntryNamesList *DictSet::GetPubDictEntryNames() 
+//{
+//   return GetDefaultPubDict()->GetDictEntryNames();
+//}
 
 /** 
  * \ingroup DictSet
@@ -101,6 +104,8 @@ EntryNamesList *DictSet::GetPubDictEntryNames()
  *           values are lists of all the dictionnary entries among that
  *           group. Note that apparently the Dicom standard doesn't explicitely
  *           define a name (as a string) for each group.
+ *           NO ! Dicom Standard explicitely doesn't define 
+ *                any name, for any group !
  *          - A typical usage of this method would be to enable a dynamic
  *           configuration of a Dicom file browser: the admin/user can
  *           select in the interface which Dicom tags should be displayed.
@@ -118,10 +123,14 @@ EntryNamesList *DictSet::GetPubDictEntryNames()
  *          corresponding values are lists of all the dictionnary entries
  *          among that group.
  */
-EntryNamesByCatMap *DictSet::GetPubDictEntryNamesByCategory() 
-{
-   return GetDefaultPubDict()->GetDictEntryNamesByCategory();
-}
+
+
+// Probabely useless!
+//EntryNamesByCatMap *DictSet::GetPubDictEntryNamesByCategory() 
+//{
+//   return GetDefaultPubDict()->GetDictEntryNamesByCategory();
+//}
 
 /**
  * \ingroup DictSet
@@ -166,12 +175,12 @@ Dict *DictSet::GetDict(DictKey const &dictName)
 DictEntry *DictSet::NewVirtualDictEntry( uint16_t group,
                                          uint16_t element,
                                          TagName vr,
-                                         TagName fourth,
+                                         TagName vm,
                                          TagName name)
 {
    DictEntry *entry;
    const std::string tag = DictEntry::TranslateToKey(group,element)
-                           + "#" + vr + "#" + fourth + "#" + name;
+                           + "#" + vr + "#" + vm + "#" + name;
    TagKeyHT::iterator it;
    
    it = VirtualEntry.find(tag);
@@ -181,7 +190,7 @@ DictEntry *DictSet::NewVirtualDictEntry( uint16_t group,
    }
    else
    {
-      DictEntry ent(group, element, vr, fourth, name);
+      DictEntry ent(group, element, vr, vm, name);
       VirtualEntry.insert(
          std::map<TagKey, DictEntry>::value_type
             (tag, ent));
index abf1a0f6bb5761c83495ea9673a1e1ce94db7f48..f725074dfef78b6e9fca404588bbf0e75d3377e5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDictSet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:27 $
-  Version:   $Revision: 1.32 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  Version:   $Revision: 1.33 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -46,8 +46,9 @@ public:
 
    void Print(std::ostream &os);
 
-   EntryNamesList *GetPubDictEntryNames();
-   EntryNamesByCatMap* GetPubDictEntryNamesByCategory();
+   // Probabely useless !
+   //EntryNamesList *GetPubDictEntryNames();
+   //EntryNamesByCatMap* GetPubDictEntryNamesByCategory();
 
    Dict *LoadDictFromFile( std::string const &fileName,
                            DictKey const &name );
@@ -63,7 +64,7 @@ public:
 
    DictEntry *NewVirtualDictEntry(uint16_t group, uint16_t element,
                                   TagName vr     = GDCM_UNKNOWN,
-                                  TagName fourth = GDCM_UNKNOWN,
+                                  TagName vm     = GDCM_UNKNOWN,
                                   TagName name   = GDCM_UNKNOWN);
 
    static std::string BuildDictPath();
index 395491db1d25639679191c9f983486a8c8736452..0c751dd2db03b14362b958ba392a663cd77799b3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/07 08:50:13 $
-  Version:   $Revision: 1.33 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  Version:   $Revision: 1.34 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -38,18 +38,18 @@ namespace gdcm
 
 /**
  * \brief   Request a new virtual dict entry to the dict set
- * @param   group     group  number of the underlying DictEntry
+ * @param   group group  number of the underlying DictEntry
  * @param   elem  element number of the underlying DictEntry
- * @param   vr     VR of the underlying DictEntry
- * @param   fourth owner group
+ * @param   vr    VR (Value Representation) of the underlying DictEntry
+ * @param   vm    VM (Value Multiplicity) of the underlying DictEntry
  * @param   name   english name
  */
 DictEntry* DocEntrySet::NewVirtualDictEntry( uint16_t group,uint16_t elem,
                                              TagName const & vr,
-                                             TagName const & fourth,
+                                             TagName const & vm,
                                              TagName const & name )
 {
-   return Global::GetDicts()->NewVirtualDictEntry(group,elem,vr,fourth,name);
+   return Global::GetDicts()->NewVirtualDictEntry(group,elem,vr,vm,name);
 }
 
 //-----------------------------------------------------------------------------
index 173d514d10954e74f7bc1117585e7ba576d7297b..108eec2e438299a85e0481afe32ba5cfc48c4e38 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.h,v $
   Language:  C++
-  Date:      $Date: 2005/01/07 08:50:13 $
-  Version:   $Revision: 1.34 $
+  Date:      $Date: 2005/01/07 12:29:17 $
+  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
@@ -77,7 +77,7 @@ public:
    DictEntry *NewVirtualDictEntry(uint16_t group, 
                                   uint16_t element,
                                   TagName const &vr     = GDCM_UNKNOWN,
-                                  TagName const &fourth = GDCM_UNKNOWN,
+                                  TagName const &vm     = GDCM_UNKNOWN,
                                   TagName const &name   = GDCM_UNKNOWN );
   
 protected: