1 /*=========================================================================
4 Module: $RCSfile: gdcmSeqEntry.h,v $
6 Date: $Date: 2004/09/16 19:21:57 $
7 Version: $Revision: 1.17 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.htm for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
19 #ifndef GDCMSQDOCENTRY_H
20 #define GDCMSQDOCENTRY_H
24 #include "gdcmSQItem.h"
25 #include "gdcmDocEntry.h"
27 //-----------------------------------------------------------------------------
28 typedef std::list<gdcmSQItem *> ListSQItem;
29 //-----------------------------------------------------------------------------
31 class GDCM_EXPORT gdcmSeqEntry : public gdcmDocEntry
34 gdcmSeqEntry( gdcmDictEntry* );
35 gdcmSeqEntry(gdcmDocEntry* d, int depth);
36 virtual ~gdcmSeqEntry();
38 virtual void Print(std::ostream &os = std::cout);
39 virtual void Write(FILE *fp, FileType);
41 /// returns the SQITEM chained List for this SeQuence.
42 ListSQItem &GetSQItems() { return items; }
44 /// Sets the delimitor mode
45 void SetDelimitorMode(bool dm) { delimitor_mode = dm;}
47 /// Sets the Sequence Delimitation Item
48 void SetSequenceDelimitationItem(gdcmDocEntry * e) { seq_term = e;}
50 void AddEntry(gdcmSQItem *it, int itemNumber);
51 gdcmSQItem *GetSQItemByOrdinalNumber(int itemNumber);
53 /// Gets the depth level
54 int GetDepthLevel() { return SQDepthLevel; }
56 /// Sets the depth level of a Sequence Entry embedded in a SeQuence
57 void SetDepthLevel(int depth) { SQDepthLevel = depth; }
63 /// If this Sequence is in delimitor mode (length =0xffffffff) or not
66 /// Chained list of SQ Items
69 /// sequence terminator item
70 gdcmDocEntry *seq_term;
72 /// \brief Defines the depth level of this \ref gdcmSeqEntry inside
73 /// the (optionaly) nested sequences. \ref SQDepthLevel
74 /// and its \ref gdcmSQItem::SQDepthLevel counterpart
75 /// are only defined on printing purposes (see \ref Print).
79 //-----------------------------------------------------------------------------