gdcmSeqEntry.h

Go to the documentation of this file.
00001 /*=========================================================================
00002                                                                                 
00003   Program:   gdcm
00004   Module:    $RCSfile: gdcmSeqEntry.h,v $
00005   Language:  C++
00006   Date:      $Date: 2007/08/22 16:14:04 $
00007   Version:   $Revision: 1.45 $
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 _GDCMSQDOCENTRY_H_
00020 #define _GDCMSQDOCENTRY_H_
00021 
00022 #include "gdcmDocEntry.h"
00023 
00024 #include <list>
00025 
00026 namespace GDCM_NAME_SPACE 
00027 {
00028 class SQItem;
00029 //-----------------------------------------------------------------------------
00030 typedef std::list<SQItem *> ListSQItem;
00031 
00032 //-----------------------------------------------------------------------------
00040 class GDCM_EXPORT SeqEntry : public DocEntry 
00041 {
00042    gdcmTypeMacro(SeqEntry);
00043 
00044 public:
00046    //static SeqEntry *New(DictEntry *e) {return new SeqEntry(e);}
00048    static SeqEntry *New(DocEntry *d, int depth) {return new SeqEntry(d,depth);}
00050    static SeqEntry *New(uint16_t group,uint16_t elem/*, VRKey const &vr = GDCM_VRUNKNOWN*/) 
00051                            {return new SeqEntry(group,elem);}
00052    
00053    void Print(std::ostream &os = std::cout, std::string const &indent = "" ); 
00054    void WriteContent(std::ofstream *fp, FileType filetype, bool insideMetaElements);
00055    uint32_t ComputeFullLength();
00056 
00057    void AddSQItem(SQItem *it, int itemNumber);
00058    void ClearSQItem();
00059    SQItem *GetFirstSQItem();
00060    SQItem *GetNextSQItem();
00061    SQItem *GetSQItem(int itemNumber);
00062    unsigned int GetNumberOfSQItems();
00063       
00065    void SetDelimitorMode(bool dm) { DelimitorMode = dm; }
00067    void SetDelimitationItem(DocEntry *e);
00068 
00070    DocEntry *GetDelimitationItem() { return SeqTerm;}
00071 
00073    int GetDepthLevel() const { return SQDepthLevel; }
00075    void SetDepthLevel(int depth) { SQDepthLevel = depth; }
00076 
00077    virtual void Copy(DocEntry *doc);
00078 
00079 protected:
00080 
00081 private:
00082    //SeqEntry( DictEntry *e);
00083    SeqEntry( DocEntry *d, int depth );
00084    SeqEntry( uint16_t group, uint16_t elem );
00085    ~SeqEntry();
00086 
00087 // Variables
00089    bool DelimitorMode;
00090    
00092    ListSQItem Items;
00094    ListSQItem::iterator ItSQItem;
00095 
00097    DocEntry *SeqTerm;
00098 
00103    int SQDepthLevel;
00104 };
00105 } // end namespace gdcm
00106 //-----------------------------------------------------------------------------
00107 #endif
00108 

Generated on Fri Aug 24 12:59:31 2007 for gdcm by  doxygen 1.4.6