Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

gdcmDict.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmDict.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/07 09:51:03 $
00007   Version:   $Revision: 1.38 $
00008                                                                                 
00009   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
00010   l'Image). All rights reserved. See Doc/License.txt or
00011   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
00012                                                                                 
00013      This software is distributed WITHOUT ANY WARRANTY; without even
00014      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00015      PURPOSE.  See the above copyright notices for more information.
00016                                                                                 
00017 =========================================================================*/
00018 
00019 #ifndef GDCMDICT_H
00020 #define GDCMDICT_H
00021 
00022 #include "gdcmBase.h"
00023 #include "gdcmDictEntry.h"
00024 
00025 #include <iostream>
00026 #include <list>
00027 #include <map>
00028 
00029 namespace gdcm 
00030 {
00031 
00032 //-----------------------------------------------------------------------------
00033 typedef std::string DictKey;
00034 typedef std::map<TagKey, DictEntry>  TagKeyHT;
00035 //-----------------------------------------------------------------------------
00045 class GDCM_EXPORT Dict : public Base
00046 {
00047 public:
00048    Dict();
00049    Dict(std::string const &filename);
00050    ~Dict();
00051 
00052 // Print
00053    void Print(std::ostream &os = std::cout, std::string const &indent = "");
00054 
00055 // Entries
00056    bool AddEntry(DictEntry const &newEntry);
00057    bool ReplaceEntry(DictEntry const &newEntry);
00058    bool RemoveEntry (TagKey const &key);
00059    bool RemoveEntry (uint16_t group, uint16_t elem);
00060    void ClearEntry();
00061    
00062 // Tag
00063    DictEntry *GetEntry(uint16_t group, uint16_t elem);
00064 
00065    DictEntry *GetFirstEntry();
00066    DictEntry *GetNextEntry();
00067 
00068 private:
00070    std::string Filename;
00071 
00073    TagKeyHT KeyHt;
00074    TagKeyHT::iterator ItKeyHt;
00075 };
00076 } // end namespace gdcm
00077 
00078 //-----------------------------------------------------------------------------
00079 #endif

Generated on Thu Feb 10 22:17:57 2005 for gdcm by doxygen 1.3.6