1 /*=========================================================================
4 Module: $RCSfile: gdcmSeqEntry.h,v $
6 Date: $Date: 2005/02/11 15:22:18 $
7 Version: $Revision: 1.34 $
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.html 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
22 #include "gdcmDocEntry.h"
29 //-----------------------------------------------------------------------------
30 typedef std::list<SQItem *> ListSQItem;
32 //-----------------------------------------------------------------------------
34 * \brief a SeqEntry (as opposed to a ValEntry) is a non elementary DocEntry.
35 * It is composed by a set of SQItems.
36 * Each SQItem is composed by a set of DocEntry
37 * A DocEntry may be a SeqEntry
40 class GDCM_EXPORT SeqEntry : public DocEntry
43 SeqEntry( DictEntry *e);
44 SeqEntry( DocEntry *d, int depth );
47 void Print(std::ostream &os = std::cout, std::string const &indent = "" );
48 void WriteContent(std::ofstream *fp, FileType filetype);
50 void AddSQItem(SQItem *it, int itemNumber);
52 SQItem *GetFirstSQItem();
53 SQItem *GetNextSQItem();
54 SQItem *GetSQItem(int itemNumber);
55 unsigned int GetNumberOfSQItems();
57 /// Sets the delimitor mode
58 void SetDelimitorMode(bool dm) { DelimitorMode = dm; }
60 /// Sets the Sequence Delimitation Item
61 void SetDelimitationItem(DocEntry *e) { SeqTerm = e; }
63 /// Gets the Sequence Delimitation Item
64 DocEntry *GetDelimitationItem() { return SeqTerm;}
66 /// Gets the depth level
67 int GetDepthLevel() const { return SQDepthLevel; }
68 /// Sets the depth level of a Sequence Entry embedded in a SeQuence
69 void SetDepthLevel(int depth) { SQDepthLevel = depth; }
75 /// If this Sequence is in delimitor mode (length =0xffffffff) or not
78 /// Chained list of SQ Items
80 /// iterator on the SQItems of the current SeqEntry
81 ListSQItem::iterator ItSQItem;
83 /// sequence terminator item
86 /// \brief Defines the depth level of this \ref SeqEntry inside
87 /// the (optionaly) nested sequences. \ref SQDepthLevel
88 /// and its \ref SQItem::SQDepthLevel counterpart
89 /// are only defined on printing purposes (see \ref Print).
92 } // end namespace gdcm
93 //-----------------------------------------------------------------------------