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

gdcmElementSet.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmElementSet.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/02/07 08:48:18 $
00007   Version:   $Revision: 1.43 $
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 GDCMELEMENTSET_H
00020 #define GDCMELEMENTSET_H
00021 
00022 #include "gdcmDocEntrySet.h"
00023 
00024 #include <map>
00025 #include <iostream>
00026 #include <fstream>
00027 
00028 namespace gdcm 
00029 {
00030 class ValEntry;
00031 class BinEntry;
00032 class SeqEntry;
00033 
00034 typedef std::map<TagKey, DocEntry *> TagDocEntryHT;
00035 
00036 //-----------------------------------------------------------------------------
00044 class GDCM_EXPORT ElementSet : public DocEntrySet
00045 {
00046 public:
00047    ElementSet(int);
00048    ~ElementSet();
00049 
00050    virtual void Print(std::ostream &os = std::cout, std::string const &indent = "" ); 
00051 
00052    void WriteContent(std::ofstream *fp, FileType filetype); 
00053 
00054    bool AddEntry(DocEntry *Entry);
00055    bool RemoveEntry(DocEntry *EntryToRemove);
00056    bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
00057    void ClearEntry();
00058    
00059    DocEntry *GetFirstEntry();
00060    DocEntry *GetNextEntry();
00061    DocEntry *GetDocEntry(uint16_t group, uint16_t elem);
00063    bool IsEmpty() { return TagHT.empty(); };
00064 
00065 protected:
00066 
00067 private:
00068 // Variables
00070    TagDocEntryHT TagHT;
00072    TagDocEntryHT::iterator ItTagHT;
00074    TagDocEntryHT::iterator ItValEntryTagHT;
00075 };
00076 } // end namespace gdcm
00077 //-----------------------------------------------------------------------------
00078 #endif
00079 

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